Skip to content

Commit c521563

Browse files
committed
Fix tests & CS
1 parent 04bfb74 commit c521563

12 files changed

+23
-25
lines changed

src/CliMenu.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ protected function drawMenuItem(MenuItemInterface $item, bool $selected = false)
361361
{
362362
$rows = $item->getRows($this->style, $selected);
363363

364-
$setColour = $this->style->getColoursSetCode();
365-
$resetColour = $this->style->getColoursResetCode();
366364
$invertedColour = $selected
367365
? $this->style->getInvertedColoursSetCode()
368366
: '';
@@ -376,21 +374,21 @@ protected function drawMenuItem(MenuItemInterface $item, bool $selected = false)
376374
$borderColour = '';
377375
}
378376

379-
return array_map(function ($row) use ($setColour, $invertedColour, $notInvertedColour, $resetColour, $borderColour) {
377+
return array_map(function ($row) use ($invertedColour, $notInvertedColour, $borderColour) {
380378
return sprintf(
381379
"%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
382380
str_repeat(' ', $this->style->getMargin()),
383381
$borderColour,
384382
str_repeat(' ', $this->style->getBorderLeftWidth()),
385-
$setColour,
383+
$this->style->getColoursSetCode(),
386384
$invertedColour,
387385
str_repeat(' ', $this->style->getPadding()),
388386
$row,
389387
str_repeat(' ', $this->style->getRightHandPadding(mb_strlen(s::stripAnsiEscapeSequence($row)))),
390388
$notInvertedColour,
391389
$borderColour,
392390
str_repeat(' ', $this->style->getBorderRightWidth()),
393-
$resetColour,
391+
$this->style->getColoursResetCode(),
394392
str_repeat(' ', $this->style->getMargin())
395393
);
396394
}, $rows);

test/res/testAddCustomControlMapping.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

test/res/testConfirmCanOnlyBeClosedWithEnter.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -17,7 +17,7 @@
1717
 
1818
 PHP School FTW 
1919
 ========================================== 
20-
 ● Item 1 
20+
 ● Item 1 
2121
 
2222

2323

test/res/testConfirmWithEvenLengthConfirmAndButton.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -17,7 +17,7 @@
1717
 
1818
 PHP School FTW 
1919
 ========================================== 
20-
 ● Item 1 
20+
 ● Item 1 
2121
 
2222

2323

test/res/testConfirmWithEvenLengthConfirmAndOddLengthButton.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -17,7 +17,7 @@
1717
 
1818
 PHP School FTW 
1919
 ========================================== 
20-
 ● Item 1 
20+
 ● Item 1 
2121
 
2222

2323

test/res/testConfirmWithOddLengthConfirmAndButton.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -17,7 +17,7 @@
1717
 
1818
 PHP School FTW 
1919
 ========================================== 
20-
 ● Item 1 
20+
 ● Item 1 
2121
 
2222

2323

test/res/testConfirmWithOddLengthConfirmAndEvenLengthButton.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -17,7 +17,7 @@
1717
 
1818
 PHP School FTW 
1919
 ========================================== 
20-
 ● Item 1 
20+
 ● Item 1 
2121
 
2222

2323

test/res/testFlashCanBeClosedWithAnyKey.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -15,7 +15,7 @@
1515
 
1616
 PHP School FTW 
1717
 ========================================== 
18-
 ● Item 1 
18+
 ● Item 1 
1919
 
2020

2121

test/res/testFlashWithEvenLength.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -15,7 +15,7 @@
1515
 
1616
 PHP School FTW 
1717
 ========================================== 
18-
 ● Item 1 
18+
 ● Item 1 
1919
 
2020

2121

test/res/testFlashWithOddLength.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -15,7 +15,7 @@
1515
 
1616
 PHP School FTW 
1717
 ========================================== 
18-
 ● Item 1 
18+
 ● Item 1 
1919
 
2020

2121

test/res/testReDrawReDrawsImmediately.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

@@ -12,7 +12,7 @@
1212
 
1313
 PHP School FTW 
1414
 ========================================== 
15-
 ● Item 1 
15+
 ● Item 1 
1616
 
1717

1818

test/res/testSimpleOpenClose.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
 
44
 PHP School FTW 
55
 ========================================== 
6-
 ● Item 1 
6+
 ● Item 1 
77
 
88

99

0 commit comments

Comments
 (0)