Skip to content

Commit

Permalink
Accept strings in AbstractPlatform::get*Expression() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Dec 19, 2021
1 parent decf34a commit 56d5e3a
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions src/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,8 @@ public function getSqrtExpression($column)
*
* @deprecated Use ROUND() in SQL instead.
*
* @param string $column
* @param int $decimals
* @param string $column
* @param string|int $decimals
*
* @return string
*/
Expand Down Expand Up @@ -856,7 +856,7 @@ public function getModExpression($expression1, $expression2)
* Returns the SQL snippet to trim a string.
*
* @param string $str The expression to apply the trim to.
* @param int $mode The position of the trim (leading/trailing/both).
* @param string|int $mode The position of the trim (leading/trailing/both).
* @param string|bool $char The char to trim, has to be quoted already. Defaults to space.
*
* @return string
Expand Down Expand Up @@ -975,9 +975,9 @@ public function getLowerExpression($str)
/**
* Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.
*
* @param string $str Literal string.
* @param string $substr Literal string to find.
* @param int|false $startPos Position to start at, beginning of string by default.
* @param string $str Literal string.
* @param string $substr Literal string to find.
* @param string|int|false $startPos Position to start at, beginning of string by default.
*
* @return string
*
Expand Down Expand Up @@ -1013,9 +1013,9 @@ public function getNowExpression()
*
* SQLite only supports the 2 parameter variant of this function.
*
* @param string $string An sql string literal or column name/alias.
* @param int $start Where to start the substring portion.
* @param int|null $length The substring portion length.
* @param string $string An sql string literal or column name/alias.
* @param string|int $start Where to start the substring portion.
* @param string|int|null $length The substring portion length.
*
* @return string
*/
Expand Down Expand Up @@ -1234,8 +1234,8 @@ public function getDateDiffExpression($date1, $date2)
/**
* Returns the SQL to add the number of given seconds to a date.
*
* @param string $date
* @param int $seconds
* @param string $date
* @param string|int $seconds
*
* @return string
*
Expand All @@ -1249,8 +1249,8 @@ public function getDateAddSecondsExpression($date, $seconds)
/**
* Returns the SQL to subtract the number of given seconds from a date.
*
* @param string $date
* @param int $seconds
* @param string $date
* @param string|int $seconds
*
* @return string
*
Expand All @@ -1264,8 +1264,8 @@ public function getDateSubSecondsExpression($date, $seconds)
/**
* Returns the SQL to add the number of given minutes to a date.
*
* @param string $date
* @param int $minutes
* @param string $date
* @param string|int $minutes
*
* @return string
*
Expand All @@ -1279,8 +1279,8 @@ public function getDateAddMinutesExpression($date, $minutes)
/**
* Returns the SQL to subtract the number of given minutes from a date.
*
* @param string $date
* @param int $minutes
* @param string $date
* @param string|int $minutes
*
* @return string
*
Expand All @@ -1294,8 +1294,8 @@ public function getDateSubMinutesExpression($date, $minutes)
/**
* Returns the SQL to add the number of given hours to a date.
*
* @param string $date
* @param int $hours
* @param string $date
* @param string|int $hours
*
* @return string
*
Expand All @@ -1309,8 +1309,8 @@ public function getDateAddHourExpression($date, $hours)
/**
* Returns the SQL to subtract the number of given hours to a date.
*
* @param string $date
* @param int $hours
* @param string $date
* @param string|int $hours
*
* @return string
*
Expand All @@ -1324,8 +1324,8 @@ public function getDateSubHourExpression($date, $hours)
/**
* Returns the SQL to add the number of given days to a date.
*
* @param string $date
* @param int $days
* @param string $date
* @param string|int $days
*
* @return string
*
Expand All @@ -1339,8 +1339,8 @@ public function getDateAddDaysExpression($date, $days)
/**
* Returns the SQL to subtract the number of given days to a date.
*
* @param string $date
* @param int $days
* @param string $date
* @param string|int $days
*
* @return string
*
Expand All @@ -1354,8 +1354,8 @@ public function getDateSubDaysExpression($date, $days)
/**
* Returns the SQL to add the number of given weeks to a date.
*
* @param string $date
* @param int $weeks
* @param string $date
* @param string|int $weeks
*
* @return string
*
Expand All @@ -1369,8 +1369,8 @@ public function getDateAddWeeksExpression($date, $weeks)
/**
* Returns the SQL to subtract the number of given weeks from a date.
*
* @param string $date
* @param int $weeks
* @param string $date
* @param string|int $weeks
*
* @return string
*
Expand All @@ -1384,8 +1384,8 @@ public function getDateSubWeeksExpression($date, $weeks)
/**
* Returns the SQL to add the number of given months to a date.
*
* @param string $date
* @param int $months
* @param string $date
* @param string|int $months
*
* @return string
*
Expand All @@ -1399,8 +1399,8 @@ public function getDateAddMonthExpression($date, $months)
/**
* Returns the SQL to subtract the number of given months to a date.
*
* @param string $date
* @param int $months
* @param string $date
* @param string|int $months
*
* @return string
*
Expand All @@ -1414,8 +1414,8 @@ public function getDateSubMonthExpression($date, $months)
/**
* Returns the SQL to add the number of given quarters to a date.
*
* @param string $date
* @param int $quarters
* @param string $date
* @param string|int $quarters
*
* @return string
*
Expand All @@ -1429,8 +1429,8 @@ public function getDateAddQuartersExpression($date, $quarters)
/**
* Returns the SQL to subtract the number of given quarters from a date.
*
* @param string $date
* @param int $quarters
* @param string $date
* @param string|int $quarters
*
* @return string
*
Expand All @@ -1444,8 +1444,8 @@ public function getDateSubQuartersExpression($date, $quarters)
/**
* Returns the SQL to add the number of given years to a date.
*
* @param string $date
* @param int $years
* @param string $date
* @param string|int $years
*
* @return string
*
Expand All @@ -1459,8 +1459,8 @@ public function getDateAddYearsExpression($date, $years)
/**
* Returns the SQL to subtract the number of given years from a date.
*
* @param string $date
* @param int $years
* @param string $date
* @param string|int $years
*
* @return string
*
Expand All @@ -1474,11 +1474,11 @@ public function getDateSubYearsExpression($date, $years)
/**
* Returns the SQL for a date arithmetic expression.
*
* @param string $date The column or literal representing a date to perform the arithmetic operation on.
* @param string $operator The arithmetic operator (+ or -).
* @param int $interval The interval that shall be calculated into the date.
* @param string $unit The unit of the interval that shall be calculated into the date.
* One of the DATE_INTERVAL_UNIT_* constants.
* @param string $date The column or literal representing a date to perform the arithmetic operation on.
* @param string $operator The arithmetic operator (+ or -).
* @param string|int $interval The interval that shall be calculated into the date.
* @param string $unit The unit of the interval that shall be calculated into the date.
* One of the DATE_INTERVAL_UNIT_* constants.
*
* @return string
*
Expand Down

0 comments on commit 56d5e3a

Please sign in to comment.