Entity/AccompanyingPeriod.php
public function isDateConsistent(ExecutionContextInterface $context) {
        if ($this->isOpen()) {
            return;
        }
        
        if (! $this->isClosingAfterOpening()) {
            $context->addViolationAt('dateClosing', 
                'The date of closing is before the date of opening',
                array(), null);
        }
    }
public function isDateConsistent(ExecutionContextInterface $context) {
        if ($this->isOpen()) {
            return;
        }
        
        if (! $this->isClosingAfterOpening()) {
            $context->addViolationAt('dateClosing', 
                'The date of closing is before the date of opening',
                array(), null);
        }
    }
/ VALIDATION function