for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Formularium\Frontend\Materialize\Renderable;
use Formularium\Field;
use Formularium\Frontend\Materialize\RenderableMaterializeInputTrait;
use Formularium\HTMLElement;
class Renderable_file extends \Formularium\Renderable
{
use RenderableMaterializeInputTrait;
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('input')[0];
return HTMLElement::factory(
'div',
['class' => 'file-field'],
[
HTMLElement::factory(
['class' => "btn"],
'span',
[],
'Upload'
),
$input
]
['class' => "file-path-wrapper"],
'input',
['class' => 'file-path validate', 'type' => 'text']
)
);
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.