Your project should not contain duplicated code 2

More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code

  1. use Laminas\Validator\StringLength;
  2. /**
  3. * @extends InputFilter<object>
  4. */
  5. class AdminInputFilter extends InputFilter

    The next 24 lines appear both in src/Admin/src/InputFilter/AdminInputFilter.php:20 and src/Admin/src/InputFilter/EditAdminInputFilter.php:20.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by sergiu
  6. {
  7. public function init(): void
  8. {
  9. $identity = new Input('identity');
  10. $identity->setRequired(true);
  1. ]);
  2. $this->add($password);
  3. $passwordConfirm = new Input('passwordConfirm');
  4. $passwordConfirm->setRequired(true);
  5. $passwordConfirm->getFilterChain()->attachByName(StringTrim::class);

    The next 54 lines appear both in src/Admin/src/InputFilter/AdminInputFilter.php:58 and src/Admin/src/InputFilter/EditAdminInputFilter.php:58.

    Time to fix: about 4 hours
    Read doc Open Issue Permalink
    Last edited by MarioRadu
  6. $passwordConfirm->getValidatorChain()->attachByName(NotEmpty::class, [
  7. 'break_chain_on_failure' => true,
  8. 'message' => '<b>Confirm Password</b> is required and cannot be empty',
  9. ]);
  10. $passwordConfirm->getValidatorChain()->attachByName(StringLength::class, [

Text files should end with a valid new line character. 4

More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l

  1. <square150x150logo src="/mstile-150x150.png"/>
  2. <TileColor>#2d89ef</TileColor>
  3. </tile>
  4. </msapplication>
  5. </browserconfig>
  6. This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Collective
  1. </div>
  2. </div>
  3. </div>
  4. </div>
  5. {% endblock %}
  6. This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Collective
  1. {% block javascript %}{% endblock %}
  2. </body>
  3. </html>
  4. This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Collective
  1. </ul>
  2. </li>
  3. </ul>
  4. {% endif %}
  5. </div>
  6. </div>

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by MarioRadu