Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/CliMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ protected function drawMenuItem(MenuItemInterface $item, bool $selected = false)

return array_map(function ($row) use ($invertedColour, $notInvertedColour, $borderColour) {
return sprintf(
"%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
"%s%s%s%s%s%s%s%s%s%s%s%s\n",
str_repeat(' ', $this->style->getMargin()),
$borderColour,
str_repeat(' ', $this->style->getBorderLeftWidth()),
Expand All @@ -399,8 +399,7 @@ protected function drawMenuItem(MenuItemInterface $item, bool $selected = false)
$notInvertedColour,
$borderColour,
str_repeat(' ', $this->style->getBorderRightWidth()),
$this->style->getColoursResetCode(),
str_repeat(' ', $this->style->getMargin())
$this->style->getColoursResetCode()
);
}, $rows);
}
Expand Down
5 changes: 2 additions & 3 deletions src/MenuStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,11 @@ public function setTitleSeparator(string $actionSeparator) : self
private function generateBorderRows() : void
{
$borderRow = sprintf(
"%s%s%s%s%s\n",
"%s%s%s%s\n",
str_repeat(' ', $this->margin),
$this->getBorderColourCode(),
str_repeat(' ', $this->width),
$this->coloursResetCode,
str_repeat(' ', $this->margin)
$this->coloursResetCode
);

$this->borderTopRows = array_fill(0, $this->borderTopWidth, $borderRow);
Expand Down
10 changes: 5 additions & 5 deletions test/res/testAddCustomControlMapping.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


10 changes: 5 additions & 5 deletions test/res/testAddCustomControlMappings.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testConfirmCanOnlyBeClosedWithEnter.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
Expand All @@ -14,10 +14,10 @@
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testConfirmWithEvenLengthConfirmAndButton.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
Expand All @@ -14,10 +14,10 @@
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testConfirmWithEvenLengthConfirmAndOddLengthButton.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
Expand All @@ -14,10 +14,10 @@
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testConfirmWithOddLengthConfirmAndButton.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
Expand All @@ -14,10 +14,10 @@
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testConfirmWithOddLengthConfirmAndEvenLengthButton.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
Expand All @@ -14,10 +14,10 @@
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testFlashCanBeClosedWithAnyKey.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
 PHP School FTW! 
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testFlashWithEvenLength.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
 PHP School FTW 
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testFlashWithOddLength.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


 
 PHP School FTW! 
 


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


20 changes: 10 additions & 10 deletions test/res/testReDrawReDrawsImmediately.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 




 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


10 changes: 5 additions & 5 deletions test/res/testSimpleOpenClose.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 
 
 PHP School FTW 
 ========================================== 
 ● Item 1 
 


14 changes: 7 additions & 7 deletions test/res/testSimpleOpenCloseWithBorders.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@


 
   
  PHP School FTW  
  ======================================  
  ● Item 1  
   
 
 
   
  PHP School FTW  
  ======================================  
  ● Item 1  
   
 


10 changes: 5 additions & 5 deletions test/res/testSimpleOpenCloseWithLeftAndRightBorders.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


   
  PHP School FTW  
  ======================================  
  ● Item 1  
   
   
  PHP School FTW  
  ======================================  
  ● Item 1  
   


Loading