Code Duplication    Length = 6-6 lines in 2 locations

src/Zicht/Itertools/filters.php 2 locations

@@ 169-174 (lines=6) @@
166
    }
167
168
    // Support numbers
169
    if (is_int($expected) || is_float($expected)) {
170
        return function ($value, $key = null) use ($expected, $strategy, $orEqual) {
171
            $value = $strategy($value, $key);
172
            return (is_int($value) || is_float($value)) && ($orEqual ? $expected <= $value : $expected < $value);
173
        };
174
    }
175
176
    // Everything else fails
177
    return function () {
@@ 217-222 (lines=6) @@
214
    }
215
216
    // Support numbers
217
    if (is_int($expected) || is_float($expected)) {
218
        return function ($value, $key = null) use ($expected, $strategy, $orEqual) {
219
            $value = $strategy($value, $key);
220
            return (is_int($value) || is_float($value)) && ($orEqual ? $expected >= $value : $expected > $value);
221
        };
222
    }
223
224
    // Everything else fails
225
    return function () {