for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Arquivei\LogAdapter\Processors;
use Monolog\Processor\ProcessorInterface;
use stdClass;
class DynamicContextProcessor implements ProcessorInterface
{
private ?array $map;
private ?stdClass $stdClass;
public function __construct(?array $map = [], ?stdClass $stdClass = null)
$this->map = $map;
$this->stdClass = $stdClass;
}
public function __invoke(array $records): array
return self::extract($records, $this->map, $this->stdClass);
Arquivei\LogAdapter\Proc...extProcessor::extract()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return self::/** @scrutinizer ignore-call */ extract($records, $this->map, $this->stdClass);
/**
* @param stdClass|null $stdClass
*/
public function setStdClass(?stdClass $stdClass): void
private function extract(?array $records, ?array $map, ?stdClass $stdClass = null): array
$stdClass
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
private function extract(?array $records, ?array $map, /** @scrutinizer ignore-unused */ ?stdClass $stdClass = null): array
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
foreach ($map as $value) {
eval($value . ";");
return $records;