diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php index 58cd04dfa..22dbaa2da 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php @@ -33,7 +33,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface /** * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft */ - public function isUserAbsent(User $user): bool|null + public function isUserAbsent(User $user): ?bool { $id = $this->mapCalendarToUser->getUserId($user); diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php index a918bb7ea..7c3fd69d6 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php @@ -18,5 +18,5 @@ interface MSUserAbsenceReaderInterface /** * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft */ - public function isUserAbsent(User $user): bool|null; + public function isUserAbsent(User $user): ?bool; } diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php index 44f716edf..486a67c5c 100644 --- a/src/Bundle/ChillEventBundle/Entity/Event.php +++ b/src/Bundle/ChillEventBundle/Entity/Event.php @@ -197,7 +197,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter return $this->id; } - public function getModerator(): User|null + public function getModerator(): ?User { return $this->moderator; } diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php index ded8ae8da..9b4664f0d 100644 --- a/src/Bundle/ChillEventBundle/Entity/Participation.php +++ b/src/Bundle/ChillEventBundle/Entity/Participation.php @@ -91,7 +91,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * Get event. */ - public function getEvent(): Event|null + public function getEvent(): ?Event { return $this->event; } @@ -127,7 +127,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * Get role. */ - public function getRole(): Role|null + public function getRole(): ?Role { return $this->role; } @@ -147,7 +147,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * Get status. */ - public function getStatus(): Status|null + public function getStatus(): ?Status { return $this->status; } diff --git a/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php b/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php index dcc19f01c..050b777e9 100644 --- a/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php +++ b/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php @@ -28,5 +28,5 @@ interface CronJobInterface * * @return array|null optionally return an array with the same data than the previous execution */ - public function run(array $lastExecutionData): array|null; + public function run(array $lastExecutionData): ?array; } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php index dd28a8efe..cce2f9ba4 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -40,15 +39,15 @@ class Age extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->value1 = $parser->SimpleArithmeticExpression(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->value2 = $parser->SimpleArithmeticExpression(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php index 93000be9c..bc6134c60 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php @@ -14,7 +14,6 @@ namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\DateDiffFunction; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\AST\PathExpression; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -45,17 +44,17 @@ class Extract extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); - $parser->match(Lexer::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); $this->field = $parser->getLexer()->token['value']; - $parser->match(Lexer::T_FROM); + $parser->match(\Doctrine\ORM\Query\TokenType::T_FROM); // $this->value = $parser->ScalarExpression(); $this->value = $parser->ArithmeticPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php index 94d2da2e8..56b2a9cda 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -33,11 +32,11 @@ class GetJsonFieldByKey extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->expr1 = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->expr2 = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php index 924831eb1..6467b93c5 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php @@ -13,7 +13,6 @@ namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\AST\Node; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -41,15 +40,15 @@ class Greatest extends FunctionNode $this->exprs = []; $lexer = $parser->getLexer(); - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->exprs[] = $parser->ArithmeticPrimary(); - while (Lexer::T_COMMA === $lexer->lookahead['type']) { - $parser->match(Lexer::T_COMMA); + while (\Doctrine\ORM\Query\TokenType::T_COMMA === $lexer->lookahead['type']) { + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->exprs[] = $parser->ArithmeticPrimary(); } - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php index 03809572d..171b069d3 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -33,9 +32,9 @@ class JsonAggregate extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->expr = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php index 675935867..ea6ea4c53 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php @@ -13,7 +13,6 @@ namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\AST\Node; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -38,16 +37,16 @@ class JsonBuildObject extends FunctionNode public function parse(Parser $parser) { $lexer = $parser->getLexer(); - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->exprs[] = $parser->ArithmeticPrimary(); - while (Lexer::T_COMMA === $lexer->lookahead['type']) { - $parser->match(Lexer::T_COMMA); + while (\Doctrine\ORM\Query\TokenType::T_COMMA === $lexer->lookahead['type']) { + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->exprs[] = $parser->ArithmeticPrimary(); } - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php index 95d851790..7abf15972 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -29,15 +28,15 @@ class JsonExtract extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->element = $parser->ArithmeticPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->keyToExtract = $parser->ArithmeticExpression(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php index 4b3b75dfd..84f991fe8 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -33,9 +32,9 @@ class JsonbArrayLength extends FunctionNode public function parse(Parser $parser): void { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->expr1 = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php index 6ca3da89c..4c6d901d5 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -33,11 +32,11 @@ class JsonbExistsInArray extends FunctionNode public function parse(Parser $parser): void { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->expr1 = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->expr2 = $parser->InputParameter(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php index 7497e042e..aa6844e88 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php @@ -13,7 +13,6 @@ namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\AST\Node; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -41,15 +40,15 @@ class Least extends FunctionNode $this->exprs = []; $lexer = $parser->getLexer(); - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->exprs[] = $parser->ArithmeticPrimary(); - while (Lexer::T_COMMA === $lexer->lookahead['type']) { - $parser->match(Lexer::T_COMMA); + while (\Doctrine\ORM\Query\TokenType::T_COMMA === $lexer->lookahead['type']) { + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->exprs[] = $parser->ArithmeticPrimary(); } - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/OverlapsI.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/OverlapsI.php index 2495199b1..edf00243f 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/OverlapsI.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/OverlapsI.php @@ -13,7 +13,6 @@ namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\AST\PathExpression; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; /** @@ -45,29 +44,29 @@ class OverlapsI extends FunctionNode public function parse(Parser $parser): void { - $parser->match(Lexer::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->firstPeriodStart = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->firstPeriodEnd = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->secondPeriodStart = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->secondPeriodEnd = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } protected function makeCase($sqlWalker, $part, string $position): string diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php index 7caf2c62c..d4c317f39 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; class Replace extends FunctionNode { @@ -35,19 +34,19 @@ class Replace extends FunctionNode public function parse(\Doctrine\ORM\Query\Parser $parser): void { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->string = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->from = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->to = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php index aa9bd29a4..9f3d1b861 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; /** * Geometry function 'ST_CONTAINS', added by postgis. @@ -31,15 +30,15 @@ class STContains extends FunctionNode public function parse(\Doctrine\ORM\Query\Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->firstPart = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->secondPart = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php index 2841bb729..f0d99d837 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -27,11 +26,11 @@ class STX extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->field = $parser->ArithmeticExpression(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php index 9457a9357..42842605d 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -27,11 +26,11 @@ class STY extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->field = $parser->ArithmeticExpression(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php index 2aa97fb9c..477e0c542 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; class Similarity extends FunctionNode { @@ -28,15 +27,15 @@ class Similarity extends FunctionNode public function parse(\Doctrine\ORM\Query\Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->firstPart = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->secondPart = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php index 7d0ef2acf..0096825a4 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php @@ -11,7 +11,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -29,15 +28,15 @@ class StrictWordSimilarityOPS extends \Doctrine\ORM\Query\AST\Functions\Function public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->firstPart = $parser->StringPrimary(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->secondPart = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php index ef150867e..dc73aea92 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -36,11 +35,11 @@ class ToChar extends FunctionNode public function parse(Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->datetime = $parser->ArithmeticExpression(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); $this->fmt = $parser->StringExpression(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php index 5813c546f..12a745a0c 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; /** * Unaccent string using postgresql extension unaccent : @@ -31,11 +30,11 @@ class Unaccent extends FunctionNode public function parse(\Doctrine\ORM\Query\Parser $parser) { - $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); $this->string = $parser->StringPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index d5821c08f..05112430c 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -549,7 +549,7 @@ class User implements UserInterface, \Stringable $this->scopeHistories[] = $newScope; $criteria = new Criteria(); - $criteria->orderBy(['startDate' => Criteria::ASC, 'id' => Criteria::ASC]); + $criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]); /** @var \Iterator $scopes */ $scopes = $this->scopeHistories->matching($criteria)->getIterator(); @@ -605,7 +605,7 @@ class User implements UserInterface, \Stringable $this->jobHistories[] = $newJob; $criteria = new Criteria(); - $criteria->orderBy(['startDate' => Criteria::ASC, 'id' => Criteria::ASC]); + $criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]); /** @var \Iterator $jobs */ $jobs = $this->jobHistories->matching($criteria)->getIterator(); diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php index 0267b126d..7c41db3a0 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php @@ -41,7 +41,7 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C return 'collate-address'; } - public function run(array $lastExecutionData): array|null + public function run(array $lastExecutionData): ?array { $maxId = ($this->collateAddressWithReferenceOrPostalCode)($lastExecutionData[self::LAST_MAX_ID] ?? 0); diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php index 46c79a250..77ce3a0c5 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php @@ -46,7 +46,7 @@ final readonly class RefreshAddressToGeographicalUnitMaterializedViewCronJob imp return 'refresh-materialized-view-address-to-geog-units'; } - public function run(array $lastExecutionData): array|null + public function run(array $lastExecutionData): ?array { $this->connection->executeQuery('REFRESH MATERIALIZED VIEW view_chill_main_address_geographical_unit'); diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php index 38e2c9509..50b0f5584 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php @@ -91,7 +91,7 @@ class JobWithReturn implements CronJobInterface return 'with-data'; } - public function run(array $lastExecutionData): array|null + public function run(array $lastExecutionData): ?array { return ['data' => 'test']; } diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php index 417e1117b..80131a8e8 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php @@ -175,7 +175,7 @@ class JobCanRun implements CronJobInterface return $this->key; } - public function run(array $lastExecutionData): array|null + public function run(array $lastExecutionData): ?array { return null; } @@ -193,7 +193,7 @@ class JobCannotRun implements CronJobInterface return 'job-b'; } - public function run(array $lastExecutionData): array|null + public function run(array $lastExecutionData): ?array { return null; } diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php index 15334298e..96587a24c 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php @@ -117,7 +117,7 @@ final class UserNormalizerTest extends TestCase * * @throws ExceptionInterface */ - public function testNormalize(User|null $user, mixed $format, mixed $context, mixed $expected) + public function testNormalize(?User $user, mixed $format, mixed $context, mixed $expected) { $userRender = $this->prophesize(UserRender::class); $userRender->renderString(Argument::type(User::class), Argument::type('array'))->willReturn($user ? $user->getLabel() : ''); diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php index 33d88e7de..73030f42c 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php @@ -39,7 +39,7 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface return 'accompanying-period-step-change'; } - public function run(array $lastExecutionData): array|null + public function run(array $lastExecutionData): ?array { ($this->requestor)(); diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php index 229a69f2c..2ebc1a859 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\PersonBundle\Doctrine\DQL; use Doctrine\ORM\Query\AST\Functions\FunctionNode; -use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; @@ -73,13 +72,13 @@ abstract class AddressPart extends FunctionNode public function parse(Parser $parser) { - $a = $parser->match(Lexer::T_IDENTIFIER); - $parser->match(Lexer::T_OPEN_PARENTHESIS); + $a = $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); // person id $this->pid = $parser->SingleValuedPathExpression(); - $parser->match(Lexer::T_COMMA); + $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); // date $this->date = $parser->ArithmeticPrimary(); - $parser->match(Lexer::T_CLOSE_PARENTHESIS); + $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); } } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 4f9c480d0..a7e178097 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -555,7 +555,7 @@ class AccompanyingPeriod implements // ensure continuity of histories $criteria = new Criteria(); - $criteria->orderBy(['startDate' => Criteria::ASC, 'id' => Criteria::ASC]); + $criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]); /** @var \Iterator $locations */ $locations = $this->getLocationHistories()->matching($criteria)->getIterator(); @@ -1536,7 +1536,7 @@ class AccompanyingPeriod implements { // ensure continuity of histories $criteria = new Criteria(); - $criteria->orderBy(['startDate' => Criteria::ASC, 'id' => Criteria::ASC]); + $criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]); /** @var \Iterator $steps */ $steps = $this->getStepHistories()->matching($criteria)->getIterator(); diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index cd28da9a7..6f22aacc8 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -1205,7 +1205,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI ->where( $expr->eq('shareHousehold', false) ) - ->orderBy(['startDate' => Criteria::DESC]); + ->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Descending]); return $this->getHouseholdParticipations() ->matching($criteria); @@ -1227,7 +1227,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI ->where( $expr->eq('shareHousehold', true) ) - ->orderBy(['startDate' => Criteria::DESC, 'id' => Criteria::DESC]); + ->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Descending, 'id' => \Doctrine\Common\Collections\Order::Descending]); return $this->getHouseholdParticipations() ->matching($criteria); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php index 6a9cce351..ab6bb6170 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php @@ -48,7 +48,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (string|null $value): string { + return function (?string $value): string { if ('_header' === $value) { return 'export.aggregator.course.by_closing_date.header'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php index 6f9ea4859..d0d121c2a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php @@ -48,7 +48,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (string|null $value): string { + return function (?string $value): string { if ('_header' === $value) { return 'export.aggregator.course.by_opening_date.header'; } diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php index 609ee03fb..8442ee106 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php @@ -521,7 +521,7 @@ class AccompanyingPeriodACLAwareRepositoryTest extends KernelTestCase /** * @param array $scopes */ - private function buildPeriod(Person $person, array $scopes, User|null $creator, bool $confirm): AccompanyingPeriod + private function buildPeriod(Person $person, array $scopes, ?User $creator, bool $confirm): AccompanyingPeriod { $period = new AccompanyingPeriod(); $period->addPerson($person); diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index 25b5008b0..5e8f8eb0b 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -112,7 +112,7 @@ class SingleTask extends AbstractTask * message="An end date is required if a warning interval is set" * ) */ - private \DateInterval|null $warningInterval = null; + private ?\DateInterval $warningInterval = null; public function __construct() { @@ -122,7 +122,7 @@ class SingleTask extends AbstractTask /** * Get endDate. */ - public function getEndDate(): \DateTime|null + public function getEndDate(): ?\DateTime { return $this->endDate; } @@ -184,7 +184,7 @@ class SingleTask extends AbstractTask /** * Get warningInterval. */ - public function getWarningInterval(): \DateInterval|null + public function getWarningInterval(): ?\DateInterval { return $this->warningInterval; } @@ -234,7 +234,7 @@ class SingleTask extends AbstractTask * * @return SingleTask */ - public function setWarningInterval(\DateInterval|null $warningInterval) + public function setWarningInterval(?\DateInterval $warningInterval) { $this->warningInterval = $warningInterval;