mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Corrections after merge (double declares)
This commit is contained in:
parent
6e079fa771
commit
19741530bf
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user