Total Complexity | 9 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 91.67% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
21 | final class CacheCpu implements Server |
||
22 | { |
||
23 | private Server $server; |
||
24 | private Clock $clock; |
||
25 | private ElapsedPeriod $threshold; |
||
26 | private ?PointInTime $cachedAt = null; |
||
27 | private ?Cpu $data = null; |
||
28 | 18 | ||
29 | public function __construct( |
||
30 | Server $server, |
||
31 | Clock $clock, |
||
32 | ElapsedPeriod $threshold |
||
33 | 18 | ) { |
|
34 | 18 | $this->server = $server; |
|
35 | 18 | $this->clock = $clock; |
|
36 | 18 | $this->threshold = $threshold; |
|
37 | } |
||
38 | 3 | ||
39 | /** |
||
40 | 3 | * @psalm-suppress InvalidNullableReturnType |
|
41 | */ |
||
42 | public function cpu(): Cpu |
||
60 | } |
||
61 | |||
62 | 3 | public function memory(): Memory |
|
63 | { |
||
64 | 3 | return $this->server->memory(); |
|
65 | } |
||
66 | |||
67 | 3 | public function processes(): Processes |
|
68 | { |
||
69 | 3 | return $this->server->processes(); |
|
70 | } |
||
71 | |||
72 | 3 | public function loadAverage(): LoadAverage |
|
73 | { |
||
74 | 3 | return $this->server->loadAverage(); |
|
75 | } |
||
76 | |||
77 | public function disk(): Disk |
||
80 | } |
||
81 | |||
82 | public function tmp(): Path |
||
85 | } |
||
86 | } |
||
87 |