public static function isSubsetOf(ConstraintInterface
$candidate, ConstraintInterface
$constraint) { if ($constraint instanceof MatchAllConstraint
) { return true;
} if ($candidate instanceof MatchNoneConstraint ||
$constraint instanceof MatchNoneConstraint
) { return false;
} $intersectionIntervals = self::
get(new MultiConstraint(array
($candidate,
$constraint), true
));
$candidateIntervals = self::
get($candidate);
if (\
count($intersectionIntervals['numeric'
]) !== \
count($candidateIntervals['numeric'
])) { return false;
} foreach ($intersectionIntervals['numeric'
] as $index =>
$interval) { if (!
isset($candidateIntervals['numeric'
][$index])) { return false;
} if ((string) $candidateIntervals['numeric'
][$index]->
getStart() !==
(string) $interval->
getStart()) {