public static function compactConstraint(ConstraintInterface
$constraint) { if (!
$constraint instanceof MultiConstraint
) { return $constraint;
} $intervals = self::
generateIntervals($constraint);
$constraints = array
();
$hasNumericMatchAll = false;
if (\
count($intervals['numeric'
]) === 1 &&
(string) $intervals['numeric'
][0
]->
getStart() ===
(string) Interval::
fromZero() &&
(string) $intervals['numeric'
][0
]->
getEnd() ===
(string) Interval::
untilPositiveInfinity()) { $constraints[] =
$intervals['numeric'
][0
]->
getStart();
$hasNumericMatchAll = true;
} else { $unEqualConstraints = array
();
for ($i = 0,
$count = \
count($intervals['numeric'
]);
$i <
$count;
$i++
) { $interval =
$intervals['numeric'
][$i];
// if current interval ends with < N and next interval begins with > N we can swap this out for != N
// but this needs to happen as a conjunctive expression together with the start of the current interval
// and end of next interval, so [>=M, <N] || [>N, <P] => [>=M, !=N, <P] but M/P can be skipped if
// they are zero/+inf