diff --git a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdpartyDuplicateController.php b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdpartyDuplicateController.php index 56967a9ce..0c27d13ff 100644 --- a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdpartyDuplicateController.php +++ b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdpartyDuplicateController.php @@ -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 = [ [$thirdparty1 === $thirdparty2, 'thirdparty_duplicate.You cannot merge a thirdparty with itself. Please choose a different thirdparty'], diff --git a/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php b/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php index 89412e5f6..d779cccb8 100644 --- a/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php +++ b/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php @@ -85,8 +85,8 @@ class ThirdpartyMergeService if (ThirdParty::class !== $assoc['targetEntity'] && ThirdParty::class !== $assoc['sourceEntity']) { continue; } - - if ($assoc['type'] & ClassMetadata::TO_ONE) { + // phpstan wants boolean for if condition + if (($assoc['type'] & ClassMetadata::TO_ONE) !== 0) { $joinColumn = $meta->getSingleAssociationJoinColumnName($assoc['fieldName']); if (ThirdParty::class === $assoc['sourceEntity'] && 'parent_id' !== $joinColumn) {