mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
Remove obsolete documentation, fix typing here and there.
This commit is contained in:
@@ -7,11 +7,6 @@ use Chill\PersonBundle\Entity\PersonNotDuplicate;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* Class PersonNotDuplicateRepository
|
||||
*
|
||||
* @package Chill\PersonBundle\Repository
|
||||
*/
|
||||
final class PersonNotDuplicateRepository
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
@@ -21,12 +16,7 @@ final class PersonNotDuplicateRepository
|
||||
$this->repository = $entityManager->getRepository(PersonNotDuplicate::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Chill\PersonBundle\Entity\Person $person
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function findNotDuplicatePerson(Person $person)
|
||||
public function findNotDuplicatePerson(Person $person): array
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('pnd');
|
||||
$qb->select('pnd')
|
||||
@@ -36,6 +26,7 @@ final class PersonNotDuplicateRepository
|
||||
$result = $qb->getQuery()->getResult();
|
||||
|
||||
$persons = [];
|
||||
|
||||
foreach ($result as $row) {
|
||||
if ($row->getPerson1() === $person) {
|
||||
$persons[] = $row->getPerson2();
|
||||
|
Reference in New Issue
Block a user