Remove obsolete documentation, fix typing here and there.

This commit is contained in:
Pol Dellaiera
2021-05-21 16:34:42 +02:00
parent 220f1ea0eb
commit d672a29dda
14 changed files with 25 additions and 181 deletions

View File

@@ -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();