Your project controllers should only contains actions as public methods 2

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

  1. }
  2. /**
  3. * @return iterable<FieldInterface>
  4. */
  5. public function configureFields(string $pageName): iterable

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Permalink
    Last edited by Damien Lagae
  6. {
  7. $id = IdField::new('id', 'enabel_partner_countries.admin.form.id');
  8. $country = CountryField::new('alpha2code', 'enabel_partner_countries.admin.form.country');
  9. $code2 = TextField::new('alpha2code', 'enabel_partner_countries.admin.form.alpha2code');
  10. $code3 = TextField::new('alpha3code', 'enabel_partner_countries.admin.form.alpha3code');
  • damienlagae

    ok for me
    => because EasyAdmin
  1. use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
  2. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  3. abstract class CountryCrudController extends AbstractCrudController
  4. {
  5. public function configureCrud(Crud $crud): Crud

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Permalink
    Last edited by Damien Lagae
  6. {
  7. return $crud
  8. ->setEntityLabelInSingular('enabel_partner_countries.admin.menu.country')
  9. ->setEntityLabelInPlural('enabel_partner_countries.admin.menu.countries')
  10. ->setPageTitle('index', '%entity_label_plural%')
  • damienlagae

    ok for me
    => because EasyAdmin

Your project should use Doctrine migrations

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

Use Doctrine Migrations to keep your production database synchronized

Time to fix: about 1 hour
Read doc Permalink
Collective

Your project uses discouraged logical operators

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

  1. if ($country instanceof Country) {
  2. return $country;
  3. }
  4. if (is_string($country)) {
  5. if (strlen($country) !== 2 and strlen($country) !== 3) {

    The and operator does not have the same precedence as &&. This could lead to unexpected behavior, use && instead.

    Time to fix: about 30 minutes
    Read doc Permalink
    Last edited by Damien Lagae
  6. throw new \InvalidArgumentException('The country code must be the alpha2code or the alpha3code.');
  7. }
  8. if (strlen($country) === 3) {
  9. $countryCode = Countries::getAlpha2Code($country);

Text files should end with a valid new line character.

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

  1. - uses: actions/checkout@v3
  2. - uses: actions/setup-python@v4
  3. with:
  4. python-version: 3.x
  5. - run: pip install mkdocs
  6. - run: mkdocs gh-deploy --force

    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 Permalink
    Last edited by Damien Lagae