Code Duplication    Length = 8-8 lines in 3 locations

src/PhpSpreadsheet/Style.php 3 locations

@@ 246-253 (lines=8) @@
243
            if ($pAdvanced && isset($pStyles['borders'])) {
244
                // 'allBorders' is a shorthand property for 'outline' and 'inside' and
245
                //        it applies to components that have not been set explicitly
246
                if (isset($pStyles['borders']['allBorders'])) {
247
                    foreach (['outline', 'inside'] as $component) {
248
                        if (!isset($pStyles['borders'][$component])) {
249
                            $pStyles['borders'][$component] = $pStyles['borders']['allBorders'];
250
                        }
251
                    }
252
                    unset($pStyles['borders']['allBorders']); // not needed any more
253
                }
254
                // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left'
255
                //        it applies to components that have not been set explicitly
256
                if (isset($pStyles['borders']['outline'])) {
@@ 256-263 (lines=8) @@
253
                }
254
                // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left'
255
                //        it applies to components that have not been set explicitly
256
                if (isset($pStyles['borders']['outline'])) {
257
                    foreach (['top', 'right', 'bottom', 'left'] as $component) {
258
                        if (!isset($pStyles['borders'][$component])) {
259
                            $pStyles['borders'][$component] = $pStyles['borders']['outline'];
260
                        }
261
                    }
262
                    unset($pStyles['borders']['outline']); // not needed any more
263
                }
264
                // 'inside' is a shorthand property for 'vertical' and 'horizontal'
265
                //        it applies to components that have not been set explicitly
266
                if (isset($pStyles['borders']['inside'])) {
@@ 266-273 (lines=8) @@
263
                }
264
                // 'inside' is a shorthand property for 'vertical' and 'horizontal'
265
                //        it applies to components that have not been set explicitly
266
                if (isset($pStyles['borders']['inside'])) {
267
                    foreach (['vertical', 'horizontal'] as $component) {
268
                        if (!isset($pStyles['borders'][$component])) {
269
                            $pStyles['borders'][$component] = $pStyles['borders']['inside'];
270
                        }
271
                    }
272
                    unset($pStyles['borders']['inside']); // not needed any more
273
                }
274
                // width and height characteristics of selection, 1, 2, or 3 (for 3 or more)
275
                $xMax = min($rangeEnd[0] - $rangeStart[0] + 1, 3);
276
                $yMax = min($rangeEnd[1] - $rangeStart[1] + 1, 3);