@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace PhpSchool\CliMenu; |
4 | 4 | |
5 | 5 | use PhpSchool\CliMenu\Dialogue\YesNo; |
6 | -use PhpSchool\CliMenu\Exception\InvalidInstantiationException; |
|
7 | 6 | use PhpSchool\CliMenu\Exception\InvalidTerminalException; |
8 | 7 | use PhpSchool\CliMenu\Exception\MenuNotOpenException; |
9 | 8 | use PhpSchool\CliMenu\MenuItem\LineBreakItem; |
@@ -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', |