@@ -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 | /** |
@@ -167,14 +167,14 @@ |
||
167 | 167 | if ($package->getVendor() == 'keeko' && $this->isCoreSchema()) { |
168 | 168 | $model = $package->getName(); |
169 | 169 | if ($this->hasModel($model)) { |
170 | - $models []= $model; |
|
170 | + $models [] = $model; |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
174 | 174 | // anyway, generate all |
175 | 175 | else { |
176 | 176 | foreach ($this->getModels() as $model) { |
177 | - $models []= $model->getOriginCommonName(); |
|
177 | + $models [] = $model->getOriginCommonName(); |
|
178 | 178 | } |
179 | 179 | } |
180 | 180 |
@@ -91,6 +91,9 @@ |
||
91 | 91 | ; |
92 | 92 | } |
93 | 93 | |
94 | + /** |
|
95 | + * @param string $name |
|
96 | + */ |
|
94 | 97 | protected function runCommand($name, InputInterface $input, OutputInterface $output) { |
95 | 98 | // return whether command has already executed |
96 | 99 | $app = $this->getApplication(); |
@@ -283,7 +283,6 @@ |
||
283 | 283 | /** |
284 | 284 | * Generates an action. |
285 | 285 | * |
286 | - * @param string $actionName |
|
287 | 286 | * @param ActionSchema $action the action node from composer.json |
288 | 287 | */ |
289 | 288 | private function generateAction($actionName) { |
@@ -14,6 +14,9 @@ |
||
14 | 14 | /** @var Table */ |
15 | 15 | private $foreign; |
16 | 16 | |
17 | + /** |
|
18 | + * @param \keeko\tools\services\CommandService $service |
|
19 | + */ |
|
17 | 20 | public function __construct($service, Table $model, Table $foreign) { |
18 | 21 | parent::__construct($service); |
19 | 22 | $this->model = $model; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | * Adds authors to the docblock of the given struct |
63 | 63 | * |
64 | 64 | * @param AbstractPhpStruct $struct |
65 | - * @param array $package |
|
65 | + * @param PackageSchema $package |
|
66 | 66 | */ |
67 | 67 | public function addAuthors(AbstractPhpStruct $struct, PackageSchema $package) { |
68 | 68 | $docblock = $struct->getDocblock(); |
@@ -230,7 +230,7 @@ |
||
230 | 230 | $module = $this->packageService->getModule(); |
231 | 231 | $action = $module->getAction($actionName); |
232 | 232 | $prefix = substr($actionName, 0, strpos($actionName, 'relationship') + 12); |
233 | - $readAction = $module->getAction($prefix.'-read'); |
|
233 | + $readAction = $module->getAction($prefix . '-read'); |
|
234 | 234 | |
235 | 235 | // get modules names |
236 | 236 | $matches = []; |