mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-08 05:08:25 +00:00
Apply new rector rules regarding to PHP version to 8.4
This commit is contained in:
@@ -32,6 +32,7 @@ class ChillMainExtension extends Extension implements Widget\HasWidgetFactoriesE
|
||||
$this->widgetFactories[] = $factory;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getConfiguration(array $config, ContainerBuilder $container): ?\Symfony\Component\Config\Definition\ConfigurationInterface
|
||||
{
|
||||
return new Configuration($this->widgetFactories, $container);
|
||||
|
||||
@@ -97,12 +97,12 @@ class ChillPersonAddAPersonWidget implements WidgetInterface
|
||||
$or = new Expr\Orx();
|
||||
// add the case where closingDate IS NULL
|
||||
$andWhenClosingDateIsNull = new Expr\Andx();
|
||||
$andWhenClosingDateIsNull->add((new Expr())->isNull('ap.closingDate'));
|
||||
$andWhenClosingDateIsNull->add((new Expr())->gte(':now', 'ap.openingDate'));
|
||||
$andWhenClosingDateIsNull->add(new Expr()->isNull('ap.closingDate'));
|
||||
$andWhenClosingDateIsNull->add(new Expr()->gte(':now', 'ap.openingDate'));
|
||||
$or->add($andWhenClosingDateIsNull);
|
||||
// add the case when now is between opening date and closing date
|
||||
$or->add(
|
||||
(new Expr())->between(':now', 'ap.openingDate', 'ap.closingDate')
|
||||
new Expr()->between(':now', 'ap.openingDate', 'ap.closingDate')
|
||||
);
|
||||
$and->add($or);
|
||||
$qb->setParameter('now', new DateTime(), Type::DATE);
|
||||
|
||||
Reference in New Issue
Block a user