Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Insight] Your project should not contain duplicated code - in src/…/InputFilter/AdminInputFilter.php, line 20 #248

Closed
arhimede opened this issue Jun 26, 2024 · 1 comment

Comments

@arhimede
Copy link
Member

in src/Admin/src/InputFilter/AdminInputFilter.php, line 20

The next 24 lines appear both in src/Admin/src/InputFilter/AdminInputFilter.php:20 and src/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

@cPintiuta
Copy link
Member

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.

@arhimede arhimede closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants