Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 93.75% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class AssetCollector implements CollectorInterface, IndexCollectorInterface |
||
13 | { |
||
14 | use CollectorTrait; |
||
15 | |||
16 | private array $assetBundles = []; |
||
17 | |||
18 | 1 | public function getCollected(): array |
|
19 | { |
||
20 | 1 | return $this->assetBundles; |
|
21 | } |
||
22 | |||
23 | 1 | public function collect(AssetBundle $assetBundle): void |
|
24 | { |
||
25 | 1 | if (!$this->isActive()) { |
|
26 | return; |
||
27 | } |
||
28 | |||
29 | 1 | $this->assetBundles[] = $assetBundle; |
|
30 | } |
||
31 | |||
32 | 1 | public function getIndexData(): array |
|
33 | { |
||
34 | 1 | return [ |
|
35 | 1 | 'asset' => [ |
|
36 | 1 | 'bundles' => [ |
|
37 | 1 | 'total' => count($this->assetBundles), |
|
38 | 1 | ], |
|
39 | 1 | ], |
|
40 | 1 | ]; |
|
41 | } |
||
42 | |||
43 | 1 | private function reset(): void |
|
46 | } |
||
47 | } |
||
48 |
This check looks for private methods that have been defined, but are not used inside the class.