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