From 19741530bf75f9e79ac16c85c84d0259bdc02448 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 13 Dec 2021 19:24:21 +0100 Subject: [PATCH] Corrections after merge (double declares) --- .../Serializer/Normalizer/UserNormalizer.php | 9 ------ .../Relationships/RelationshipRepository.php | 29 ------------------- 2 files changed, 38 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php index 74c8c8a18..d8c616d82 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php @@ -35,15 +35,6 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware private UserRender $userRender; - const NULL_USER = [ - 'type' => 'user', - 'id' => '', - 'username' => '', - 'text' => '', - 'label' => '', - 'email' => '', - ]; - public function __construct(UserRender $userRender) { $this->userRender = $userRender; diff --git a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php index e5c1d8f4e..46389e0e5 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php @@ -24,9 +24,6 @@ class RelationshipRepository implements ObjectRepository private EntityRepository $repository; - private EntityManagerInterface $em; - - private EntityRepository $repository; public function __construct(EntityManagerInterface $em) { @@ -93,30 +90,4 @@ class RelationshipRepository implements ObjectRepository return $qb; } - - public function findOneBy(array $criteria): ?Relationship - { - return $this->findOneBy($criteria); - } - - public function getClassName(): string - { - return Relationship::class; - } - - private function buildQueryByPerson(Person $person): QueryBuilder - { - $qb = $this->em->createQueryBuilder(); - $qb - ->from(Relationship::class, 'r') - ->where( - $qb->expr()->orX( - $qb->expr()->eq('r.fromPerson', ':person'), - $qb->expr()->eq('r.toPerson', ':person') - ) - ) - ->setParameter('person', $person); - - return $qb; - } }