DX [phpstan] fixes

This commit is contained in:
Julie Lenaerts 2023-05-24 14:02:49 +02:00
parent a31c4063a1
commit f5448f9d95
2 changed files with 5 additions and 7 deletions

View File

@ -48,8 +48,7 @@ class PersonMove
public function __construct( public function __construct(
EntityManagerInterface $em, EntityManagerInterface $em,
EventDispatcherInterface $eventDispatcher EventDispatcherInterface $eventDispatcher
) ) {
{
$this->em = $em; $this->em = $em;
$this->eventDispatcher = $eventDispatcher; $this->eventDispatcher = $eventDispatcher;
} }
@ -89,7 +88,7 @@ class PersonMove
} }
foreach ($metadata->getAssociationMappings() as $field => $mapping) { foreach ($metadata->getAssociationMappings() as $field => $mapping) {
if (in_array($mapping['sourceEntity'], $this->getIgnoredEntities())) { if (in_array($mapping['sourceEntity'], $this->getIgnoredEntities(), true)) {
continue; continue;
} }
if (Person::class === $mapping['targetEntity'] and true === $mapping['isOwningSide']) { if (Person::class === $mapping['targetEntity'] and true === $mapping['isOwningSide']) {
@ -125,7 +124,6 @@ class PersonMove
$from->getId() $from->getId()
); );
dump($sqls);
return $sqls; return $sqls;
} }
@ -153,7 +151,7 @@ class PersonMove
// Set part of the query, aka <here> in "UPDATE table SET <here> " // Set part of the query, aka <here> in "UPDATE table SET <here> "
$sets = []; $sets = [];
$conditions = []; $conditions = [];
dump($mapping); $tableName = '';
if (array_key_exists('joinTable', $mapping)) { if (array_key_exists('joinTable', $mapping)) {
$tableName = (null !== ($mapping['joinTable']['schema'] ?? null) ? $mapping['joinTable']['schema'] . '.' : '') $tableName = (null !== ($mapping['joinTable']['schema'] ?? null) ? $mapping['joinTable']['schema'] . '.' : '')

View File

@ -247,7 +247,7 @@ class PersonDuplicateController extends Controller
); );
$duplicatePersons = $this->similarPersonMatcher-> $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); $notDuplicatePersons = $personNotDuplicateRepository->findNotDuplicatePerson($person);
@ -271,7 +271,7 @@ class PersonDuplicateController extends Controller
return [ return [
'nb_activity' => count($nb_activity), 'nb_activity' => count($nb_activity),
'nb_document' => count($nb_document), 'nb_document' => count($nb_document),
// 'nb_event' => count($nb_event), // 'nb_event' => count($nb_event),
'nb_task' => $nb_task, 'nb_task' => $nb_task,
'nb_addresses' => count($person->getAddresses()), 'nb_addresses' => count($person->getAddresses()),
]; ];