Code Duplication    Length = 11-11 lines in 2 locations

src/CliMenuBuilder.php 1 location

@@ 290-300 (lines=11) @@
287
        $leftWidth = null,
288
        string $colour = null
289
    ) : self {
290
        if (!is_int($rightWidth)) {
291
            $colour = $rightWidth;
292
            $rightWidth = $bottomWidth = $leftWidth = $topWidth;
293
        } elseif (!is_int($bottomWidth)) {
294
            $colour = $bottomWidth;
295
            $bottomWidth = $topWidth;
296
            $leftWidth = $rightWidth;
297
        } elseif (!is_int($leftWidth)) {
298
            $colour = $leftWidth;
299
            $leftWidth = $rightWidth;
300
        }
301
302
        $this->style['borderTopWidth'] = $topWidth;
303
        $this->style['borderRightWidth'] = $rightWidth;

src/MenuStyle.php 1 location

@@ 521-531 (lines=11) @@
518
        $leftWidth = null,
519
        string $colour = null
520
    ) : self {
521
        if (!is_int($rightWidth)) {
522
            $colour = $rightWidth;
523
            $rightWidth = $bottomWidth = $leftWidth = $topWidth;
524
        } elseif (!is_int($bottomWidth)) {
525
            $colour = $bottomWidth;
526
            $bottomWidth = $topWidth;
527
            $leftWidth = $rightWidth;
528
        } elseif (!is_int($leftWidth)) {
529
            $colour = $leftWidth;
530
            $leftWidth = $rightWidth;
531
        }
532
533
        $this->borderTopWidth = $topWidth;
534
        $this->borderRightWidth = $rightWidth;