| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class CacheCollector implements CollectorInterface, SummaryCollectorInterface |
||
| 13 | { |
||
| 14 | use CollectorTrait; |
||
| 15 | |||
| 16 | public array $set = []; |
||
| 17 | private array $get = []; |
||
| 18 | |||
| 19 | public function collectGet(string $key): void |
||
| 20 | { |
||
| 21 | $this->get[$key] = $key; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function collectSet(string $key, mixed $value, DateInterval|int|null $ttl) |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getCollected(): array |
||
| 34 | { |
||
| 35 | return [ |
||
| 36 | 'cache' => [ |
||
| 37 | 'get' => array_values($this->get), |
||
| 38 | 'set' => array_values($this->set), |
||
| 39 | ], |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getSummary(): array |
||
| 44 | { |
||
| 45 | return [ |
||
| 46 | 'cache' => [ |
||
| 47 | 'get' => [ |
||
| 48 | 'total' => array_values($this->get), |
||
| 49 | ], |
||
| 50 | 'set' => [ |
||
| 51 | 'total' => array_values($this->set), |
||
| 52 | ], |
||
| 53 | ], |
||
| 54 | ]; |
||
| 55 | } |
||
| 56 | |||
| 57 | public static function getView(): string |
||
| 60 | } |
||
| 61 | } |
||
| 62 |
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