for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Formularium\Frontend\Vue;
use Formularium\Field;
use Formularium\HTMLElement;
trait RenderableVueTrait
{
public function viewable($value, Field $field, HTMLElement $previous): HTMLElement
$field
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function viewable($value, /** @scrutinizer ignore-unused */ 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.
$value
public function viewable(/** @scrutinizer ignore-unused */ $value, Field $field, HTMLElement $previous): HTMLElement
return $previous;
}
public function editable($value, Field $field, HTMLElement $previous): HTMLElement
public function editable(/** @scrutinizer ignore-unused */ $value, Field $field, HTMLElement $previous): HTMLElement
foreach ($previous->get('input') as $input) {
$input->setAttribute('v-model', $field->getName())
->removeAttribute('value');
foreach ($previous->get('textarea') as $textarea) {
$textarea->setAttribute('v-model', $field->getName());
foreach ($previous->get('select') as $input) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.