Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class MockContainer extends AbstractContainer |
||
15 | { |
||
16 | /** @var \Psr\Clock\ClockInterface */ |
||
17 | private ClockInterface $clock; |
||
18 | |||
19 | |||
20 | /** |
||
21 | * Get a PSR-3 compatible logger. |
||
22 | * @return \Psr\Log\LoggerInterface |
||
23 | */ |
||
24 | public function getLogger(): LoggerInterface |
||
25 | { |
||
26 | return new NullLogger(); |
||
27 | } |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Set the system clock |
||
32 | * |
||
33 | * @param \Psr\Clock\ClockInterface $clock |
||
34 | * @return void |
||
35 | */ |
||
36 | public function setClock(ClockInterface $clock): void |
||
37 | { |
||
38 | $this->clock = $clock; |
||
39 | } |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Get the system clock |
||
44 | * |
||
45 | * @return \Psr\Clock\ClockInterface |
||
46 | */ |
||
47 | public function getClock(): ClockInterface |
||
50 | } |
||
51 | } |
||
52 |