Code Duplication    Length = 5-5 lines in 2 locations

src/Zicht/Itertools/lib/SortedIterator.php 2 locations

@@ 76-80 (lines=5) @@
73
    public function __construct(\Closure $func, \Iterator $iterable, $reverse = false)
74
    {
75
        if ($reverse) {
76
            $cmp = function ($a, $b) use ($func) {
77
                $orderA = $a['order'];
78
                $orderB = $b['order'];
79
                return $orderA == $orderB ? 0 : ($orderA < $orderB ? 1 : -1);
80
            };
81
        } else {
82
            $cmp = function ($a, $b) use ($func) {
83
                $orderA = $a['order'];
@@ 82-86 (lines=5) @@
79
                return $orderA == $orderB ? 0 : ($orderA < $orderB ? 1 : -1);
80
            };
81
        } else {
82
            $cmp = function ($a, $b) use ($func) {
83
                $orderA = $a['order'];
84
                $orderB = $b['order'];
85
                return $orderA == $orderB ? 0 : ($orderA < $orderB ? -1 : 1);
86
            };
87
        }
88
89
        $data = [];