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