for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Formularium\Frontend\Bootstrap\Renderable;
use Formularium\Field;
use Formularium\Frontend\Bootstrap\RenderableBootstrapTrait;
use Formularium\HTMLElement;
class Renderable_bool extends \Formularium\Renderable
{
use RenderableBootstrapTrait;
public function viewable($value, Field $field, HTMLElement $previous): HTMLElement
return $previous;
}
public function _editable($value, Field $field, HTMLElement $previous): HTMLElement
$value
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function _editable(/** @scrutinizer ignore-unused */ $value, Field $field, HTMLElement $previous): HTMLElement
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$field
public function _editable($value, /** @scrutinizer ignore-unused */ Field $field, HTMLElement $previous): HTMLElement
// add extra classes
$input = $previous->get('select');
$input[0]->setAttributes([
'class' => 'form-control',
]);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.