diff --git a/src/Query/Mysql/Acos.php b/src/Query/Mysql/Acos.php index 8ffc6ae8..4e2f71b6 100644 --- a/src/Query/Mysql/Acos.php +++ b/src/Query/Mysql/Acos.php @@ -9,14 +9,14 @@ class Acos extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'ACOS(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/AddTime.php b/src/Query/Mysql/AddTime.php index c0fb6aee..30a16cb0 100644 --- a/src/Query/Mysql/AddTime.php +++ b/src/Query/Mysql/AddTime.php @@ -14,12 +14,12 @@ class AddTime extends FunctionNode public $time; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'ADDTIME(' . $sqlWalker->walkArithmeticPrimary($this->date) . ', ' . $sqlWalker->walkArithmeticPrimary($this->time) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/AesDecrypt.php b/src/Query/Mysql/AesDecrypt.php index 056c8de9..0c52242e 100644 --- a/src/Query/Mysql/AesDecrypt.php +++ b/src/Query/Mysql/AesDecrypt.php @@ -11,7 +11,7 @@ class AesDecrypt extends FunctionNode public $key = ''; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'AES_DECRYPT(%s, %s)', diff --git a/src/Query/Mysql/AesEncrypt.php b/src/Query/Mysql/AesEncrypt.php index 779f5e36..804a627d 100644 --- a/src/Query/Mysql/AesEncrypt.php +++ b/src/Query/Mysql/AesEncrypt.php @@ -11,7 +11,7 @@ class AesEncrypt extends FunctionNode public $key = ''; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'AES_ENCRYPT(%s, %s)', diff --git a/src/Query/Mysql/AnyValue.php b/src/Query/Mysql/AnyValue.php index b94fdd40..c7db908f 100644 --- a/src/Query/Mysql/AnyValue.php +++ b/src/Query/Mysql/AnyValue.php @@ -9,7 +9,7 @@ class AnyValue extends FunctionNode { public $value; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -17,7 +17,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'ANY_VALUE(%s)', diff --git a/src/Query/Mysql/Ascii.php b/src/Query/Mysql/Ascii.php index b3450a32..28893478 100644 --- a/src/Query/Mysql/Ascii.php +++ b/src/Query/Mysql/Ascii.php @@ -9,12 +9,12 @@ class Ascii extends FunctionNode { private $string; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'ASCII('.$sqlWalker->walkArithmeticPrimary($this->string).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Asin.php b/src/Query/Mysql/Asin.php index a398c86c..c2d29684 100644 --- a/src/Query/Mysql/Asin.php +++ b/src/Query/Mysql/Asin.php @@ -9,14 +9,14 @@ class Asin extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'ASIN(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Atan.php b/src/Query/Mysql/Atan.php index 64fe1b32..866e3737 100644 --- a/src/Query/Mysql/Atan.php +++ b/src/Query/Mysql/Atan.php @@ -12,7 +12,7 @@ class Atan extends FunctionNode public $optionalSecondExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $secondArgument = ''; @@ -28,7 +28,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Atan2.php b/src/Query/Mysql/Atan2.php index 9b934b23..70b2de98 100644 --- a/src/Query/Mysql/Atan2.php +++ b/src/Query/Mysql/Atan2.php @@ -11,7 +11,7 @@ class Atan2 extends FunctionNode public $secondExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $firstArgument = $sqlWalker->walkSimpleArithmeticExpression( $this->firstExpression @@ -24,7 +24,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) return 'ATAN2(' . $firstArgument . ', ' . $secondArgument . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Binary.php b/src/Query/Mysql/Binary.php index 56645e90..23bdfc47 100644 --- a/src/Query/Mysql/Binary.php +++ b/src/Query/Mysql/Binary.php @@ -12,7 +12,7 @@ class Binary extends FunctionNode { private $stringPrimary; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -22,7 +22,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'BINARY('.$sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary).')'; } diff --git a/src/Query/Mysql/BitCount.php b/src/Query/Mysql/BitCount.php index 03b09706..9042b810 100644 --- a/src/Query/Mysql/BitCount.php +++ b/src/Query/Mysql/BitCount.php @@ -9,7 +9,7 @@ class BitCount extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'BIT_COUNT(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/BitXor.php b/src/Query/Mysql/BitXor.php index cd3621be..211b5e32 100644 --- a/src/Query/Mysql/BitXor.php +++ b/src/Query/Mysql/BitXor.php @@ -14,14 +14,14 @@ class BitXor extends FunctionNode public $secondArithmetic; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return $this->firstArithmetic->dispatch($sqlWalker) . ' ^ ' . $this->secondArithmetic->dispatch($sqlWalker); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Cast.php b/src/Query/Mysql/Cast.php index 57986323..5f44b7df 100644 --- a/src/Query/Mysql/Cast.php +++ b/src/Query/Mysql/Cast.php @@ -30,7 +30,7 @@ class Cast extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -70,7 +70,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( 'CAST(%s AS %s)', diff --git a/src/Query/Mysql/Ceil.php b/src/Query/Mysql/Ceil.php index 5bfb1dbc..a7cf1cf8 100644 --- a/src/Query/Mysql/Ceil.php +++ b/src/Query/Mysql/Ceil.php @@ -9,12 +9,12 @@ class Ceil extends FunctionNode { private $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'CEIL(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/CharLength.php b/src/Query/Mysql/CharLength.php index 422b600f..cdc3c0a8 100644 --- a/src/Query/Mysql/CharLength.php +++ b/src/Query/Mysql/CharLength.php @@ -12,12 +12,12 @@ class CharLength extends FunctionNode { private $expr; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'CHAR_LENGTH('.$sqlWalker->walkArithmeticPrimary($this->expr1).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Collate.php b/src/Query/Mysql/Collate.php index f6aa4236..311e1a7b 100644 --- a/src/Query/Mysql/Collate.php +++ b/src/Query/Mysql/Collate.php @@ -24,7 +24,7 @@ class Collate extends FunctionNode /** * @param \Doctrine\ORM\Query\Parser $parser */ - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -45,7 +45,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker * @return string */ - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf('%s COLLATE %s', $sqlWalker->walkStringPrimary($this->stringPrimary), $this->collation); } diff --git a/src/Query/Mysql/ConcatWs.php b/src/Query/Mysql/ConcatWs.php index 1b268d6a..68a8a6d3 100644 --- a/src/Query/Mysql/ConcatWs.php +++ b/src/Query/Mysql/ConcatWs.php @@ -14,7 +14,7 @@ class ConcatWs extends FunctionNode private $notEmpty = false; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -53,7 +53,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { // Create an array to hold the query elements. $queryBuilder = ['CONCAT_WS(']; diff --git a/src/Query/Mysql/ConvertTz.php b/src/Query/Mysql/ConvertTz.php index 0c302ddd..732505eb 100644 --- a/src/Query/Mysql/ConvertTz.php +++ b/src/Query/Mysql/ConvertTz.php @@ -21,7 +21,7 @@ class ConvertTz extends FunctionNode /** * @inheritdoc */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( 'CONVERT_TZ(%s, %s, %s)', @@ -34,7 +34,7 @@ public function getSql(SqlWalker $sqlWalker) /** * @inheritdoc */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Cos.php b/src/Query/Mysql/Cos.php index c6577192..47ef44c9 100644 --- a/src/Query/Mysql/Cos.php +++ b/src/Query/Mysql/Cos.php @@ -9,14 +9,14 @@ class Cos extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'COS(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Cot.php b/src/Query/Mysql/Cot.php index 1bb48340..cf597205 100644 --- a/src/Query/Mysql/Cot.php +++ b/src/Query/Mysql/Cot.php @@ -9,14 +9,14 @@ class Cot extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'COT(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/CountIf.php b/src/Query/Mysql/CountIf.php index 599d7516..694b7006 100644 --- a/src/Query/Mysql/CountIf.php +++ b/src/Query/Mysql/CountIf.php @@ -16,7 +16,7 @@ class CountIf extends FunctionNode private $inverse = false; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -43,7 +43,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'COUNT(CASE %s WHEN %s THEN %s END)', diff --git a/src/Query/Mysql/Crc32.php b/src/Query/Mysql/Crc32.php index c1a7c01b..9172c06e 100644 --- a/src/Query/Mysql/Crc32.php +++ b/src/Query/Mysql/Crc32.php @@ -12,14 +12,14 @@ class Crc32 extends FunctionNode { public $stringPrimary; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'CRC32(' . $sqlWalker->walkStringPrimary($this->stringPrimary) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Date.php b/src/Query/Mysql/Date.php index cfb042f4..d65deee9 100644 --- a/src/Query/Mysql/Date.php +++ b/src/Query/Mysql/Date.php @@ -12,12 +12,12 @@ class Date extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DATE(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/DateAdd.php b/src/Query/Mysql/DateAdd.php index 2c50d99e..6280e9f9 100644 --- a/src/Query/Mysql/DateAdd.php +++ b/src/Query/Mysql/DateAdd.php @@ -37,7 +37,7 @@ class DateAdd extends FunctionNode 'YEAR_MONTH', ]; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -53,7 +53,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $unit = strtoupper(is_string($this->unit) ? $this->unit : $this->unit->value); diff --git a/src/Query/Mysql/DateDiff.php b/src/Query/Mysql/DateDiff.php index a0952094..d66ca8a7 100644 --- a/src/Query/Mysql/DateDiff.php +++ b/src/Query/Mysql/DateDiff.php @@ -11,7 +11,7 @@ class DateDiff extends FunctionNode public $secondDateExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DATEDIFF(' . $sqlWalker->walkArithmeticTerm($this->firstDateExpression) . ', ' . diff --git a/src/Query/Mysql/DateFormat.php b/src/Query/Mysql/DateFormat.php index bd7a7e74..28770a6e 100644 --- a/src/Query/Mysql/DateFormat.php +++ b/src/Query/Mysql/DateFormat.php @@ -14,7 +14,7 @@ class DateFormat extends FunctionNode public $patternExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DATE_FORMAT(' . $this->dateExpression->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/DateSub.php b/src/Query/Mysql/DateSub.php index b1c94d79..5f66e7fa 100644 --- a/src/Query/Mysql/DateSub.php +++ b/src/Query/Mysql/DateSub.php @@ -14,7 +14,7 @@ class DateSub extends DateAdd * @throws QueryException * @return string */ - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $unit = strtoupper(is_string($this->unit) ? $this->unit : $this->unit->value); diff --git a/src/Query/Mysql/Day.php b/src/Query/Mysql/Day.php index 49b2b0c3..36954cb9 100644 --- a/src/Query/Mysql/Day.php +++ b/src/Query/Mysql/Day.php @@ -13,12 +13,12 @@ class Day extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DAY(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/DayName.php b/src/Query/Mysql/DayName.php index 59552c46..70c14352 100644 --- a/src/Query/Mysql/DayName.php +++ b/src/Query/Mysql/DayName.php @@ -12,12 +12,12 @@ class DayName extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DAYNAME(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/DayOfWeek.php b/src/Query/Mysql/DayOfWeek.php index 6bb91d1a..68cf981f 100644 --- a/src/Query/Mysql/DayOfWeek.php +++ b/src/Query/Mysql/DayOfWeek.php @@ -8,19 +8,19 @@ class DayOfWeek extends FunctionNode { public $date; - - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DAYOFWEEK(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - - public function parse(\Doctrine\ORM\Query\Parser $parser) + + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); - + $this->date = $parser->ArithmeticPrimary(); - + $parser->match(Lexer::T_CLOSE_PARENTHESIS); } } diff --git a/src/Query/Mysql/DayOfYear.php b/src/Query/Mysql/DayOfYear.php index a836db31..7285d982 100644 --- a/src/Query/Mysql/DayOfYear.php +++ b/src/Query/Mysql/DayOfYear.php @@ -17,7 +17,7 @@ class DayOfYear extends FunctionNode /** * @inheritdoc */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'DAYOFYEAR(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } @@ -25,7 +25,7 @@ public function getSql(SqlWalker $sqlWalker) /** * @inheritdoc */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Degrees.php b/src/Query/Mysql/Degrees.php index 9185d64f..b516cf74 100644 --- a/src/Query/Mysql/Degrees.php +++ b/src/Query/Mysql/Degrees.php @@ -9,7 +9,7 @@ class Degrees extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DEGREES(' . $sqlWalker->walkSimpleArithmeticExpression( @@ -18,7 +18,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Div.php b/src/Query/Mysql/Div.php index cdc13b50..1d86b8bc 100644 --- a/src/Query/Mysql/Div.php +++ b/src/Query/Mysql/Div.php @@ -25,7 +25,7 @@ class Div extends FunctionNode /** * @inheritdoc */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return $sqlWalker->walkArithmeticPrimary($this->dividend) . ' DIV ' . @@ -35,7 +35,7 @@ public function getSql(SqlWalker $sqlWalker) /** * @inheritdoc */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Exp.php b/src/Query/Mysql/Exp.php index 82769ef3..c119f40f 100644 --- a/src/Query/Mysql/Exp.php +++ b/src/Query/Mysql/Exp.php @@ -9,14 +9,14 @@ class Exp extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'EXP(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Extract.php b/src/Query/Mysql/Extract.php index 392c9506..d6d9c31e 100644 --- a/src/Query/Mysql/Extract.php +++ b/src/Query/Mysql/Extract.php @@ -14,7 +14,7 @@ class Extract extends DateAdd public $unit = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -29,7 +29,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $unit = strtoupper($this->unit); if (!in_array($unit, self::$allowedUnits)) { diff --git a/src/Query/Mysql/Field.php b/src/Query/Mysql/Field.php index 0091415f..45849d68 100644 --- a/src/Query/Mysql/Field.php +++ b/src/Query/Mysql/Field.php @@ -14,7 +14,7 @@ class Field extends FunctionNode private $values = []; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -36,7 +36,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $query = 'FIELD('; diff --git a/src/Query/Mysql/FindInSet.php b/src/Query/Mysql/FindInSet.php index 447ae5f2..5b31c787 100644 --- a/src/Query/Mysql/FindInSet.php +++ b/src/Query/Mysql/FindInSet.php @@ -11,7 +11,7 @@ class FindInSet extends FunctionNode public $haystack = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'FIND_IN_SET(' . $this->needle->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/Floor.php b/src/Query/Mysql/Floor.php index cd0e064f..7e89a983 100644 --- a/src/Query/Mysql/Floor.php +++ b/src/Query/Mysql/Floor.php @@ -9,12 +9,12 @@ class Floor extends FunctionNode { private $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'FLOOR(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Format.php b/src/Query/Mysql/Format.php index a861c97c..469a6b35 100644 --- a/src/Query/Mysql/Format.php +++ b/src/Query/Mysql/Format.php @@ -14,7 +14,7 @@ class Format extends FunctionNode public $patternExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'FORMAT(' . $this->numberExpression->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/FromBase64.php b/src/Query/Mysql/FromBase64.php index d0aa545f..13ae69ac 100644 --- a/src/Query/Mysql/FromBase64.php +++ b/src/Query/Mysql/FromBase64.php @@ -18,7 +18,7 @@ class FromBase64 extends FunctionNode { public $field = null; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -26,7 +26,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'FROM_BASE64(' . $this->field->dispatch($sqlWalker) . ')'; } diff --git a/src/Query/Mysql/FromUnixtime.php b/src/Query/Mysql/FromUnixtime.php index f74fa6bc..7bd20341 100644 --- a/src/Query/Mysql/FromUnixtime.php +++ b/src/Query/Mysql/FromUnixtime.php @@ -14,7 +14,7 @@ class FromUnixtime extends FunctionNode public $secondExpression = null; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { if (null !== $this->secondExpression) { return 'FROM_UNIXTIME(' @@ -27,7 +27,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) return 'FROM_UNIXTIME(' . $this->firstExpression->dispatch($sqlWalker) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $lexer = $parser->getLexer(); diff --git a/src/Query/Mysql/Greatest.php b/src/Query/Mysql/Greatest.php index b370a19b..96734f4c 100644 --- a/src/Query/Mysql/Greatest.php +++ b/src/Query/Mysql/Greatest.php @@ -20,7 +20,7 @@ class Greatest extends FunctionNode /** * @param Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -40,7 +40,7 @@ public function parse(Parser $parser) * @param SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $query = 'GREATEST('; diff --git a/src/Query/Mysql/GroupConcat.php b/src/Query/Mysql/GroupConcat.php index 09d6c5c9..970ff2a7 100644 --- a/src/Query/Mysql/GroupConcat.php +++ b/src/Query/Mysql/GroupConcat.php @@ -15,7 +15,7 @@ class GroupConcat extends FunctionNode public $orderBy = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -56,7 +56,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $result = 'GROUP_CONCAT(' . ($this->isDistinct ? 'DISTINCT ' : ''); diff --git a/src/Query/Mysql/Hex.php b/src/Query/Mysql/Hex.php index fdca526e..716992df 100644 --- a/src/Query/Mysql/Hex.php +++ b/src/Query/Mysql/Hex.php @@ -9,12 +9,12 @@ class Hex extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'HEX(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Hour.php b/src/Query/Mysql/Hour.php index dbe403c2..9a6817c9 100644 --- a/src/Query/Mysql/Hour.php +++ b/src/Query/Mysql/Hour.php @@ -12,12 +12,12 @@ class Hour extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'HOUR('.$sqlWalker->walkArithmeticPrimary($this->date).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/IfElse.php b/src/Query/Mysql/IfElse.php index c506f21f..1493ba2b 100644 --- a/src/Query/Mysql/IfElse.php +++ b/src/Query/Mysql/IfElse.php @@ -12,7 +12,7 @@ class IfElse extends FunctionNode { private $expr = []; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -36,7 +36,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'IF(%s, %s, %s)', diff --git a/src/Query/Mysql/IfNull.php b/src/Query/Mysql/IfNull.php index f82cc5a3..26d32e77 100644 --- a/src/Query/Mysql/IfNull.php +++ b/src/Query/Mysql/IfNull.php @@ -14,7 +14,7 @@ class IfNull extends FunctionNode private $expr2; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'IFNULL(' .$sqlWalker->walkArithmeticPrimary($this->expr1). ', ' diff --git a/src/Query/Mysql/Inet6Aton.php b/src/Query/Mysql/Inet6Aton.php index 76482b1e..430e5fc1 100644 --- a/src/Query/Mysql/Inet6Aton.php +++ b/src/Query/Mysql/Inet6Aton.php @@ -18,7 +18,7 @@ class Inet6Aton extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'INET6_ATON(' . ( diff --git a/src/Query/Mysql/Inet6Ntoa.php b/src/Query/Mysql/Inet6Ntoa.php index 968eb523..5d641271 100644 --- a/src/Query/Mysql/Inet6Ntoa.php +++ b/src/Query/Mysql/Inet6Ntoa.php @@ -18,7 +18,7 @@ class Inet6Ntoa extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'INET6_NTOA(' . ( diff --git a/src/Query/Mysql/InetAton.php b/src/Query/Mysql/InetAton.php index c15755a5..a03e8530 100644 --- a/src/Query/Mysql/InetAton.php +++ b/src/Query/Mysql/InetAton.php @@ -18,7 +18,7 @@ class InetAton extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'INET_ATON(' . ( diff --git a/src/Query/Mysql/InetNtoa.php b/src/Query/Mysql/InetNtoa.php index a79182bd..4e2f55d2 100644 --- a/src/Query/Mysql/InetNtoa.php +++ b/src/Query/Mysql/InetNtoa.php @@ -18,7 +18,7 @@ class InetNtoa extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'INET_NTOA(' . ( diff --git a/src/Query/Mysql/Instr.php b/src/Query/Mysql/Instr.php index 3cc8a876..e939bdbb 100644 --- a/src/Query/Mysql/Instr.php +++ b/src/Query/Mysql/Instr.php @@ -16,7 +16,7 @@ class Instr extends FunctionNode /** * @param \Doctrine\ORM\Query\Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -30,7 +30,7 @@ public function parse(Parser $parser) * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( 'INSTR(%s, %s)', diff --git a/src/Query/Mysql/IsIpv4.php b/src/Query/Mysql/IsIpv4.php index e0e1b9c0..959b6e6d 100644 --- a/src/Query/Mysql/IsIpv4.php +++ b/src/Query/Mysql/IsIpv4.php @@ -18,7 +18,7 @@ class IsIpv4 extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'IS_IPV4(' . ( diff --git a/src/Query/Mysql/IsIpv4Compat.php b/src/Query/Mysql/IsIpv4Compat.php index 8324a255..13e221a2 100644 --- a/src/Query/Mysql/IsIpv4Compat.php +++ b/src/Query/Mysql/IsIpv4Compat.php @@ -18,7 +18,7 @@ class IsIpv4Compat extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'IS_IPV4_COMPAT(' . ( diff --git a/src/Query/Mysql/IsIpv4Mapped.php b/src/Query/Mysql/IsIpv4Mapped.php index 56171377..e8f91e2f 100644 --- a/src/Query/Mysql/IsIpv4Mapped.php +++ b/src/Query/Mysql/IsIpv4Mapped.php @@ -18,7 +18,7 @@ class IsIpv4Mapped extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'IS_IPV4_MAPPED(' . ( diff --git a/src/Query/Mysql/IsIpv6.php b/src/Query/Mysql/IsIpv6.php index d421b0cd..1bb1d453 100644 --- a/src/Query/Mysql/IsIpv6.php +++ b/src/Query/Mysql/IsIpv6.php @@ -18,7 +18,7 @@ class IsIpv6 extends FunctionNode * * @throws QueryException */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,7 +31,7 @@ public function parse(Parser $parser) * * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'IS_IPV6(' . ( diff --git a/src/Query/Mysql/JsonContains.php b/src/Query/Mysql/JsonContains.php index 4dd4e421..e307225b 100644 --- a/src/Query/Mysql/JsonContains.php +++ b/src/Query/Mysql/JsonContains.php @@ -15,7 +15,7 @@ class JsonContains extends FunctionNode protected $path; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -35,7 +35,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $target = $sqlWalker->walkStringPrimary($this->target); $candidate = $sqlWalker->walkStringPrimary($this->candidate); diff --git a/src/Query/Mysql/JsonDepth.php b/src/Query/Mysql/JsonDepth.php index fb8f7f19..cfbaa2b0 100644 --- a/src/Query/Mysql/JsonDepth.php +++ b/src/Query/Mysql/JsonDepth.php @@ -11,7 +11,7 @@ class JsonDepth extends FunctionNode { protected $target; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf('JSON_DEPTH(%s)', $sqlWalker->walkStringPrimary($this->target)); } diff --git a/src/Query/Mysql/JsonLength.php b/src/Query/Mysql/JsonLength.php index efe8990d..e7731a51 100644 --- a/src/Query/Mysql/JsonLength.php +++ b/src/Query/Mysql/JsonLength.php @@ -13,7 +13,7 @@ class JsonLength extends FunctionNode protected $path; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -29,7 +29,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $target = $sqlWalker->walkStringPrimary($this->target); diff --git a/src/Query/Mysql/LastDay.php b/src/Query/Mysql/LastDay.php index 1f7b5f88..bc167ff8 100644 --- a/src/Query/Mysql/LastDay.php +++ b/src/Query/Mysql/LastDay.php @@ -13,12 +13,12 @@ class LastDay extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'LAST_DAY(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Least.php b/src/Query/Mysql/Least.php index 1338b38e..20a57ad3 100644 --- a/src/Query/Mysql/Least.php +++ b/src/Query/Mysql/Least.php @@ -19,7 +19,7 @@ class Least extends FunctionNode /** * @param Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -39,7 +39,7 @@ public function parse(Parser $parser) * @param SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $query = 'LEAST('; diff --git a/src/Query/Mysql/Log.php b/src/Query/Mysql/Log.php index ea8db45f..28c6afd7 100644 --- a/src/Query/Mysql/Log.php +++ b/src/Query/Mysql/Log.php @@ -9,14 +9,14 @@ class Log extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'LOG(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Log10.php b/src/Query/Mysql/Log10.php index 5ec8b849..f5fd868a 100644 --- a/src/Query/Mysql/Log10.php +++ b/src/Query/Mysql/Log10.php @@ -9,14 +9,14 @@ class Log10 extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'LOG10(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Log2.php b/src/Query/Mysql/Log2.php index 9ea6b8da..6cae3d94 100644 --- a/src/Query/Mysql/Log2.php +++ b/src/Query/Mysql/Log2.php @@ -9,14 +9,14 @@ class Log2 extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'LOG2(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Lpad.php b/src/Query/Mysql/Lpad.php index d552b792..cf20dd70 100644 --- a/src/Query/Mysql/Lpad.php +++ b/src/Query/Mysql/Lpad.php @@ -16,7 +16,7 @@ class Lpad extends FunctionNode public $padstring = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -28,7 +28,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'LPAD(' . $this->string->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/MakeDate.php b/src/Query/Mysql/MakeDate.php index 6d90e48d..37a8253b 100644 --- a/src/Query/Mysql/MakeDate.php +++ b/src/Query/Mysql/MakeDate.php @@ -11,7 +11,7 @@ class MakeDate extends FunctionNode public $dayOfYear = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'MAKEDATE('. $sqlWalker->walkArithmeticPrimary($this->year).', '. diff --git a/src/Query/Mysql/MatchAgainst.php b/src/Query/Mysql/MatchAgainst.php index ffc1ed00..c9a7b4ae 100644 --- a/src/Query/Mysql/MatchAgainst.php +++ b/src/Query/Mysql/MatchAgainst.php @@ -19,7 +19,7 @@ class MatchAgainst extends FunctionNode /** @var bool */ protected $queryExpansion = false; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { // match $parser->match(Lexer::T_IDENTIFIER); @@ -88,7 +88,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $walker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $walker): string { $fields = []; diff --git a/src/Query/Mysql/Md5.php b/src/Query/Mysql/Md5.php index 84d3adcf..bb290608 100644 --- a/src/Query/Mysql/Md5.php +++ b/src/Query/Mysql/Md5.php @@ -12,14 +12,14 @@ class Md5 extends FunctionNode { public $stringPrimary; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return $sqlWalker->getConnection()->getDatabasePlatform()->getMd5Expression( $sqlWalker->walkStringPrimary($this->stringPrimary) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Minute.php b/src/Query/Mysql/Minute.php index f436894a..84d2829a 100644 --- a/src/Query/Mysql/Minute.php +++ b/src/Query/Mysql/Minute.php @@ -12,12 +12,12 @@ class Minute extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'MINUTE('.$sqlWalker->walkArithmeticPrimary($this->date).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Month.php b/src/Query/Mysql/Month.php index 532920a1..3efc45c7 100644 --- a/src/Query/Mysql/Month.php +++ b/src/Query/Mysql/Month.php @@ -13,12 +13,12 @@ class Month extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'MONTH(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/MonthName.php b/src/Query/Mysql/MonthName.php index c5976460..5b24cdec 100644 --- a/src/Query/Mysql/MonthName.php +++ b/src/Query/Mysql/MonthName.php @@ -12,12 +12,12 @@ class MonthName extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'MONTHNAME(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Now.php b/src/Query/Mysql/Now.php index ac44d9bd..dd0a4120 100644 --- a/src/Query/Mysql/Now.php +++ b/src/Query/Mysql/Now.php @@ -7,12 +7,12 @@ class Now extends FunctionNode { - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'NOW()'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/NullIf.php b/src/Query/Mysql/NullIf.php index 9c73f98f..cc77b4e5 100644 --- a/src/Query/Mysql/NullIf.php +++ b/src/Query/Mysql/NullIf.php @@ -14,7 +14,7 @@ class NullIf extends FunctionNode private $expr2; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'NULLIF(%s, %s)', diff --git a/src/Query/Mysql/PeriodDiff.php b/src/Query/Mysql/PeriodDiff.php index 044333e2..e6cc3f80 100644 --- a/src/Query/Mysql/PeriodDiff.php +++ b/src/Query/Mysql/PeriodDiff.php @@ -11,7 +11,7 @@ class PeriodDiff extends FunctionNode public $secondDateExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'PERIOD_DIFF(' . $sqlWalker->walkArithmeticTerm($this->firstDateExpression) . ', ' . diff --git a/src/Query/Mysql/Pi.php b/src/Query/Mysql/Pi.php index d332688e..0b0173a5 100644 --- a/src/Query/Mysql/Pi.php +++ b/src/Query/Mysql/Pi.php @@ -9,12 +9,12 @@ class Pi extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'PI()'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Power.php b/src/Query/Mysql/Power.php index 69515cc6..c1dbe27c 100644 --- a/src/Query/Mysql/Power.php +++ b/src/Query/Mysql/Power.php @@ -9,13 +9,13 @@ class Power extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'POWER(' . $this->arithmeticExpression->dispatch($sqlWalker) . ', ' . $this->power->dispatch($sqlWalker) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Quarter.php b/src/Query/Mysql/Quarter.php index fb2a7f6f..b7c6465b 100644 --- a/src/Query/Mysql/Quarter.php +++ b/src/Query/Mysql/Quarter.php @@ -12,12 +12,12 @@ class Quarter extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'QUARTER('.$sqlWalker->walkArithmeticPrimary($this->date).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Radians.php b/src/Query/Mysql/Radians.php index 70788646..c829c343 100644 --- a/src/Query/Mysql/Radians.php +++ b/src/Query/Mysql/Radians.php @@ -9,7 +9,7 @@ class Radians extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'RADIANS(' . $sqlWalker->walkSimpleArithmeticExpression( @@ -18,7 +18,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Rand.php b/src/Query/Mysql/Rand.php index e3baea36..8991c2c1 100644 --- a/src/Query/Mysql/Rand.php +++ b/src/Query/Mysql/Rand.php @@ -13,7 +13,7 @@ class Rand extends FunctionNode */ private $expression = null; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { if ($this->expression) { return 'RAND(' . $this->expression->dispatch($sqlWalker) . ')'; @@ -22,7 +22,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) return 'RAND()'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $lexer = $parser->getLexer(); $parser->match(Lexer::T_IDENTIFIER); diff --git a/src/Query/Mysql/Regexp.php b/src/Query/Mysql/Regexp.php index bd754f80..a0760697 100644 --- a/src/Query/Mysql/Regexp.php +++ b/src/Query/Mysql/Regexp.php @@ -11,7 +11,7 @@ class Regexp extends FunctionNode public $regexp = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return '(' . $this->value->dispatch($sqlWalker) . ' REGEXP ' . $this->regexp->dispatch($sqlWalker) . ')'; } diff --git a/src/Query/Mysql/Replace.php b/src/Query/Mysql/Replace.php index 98807b23..d3ac2def 100644 --- a/src/Query/Mysql/Replace.php +++ b/src/Query/Mysql/Replace.php @@ -16,7 +16,7 @@ class Replace extends FunctionNode public $subject = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -28,7 +28,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'REPLACE(' . $this->subject->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/Round.php b/src/Query/Mysql/Round.php index 9dd34914..5fe317b1 100644 --- a/src/Query/Mysql/Round.php +++ b/src/Query/Mysql/Round.php @@ -11,7 +11,7 @@ class Round extends FunctionNode private $secondExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $lexer = $parser->getLexer(); $parser->match(Lexer::T_IDENTIFIER); @@ -27,7 +27,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { // use second parameter if parsed if (null !== $this->secondExpression) { diff --git a/src/Query/Mysql/Rpad.php b/src/Query/Mysql/Rpad.php index c89ec3bc..bf733a6a 100644 --- a/src/Query/Mysql/Rpad.php +++ b/src/Query/Mysql/Rpad.php @@ -16,7 +16,7 @@ class Rpad extends FunctionNode public $padstring = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -28,7 +28,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'RPAD(' . $this->string->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/SecToTime.php b/src/Query/Mysql/SecToTime.php index e26a365d..0816586d 100644 --- a/src/Query/Mysql/SecToTime.php +++ b/src/Query/Mysql/SecToTime.php @@ -14,12 +14,12 @@ class SecToTime extends FunctionNode { public $time; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'SEC_TO_TIME('.$sqlWalker->walkArithmeticPrimary($this->time).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Second.php b/src/Query/Mysql/Second.php index 3c54de37..c9304469 100644 --- a/src/Query/Mysql/Second.php +++ b/src/Query/Mysql/Second.php @@ -12,12 +12,12 @@ class Second extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'SECOND('.$sqlWalker->walkArithmeticPrimary($this->date).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Sha1.php b/src/Query/Mysql/Sha1.php index d3b22d62..bdb1d0aa 100644 --- a/src/Query/Mysql/Sha1.php +++ b/src/Query/Mysql/Sha1.php @@ -12,14 +12,14 @@ class Sha1 extends FunctionNode { public $stringPrimary; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'SHA1(' . $sqlWalker->walkStringPrimary($this->stringPrimary) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Sha2.php b/src/Query/Mysql/Sha2.php index 4a0f2018..cf23aa4f 100644 --- a/src/Query/Mysql/Sha2.php +++ b/src/Query/Mysql/Sha2.php @@ -14,7 +14,7 @@ class Sha2 extends FunctionNode public $simpleArithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'SHA2(' . $sqlWalker->walkStringPrimary($this->stringPrimary) . @@ -23,7 +23,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Sin.php b/src/Query/Mysql/Sin.php index 0be0fe4d..e40e53fb 100644 --- a/src/Query/Mysql/Sin.php +++ b/src/Query/Mysql/Sin.php @@ -9,14 +9,14 @@ class Sin extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'SIN(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Soundex.php b/src/Query/Mysql/Soundex.php index 6a8e6b67..b5d39a48 100644 --- a/src/Query/Mysql/Soundex.php +++ b/src/Query/Mysql/Soundex.php @@ -12,12 +12,12 @@ class Soundex extends FunctionNode { public $stringPrimary; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'SOUNDEX('.$sqlWalker->walkStringPrimary($this->stringPrimary).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Std.php b/src/Query/Mysql/Std.php index 6d5829ff..d8b9df85 100644 --- a/src/Query/Mysql/Std.php +++ b/src/Query/Mysql/Std.php @@ -12,12 +12,12 @@ class Std extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf('STD(%s)', $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression)); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/StdDev.php b/src/Query/Mysql/StdDev.php index d146818a..c25329a5 100644 --- a/src/Query/Mysql/StdDev.php +++ b/src/Query/Mysql/StdDev.php @@ -12,12 +12,12 @@ class StdDev extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf('STDDEV(%s)', $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression)); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/StrToDate.php b/src/Query/Mysql/StrToDate.php index 7163999a..863caba5 100644 --- a/src/Query/Mysql/StrToDate.php +++ b/src/Query/Mysql/StrToDate.php @@ -11,7 +11,7 @@ class StrToDate extends FunctionNode public $dateFormat = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'STR_TO_DATE(' . $this->dateString->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/SubstringIndex.php b/src/Query/Mysql/SubstringIndex.php index 85a5f38f..5d05a8d1 100644 --- a/src/Query/Mysql/SubstringIndex.php +++ b/src/Query/Mysql/SubstringIndex.php @@ -18,7 +18,7 @@ class SubstringIndex extends FunctionNode /** * @param \Doctrine\ORM\Query\Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -34,7 +34,7 @@ public function parse(Parser $parser) * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( 'SUBSTRING_INDEX(%s, %s, %s)', diff --git a/src/Query/Mysql/Tan.php b/src/Query/Mysql/Tan.php index c0de4484..23dd70f6 100644 --- a/src/Query/Mysql/Tan.php +++ b/src/Query/Mysql/Tan.php @@ -9,14 +9,14 @@ class Tan extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'TAN(' . $sqlWalker->walkSimpleArithmeticExpression( $this->arithmeticExpression ) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Time.php b/src/Query/Mysql/Time.php index 04820389..dc6d2c65 100644 --- a/src/Query/Mysql/Time.php +++ b/src/Query/Mysql/Time.php @@ -13,12 +13,12 @@ class Time extends FunctionNode { public $time; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'TIME(' . $sqlWalker->walkArithmeticPrimary($this->time) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/TimeDiff.php b/src/Query/Mysql/TimeDiff.php index 8b7da276..ede2a411 100644 --- a/src/Query/Mysql/TimeDiff.php +++ b/src/Query/Mysql/TimeDiff.php @@ -11,7 +11,7 @@ class TimeDiff extends FunctionNode public $secondDateExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'TIMEDIFF(%s, %s)', diff --git a/src/Query/Mysql/TimeToSec.php b/src/Query/Mysql/TimeToSec.php index 3b4b8744..7cd27a8f 100644 --- a/src/Query/Mysql/TimeToSec.php +++ b/src/Query/Mysql/TimeToSec.php @@ -14,12 +14,12 @@ class TimeToSec extends FunctionNode { public $time; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'TIME_TO_SEC('.$sqlWalker->walkArithmeticPrimary($this->time).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/TimestampAdd.php b/src/Query/Mysql/TimestampAdd.php index db623f21..43f6c615 100644 --- a/src/Query/Mysql/TimestampAdd.php +++ b/src/Query/Mysql/TimestampAdd.php @@ -16,7 +16,7 @@ class TimestampAdd extends FunctionNode public $unit = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -30,7 +30,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sql_walker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sql_walker): string { return sprintf( 'TIMESTAMPADD(%s, %s, %s)', diff --git a/src/Query/Mysql/TimestampDiff.php b/src/Query/Mysql/TimestampDiff.php index b5d3e997..c59d3aa6 100644 --- a/src/Query/Mysql/TimestampDiff.php +++ b/src/Query/Mysql/TimestampDiff.php @@ -16,7 +16,7 @@ class TimestampDiff extends FunctionNode public $unit = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -30,7 +30,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sql_walker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sql_walker): string { return sprintf( 'TIMESTAMPDIFF(%s, %s, %s)', diff --git a/src/Query/Mysql/Truncate.php b/src/Query/Mysql/Truncate.php index 6341ab46..5557f5bb 100644 --- a/src/Query/Mysql/Truncate.php +++ b/src/Query/Mysql/Truncate.php @@ -14,7 +14,7 @@ class Truncate extends FunctionNode public $patternExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'TRUNCATE(' . $this->numberExpression->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Mysql/Unhex.php b/src/Query/Mysql/Unhex.php index 4bbf3c42..41cbf27b 100644 --- a/src/Query/Mysql/Unhex.php +++ b/src/Query/Mysql/Unhex.php @@ -9,12 +9,12 @@ class Unhex extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'UNHEX(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/UnixTimestamp.php b/src/Query/Mysql/UnixTimestamp.php index 7be1a1ce..7a49c2c8 100644 --- a/src/Query/Mysql/UnixTimestamp.php +++ b/src/Query/Mysql/UnixTimestamp.php @@ -13,7 +13,7 @@ class UnixTimestamp extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'UNIX_TIMESTAMP(%s)', @@ -21,7 +21,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/UtcTimestamp.php b/src/Query/Mysql/UtcTimestamp.php index 47bd48df..a32577f3 100644 --- a/src/Query/Mysql/UtcTimestamp.php +++ b/src/Query/Mysql/UtcTimestamp.php @@ -10,12 +10,12 @@ */ class UtcTimestamp extends FunctionNode { - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'UTC_TIMESTAMP()'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/UuidShort.php b/src/Query/Mysql/UuidShort.php index 61c91e56..41922c1a 100644 --- a/src/Query/Mysql/UuidShort.php +++ b/src/Query/Mysql/UuidShort.php @@ -9,12 +9,12 @@ class UuidShort extends FunctionNode { public $arithmeticExpression; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'UUID_SHORT()'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Variance.php b/src/Query/Mysql/Variance.php index 948c65b5..cadab86f 100644 --- a/src/Query/Mysql/Variance.php +++ b/src/Query/Mysql/Variance.php @@ -13,7 +13,7 @@ class Variance extends FunctionNode /** @var SimpleArithmeticExpression */ protected $arithmeticExpression; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -23,7 +23,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf('VARIANCE(%s)', $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression)); } diff --git a/src/Query/Mysql/Week.php b/src/Query/Mysql/Week.php index a7552c1b..3efe6b4d 100644 --- a/src/Query/Mysql/Week.php +++ b/src/Query/Mysql/Week.php @@ -16,7 +16,7 @@ class Week extends FunctionNode public $mode; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $sql = 'WEEK(' . $sqlWalker->walkArithmeticPrimary($this->date); if ($this->mode != null) { @@ -27,7 +27,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) return $sql; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/WeekDay.php b/src/Query/Mysql/WeekDay.php index be56e6af..187b2569 100644 --- a/src/Query/Mysql/WeekDay.php +++ b/src/Query/Mysql/WeekDay.php @@ -12,12 +12,12 @@ class WeekDay extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'WEEKDAY(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/WeekOfYear.php b/src/Query/Mysql/WeekOfYear.php index 9b2f57c8..ce7fb57d 100644 --- a/src/Query/Mysql/WeekOfYear.php +++ b/src/Query/Mysql/WeekOfYear.php @@ -9,12 +9,12 @@ class WeekOfYear extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'WEEKOFYEAR(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/Year.php b/src/Query/Mysql/Year.php index c5eb2864..f9519b88 100644 --- a/src/Query/Mysql/Year.php +++ b/src/Query/Mysql/Year.php @@ -12,12 +12,12 @@ class Year extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'YEAR(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/YearMonth.php b/src/Query/Mysql/YearMonth.php index edafdaf7..e8046494 100644 --- a/src/Query/Mysql/YearMonth.php +++ b/src/Query/Mysql/YearMonth.php @@ -9,7 +9,7 @@ class YearMonth extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(YEAR_MONTH FROM %s)', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Mysql/YearWeek.php b/src/Query/Mysql/YearWeek.php index 06aa82f0..d0177a9f 100644 --- a/src/Query/Mysql/YearWeek.php +++ b/src/Query/Mysql/YearWeek.php @@ -14,7 +14,7 @@ class YearWeek extends FunctionNode public $mode; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $sql = 'YEARWEEK(' . $sqlWalker->walkArithmeticPrimary($this->date); if ($this->mode != null) { @@ -25,7 +25,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) return $sql; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/MysqlWalker.php b/src/Query/MysqlWalker.php index 1698088d..4d79b428 100644 --- a/src/Query/MysqlWalker.php +++ b/src/Query/MysqlWalker.php @@ -8,6 +8,8 @@ class MysqlWalker extends SqlWalker { /** * @inheritdoc + * + * @return array|string */ public function walkSelectClause($selectClause) { @@ -29,7 +31,7 @@ public function walkSelectClause($selectClause) /** * @inheritdoc */ - public function walkGroupByClause($groupByClause) + public function walkGroupByClause($groupByClause): string { $sql = parent::walkGroupByClause($groupByClause); diff --git a/src/Query/Oracle/Ceil.php b/src/Query/Oracle/Ceil.php index 6c1d9962..a26b5529 100755 --- a/src/Query/Oracle/Ceil.php +++ b/src/Query/Oracle/Ceil.php @@ -12,7 +12,7 @@ class Ceil extends FunctionNode { private $number; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'CEIL(%s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Day.php b/src/Query/Oracle/Day.php index db27ab4f..f9e4e534 100644 --- a/src/Query/Oracle/Day.php +++ b/src/Query/Oracle/Day.php @@ -12,7 +12,7 @@ class Day extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(DAY FROM %s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Floor.php b/src/Query/Oracle/Floor.php index 69b0d8ff..a05e1e83 100755 --- a/src/Query/Oracle/Floor.php +++ b/src/Query/Oracle/Floor.php @@ -12,7 +12,7 @@ class Floor extends FunctionNode { private $number; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'FLOOR(%s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Hour.php b/src/Query/Oracle/Hour.php index 77160c9e..d8cb6e65 100644 --- a/src/Query/Oracle/Hour.php +++ b/src/Query/Oracle/Hour.php @@ -12,7 +12,7 @@ class Hour extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(HOUR FROM %s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Listagg.php b/src/Query/Oracle/Listagg.php index dac6406a..102c0ce2 100644 --- a/src/Query/Oracle/Listagg.php +++ b/src/Query/Oracle/Listagg.php @@ -37,7 +37,7 @@ class Listagg extends FunctionNode /** * @inheritdoc */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $lexer = $parser->getLexer(); @@ -88,7 +88,7 @@ public function parse(Parser $parser) /** * @inheritdoc */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $result = 'LISTAGG(' . $this->listaggField->dispatch($sqlWalker); if ($this->separator) { diff --git a/src/Query/Oracle/Minute.php b/src/Query/Oracle/Minute.php index 4579be71..a6026a51 100644 --- a/src/Query/Oracle/Minute.php +++ b/src/Query/Oracle/Minute.php @@ -12,7 +12,7 @@ class Minute extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(MINUTE FROM %s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Month.php b/src/Query/Oracle/Month.php index 88356b25..6129874e 100644 --- a/src/Query/Oracle/Month.php +++ b/src/Query/Oracle/Month.php @@ -12,7 +12,7 @@ class Month extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(MONTH FROM %s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Nvl.php b/src/Query/Oracle/Nvl.php index daf68e89..44702afa 100644 --- a/src/Query/Oracle/Nvl.php +++ b/src/Query/Oracle/Nvl.php @@ -14,7 +14,7 @@ class Nvl extends FunctionNode private $expr2; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'NVL(%s, %s)', @@ -23,7 +23,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Second.php b/src/Query/Oracle/Second.php index d1006cea..2b27aac2 100644 --- a/src/Query/Oracle/Second.php +++ b/src/Query/Oracle/Second.php @@ -12,7 +12,7 @@ class Second extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'FLOOR(EXTRACT(SECOND FROM %s))', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/ToChar.php b/src/Query/Oracle/ToChar.php index 4475d441..75d873b1 100755 --- a/src/Query/Oracle/ToChar.php +++ b/src/Query/Oracle/ToChar.php @@ -16,7 +16,7 @@ class ToChar extends FunctionNode private $nls = null; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { if ($this->nls) { return sprintf( @@ -34,7 +34,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $lexer = $parser->getLexer(); diff --git a/src/Query/Oracle/ToDate.php b/src/Query/Oracle/ToDate.php index 8632789f..9acc84c8 100644 --- a/src/Query/Oracle/ToDate.php +++ b/src/Query/Oracle/ToDate.php @@ -14,7 +14,7 @@ class ToDate extends FunctionNode private $fmt; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'TO_DATE(%s, %s)', @@ -23,7 +23,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Oracle/Trunc.php b/src/Query/Oracle/Trunc.php index 629b1c46..56650a59 100755 --- a/src/Query/Oracle/Trunc.php +++ b/src/Query/Oracle/Trunc.php @@ -21,7 +21,7 @@ class Trunc extends FunctionNode */ private $fmt; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { if ($this->fmt) { return sprintf( @@ -37,7 +37,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $lexer = $parser->getLexer(); diff --git a/src/Query/Oracle/Year.php b/src/Query/Oracle/Year.php index 1985904f..7dc76e0f 100644 --- a/src/Query/Oracle/Year.php +++ b/src/Query/Oracle/Year.php @@ -12,7 +12,7 @@ class Year extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(YEAR FROM %s)', @@ -20,7 +20,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/AtTimeZoneFunction.php b/src/Query/Postgresql/AtTimeZoneFunction.php index 92594aff..c9ee23f9 100644 --- a/src/Query/Postgresql/AtTimeZoneFunction.php +++ b/src/Query/Postgresql/AtTimeZoneFunction.php @@ -16,7 +16,7 @@ class AtTimeZoneFunction extends FunctionNode public $timezoneExpression = null; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -26,7 +26,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( '%s AT TIME ZONE %s', diff --git a/src/Query/Postgresql/CountFilterFunction.php b/src/Query/Postgresql/CountFilterFunction.php index 67930565..1a562a78 100644 --- a/src/Query/Postgresql/CountFilterFunction.php +++ b/src/Query/Postgresql/CountFilterFunction.php @@ -16,7 +16,7 @@ class CountFilterFunction extends FunctionNode public $whereExpression = null; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -26,7 +26,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( 'COUNT(%s) FILTER(%s)', diff --git a/src/Query/Postgresql/Date.php b/src/Query/Postgresql/Date.php index d5993118..d847862b 100644 --- a/src/Query/Postgresql/Date.php +++ b/src/Query/Postgresql/Date.php @@ -9,12 +9,12 @@ class Date extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'DATE(' . $sqlWalker->walkArithmeticPrimary($this->date) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/DateFormat.php b/src/Query/Postgresql/DateFormat.php index 5bcd419e..7dd6a67a 100644 --- a/src/Query/Postgresql/DateFormat.php +++ b/src/Query/Postgresql/DateFormat.php @@ -14,7 +14,7 @@ class DateFormat extends FunctionNode public $patternExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'TO_CHAR(' . $this->dateExpression->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Postgresql/DatePart.php b/src/Query/Postgresql/DatePart.php index 2f7b9ebd..faba0a80 100644 --- a/src/Query/Postgresql/DatePart.php +++ b/src/Query/Postgresql/DatePart.php @@ -13,10 +13,10 @@ class DatePart extends FunctionNode { public $dateString = null; - + public $dateFormat = null; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -26,7 +26,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'DATE_PART(' . $this->dateString->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Postgresql/DateTrunc.php b/src/Query/Postgresql/DateTrunc.php index 7aef29a2..9ceefbf8 100644 --- a/src/Query/Postgresql/DateTrunc.php +++ b/src/Query/Postgresql/DateTrunc.php @@ -13,7 +13,7 @@ class DateTrunc extends FunctionNode public $fieldTimestamp = null; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -23,7 +23,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return sprintf( 'DATE_TRUNC(%s, %s)', diff --git a/src/Query/Postgresql/Day.php b/src/Query/Postgresql/Day.php index 045cb4d2..57d4bcd5 100644 --- a/src/Query/Postgresql/Day.php +++ b/src/Query/Postgresql/Day.php @@ -9,7 +9,7 @@ class Day extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(DAY FROM %s)', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/Greatest.php b/src/Query/Postgresql/Greatest.php index c2a6e183..d0850c2b 100644 --- a/src/Query/Postgresql/Greatest.php +++ b/src/Query/Postgresql/Greatest.php @@ -21,7 +21,7 @@ class Greatest extends FunctionNode /** * @param Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -41,7 +41,7 @@ public function parse(Parser $parser) * @param SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $query = 'GREATEST('; diff --git a/src/Query/Postgresql/Hour.php b/src/Query/Postgresql/Hour.php index d05af9df..27b37707 100644 --- a/src/Query/Postgresql/Hour.php +++ b/src/Query/Postgresql/Hour.php @@ -9,7 +9,7 @@ class Hour extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(HOUR FROM %s)', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/Least.php b/src/Query/Postgresql/Least.php index ad05b5bc..ef91c94e 100644 --- a/src/Query/Postgresql/Least.php +++ b/src/Query/Postgresql/Least.php @@ -20,7 +20,7 @@ class Least extends FunctionNode /** * @param Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -40,7 +40,7 @@ public function parse(Parser $parser) * @param SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $query = 'LEAST('; diff --git a/src/Query/Postgresql/Minute.php b/src/Query/Postgresql/Minute.php index c4832910..2464dcdf 100644 --- a/src/Query/Postgresql/Minute.php +++ b/src/Query/Postgresql/Minute.php @@ -9,7 +9,7 @@ class Minute extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(MINUTE FROM %s)', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/Month.php b/src/Query/Postgresql/Month.php index 0ad92318..3437d658 100644 --- a/src/Query/Postgresql/Month.php +++ b/src/Query/Postgresql/Month.php @@ -9,7 +9,7 @@ class Month extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(MONTH FROM %s)', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/RegexpReplace.php b/src/Query/Postgresql/RegexpReplace.php index cf2ed8fe..a9dfe85b 100644 --- a/src/Query/Postgresql/RegexpReplace.php +++ b/src/Query/Postgresql/RegexpReplace.php @@ -17,12 +17,12 @@ class RegexpReplace extends FunctionNode private $replace; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'REGEXP_REPLACE('.$this->string->dispatch($sqlWalker).', '.$this->search->dispatch($sqlWalker).', '.$this->replace->dispatch($sqlWalker).')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/Second.php b/src/Query/Postgresql/Second.php index 604ed37b..4bd64232 100644 --- a/src/Query/Postgresql/Second.php +++ b/src/Query/Postgresql/Second.php @@ -9,7 +9,7 @@ class Second extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'FLOOR(EXTRACT(SECOND FROM %s))', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Postgresql/StrToDate.php b/src/Query/Postgresql/StrToDate.php index cb2ffed1..55d57121 100644 --- a/src/Query/Postgresql/StrToDate.php +++ b/src/Query/Postgresql/StrToDate.php @@ -11,7 +11,7 @@ class StrToDate extends FunctionNode public $dateFormat = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -21,7 +21,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'TO_DATE(' . $this->dateString->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Postgresql/StringAgg.php b/src/Query/Postgresql/StringAgg.php index e5905f7d..67b6688b 100644 --- a/src/Query/Postgresql/StringAgg.php +++ b/src/Query/Postgresql/StringAgg.php @@ -22,7 +22,7 @@ class StringAgg extends FunctionNode private $isDistinct = false; - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -45,7 +45,7 @@ public function parse(Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return \sprintf( 'string_agg(%s%s, %s%s)', diff --git a/src/Query/Postgresql/Year.php b/src/Query/Postgresql/Year.php index ceec24c9..4c9d2328 100644 --- a/src/Query/Postgresql/Year.php +++ b/src/Query/Postgresql/Year.php @@ -9,7 +9,7 @@ class Year extends FunctionNode { private $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'EXTRACT(YEAR FROM %s)', @@ -17,7 +17,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) ); } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/SortableNullsWalker.php b/src/Query/SortableNullsWalker.php index 648387de..34cdc021 100644 --- a/src/Query/SortableNullsWalker.php +++ b/src/Query/SortableNullsWalker.php @@ -28,10 +28,14 @@ */ class SortableNullsWalker extends Query\SqlWalker { - const NULLS_FIRST = 'NULLS FIRST'; + public const NULLS_FIRST = 'NULLS FIRST'; - const NULLS_LAST = 'NULLS LAST'; + public const NULLS_LAST = 'NULLS LAST'; + /** + * @param $orderByItem + * @return array|string + */ public function walkOrderByItem($orderByItem) { $sql = parent::walkOrderByItem($orderByItem); diff --git a/src/Query/Sqlite/AbstractStrfTime.php b/src/Query/Sqlite/AbstractStrfTime.php index 4dffe58a..8fde4ed9 100644 --- a/src/Query/Sqlite/AbstractStrfTime.php +++ b/src/Query/Sqlite/AbstractStrfTime.php @@ -12,7 +12,7 @@ abstract class AbstractStrfTime extends FunctionNode { public $date; - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return "STRFTIME('" . $this->getFormat() @@ -21,7 +21,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) . ')'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -31,5 +31,5 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - abstract protected function getFormat(); + abstract protected function getFormat(): string; } diff --git a/src/Query/Sqlite/ConcatWs.php b/src/Query/Sqlite/ConcatWs.php index 06b7e973..02229c7b 100644 --- a/src/Query/Sqlite/ConcatWs.php +++ b/src/Query/Sqlite/ConcatWs.php @@ -14,7 +14,7 @@ class ConcatWs extends FunctionNode private $notEmpty = false; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -53,7 +53,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { $separator = $this->values[0]->simpleArithmeticExpression->value; diff --git a/src/Query/Sqlite/Date.php b/src/Query/Sqlite/Date.php index 24082225..f6173545 100644 --- a/src/Query/Sqlite/Date.php +++ b/src/Query/Sqlite/Date.php @@ -7,7 +7,7 @@ */ class Date extends AbstractStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%Y-%m-%d'; } diff --git a/src/Query/Sqlite/DateFormat.php b/src/Query/Sqlite/DateFormat.php index df458290..8ed2e81e 100644 --- a/src/Query/Sqlite/DateFormat.php +++ b/src/Query/Sqlite/DateFormat.php @@ -22,7 +22,7 @@ class DateFormat extends FunctionNode * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker * @return string */ - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'STRFTIME(' . $sqlWalker->walkArithmeticPrimary($this->format) @@ -34,7 +34,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) /** * @param \Doctrine\ORM\Query\Parser $parser */ - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -49,7 +49,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) * @param ArithmeticExpression $expr * @return ArithmeticExpression */ - private function convertFormat(ArithmeticExpression $expr) + private function convertFormat(ArithmeticExpression $expr): ArithmeticExpression { // when using bind variables there is no value component. if (empty($expr->simpleArithmeticExpression->value)) { diff --git a/src/Query/Sqlite/Day.php b/src/Query/Sqlite/Day.php index 0b2f53b6..0c316829 100644 --- a/src/Query/Sqlite/Day.php +++ b/src/Query/Sqlite/Day.php @@ -7,7 +7,7 @@ */ class Day extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%d'; } diff --git a/src/Query/Sqlite/Greatest.php b/src/Query/Sqlite/Greatest.php index cd36996e..d7b983e6 100644 --- a/src/Query/Sqlite/Greatest.php +++ b/src/Query/Sqlite/Greatest.php @@ -20,7 +20,7 @@ class Greatest extends FunctionNode /** * @param Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -40,7 +40,7 @@ public function parse(Parser $parser) * @param SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $query = 'MAX('; diff --git a/src/Query/Sqlite/Hour.php b/src/Query/Sqlite/Hour.php index 944c13bb..230d07e1 100644 --- a/src/Query/Sqlite/Hour.php +++ b/src/Query/Sqlite/Hour.php @@ -7,7 +7,7 @@ */ class Hour extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%H'; } diff --git a/src/Query/Sqlite/IfElse.php b/src/Query/Sqlite/IfElse.php index 1534fc7c..f54f49c6 100644 --- a/src/Query/Sqlite/IfElse.php +++ b/src/Query/Sqlite/IfElse.php @@ -12,7 +12,7 @@ class IfElse extends FunctionNode { private $expr = []; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -26,7 +26,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return sprintf( 'CASE WHEN %s THEN %s ELSE %s END', diff --git a/src/Query/Sqlite/IfNull.php b/src/Query/Sqlite/IfNull.php index 57f3d3ad..77f26c43 100644 --- a/src/Query/Sqlite/IfNull.php +++ b/src/Query/Sqlite/IfNull.php @@ -14,7 +14,7 @@ class IfNull extends FunctionNode private $expr2; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -24,7 +24,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'IFNULL(' . $sqlWalker->walkArithmeticPrimary($this->expr1) diff --git a/src/Query/Sqlite/JulianDay.php b/src/Query/Sqlite/JulianDay.php index 46e0ef45..4341b732 100644 --- a/src/Query/Sqlite/JulianDay.php +++ b/src/Query/Sqlite/JulianDay.php @@ -7,7 +7,7 @@ */ class JulianDay extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%J'; } diff --git a/src/Query/Sqlite/Least.php b/src/Query/Sqlite/Least.php index 63e31abc..a1c2edc2 100644 --- a/src/Query/Sqlite/Least.php +++ b/src/Query/Sqlite/Least.php @@ -19,7 +19,7 @@ class Least extends FunctionNode /** * @param Parser $parser */ - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -39,7 +39,7 @@ public function parse(Parser $parser) * @param SqlWalker $sqlWalker * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { $query = 'MIN('; diff --git a/src/Query/Sqlite/Minute.php b/src/Query/Sqlite/Minute.php index 5db0ef67..c787b743 100644 --- a/src/Query/Sqlite/Minute.php +++ b/src/Query/Sqlite/Minute.php @@ -7,7 +7,7 @@ */ class Minute extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%M'; } diff --git a/src/Query/Sqlite/Month.php b/src/Query/Sqlite/Month.php index d036683d..49dfcbb7 100644 --- a/src/Query/Sqlite/Month.php +++ b/src/Query/Sqlite/Month.php @@ -7,7 +7,7 @@ */ class Month extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%m'; } diff --git a/src/Query/Sqlite/NumberFromStrfTime.php b/src/Query/Sqlite/NumberFromStrfTime.php index 7eed2fcc..d071b72b 100644 --- a/src/Query/Sqlite/NumberFromStrfTime.php +++ b/src/Query/Sqlite/NumberFromStrfTime.php @@ -4,7 +4,7 @@ abstract class NumberFromStrfTime extends AbstractStrfTime { - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return "CAST(STRFTIME('" . $this->getFormat() diff --git a/src/Query/Sqlite/Random.php b/src/Query/Sqlite/Random.php index 896397d7..b13cfdb4 100644 --- a/src/Query/Sqlite/Random.php +++ b/src/Query/Sqlite/Random.php @@ -7,12 +7,12 @@ class Random extends FunctionNode { - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'RANDOM()'; } - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Sqlite/Replace.php b/src/Query/Sqlite/Replace.php index 872a625a..6b00f1c6 100644 --- a/src/Query/Sqlite/Replace.php +++ b/src/Query/Sqlite/Replace.php @@ -16,7 +16,7 @@ class Replace extends FunctionNode public $subject = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -28,7 +28,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { return 'REPLACE(' . $this->subject->dispatch($sqlWalker) . ', ' . diff --git a/src/Query/Sqlite/Round.php b/src/Query/Sqlite/Round.php index 9b5465fa..605fca45 100644 --- a/src/Query/Sqlite/Round.php +++ b/src/Query/Sqlite/Round.php @@ -14,7 +14,7 @@ class Round extends FunctionNode private $secondExpression = null; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $lexer = $parser->getLexer(); $parser->match(Lexer::T_IDENTIFIER); @@ -30,7 +30,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string { // use second parameter if parsed if (null !== $this->secondExpression) { diff --git a/src/Query/Sqlite/Second.php b/src/Query/Sqlite/Second.php index 5009b8a0..46d0cb98 100644 --- a/src/Query/Sqlite/Second.php +++ b/src/Query/Sqlite/Second.php @@ -4,7 +4,7 @@ class Second extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%S'; } diff --git a/src/Query/Sqlite/StrfTime.php b/src/Query/Sqlite/StrfTime.php index db33dd80..b329632d 100644 --- a/src/Query/Sqlite/StrfTime.php +++ b/src/Query/Sqlite/StrfTime.php @@ -22,7 +22,7 @@ class StrfTime extends FunctionNode * @throws \Doctrine\ORM\Query\QueryException * @return string */ - public function getSql(SqlWalker $sqlWalker) + public function getSql(SqlWalker $sqlWalker): string { return 'strftime(' . $sqlWalker->walkLiteral($this->formatter) @@ -31,7 +31,7 @@ public function getSql(SqlWalker $sqlWalker) . ')'; } - public function parse(Parser $parser) + public function parse(Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); diff --git a/src/Query/Sqlite/Week.php b/src/Query/Sqlite/Week.php index b48299d7..a550a2d3 100644 --- a/src/Query/Sqlite/Week.php +++ b/src/Query/Sqlite/Week.php @@ -15,7 +15,7 @@ class Week extends NumberFromStrfTime */ public $mode; - public function parse(\Doctrine\ORM\Query\Parser $parser) + public function parse(\Doctrine\ORM\Query\Parser $parser): void { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); @@ -30,7 +30,7 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $parser->match(Lexer::T_CLOSE_PARENTHESIS); } - protected function getFormat() + protected function getFormat(): string { return '%W'; } diff --git a/src/Query/Sqlite/WeekDay.php b/src/Query/Sqlite/WeekDay.php index 3680cafe..99635afd 100644 --- a/src/Query/Sqlite/WeekDay.php +++ b/src/Query/Sqlite/WeekDay.php @@ -7,7 +7,7 @@ */ class WeekDay extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%w'; } diff --git a/src/Query/Sqlite/Year.php b/src/Query/Sqlite/Year.php index 82f406d2..1cd4ae5c 100644 --- a/src/Query/Sqlite/Year.php +++ b/src/Query/Sqlite/Year.php @@ -7,7 +7,7 @@ */ class Year extends NumberFromStrfTime { - protected function getFormat() + protected function getFormat(): string { return '%Y'; } diff --git a/src/Types/CarbonDateTimeType.php b/src/Types/CarbonDateTimeType.php index 9bf3c1e9..7535cf79 100644 --- a/src/Types/CarbonDateTimeType.php +++ b/src/Types/CarbonDateTimeType.php @@ -8,7 +8,7 @@ class CarbonDateTimeType extends DateTimeType { - const CARBONDATETIME = 'carbondatetime'; + public const CARBONDATETIME = 'carbondatetime'; public function getName() { diff --git a/src/Types/CarbonDateTimeTzType.php b/src/Types/CarbonDateTimeTzType.php index ceba7b6e..08794863 100644 --- a/src/Types/CarbonDateTimeTzType.php +++ b/src/Types/CarbonDateTimeTzType.php @@ -8,7 +8,7 @@ class CarbonDateTimeTzType extends DateTimeTzType { - const CARBONDATETIMETZ = 'carbondatetimetz'; + public const CARBONDATETIMETZ = 'carbondatetimetz'; public function getName() { diff --git a/src/Types/CarbonDateType.php b/src/Types/CarbonDateType.php index e3723ac5..0f7ebf82 100644 --- a/src/Types/CarbonDateType.php +++ b/src/Types/CarbonDateType.php @@ -8,7 +8,7 @@ class CarbonDateType extends DateType { - const CARBONDATE = 'carbondate'; + public const CARBONDATE = 'carbondate'; public function getName() { diff --git a/src/Types/CarbonImmutableDateTimeType.php b/src/Types/CarbonImmutableDateTimeType.php index 8d15138d..327c95d8 100644 --- a/src/Types/CarbonImmutableDateTimeType.php +++ b/src/Types/CarbonImmutableDateTimeType.php @@ -8,7 +8,7 @@ class CarbonImmutableDateTimeType extends DateTimeType { - const CARBONDATETIME = 'carbondatetime_immutable'; + public const CARBONDATETIME = 'carbondatetime_immutable'; public function getName() { diff --git a/src/Types/CarbonImmutableDateTimeTzType.php b/src/Types/CarbonImmutableDateTimeTzType.php index 3964f4d8..f7fa0bc4 100644 --- a/src/Types/CarbonImmutableDateTimeTzType.php +++ b/src/Types/CarbonImmutableDateTimeTzType.php @@ -8,7 +8,7 @@ class CarbonImmutableDateTimeTzType extends DateTimeTzType { - const CARBONDATETIMETZ = 'carbondatetimetz_immutable'; + public const CARBONDATETIMETZ = 'carbondatetimetz_immutable'; public function getName() { diff --git a/src/Types/CarbonImmutableDateType.php b/src/Types/CarbonImmutableDateType.php index ec82d612..efc99e2c 100644 --- a/src/Types/CarbonImmutableDateType.php +++ b/src/Types/CarbonImmutableDateType.php @@ -8,7 +8,7 @@ class CarbonImmutableDateType extends DateType { - const CARBONDATE = 'carbondate_immutable'; + public const CARBONDATE = 'carbondate_immutable'; public function getName() { diff --git a/src/Types/CarbonImmutableTimeType.php b/src/Types/CarbonImmutableTimeType.php index 11012184..dd55b131 100644 --- a/src/Types/CarbonImmutableTimeType.php +++ b/src/Types/CarbonImmutableTimeType.php @@ -8,7 +8,7 @@ class CarbonImmutableTimeType extends TimeType { - const CARBONTIME = 'carbontime_immutable'; + public const CARBONTIME = 'carbontime_immutable'; public function getName() { diff --git a/src/Types/CarbonTimeType.php b/src/Types/CarbonTimeType.php index 00025651..168c5c1e 100644 --- a/src/Types/CarbonTimeType.php +++ b/src/Types/CarbonTimeType.php @@ -8,7 +8,7 @@ class CarbonTimeType extends TimeType { - const CARBONTIME = 'carbontime'; + public const CARBONTIME = 'carbontime'; public function getName() { diff --git a/src/Types/PolygonType.php b/src/Types/PolygonType.php index 558de72b..33ee1e8b 100644 --- a/src/Types/PolygonType.php +++ b/src/Types/PolygonType.php @@ -7,7 +7,7 @@ class PolygonType extends Type { - const FIELD = 'polygon'; + public const FIELD = 'polygon'; public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { diff --git a/src/Types/ZendDateType.php b/src/Types/ZendDateType.php index a52b7d99..d770afc1 100755 --- a/src/Types/ZendDateType.php +++ b/src/Types/ZendDateType.php @@ -17,7 +17,7 @@ */ class ZendDateType extends Type { - const ZENDDATE = 'zenddate'; + public const ZENDDATE = 'zenddate'; public function getName() {