for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Knik\Binn\Decoder;
use Knik\Binn\Contracts\BinnValueDecoder;
class BinnDecode
{
/** @var DecoderCollection */
private $decoders;
public function __construct(DecoderCollection $decoders)
$this->decoders = $decoders;
}
public function decode($value, $format, $context = [])
$format
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function decode($value, /** @scrutinizer ignore-unused */ $format, $context = [])
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$context
public function decode($value, $format, /** @scrutinizer ignore-unused */ $context = [])
/** @var BinnValueDecoder $decoder */
foreach ($this->decoders->getAll() as $decoder) {
if ($decoder->supportsDecoding($value)) {
return $decoder->decode($value);
return null;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.