mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Fix deprecations and code style issues
This commit is contained in:
@@ -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)();
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
|
@@ -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';
|
||||
}
|
||||
|
@@ -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';
|
||||
}
|
||||
|
@@ -521,7 +521,7 @@ class AccompanyingPeriodACLAwareRepositoryTest extends KernelTestCase
|
||||
/**
|
||||
* @param array<Scope> $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);
|
||||
|
Reference in New Issue
Block a user