Total Complexity | 4 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class ServiceCollector implements ServiceCollectorInterface |
||
8 | { |
||
9 | use CollectorTrait; |
||
10 | |||
11 | private array $items = []; |
||
12 | |||
13 | 1 | public function getCollected(): array |
|
16 | } |
||
17 | |||
18 | 4 | public function collect( |
|
19 | string $service, |
||
20 | string $class, |
||
21 | string $method, |
||
22 | ?array $arguments, |
||
23 | $result, |
||
24 | string $status, |
||
25 | ?object $error, |
||
26 | float $timeStart, |
||
27 | float $timeEnd |
||
28 | ): void { |
||
29 | 4 | if (!$this->isActive()) { |
|
30 | 3 | return; |
|
31 | } |
||
32 | |||
33 | 1 | $this->items[] = [ |
|
34 | 1 | 'service' => $service, |
|
35 | 1 | 'class' => $class, |
|
36 | 1 | 'method' => $method, |
|
37 | 1 | 'arguments' => $arguments, |
|
38 | 1 | 'result' => $result, |
|
39 | 1 | 'status' => $status, |
|
40 | 1 | 'error' => $error, |
|
41 | 1 | 'timeStart' => $timeStart, |
|
42 | 1 | 'timeEnd' => $timeEnd, |
|
43 | ]; |
||
44 | 1 | } |
|
45 | |||
46 | 1 | private function reset(): void |
|
49 | 1 | } |
|
50 | } |
||
51 |
This check looks for private methods that have been defined, but are not used inside the class.