From 2dc2479304cd2e4d95aa3ba2a4c5e7f622c1e1fa Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Thu, 5 Mar 2015 17:55:47 +0100 Subject: [PATCH] Adding documentation --- Entity/Person.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Entity/Person.php b/Entity/Person.php index 608984e5c..33d68ad84 100644 --- a/Entity/Person.php +++ b/Entity/Person.php @@ -562,12 +562,15 @@ class Person { return $this->spokenLanguages; } - // VALIDATION + /** + * Validation callback that checks if the accompanying periods are valid + * + * This method add violation errors. + */ public function isAccompanyingPeriodValid(ExecutionContextInterface $context) { $r = $this->checkAccompanyingPeriodIsNotCovering(); if ($r !== true) { - if ($r['result'] === self::ERROR_OPENING_NOT_CLOSED_IS_BEFORE_NEW_LINE) { $context->addViolationAt('history', 'Accompanying period not closed is before the new line',