Code Duplication    Length = 5-5 lines in 2 locations

src/allPass.php 1 location

@@ 11-15 (lines=5) @@
8
9
function allPass(array $preds): \Closure
10
{
11
    return function (...$args) use ($preds): bool {
12
        return \array_reduce($preds, function (bool $prev, callable $pred) use ($args): bool {
13
            return $prev && $pred(...$args);
14
        }, true);
15
    };
16
}
17

src/anyPass.php 1 location

@@ 11-15 (lines=5) @@
8
9
function anyPass(array $preds): \Closure
10
{
11
    return function (...$args) use ($preds): bool {
12
        return \array_reduce($preds, function (bool $prev, callable $pred) use ($args): bool {
13
            return $prev ?: $pred(...$args);
14
        }, false);
15
    };
16
}
17