for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Epesi\Core\System\Modules\Concerns;
use atk4\ui\Form;
trait HasOptions
{
/**
* Define the option elements and return as array
* Options are class specific and can be modified by the user
*/
public function addOptionControls(Form $form) {}
$form
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function addOptionControls(/** @scrutinizer ignore-unused */ Form $form) {}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
* Define the server side form validation rules
public function rules() {
return [];
}
public function getOptionDefaults()
$form = new Form();
$this->addOptionControls($form);
return $form->model->get();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.