Code Duplication    Length = 11-14 lines in 2 locations

src/CliMenuBuilder.php 1 location

@@ 230-240 (lines=11) @@
227
        return $this;
228
    }
229
230
    public function setPadding(int $topBottom, int $leftRight = null) : self
231
    {
232
        if ($leftRight === null) {
233
            $leftRight = $topBottom;
234
        }
235
236
        $this->setPaddingTopBottom($topBottom);
237
        $this->setPaddingLeftRight($leftRight);
238
239
        return $this;
240
    }
241
242
    public function setPaddingTopBottom(int $topBottom) : self
243
    {

src/MenuStyle.php 1 location

@@ 429-442 (lines=14) @@
426
        return $this->paddingTopBottomRows;
427
    }
428
429
    public function setPadding(int $topBottom, int $leftRight = null) : self
430
    {
431
        if ($leftRight === null) {
432
            $leftRight = $topBottom;
433
        }
434
435
        $this->setPaddingTopBottom($topBottom);
436
        $this->setPaddingLeftRight($leftRight);
437
438
        $this->calculateContentWidth();
439
        $this->generatePaddingTopBottomRows();
440
441
        return $this;
442
    }
443
444
    public function setPaddingTopBottom(int $topBottom) : self
445
    {