for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jidaikobo\Kontiki\Models;
class FileModel extends BaseModel
{
use Traits\CRUDTrait;
protected string $table = 'files';
protected function defineFieldDefinitions(array $params = []): void
$params
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function defineFieldDefinitions(/** @scrutinizer ignore-unused */ array $params = []): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$this->fieldDefinitions = [
'id' => [
'label' => 'ID',
],
'path' => [
'label' => __('path'),
'type' => 'text',
'attributes' => ['class' => 'form-control'],
'label_attributes' => ['class' => 'form-label'],
'default' => '',
'searchable' => true,
'rules' => ['required'],
'filter' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
Jidaikobo\Kontiki\Models...TIZE_FULL_SPECIAL_CHARS
'template' => 'default',
'group' => 'main',
'fieldset_template' => 'forms/fieldset/flat.php',
'description' => [
'label' => __('description'),
'description' => '',
'type' => 'textarea',
'attributes' => [
'class' => 'form-control',
'rows' => '2'
'rules' => [
['lengthMin', 3]
'filter' => FILTER_UNSAFE_RAW,
];
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.