Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SystemClock | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| now | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | // ╔════════════════════════════════════════════════════════════╗ |
| 4 | // ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║ |
| 5 | // ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com> ║ |
| 6 | // ╚════════════════════════════════════════════════════════════╝ |
| 7 | |
| 8 | declare(strict_types=1); |
| 9 | |
| 10 | namespace Phexium\Plugin\Clock\Adapter; |
| 11 | |
| 12 | use DateTimeImmutable; |
| 13 | use Override; |
| 14 | use Phexium\Plugin\Clock\Port\ClockInterface; |
| 15 | |
| 16 | final readonly class SystemClock implements ClockInterface |
| 17 | { |
| 18 | #[Override] |
| 19 | public function now(): DateTimeImmutable |
| 20 | { |
| 21 | return new DateTimeImmutable(); |
| 22 | } |
| 23 | } |