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

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