if (\
is_string($arrow) && !\
in_array($arrow,
$this->allowedPHPFunctions, true
)) { throw new \
RuntimeException(sprintf('Function "%s" is not allowed',
$arrow));
} if (\
is_array($array)) { // @phpstan-ignore-next-line
return array_filter($array,
$arrow, \ARRAY_FILTER_USE_BOTH
);
} // @phpstan-ignore-next-line
return new \
CallbackFilterIterator(new \
IteratorIterator($array),
$arrow);
} /**
* @param iterable<mixed> $array
* @param string|callable(mixed): mixed|\Closure $arrow
*
* @return array<mixed>
*/
public function sort(iterable
$array, string|callable|\Closure|null
$arrow = null
): array
{ if (\
is_array($arrow)) {