phpstan and php cs fixer

This commit is contained in:
Julie Lenaerts 2025-03-03 21:05:00 +01:00
parent 9979378e78
commit 535409e529
2 changed files with 3 additions and 3 deletions

View File

@ -101,7 +101,7 @@ class ThirdpartyDuplicateController extends AbstractController
} }
} }
private function validateThirdpartyMerge(Thirdparty $thirdparty1, Thirdparty $thirdparty2): void private function validateThirdpartyMerge(ThirdParty $thirdparty1, ThirdParty $thirdparty2): void
{ {
$constraints = [ $constraints = [
[$thirdparty1 === $thirdparty2, 'thirdparty_duplicate.You cannot merge a thirdparty with itself. Please choose a different thirdparty'], [$thirdparty1 === $thirdparty2, 'thirdparty_duplicate.You cannot merge a thirdparty with itself. Please choose a different thirdparty'],

View File

@ -85,8 +85,8 @@ class ThirdpartyMergeService
if (ThirdParty::class !== $assoc['targetEntity'] && ThirdParty::class !== $assoc['sourceEntity']) { if (ThirdParty::class !== $assoc['targetEntity'] && ThirdParty::class !== $assoc['sourceEntity']) {
continue; continue;
} }
// phpstan wants boolean for if condition
if ($assoc['type'] & ClassMetadata::TO_ONE) { if (($assoc['type'] & ClassMetadata::TO_ONE) !== 0) {
$joinColumn = $meta->getSingleAssociationJoinColumnName($assoc['fieldName']); $joinColumn = $meta->getSingleAssociationJoinColumnName($assoc['fieldName']);
if (ThirdParty::class === $assoc['sourceEntity'] && 'parent_id' !== $joinColumn) { if (ThirdParty::class === $assoc['sourceEntity'] && 'parent_id' !== $joinColumn) {