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

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