replace PersonRender by PersonRenderInterface

This commit is contained in:
nobohan 2022-02-16 10:38:58 +01:00
parent b54e076ca0
commit 50410d190f
9 changed files with 27 additions and 27 deletions

View File

@ -22,7 +22,7 @@ use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Templating\Entity\PersonRender; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
@ -43,7 +43,7 @@ class ActivityContext implements
private NormalizerInterface $normalizer; private NormalizerInterface $normalizer;
private PersonRender $personRender; private PersonRenderInterface $personRender;
private TranslatableStringHelperInterface $translatableStringHelper; private TranslatableStringHelperInterface $translatableStringHelper;
@ -54,7 +54,7 @@ class ActivityContext implements
NormalizerInterface $normalizer, NormalizerInterface $normalizer,
TranslatableStringHelperInterface $translatableStringHelper, TranslatableStringHelperInterface $translatableStringHelper,
EntityManagerInterface $em, EntityManagerInterface $em,
PersonRender $personRender, PersonRenderInterface $personRender,
TranslatorInterface $translator, TranslatorInterface $translator,
BaseContextData $baseContextData BaseContextData $baseContextData
) { ) {

View File

@ -16,7 +16,7 @@ use Chill\MainBundle\Form\Type\CommentType;
use Chill\PersonBundle\Entity\Person\PersonResource; use Chill\PersonBundle\Entity\Person\PersonResource;
use Chill\PersonBundle\Entity\Person\PersonResourceKind; use Chill\PersonBundle\Entity\Person\PersonResourceKind;
use Chill\PersonBundle\Form\Type\PickPersonDynamicType; 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\PersonBundle\Templating\Entity\ResourceKindRender;
use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType; use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType;
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
@ -29,7 +29,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
final class PersonResourceType extends AbstractType final class PersonResourceType extends AbstractType
{ {
private PersonRender $personRender; private PersonRenderInterface $personRender;
private ResourceKindRender $resourceKindRender; private ResourceKindRender $resourceKindRender;
@ -37,7 +37,7 @@ final class PersonResourceType extends AbstractType
private TranslatorInterface $translator; 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->resourceKindRender = $resourceKindRender;
$this->personRender = $personRender; $this->personRender = $personRender;

View File

@ -15,7 +15,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Repository\PersonNotDuplicateRepository; use Chill\PersonBundle\Repository\PersonNotDuplicateRepository;
use Chill\PersonBundle\Security\Authorization\PersonVoter; use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Chill\PersonBundle\Templating\Entity\PersonRender; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
@ -39,7 +39,7 @@ class SimilarPersonMatcher
protected PersonNotDuplicateRepository $personNotDuplicateRepository; protected PersonNotDuplicateRepository $personNotDuplicateRepository;
protected PersonRender $personRender; protected PersonRenderInterface $personRender;
/** /**
* @var TokenStorageInterface * @var TokenStorageInterface
@ -51,7 +51,7 @@ class SimilarPersonMatcher
AuthorizationHelper $authorizationHelper, AuthorizationHelper $authorizationHelper,
TokenStorageInterface $tokenStorage, TokenStorageInterface $tokenStorage,
PersonNotDuplicateRepository $personNotDuplicateRepository, PersonNotDuplicateRepository $personNotDuplicateRepository,
PersonRender $personRender PersonRenderInterface $personRender
) { ) {
$this->em = $em; $this->em = $em;
$this->authorizationHelper = $authorizationHelper; $this->authorizationHelper = $authorizationHelper;

View File

@ -19,7 +19,7 @@ use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\PersonAltName; use Chill\PersonBundle\Entity\PersonAltName;
use Chill\PersonBundle\Repository\Relationships\RelationshipRepository; use Chill\PersonBundle\Repository\Relationships\RelationshipRepository;
use Chill\PersonBundle\Templating\Entity\PersonRender; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use DateTimeInterface; use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Serializer\Exception\UnexpectedValueException; use Symfony\Component\Serializer\Exception\UnexpectedValueException;
@ -37,7 +37,7 @@ class PersonDocGenNormalizer implements
{ {
use NormalizerAwareTrait; use NormalizerAwareTrait;
private PersonRender $personRender; private PersonRenderInterface $personRender;
private RelationshipRepository $relationshipRepository; private RelationshipRepository $relationshipRepository;
@ -46,7 +46,7 @@ class PersonDocGenNormalizer implements
private TranslatorInterface $translator; private TranslatorInterface $translator;
public function __construct( public function __construct(
PersonRender $personRender, PersonRenderInterface $personRender,
RelationshipRepository $relationshipRepository, RelationshipRepository $relationshipRepository,
TranslatorInterface $translator, TranslatorInterface $translator,
TranslatableStringHelper $translatableStringHelper TranslatableStringHelper $translatableStringHelper

View File

@ -23,7 +23,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Templating\Entity\PersonRender; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use DateTime; use DateTime;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
@ -48,7 +48,7 @@ class AccompanyingPeriodContext implements
private NormalizerInterface $normalizer; private NormalizerInterface $normalizer;
private PersonRender $personRender; private PersonRenderInterface $personRender;
private TranslatableStringHelperInterface $translatableStringHelper; private TranslatableStringHelperInterface $translatableStringHelper;
@ -59,7 +59,7 @@ class AccompanyingPeriodContext implements
NormalizerInterface $normalizer, NormalizerInterface $normalizer,
TranslatableStringHelperInterface $translatableStringHelper, TranslatableStringHelperInterface $translatableStringHelper,
EntityManagerInterface $em, EntityManagerInterface $em,
PersonRender $personRender, PersonRenderInterface $personRender,
TranslatorInterface $translator, TranslatorInterface $translator,
BaseContextData $baseContextData BaseContextData $baseContextData
) { ) {

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod; namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
use Chill\PersonBundle\Entity\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\Constraint;
use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException; use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@ -20,9 +20,9 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
class LocationValidityValidator extends ConstraintValidator class LocationValidityValidator extends ConstraintValidator
{ {
private PersonRender $render; private PersonRenderInterface $render;
public function __construct(PersonRender $render) public function __construct(PersonRenderInterface $render)
{ {
$this->render = $render; $this->render = $render;
} }

View File

@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
use Chill\MainBundle\Util\DateRangeCovering; use Chill\MainBundle\Util\DateRangeCovering;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Templating\Entity\PersonRender; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraint;
@ -26,11 +26,11 @@ class ParticipationOverlapValidator extends ConstraintValidator
{ {
private const MAX_PARTICIPATION = 1; private const MAX_PARTICIPATION = 1;
private PersonRender $personRender; private PersonRenderInterface $personRender;
private ThirdPartyRender $thirdpartyRender; private ThirdPartyRender $thirdpartyRender;
public function __construct(PersonRender $personRender, ThirdPartyRender $thirdPartyRender) public function __construct(PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender)
{ {
$this->personRender = $personRender; $this->personRender = $personRender;
$this->thirdpartyRender = $thirdPartyRender; $this->thirdpartyRender = $thirdPartyRender;

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod; namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Templating\Entity\PersonRender; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Form\Exception\UnexpectedTypeException;
@ -24,11 +24,11 @@ use function in_array;
class ResourceDuplicateCheckValidator extends ConstraintValidator class ResourceDuplicateCheckValidator extends ConstraintValidator
{ {
private PersonRender $personRender; private PersonRenderInterface $personRender;
private ThirdPartyRender $thirdpartyRender; private ThirdPartyRender $thirdpartyRender;
public function __construct(PersonRender $personRender, ThirdPartyRender $thirdPartyRender) public function __construct(PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender)
{ {
$this->personRender = $personRender; $this->personRender = $personRender;
$this->thirdpartyRender = $thirdPartyRender; $this->thirdpartyRender = $thirdPartyRender;

View File

@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Validator\Constraints\Household;
use Chill\MainBundle\Util\DateRangeCovering; use Chill\MainBundle\Util\DateRangeCovering;
use Chill\PersonBundle\Entity\Person; 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\Constraint;
use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException; use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@ -26,9 +26,9 @@ use function count;
*/ */
class HouseholdMembershipSequentialValidator extends ConstraintValidator class HouseholdMembershipSequentialValidator extends ConstraintValidator
{ {
private PersonRender $render; private PersonRenderInterface $render;
public function __construct(PersonRender $render) public function __construct(PersonRenderInterface $render)
{ {
$this->render = $render; $this->render = $render;
} }