hamburgscleanest /
guzzle-advanced-throttle
| 1 | <?php |
||
| 2 | |||
| 3 | namespace hamburgscleanest\GuzzleAdvancedThrottle; |
||
| 4 | |||
| 5 | use DateTimeImmutable; |
||
| 6 | |||
| 7 | class SystemClock |
||
| 8 | { |
||
| 9 | use TimeTravel; |
||
| 10 | |||
| 11 | private DateTimeImmutable $_now; |
||
| 12 | |||
| 13 | 44 | public function __construct(DateTimeImmutable | null $now = null) |
|
|
0 ignored issues
–
show
|
|||
| 14 | { |
||
| 15 | 44 | $this->_now = $now ?? new DateTimeImmutable(); |
|
| 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 |
|
| 29 | { |
||
| 30 | 44 | return $this->_now; |
|
| 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