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;
class LogCollector implements SummaryCollectorInterface
{
use CollectorTrait;
private array $messages = [];
public function getCollected(): array
return $this->messages;
}
public function collect(string $level, $message, array $context, string $line): void
if (!$this->isActive()) {
return;
$this->messages[] = [
'time' => microtime(true),
'level' => $level,
'message' => $message,
'context' => $context,
'line' => $line,
];
private function reset(): void
reset()
This check looks for private methods that have been defined, but are not used inside the class.
$this->messages = [];
public function getSummary(): array
return [
'logger' => [
'total' => count($this->messages),
],
This check looks for private methods that have been defined, but are not used inside the class.