Code Duplication    Length = 6-6 lines in 2 locations

src/Zicht/Itertools/util/Filters.php 2 locations

@@ 145-150 (lines=6) @@
142
        }
143
144
        // Support numbers
145
        if (is_int($expected) || is_float($expected)) {
146
            return function ($value, $key = null) use ($expected, $strategy, $orEqual) {
147
                $value = $strategy($value, $key);
148
                return (is_int($value) || is_float($value)) && ($orEqual ? $expected <= $value : $expected < $value);
149
            };
150
        }
151
152
        // Everything else fails
153
        return function () {
@@ 192-197 (lines=6) @@
189
        }
190
191
        // Support numbers
192
        if (is_int($expected) || is_float($expected)) {
193
            return function ($value, $key = null) use ($expected, $strategy, $orEqual) {
194
                $value = $strategy($value, $key);
195
                return (is_int($value) || is_float($value)) && ($orEqual ? $expected >= $value : $expected > $value);
196
            };
197
        }
198
199
        // Everything else fails
200
        return function () {