Code Duplication    Length = 6-6 lines in 2 locations

src/Zicht/Itertools/filters.php 2 locations

@@ 161-166 (lines=6) @@
158
    }
159
160
    // Support numbers
161
    if (is_int($expected) || is_float($expected)) {
162
        return function ($value, $key = null) use ($expected, $strategy, $orEqual) {
163
            $value = $strategy($value, $key);
164
            return (is_int($value) || is_float($value)) && ($orEqual ? $expected <= $value : $expected < $value);
165
        };
166
    }
167
168
    // Everything else fails
169
    return function () {
@@ 201-206 (lines=6) @@
198
    }
199
200
    // Support numbers
201
    if (is_int($expected) || is_float($expected)) {
202
        return function ($value, $key = null) use ($expected, $strategy, $orEqual) {
203
            $value = $strategy($value, $key);
204
            return (is_int($value) || is_float($value)) && ($orEqual ? $expected >= $value : $expected > $value);
205
        };
206
    }
207
208
    // Everything else fails
209
    return function () {