fix error when having two address at same date

This commit is contained in:
Julien Fastré 2018-07-05 12:47:31 +02:00
parent f2948e31de
commit 5ca6a9939c

View File

@ -723,11 +723,11 @@ class Person implements HasCenterInterface {
public function isAddressesValid(ExecutionContextInterface $context)
{
if ($this->hasTwoAdressWithSameValidFromDate()) {
$context->addViolationAt(
'addresses',
'Two addresses has the same validFrom date',
array()
);
$context
->buildViolation('Two addresses has the same validFrom date')
->atPath('addresses')
->addViolation()
;
}
}