for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\Yii\Debug\Collector;
use JetBrains\PhpStorm\ArrayShape;
use Yiisoft\Assets\AssetBundle;
final class AssetCollector implements CollectorInterface, IndexCollectorInterface
{
use CollectorTrait;
private array $assetBundles = [];
public function getCollected(): array
return $this->assetBundles;
}
public function collect(AssetBundle $assetBundle): void
if (!$this->isActive()) {
return;
$this->assetBundles[] = $assetBundle;
#[ArrayShape(['totalAssetBundles' => 'int'])]
public function getIndexData(): array
return [
'totalAssetBundles' => count($this->assetBundles),
];
private function reset(): void
reset()
This check looks for private methods that have been defined, but are not used inside the class.
$this->assetBundles = [];
This check looks for private methods that have been defined, but are not used inside the class.