Code Duplication    Length = 8-8 lines in 3 locations

src/PhpSpreadsheet/Style/Style.php 3 locations

@@ 228-235 (lines=8) @@
225
            if ($pAdvanced && isset($pStyles['borders'])) {
226
                // 'allBorders' is a shorthand property for 'outline' and 'inside' and
227
                //        it applies to components that have not been set explicitly
228
                if (isset($pStyles['borders']['allBorders'])) {
229
                    foreach (['outline', 'inside'] as $component) {
230
                        if (!isset($pStyles['borders'][$component])) {
231
                            $pStyles['borders'][$component] = $pStyles['borders']['allBorders'];
232
                        }
233
                    }
234
                    unset($pStyles['borders']['allBorders']); // not needed any more
235
                }
236
                // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left'
237
                //        it applies to components that have not been set explicitly
238
                if (isset($pStyles['borders']['outline'])) {
@@ 238-245 (lines=8) @@
235
                }
236
                // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left'
237
                //        it applies to components that have not been set explicitly
238
                if (isset($pStyles['borders']['outline'])) {
239
                    foreach (['top', 'right', 'bottom', 'left'] as $component) {
240
                        if (!isset($pStyles['borders'][$component])) {
241
                            $pStyles['borders'][$component] = $pStyles['borders']['outline'];
242
                        }
243
                    }
244
                    unset($pStyles['borders']['outline']); // not needed any more
245
                }
246
                // 'inside' is a shorthand property for 'vertical' and 'horizontal'
247
                //        it applies to components that have not been set explicitly
248
                if (isset($pStyles['borders']['inside'])) {
@@ 248-255 (lines=8) @@
245
                }
246
                // 'inside' is a shorthand property for 'vertical' and 'horizontal'
247
                //        it applies to components that have not been set explicitly
248
                if (isset($pStyles['borders']['inside'])) {
249
                    foreach (['vertical', 'horizontal'] as $component) {
250
                        if (!isset($pStyles['borders'][$component])) {
251
                            $pStyles['borders'][$component] = $pStyles['borders']['inside'];
252
                        }
253
                    }
254
                    unset($pStyles['borders']['inside']); // not needed any more
255
                }
256
                // width and height characteristics of selection, 1, 2, or 3 (for 3 or more)
257
                $xMax = min($rangeEnd[0] - $rangeStart[0] + 1, 3);
258
                $yMax = min($rangeEnd[1] - $rangeStart[1] + 1, 3);