Code Duplication    Length = 3-3 lines in 4 locations

src/ConnectedDifferences.php 4 locations

@@ 141-143 (lines=3) @@
138
        foreach ($this->boundaries as $boundary) {
139
            foreach ($keep as $i => $kept) {
140
                if ($this->intersect($boundary, $kept)) {
141
                    if ($boundary["top"] < $kept["top"]) {
142
                        $keep[$i]["top"] = $boundary["top"];
143
                    }
144
145
                    if ($boundary["right"] > $kept["right"]) {
146
                        $keep[$i]["right"] = $boundary["right"];
@@ 145-147 (lines=3) @@
142
                        $keep[$i]["top"] = $boundary["top"];
143
                    }
144
145
                    if ($boundary["right"] > $kept["right"]) {
146
                        $keep[$i]["right"] = $boundary["right"];
147
                    }
148
149
                    if ($boundary["bottom"] > $kept["bottom"]) {
150
                        $keep[$i]["bottom"] = $boundary["bottom"];
@@ 149-151 (lines=3) @@
146
                        $keep[$i]["right"] = $boundary["right"];
147
                    }
148
149
                    if ($boundary["bottom"] > $kept["bottom"]) {
150
                        $keep[$i]["bottom"] = $boundary["bottom"];
151
                    }
152
153
                    if ($boundary["left"] < $kept["left"]) {
154
                        $keep[$i]["left"] = $boundary["left"];
@@ 153-155 (lines=3) @@
150
                        $keep[$i]["bottom"] = $boundary["bottom"];
151
                    }
152
153
                    if ($boundary["left"] < $kept["left"]) {
154
                        $keep[$i]["left"] = $boundary["left"];
155
                    }
156
157
                    continue 2;
158
                }