diff --git a/phpstan-types.neon b/phpstan-types.neon index 9671c05a5..d43fd8944 100644 --- a/phpstan-types.neon +++ b/phpstan-types.neon @@ -460,8 +460,3 @@ parameters: count: 1 path: src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 1 - path: src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php - diff --git a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php index aeab09fea..31af0a649 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php @@ -29,8 +29,12 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class PersonResourceType extends AbstractType { + private PersonRenderInterface $personRender; + private ResourceKindRender $resourceKindRender; + private ThirdPartyRender $thirdPartyRender; + private TranslatorInterface $translator; public function __construct(ResourceKindRender $resourceKindRender, PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender, TranslatorInterface $translator) diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index cec9dee7d..4fe3da927 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -71,13 +71,13 @@ class ThirdPartyRender extends AbstractChillEntityRender $civility = ''; } - if (!empty($entity->getAcronym())) { + if ('' !== (string) $entity->getAcronym()) { $acronym = ' (' . $entity->getAcronym() . ')'; } else { $acronym = ''; } - $firstname = empty($entity->getFirstname()) ? '' : $entity->getFirstname(); + $firstname = ('' === $entity->getFirstname()) ? '' : $entity->getFirstname(); return $civility . $firstname . ' ' . $entity->getName() . $acronym; }