| Total Complexity | 4 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class Time |
||
| 22 | { |
||
| 23 | protected static int|null $frozenTime = null; |
||
| 24 | |||
| 25 | public static function freeze(int $time = null): void |
||
| 26 | { |
||
| 27 | static::$frozenTime = $time ?? static::time(); |
||
| 28 | } |
||
| 29 | |||
| 30 | public static function unfreeze(): void |
||
| 31 | { |
||
| 32 | static::$frozenTime = null; |
||
| 33 | } |
||
| 34 | |||
| 35 | public static function get(): int |
||
| 38 | } |
||
| 39 | |||
| 40 | protected static function time(): int |
||
| 43 | } |
||
| 44 | } |
||
| 45 |