From cc2bee8188b6eff1f5caa833a2b8cfff1b355069 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Jul 2022 14:56:44 +0200 Subject: [PATCH] php cs style fixes, stan ok! --- .../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 f198b371e..555f91629 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php @@ -47,8 +47,8 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator ]); foreach ($relationships as $r) { - if ($r->getRelation()->getId() !== $relationType->getId() && - ($r->getFromPerson() === $fromPerson + if ($r->getRelation()->getId() !== $relationType->getId() + && ($r->getFromPerson() === $fromPerson || $r->getFromPerson() === $toPerson || $r->getToPerson() === $fromPerson || $r->getToPerson() === $toPerson)