admin
admin copied to clipboard
[Insight] Your project should not contain duplicated code - in src/…/InputFilter/AdminInputFilter.php, line 20
in src/Admin/src/InputFilter/AdminInputFilter.php, line 20
The next 24 lines appear both in
src/Admin/src/InputFilter/AdminInputFilter.php:20andsrc/Admin/src/InputFilter/EditAdminInputFilter.php:20.
use Laminas\Validator\StringLength;
/**
* @extends InputFilter<object>
*/
class AdminInputFilter extends InputFilter
{
public function init(): void
{
$identity = new Input('identity');
$identity->setRequired(true);
Posted from SymfonyInsight
This should be ignored as the other warning like this was. The dublicate code warning is between create and edit inputs for the admin, whatever changes we make, still will se dublicate code, as the password inputs for create needs to be required and for edit don't. I tried to make a base input filter and create and update to extend that, but still will see dublicate code because of the passwords inputs.