From ce3a74326de703b3676fb6324a7a09bbfd314892 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 26 Jan 2022 12:01:14 +0100 Subject: [PATCH] cs-fixes --- .../ChillPersonBundle/Entity/Person/PersonResource.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php index b6dc57ed8..4e1718a64 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php @@ -261,13 +261,15 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface /** * @Assert\Callback + * + * @param mixed $payload */ public function validate(ExecutionContextInterface $context, $payload) { - if ($this->person === null && $this->thirdParty === null && $this->freeText === null ) { + if (null === $this->person && null === $this->thirdParty && null === $this->freeText) { $context->buildViolation('You must associate at least one entity') - ->atPath('person') - ->addViolation(); + ->atPath('person') + ->addViolation(); } } }