mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Repository\Relationships;
|
||||
|
||||
use Chill\PersonBundle\Entity\Relationships\Relationship;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
class RelationshipRepository implements ObjectRepository
|
||||
@@ -32,16 +38,6 @@ class RelationshipRepository implements ObjectRepository
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria): ?Relationship
|
||||
{
|
||||
return $this->findOneBy($criteria);
|
||||
}
|
||||
|
||||
public function getClassName(): string
|
||||
{
|
||||
return Relationship::class;
|
||||
}
|
||||
|
||||
public function findByPerson($personId): array
|
||||
{
|
||||
// return all relationships of which person is part? or only where person is the fromPerson?
|
||||
@@ -52,8 +48,16 @@ class RelationshipRepository implements ObjectRepository
|
||||
->orWhere('r.toPerson = :val')
|
||||
->setParameter('val', $personId)
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
->getResult();
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria): ?Relationship
|
||||
{
|
||||
return $this->findOneBy($criteria);
|
||||
}
|
||||
|
||||
public function getClassName(): string
|
||||
{
|
||||
return Relationship::class;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user