mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 08:33:49 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -200,7 +200,7 @@ class Household
|
||||
*/
|
||||
public function getCurrentAddress(?DateTime $at = null): ?Address
|
||||
{
|
||||
$at = null === $at ? new DateTime('today') : $at;
|
||||
$at = $at ?? new DateTime('today');
|
||||
|
||||
$addrs = $this->getAddresses()->filter(static function (Address $a) use ($at) {
|
||||
return $a->getValidFrom() <= $at && (
|
||||
@@ -412,7 +412,7 @@ class Household
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
$date = null === $now ? (new DateTimeImmutable('today')) : $now;
|
||||
$date = $now ?? new DateTimeImmutable('today');
|
||||
|
||||
$criteria
|
||||
->where(
|
||||
@@ -634,7 +634,7 @@ class Household
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
$date = null === $now ? (new DateTimeImmutable('today')) : $now;
|
||||
$date = $now ?? new DateTimeImmutable('today');
|
||||
|
||||
$criteria
|
||||
->where($expr->orX(
|
||||
|
Reference in New Issue
Block a user