Code Duplication    Length = 6-6 lines in 2 locations

src/Zicht/Itertools/filters.php 2 locations

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