OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
kreait
/
firebase-tokens
/
tests
/
Firebase
/
Auth
/
Token
/
Util
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:36:42 AM
rwxr-xr-x
📄
ArrayKeyStore.php
681 bytes
08/12/2024 10:36:42 AM
rw-r--r--
📄
TestHelperClock.php
1.02 KB
08/12/2024 10:36:43 AM
rw-r--r--
Editing: TestHelperClock.php
Close
<?php declare(strict_types=1); namespace Firebase\Auth\Token\Tests\Util; use DateInterval; use DateTimeImmutable; use Kreait\Clock; final class TestHelperClock implements Clock { private Clock $clock; public function __construct(Clock $clock) { $this->clock = $clock; } public function now(): DateTimeImmutable { return $this->clock->now(); } public function minutesEarlier(int $minutes): DateTimeImmutable { return $this->now()->sub(new DateInterval('PT'.$minutes.'M')); } public function minutesLater(int $minutes): DateTimeImmutable { return $this->now()->add(new DateInterval('PT'.$minutes.'M')); } public function secondsEarlier(int $seconds): DateTimeImmutable { return $this->now()->sub(new DateInterval('PT'.$seconds.'S')); } public function secondsLater(int $seconds): DateTimeImmutable { return $this->now()->add(new DateInterval('PT'.$seconds.'S')); } }