DX: apply rector rulesset up to PHP72

This commit is contained in:
2023-03-29 22:32:52 +02:00
parent 64b8ae3df1
commit b9a7530f7a
110 changed files with 194 additions and 229 deletions

View File

@@ -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(