Your project controllers should only contains actions as public methods 2
- Read doc
- Productivity
- Major
More information: https://insight.symfony.com/what-we-analyse/symfony.controller.non_action_public_method_in_controller_class
- }
- /**
- * @return iterable<FieldInterface>
- */
- public function configureFields(string $pageName): iterable
- {
- $id = IdField::new('id', 'enabel_partner_countries.admin.form.id');
- $country = CountryField::new('alpha2code', 'enabel_partner_countries.admin.form.country');
- $code2 = TextField::new('alpha2code', 'enabel_partner_countries.admin.form.alpha2code');
- $code3 = TextField::new('alpha3code', 'enabel_partner_countries.admin.form.alpha3code');
- use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- abstract class CountryCrudController extends AbstractCrudController
- {
- public function configureCrud(Crud $crud): Crud
- {
- return $crud
- ->setEntityLabelInSingular('enabel_partner_countries.admin.menu.country')
- ->setEntityLabelInPlural('enabel_partner_countries.admin.menu.countries')
- ->setPageTitle('index', '%entity_label_plural%')
Your project should use Doctrine migrations
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/composer.using_migrations
Your project uses discouraged logical operators
- Read doc
- Reliability
- Minor
More information: https://insight.symfony.com/what-we-analyse/php.boolean_statement
- if ($country instanceof Country) {
- return $country;
- }
- if (is_string($country)) {
- if (strlen($country) !== 2 and strlen($country) !== 3) {
- throw new \InvalidArgumentException('The country code must be the alpha2code or the alpha3code.');
- }
- if (strlen($country) === 3) {
- $countryCode = Countries::getAlpha2Code($country);
Text files should end with a valid new line character.
- Read doc
- Productivity
- Info
More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: 3.x
- - run: pip install mkdocs
- - run: mkdocs gh-deploy --force
damienlagae
=> because EasyAdmin