mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
cs-fixes
This commit is contained in:
parent
5d7501d36e
commit
ed00a882af
@ -261,13 +261,15 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Assert\Callback
|
* @Assert\Callback
|
||||||
|
*
|
||||||
|
* @param mixed $payload
|
||||||
*/
|
*/
|
||||||
public function validate(ExecutionContextInterface $context, $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')
|
$context->buildViolation('You must associate at least one entity')
|
||||||
->atPath('person')
|
->atPath('person')
|
||||||
->addViolation();
|
->addViolation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user