From f5448f9d95babf82d972d3ccc31eb0430cc4d9c7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 24 May 2023 14:02:49 +0200 Subject: [PATCH] DX [phpstan] fixes --- .../ChillPersonBundle/Actions/Remove/PersonMove.php | 8 +++----- .../Controller/PersonDuplicateController.php | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php index 8363134fd..4e2f7468e 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php @@ -48,8 +48,7 @@ class PersonMove public function __construct( EntityManagerInterface $em, EventDispatcherInterface $eventDispatcher - ) - { + ) { $this->em = $em; $this->eventDispatcher = $eventDispatcher; } @@ -89,7 +88,7 @@ class PersonMove } foreach ($metadata->getAssociationMappings() as $field => $mapping) { - if (in_array($mapping['sourceEntity'], $this->getIgnoredEntities())) { + if (in_array($mapping['sourceEntity'], $this->getIgnoredEntities(), true)) { continue; } if (Person::class === $mapping['targetEntity'] and true === $mapping['isOwningSide']) { @@ -125,7 +124,6 @@ class PersonMove $from->getId() ); - dump($sqls); return $sqls; } @@ -153,7 +151,7 @@ class PersonMove // Set part of the query, aka in "UPDATE table SET " $sets = []; $conditions = []; - dump($mapping); + $tableName = ''; if (array_key_exists('joinTable', $mapping)) { $tableName = (null !== ($mapping['joinTable']['schema'] ?? null) ? $mapping['joinTable']['schema'] . '.' : '') diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php index ab353c83e..386e55039 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php @@ -247,7 +247,7 @@ class PersonDuplicateController extends Controller ); $duplicatePersons = $this->similarPersonMatcher-> - matchPerson($person, 0.5, SimilarPersonMatcher::SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL, false, $personNotDuplicateRepository); + matchPerson($person, 0.5, SimilarPersonMatcher::SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL, false); $notDuplicatePersons = $personNotDuplicateRepository->findNotDuplicatePerson($person); @@ -271,7 +271,7 @@ class PersonDuplicateController extends Controller return [ 'nb_activity' => count($nb_activity), 'nb_document' => count($nb_document), -// 'nb_event' => count($nb_event), + // 'nb_event' => count($nb_event), 'nb_task' => $nb_task, 'nb_addresses' => count($person->getAddresses()), ];