for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Knik\Binn\Encoder;
use Knik\Binn\Contracts\BinnValueEncoder;
class BinnEncode
{
/** @var EncoderCollection */
private $encoders;
public function __construct(EncoderCollection $encoders)
$this->encoders = $encoders;
}
public function encode($value, $format, $context = []): ?string
$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 encode($value, /** @scrutinizer ignore-unused */ $format, $context = []): ?string
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 encode($value, $format, /** @scrutinizer ignore-unused */ $context = []): ?string
/** @var BinnValueEncoder $encoder */
foreach ($this->encoders->getAll() as $encoder) {
if ($encoder->supportsEncoding($value)) {
return $encoder->encode($value);
return "\x00";
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.