Skip to content

Commit ecb9b18

Browse files
chore: Add PR's requested changes
1 parent c668d63 commit ecb9b18

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

app/Repositories/DoctrineUserTrustedDeviceRepository.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Auth\Repositories\IUserTrustedDeviceRepository;
1616
use Auth\User;
1717
use Doctrine\Common\Collections\Criteria;
18+
use Doctrine\Common\Collections\Expr\Comparison;
1819

1920
final class DoctrineUserTrustedDeviceRepository
2021
extends ModelDoctrineRepository implements IUserTrustedDeviceRepository
@@ -24,13 +25,10 @@ protected function getBaseEntity()
2425
return UserTrustedDevice::class;
2526
}
2627

27-
private function buildActiveExpiryExpr(): \Doctrine\Common\Collections\Expr\CompositeExpression
28+
private function buildActiveExpiryExpr(): Comparison
2829
{
2930
$now = new \DateTime('now', new \DateTimeZone('UTC'));
30-
return Criteria::expr()->orX(
31-
Criteria::expr()->gt('expires_at', $now),
32-
Criteria::expr()->isNull('expires_at')
33-
);
31+
return Criteria::expr()->gt('expires_at', $now);
3432
}
3533

3634
public function getActiveByUserAndIdentifier(User $user, string $deviceIdentifier): ?UserTrustedDevice

app/libs/Auth/Models/TwoFactorAuditLog.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,4 @@ public function getMetadata(): ?array { return $this->metadata; }
8888
public function setMetadata(?array $value): void { $this->metadata = $value; }
8989

9090
public function getCreatedAt(): \DateTime { return $this->created_at; }
91-
92-
public function __get($name) { return $this->{$name}; }
9391
}

0 commit comments

Comments
 (0)