| 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 | 2 | public function getCollected(): array |
|
| 16 | } |
||
| 17 | |||
| 18 | 7 | 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 | 7 | if (!$this->isActive()) { |
|
| 30 | 5 | return; |
|
| 31 | } |
||
| 32 | |||
| 33 | 2 | $this->items[] = [ |
|
| 34 | 2 | 'service' => $service, |
|
| 35 | 2 | 'class' => $class, |
|
| 36 | 2 | 'method' => $method, |
|
| 37 | 2 | 'arguments' => $arguments, |
|
| 38 | 2 | 'result' => $result, |
|
| 39 | 2 | 'status' => $status, |
|
| 40 | 2 | 'error' => $error, |
|
| 41 | 2 | 'timeStart' => $timeStart, |
|
| 42 | 2 | 'timeEnd' => $timeEnd, |
|
| 43 | ]; |
||
| 44 | 2 | } |
|
| 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.