mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Corrections after merge (double declares)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user