@@ -28,7 +28,7 @@ |
||
28 | 28 | $this->setDispatcher($dispatcher); |
29 | 29 | $this->keekoDispatcher = $dispatcher; |
30 | 30 | |
31 | - $dispatcher->addListener(ConsoleEvents::TERMINATE, function (ConsoleTerminateEvent $event) { |
|
31 | + $dispatcher->addListener(ConsoleEvents::TERMINATE, function(ConsoleTerminateEvent $event) { |
|
32 | 32 | $command = $event->getCommand(); |
33 | 33 | $this->finishedCommands[] = $command->getName(); |
34 | 34 | }); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $types = ['module', 'app']; |
175 | 175 | $question = new Question('Package type (module|app)', $type); |
176 | 176 | $question->setAutocompleterValues($types); |
177 | - $question->setValidator(function ($answer) use ($types) { |
|
177 | + $question->setValidator(function($answer) use ($types) { |
|
178 | 178 | if (!in_array($answer, $types)) { |
179 | 179 | throw new \RuntimeException('The name of the type should be one of: ' . |
180 | 180 | implode(',', $types)); |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | private function validateName($name) { |
554 | 554 | if (!preg_match('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}', $name)) { |
555 | 555 | throw new \InvalidArgumentException( |
556 | - 'The package name '.$name.' is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+' |
|
556 | + 'The package name ' . $name . ' is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+' |
|
557 | 557 | ); |
558 | 558 | } |
559 | 559 | } |
@@ -24,8 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | protected function getQuestion($question, $default = null, $sep = ':') { |
26 | 26 | return !empty($default) ? |
27 | - sprintf('<info>%s</info> [<comment>%s</comment>]%s ', $question, $default, $sep) : |
|
28 | - sprintf('<info>%s</info>%s ', $question, $sep); |
|
27 | + sprintf('<info>%s</info> [<comment>%s</comment>]%s ', $question, $default, $sep) : sprintf('<info>%s</info>%s ', $question, $sep); |
|
29 | 28 | } |
30 | 29 | |
31 | 30 | /** |
@@ -105,7 +105,7 @@ |
||
105 | 105 | $fields .= sprintf("'%s'", $prop); |
106 | 106 | |
107 | 107 | if (isset($conversions[$prop])) { |
108 | - $fields .= ' => function($v) {'."\n\t".'return ' . $conversions[$prop] . ';'."\n".'}'; |
|
108 | + $fields .= ' => function($v) {' . "\n\t" . 'return ' . $conversions[$prop] . ';' . "\n" . '}'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | $fields .= ', '; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public static function toStudlyCase($input) { |
16 | 16 | $input = trim($input, '-_'); |
17 | 17 | return ucfirst(preg_replace_callback('/([A-Z-_][a-z]+)/', function($matches) { |
18 | - return ucfirst(str_replace(['-','_'], '',$matches[0])); |
|
18 | + return ucfirst(str_replace(['-', '_'], '', $matches[0])); |
|
19 | 19 | }, $input)); |
20 | 20 | } |
21 | 21 |