| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class SystemClock |
||
| 8 | { |
||
| 9 | use TimeTravel; |
||
| 10 | |||
| 11 | private DateTimeImmutable $_now; |
||
| 12 | |||
| 13 | 44 | public function __construct(DateTimeImmutable | null $now = null) |
|
| 16 | 44 | } |
|
| 17 | |||
| 18 | 42 | public static function create(DateTimeImmutable | null $now = null): self |
|
| 19 | { |
||
| 20 | 42 | return new self($now); |
|
| 21 | } |
||
| 22 | |||
| 23 | 25 | public static function fromTimestamp(int $timestamp): self |
|
| 24 | { |
||
| 25 | 25 | return new self((new DateTimeImmutable())->setTimestamp($timestamp)); |
|
| 26 | } |
||
| 27 | |||
| 28 | 44 | public function now(): DateTimeImmutable |
|
| 31 | } |
||
| 32 | } |
||
| 33 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths