From 72f5b0b275b7fd4528fabe70eb516729c165c156 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 25 May 2023 12:52:23 +0200 Subject: [PATCH] DX [cs-fix] --- .../Relationship/RelationshipNoDuplicateValidator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php index cb1e5395e..b44a966cc 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php @@ -46,8 +46,8 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator ]); foreach ($relationships as $r) { - if ( spl_object_hash($r) !== spl_object_hash($value) and - $r->getFromPerson() === $fromPerson + if (spl_object_hash($r) !== spl_object_hash($value) + and $r->getFromPerson() === $fromPerson || $r->getFromPerson() === $toPerson || $r->getToPerson() === $fromPerson || $r->getToPerson() === $toPerson