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\Web;
use Yiisoft\Assets\AssetBundle;
use Yiisoft\Yii\Debug\Collector\CollectorTrait;
use Yiisoft\Yii\Debug\Collector\SummaryCollectorInterface;
final class AssetCollector implements SummaryCollectorInterface
{
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;
public function getSummary(): array
return [
'asset' => [
'bundles' => [
'total' => 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.