From 50410d190fe75c9e87331750fd357438fb664399 Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 16 Feb 2022 10:38:58 +0100 Subject: [PATCH] replace PersonRender by PersonRenderInterface --- .../Service/DocGenerator/ActivityContext.php | 6 +++--- src/Bundle/ChillPersonBundle/Form/PersonResourceType.php | 6 +++--- .../ChillPersonBundle/Search/SimilarPersonMatcher.php | 6 +++--- .../Serializer/Normalizer/PersonDocGenNormalizer.php | 6 +++--- .../Service/DocGenerator/AccompanyingPeriodContext.php | 6 +++--- .../AccompanyingPeriod/LocationValidityValidator.php | 6 +++--- .../AccompanyingPeriod/ParticipationOverlapValidator.php | 6 +++--- .../AccompanyingPeriod/ResourceDuplicateCheckValidator.php | 6 +++--- .../Household/HouseholdMembershipSequentialValidator.php | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php index 7ee09690a..a787e9ecd 100644 --- a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php +++ b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php @@ -22,7 +22,7 @@ use Chill\DocStoreBundle\Repository\DocumentCategoryRepository; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -43,7 +43,7 @@ class ActivityContext implements private NormalizerInterface $normalizer; - private PersonRender $personRender; + private PersonRenderInterface $personRender; private TranslatableStringHelperInterface $translatableStringHelper; @@ -54,7 +54,7 @@ class ActivityContext implements NormalizerInterface $normalizer, TranslatableStringHelperInterface $translatableStringHelper, EntityManagerInterface $em, - PersonRender $personRender, + PersonRenderInterface $personRender, TranslatorInterface $translator, BaseContextData $baseContextData ) { diff --git a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php index f69081584..31af0a649 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php @@ -16,7 +16,7 @@ use Chill\MainBundle\Form\Type\CommentType; use Chill\PersonBundle\Entity\Person\PersonResource; use Chill\PersonBundle\Entity\Person\PersonResourceKind; use Chill\PersonBundle\Form\Type\PickPersonDynamicType; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Chill\PersonBundle\Templating\Entity\ResourceKindRender; use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType; use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; @@ -29,7 +29,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class PersonResourceType extends AbstractType { - private PersonRender $personRender; + private PersonRenderInterface $personRender; private ResourceKindRender $resourceKindRender; @@ -37,7 +37,7 @@ final class PersonResourceType extends AbstractType private TranslatorInterface $translator; - public function __construct(ResourceKindRender $resourceKindRender, PersonRender $personRender, ThirdPartyRender $thirdPartyRender, TranslatorInterface $translator) + public function __construct(ResourceKindRender $resourceKindRender, PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender, TranslatorInterface $translator) { $this->resourceKindRender = $resourceKindRender; $this->personRender = $personRender; diff --git a/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php b/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php index 98dc14110..c046c8947 100644 --- a/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php +++ b/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php @@ -15,7 +15,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Repository\PersonNotDuplicateRepository; use Chill\PersonBundle\Security\Authorization\PersonVoter; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; @@ -39,7 +39,7 @@ class SimilarPersonMatcher protected PersonNotDuplicateRepository $personNotDuplicateRepository; - protected PersonRender $personRender; + protected PersonRenderInterface $personRender; /** * @var TokenStorageInterface @@ -51,7 +51,7 @@ class SimilarPersonMatcher AuthorizationHelper $authorizationHelper, TokenStorageInterface $tokenStorage, PersonNotDuplicateRepository $personNotDuplicateRepository, - PersonRender $personRender + PersonRenderInterface $personRender ) { $this->em = $em; $this->authorizationHelper = $authorizationHelper; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php index 4dd32aa54..c19b35b57 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php @@ -19,7 +19,7 @@ use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\PersonAltName; use Chill\PersonBundle\Repository\Relationships\RelationshipRepository; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use DateTimeInterface; use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Serializer\Exception\UnexpectedValueException; @@ -37,7 +37,7 @@ class PersonDocGenNormalizer implements { use NormalizerAwareTrait; - private PersonRender $personRender; + private PersonRenderInterface $personRender; private RelationshipRepository $relationshipRepository; @@ -46,7 +46,7 @@ class PersonDocGenNormalizer implements private TranslatorInterface $translator; public function __construct( - PersonRender $personRender, + PersonRenderInterface $personRender, RelationshipRepository $relationshipRepository, TranslatorInterface $translator, TranslatableStringHelper $translatableStringHelper diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php index d666c6928..45057038f 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php @@ -23,7 +23,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use DateTime; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; @@ -48,7 +48,7 @@ class AccompanyingPeriodContext implements private NormalizerInterface $normalizer; - private PersonRender $personRender; + private PersonRenderInterface $personRender; private TranslatableStringHelperInterface $translatableStringHelper; @@ -59,7 +59,7 @@ class AccompanyingPeriodContext implements NormalizerInterface $normalizer, TranslatableStringHelperInterface $translatableStringHelper, EntityManagerInterface $em, - PersonRender $personRender, + PersonRenderInterface $personRender, TranslatorInterface $translator, BaseContextData $baseContextData ) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php index b17e1673a..777fc8bf9 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php @@ -12,7 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; @@ -20,9 +20,9 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; class LocationValidityValidator extends ConstraintValidator { - private PersonRender $render; + private PersonRenderInterface $render; - public function __construct(PersonRender $render) + public function __construct(PersonRenderInterface $render) { $this->render = $render; } diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php index 73c29b1b3..f9f88debe 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php @@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod; use Chill\MainBundle\Util\DateRangeCovering; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; use Doctrine\Common\Collections\Collection; use Symfony\Component\Validator\Constraint; @@ -26,11 +26,11 @@ class ParticipationOverlapValidator extends ConstraintValidator { private const MAX_PARTICIPATION = 1; - private PersonRender $personRender; + private PersonRenderInterface $personRender; private ThirdPartyRender $thirdpartyRender; - public function __construct(PersonRender $personRender, ThirdPartyRender $thirdPartyRender) + public function __construct(PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender) { $this->personRender = $personRender; $this->thirdpartyRender = $thirdPartyRender; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php index 3b84137fb..daf4d67f7 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php @@ -12,7 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; use Doctrine\Common\Collections\Collection; use Symfony\Component\Form\Exception\UnexpectedTypeException; @@ -24,11 +24,11 @@ use function in_array; class ResourceDuplicateCheckValidator extends ConstraintValidator { - private PersonRender $personRender; + private PersonRenderInterface $personRender; private ThirdPartyRender $thirdpartyRender; - public function __construct(PersonRender $personRender, ThirdPartyRender $thirdPartyRender) + public function __construct(PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender) { $this->personRender = $personRender; $this->thirdpartyRender = $thirdPartyRender; diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php index c357cb138..eba6fd87e 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php @@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Validator\Constraints\Household; use Chill\MainBundle\Util\DateRangeCovering; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Templating\Entity\PersonRender; +use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; @@ -26,9 +26,9 @@ use function count; */ class HouseholdMembershipSequentialValidator extends ConstraintValidator { - private PersonRender $render; + private PersonRenderInterface $render; - public function __construct(PersonRender $render) + public function __construct(PersonRenderInterface $render) { $this->render = $render; }