Code Duplication    Length = 9-9 lines in 2 locations

src/Crops/Entropy.php 2 locations

@@ 95-103 (lines=9) @@
92
            $sliceSize = min($aBottom - $aTop - $targetSize, $sliceSize);
93
94
            // Make a top slice image
95
            if (!$aSlice) {
96
                $aSlice = clone $image;
97
98
                if ($axis === 'h') {
99
                    $aSlice->cropImage($sliceSize, $originalSize, $aTop, 0);
100
                } else {
101
                    $aSlice->cropImage($originalSize, $sliceSize, 0, $aTop);
102
                }
103
            }
104
105
            // Make a bottom slice image
106
            if (!$bSlice) {
@@ 106-114 (lines=9) @@
103
            }
104
105
            // Make a bottom slice image
106
            if (!$bSlice) {
107
                $bSlice = clone $image;
108
109
                if ($axis === 'h') {
110
                    $bSlice->cropImage($sliceSize, $originalSize, $aBottom - $sliceSize, 0);
111
                } else {
112
                    $bSlice->cropImage($originalSize, $sliceSize, 0, $aBottom - $sliceSize);
113
                }
114
            }
115
116
            // calculate slices potential
117
            $aPosition = (($axis === 'h') ? 'left' : 'top');