@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $console = $this; |
| 46 | 46 | |
| 47 | - $itemCallable = function (CliMenu $menu) use ($placeHolder, $console, $file) { |
|
| 47 | + $itemCallable = function(CliMenu $menu) use ($placeHolder, $console, $file) { |
|
| 48 | 48 | $successStyle = (new MenuStyle) |
| 49 | 49 | ->setBg('254') |
| 50 | 50 | ->setFg('166'); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ->setPromptText('Type service provider namespace. [esc] to exit') |
| 54 | 54 | ->setPlaceholderText($placeHolder) |
| 55 | 55 | ->setValidationFailedText('Please type full qualified service provider namespace') |
| 56 | - ->setValidator(function ($provider) use ($placeHolder, $console, $file) { |
|
| 56 | + ->setValidator(function($provider) use ($placeHolder, $console, $file) { |
|
| 57 | 57 | if (!$console->fileIsExist($provider)) { |
| 58 | 58 | $this->setValidationFailedText("Class {$provider} must be exist"); |
| 59 | 59 | return false; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ->setPromptText("Component file {$filePath} already exists!. Want to overwrite?") |
| 128 | 128 | ->setPlaceholderText(' Y / N ') |
| 129 | 129 | ->setValidationFailedText('Please choose either Y / N') |
| 130 | - ->setValidator(function ($force) { |
|
| 130 | + ->setValidator(function($force) { |
|
| 131 | 131 | return in_array(strtolower($force), ['y', 'n']); |
| 132 | 132 | })->ask(); |
| 133 | 133 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | if (strtolower($force) === strtolower('N')) { |
| 137 | 137 | $menu->confirm('Component file are remained same!!!', $successStyle)->display('OK!'); |
| 138 | 138 | } elseif (strtolower($force) === strtolower('Y')) { |
| 139 | - $file->copy($filePath, \str_replace('component.php', date('dmyHis') . '.php', $filePath)); |
|
| 139 | + $file->copy($filePath, \str_replace('component.php', date('dmyHis').'.php', $filePath)); |
|
| 140 | 140 | |
| 141 | 141 | $this->copyStubToLocation($file, $filePath, $stub); |
| 142 | 142 | |