Code Duplication    Length = 11-11 lines in 2 locations

src/CliMenuBuilder.php 1 location

@@ 306-316 (lines=11) @@
303
        $leftWidth = null,
304
        string $colour = null
305
    ) : self {
306
        if (!is_int($rightWidth)) {
307
            $colour = $rightWidth;
308
            $rightWidth = $bottomWidth = $leftWidth = $topWidth;
309
        } elseif (!is_int($bottomWidth)) {
310
            $colour = $bottomWidth;
311
            $bottomWidth = $topWidth;
312
            $leftWidth = $rightWidth;
313
        } elseif (!is_int($leftWidth)) {
314
            $colour = $leftWidth;
315
            $leftWidth = $rightWidth;
316
        }
317
318
        $this->style['borderTopWidth'] = $topWidth;
319
        $this->style['borderRightWidth'] = $rightWidth;

src/MenuStyle.php 1 location

@@ 611-621 (lines=11) @@
608
        $leftWidth = null,
609
        string $colour = null
610
    ) : self {
611
        if (!is_int($rightWidth)) {
612
            $colour = $rightWidth;
613
            $rightWidth = $bottomWidth = $leftWidth = $topWidth;
614
        } elseif (!is_int($bottomWidth)) {
615
            $colour = $bottomWidth;
616
            $bottomWidth = $topWidth;
617
            $leftWidth = $rightWidth;
618
        } elseif (!is_int($leftWidth)) {
619
            $colour = $leftWidth;
620
            $leftWidth = $rightWidth;
621
        }
622
623
        $this->borderTopWidth = $topWidth;
624
        $this->borderRightWidth = $rightWidth;