@@ -3,9 +3,9 @@ |
||
3 | 3 | use PhpSchool\CliMenu\CliMenu; |
4 | 4 | use PhpSchool\CliMenu\CliMenuBuilder; |
5 | 5 | |
6 | -require_once(__DIR__ . '/../vendor/autoload.php'); |
|
6 | +require_once(__DIR__.'/../vendor/autoload.php'); |
|
7 | 7 | |
8 | -$itemCallable = function (CliMenu $menu) { |
|
8 | +$itemCallable = function(CliMenu $menu) { |
|
9 | 9 | echo $menu->getSelectedItem()->getText(); |
10 | 10 | }; |
11 | 11 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | use PhpSchool\CliMenu\CliMenu; |
4 | 4 | use PhpSchool\CliMenu\CliMenuBuilder; |
5 | 5 | |
6 | -require_once(__DIR__ . '/../vendor/autoload.php'); |
|
6 | +require_once(__DIR__.'/../vendor/autoload.php'); |
|
7 | 7 | |
8 | -$itemCallable = function (CliMenu $menu) { |
|
8 | +$itemCallable = function(CliMenu $menu) { |
|
9 | 9 | $menu->confirm('PHP School FTW!') |
10 | 10 | ->display('OK'); |
11 | 11 | }; |
@@ -3,9 +3,9 @@ |
||
3 | 3 | use PhpSchool\CliMenu\CliMenu; |
4 | 4 | use PhpSchool\CliMenu\CliMenuBuilder; |
5 | 5 | |
6 | -require_once(__DIR__ . '/../vendor/autoload.php'); |
|
6 | +require_once(__DIR__.'/../vendor/autoload.php'); |
|
7 | 7 | |
8 | -$itemCallable = function (CliMenu $menu) { |
|
8 | +$itemCallable = function(CliMenu $menu) { |
|
9 | 9 | echo $menu->getSelectedItem()->getText(); |
10 | 10 | }; |
11 | 11 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | ) |
53 | 53 | ); |
54 | 54 | |
55 | - return array_map(function ($row, $key) use ($style, $marker, $length) { |
|
55 | + return array_map(function($row, $key) use ($style, $marker, $length) { |
|
56 | 56 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
57 | 57 | |
58 | 58 | if ($key === 0) { |
@@ -3,13 +3,13 @@ |
||
3 | 3 | use PhpSchool\CliMenu\CliMenu; |
4 | 4 | use PhpSchool\CliMenu\CliMenuBuilder; |
5 | 5 | |
6 | -require_once(__DIR__ . '/../vendor/autoload.php'); |
|
6 | +require_once(__DIR__.'/../vendor/autoload.php'); |
|
7 | 7 | |
8 | -$itemCallable = function (CliMenu $menu) { |
|
8 | +$itemCallable = function(CliMenu $menu) { |
|
9 | 9 | $menu->yesNo(sprintf('switch [%s]?!', 6789)) |
10 | 10 | ->setYesText('OK') |
11 | 11 | ->setNoText('Cancel') |
12 | - ->display(function ($res) { |
|
12 | + ->display(function($res) { |
|
13 | 13 | var_dump($res); |
14 | 14 | }); |
15 | 15 | }; |
@@ -66,8 +66,8 @@ |
||
66 | 66 | |
67 | 67 | $promptWidth = mb_strlen($this->text) + 4; |
68 | 68 | $fillWidth = $promptWidth - (mb_strlen($this->getYesText()) + mb_strlen($this->getNoText())); |
69 | - $placeHolderWidth = 0 == ($fillWidth % 2) ? 2 : 1; |
|
70 | - $fillWidth = ($fillWidth - $placeHolderWidth) / 2; |
|
69 | + $placeHolderWidth = 0 == ($fillWidth%2) ? 2 : 1; |
|
70 | + $fillWidth = ($fillWidth - $placeHolderWidth)/2; |
|
71 | 71 | |
72 | 72 | $this->write(sprintf( |
73 | 73 | '%s%s%s', |