private function isValid(Constraint $constraint, int $difference): bool
    {
        /*
         * It's a earlier than today date?
         * Nothing to do
         */
        if ($constraint instanceof EarlierThanToday && $difference < 0) {
            return true;
        }

        /*
         * It's a earlier than or equal today date?
         * Nothing to do
         */
        if ($constraint instanceof EarlierThanOrEqualToday && $difference <= 0) {
            return true;
        }

        /*
         * It's a later than today date?
         * Nothing to do
         */
        if ($constraint instanceof LaterThanToday && $difference > 0) {
            return true;
        }

        /*
         * It's a later than or equal today date?
         * Nothing to do
         */
        if ($constraint instanceof LaterThanOrEqualToday && $difference >= 0) {
            return true;
        }

        return false;
    }
private function isValid(Constraint $constraint, int $difference): bool
    {
        /*
         * It's a earlier than today date?
         * Nothing to do
         */
        if ($constraint instanceof EarlierThanToday && $difference < 0) {
            return true;
        }

        /*
         * It's a earlier than or equal today date?
         * Nothing to do
         */
        if ($constraint instanceof EarlierThanOrEqualToday && $difference <= 0) {
            return true;
        }

        /*
         * It's a later than today date?
         * Nothing to do
         */
        if ($constraint instanceof LaterThanToday && $difference > 0) {
            return true;
        }

        /*
         * It's a later than or equal today date?
         * Nothing to do
         */
        if ($constraint instanceof LaterThanOrEqualToday && $difference >= 0) {
            return true;
        }

        return false;
    }
private function isValid ( Constraint $ constraint , int $ difference ) : bool { /*
         * It's a earlier than today date?
         * Nothing to do
         */ if ( $ constraint instanceof EarlierThanToday && $ difference < 0 ) { return true ; } /*
         * It's a earlier than or equal today date?
         * Nothing to do
         */ if ( $ constraint instanceof EarlierThanOrEqualToday && $ difference <= 0 ) { return true ; } /*
         * It's a later than today date?
         * Nothing to do
         */ if ( $ constraint instanceof LaterThanToday && $ difference > 0 ) { return true ; } /*
         * It's a later than or equal today date?
         * Nothing to do
         */ if ( $ constraint instanceof LaterThanOrEqualToday && $ difference >= 0 ) { return true ; } return false ; }
Returns information if processing date is valid.
Based on given constraint and difference between the date and today.

@param Constraint $constraint The constraint
@param int        $difference Difference between validated date and today
@return bool
Returns information if processing date is valid . Based on given constraint and difference between the date and today .