From 535409e529fb60dd127056fc54f836f6f6897525 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 3 Mar 2025 21:05:00 +0100 Subject: [PATCH] phpstan and php cs fixer --- .../Controller/ThirdpartyDuplicateController.php | 2 +- .../ChillThirdPartyBundle/Service/ThirdpartyMergeService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) {