Code Duplication    Length = 11-11 lines in 2 locations

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;

src/Builder/CliMenuBuilder.php 1 location

@@ 268-278 (lines=11) @@
265
        $leftWidth = null,
266
        string $colour = null
267
    ) : self {
268
        if (!is_int($rightWidth)) {
269
            $colour = $rightWidth;
270
            $rightWidth = $bottomWidth = $leftWidth = $topWidth;
271
        } elseif (!is_int($bottomWidth)) {
272
            $colour = $bottomWidth;
273
            $bottomWidth = $topWidth;
274
            $leftWidth = $rightWidth;
275
        } elseif (!is_int($leftWidth)) {
276
            $colour = $leftWidth;
277
            $leftWidth = $rightWidth;
278
        }
279
280
        $this->style['borderTopWidth'] = $topWidth;
281
        $this->style['borderRightWidth'] = $rightWidth;