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