Skip to content

Commit 5ef5502

Browse files
committed
phpdoc updates
1 parent dfced75 commit 5ef5502

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

src/Console/Command/ModuleCreateCommand.php

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ public function setSkeletonModuleDir($moduleDir)
147147

148148
/**
149149
* @param string $moduleDir
150+
*
151+
* @return void
150152
*/
151153
public function setTargetModuleDir($moduleDir)
152154
{
@@ -155,13 +157,16 @@ public function setTargetModuleDir($moduleDir)
155157

156158
/**
157159
* @param array $tplEngines
160+
*
161+
* @return void
158162
*/
159163
public function setEnabledTemplatingEngines(array $tplEngines)
160164
{
161165
$this->configEnabledTemplatingEngines = $tplEngines;
162166
}
163167

164168
/**
169+
* @return void
165170
*/
166171
protected function configure()
167172
{
@@ -320,8 +325,10 @@ protected function askQuestions(InputInterface $input, OutputInterface $output)
320325
$this->chooseTemplatingEngine($input, $output);
321326
}
322327

323-
if($this->askForRouting($input, $output)) {
324-
$this->chooseRouter($input, $output);
328+
if($this->askForContoller($input, $output)) {
329+
if($this->askForRouting($input, $output)) {
330+
return $this->chooseRouter($input, $output);
331+
}
325332
}
326333
}
327334

@@ -416,7 +423,7 @@ private function askForTemplating(InputInterface $input, OutputInterface $output
416423
private function askForRouting(InputInterface $input, OutputInterface $output)
417424
{
418425
$questionHelper = $this->getHelper('question');
419-
$question = new ConfirmationQuestion("Do you need routing? (yes/no):\n", false);
426+
$question = new ConfirmationQuestion("Which router do you want? (yes/no):\n", false);
420427

421428
return $questionHelper->ask($input, $output, $question);
422429
}
@@ -439,6 +446,12 @@ private function chooseTemplatingEngine($input, $output)
439446
}
440447
}
441448

449+
/**
450+
* @param InputInterface $input
451+
* @param OutputInterface $output
452+
*
453+
* @return void
454+
*/
442455
private function chooseRouter(InputInterface $input, OutputInterface $output)
443456
{
444457
$routingQuestion = new ChoiceQuestion('Choose your routing engine:',
@@ -460,13 +473,21 @@ private function chooseRouter(InputInterface $input, OutputInterface $output)
460473
$this->routingEngine = $chosenRouter;
461474
}
462475

476+
/**
477+
* @param $tplEngine
478+
*
479+
* @return void
480+
*/
463481
private function getTemplatingFilesFromEngine($tplEngine)
464482
{
465483
if(!isset($this->tplEngineFilesMap[$tplEngine])) {
466484
throw new \InvalidArgumentException('Invalid templating engine specified for map files: ' . $tplEngine);
467485
}
468486
}
469487

488+
/**
489+
* @return void
490+
*/
470491
private function processTemplatingFiles()
471492
{
472493
$tplFiles = $this->getTemplatingFilesFromEngine($this->tplEngine);
@@ -495,6 +516,8 @@ private function processTemplatingFiles()
495516

496517
/**
497518
* @throws \Exception
519+
*
520+
* @return void
498521
*/
499522
private function processRoutingFiles($tokenizedFiles, $tokens)
500523
{
@@ -543,6 +566,9 @@ private function processRoutingFiles($tokenizedFiles, $tokens)
543566
}
544567
}
545568

569+
/**
570+
* @return array
571+
*/
546572
protected function getTokenizedCoreFiles()
547573
{
548574
$files = [];
@@ -552,6 +578,11 @@ protected function getTokenizedCoreFiles()
552578
return $files;
553579
}
554580

581+
/**
582+
* @param $routingEngine
583+
* @return array
584+
* @throws \Exception
585+
*/
555586
private function getRoutingTokenMap($routingEngine) {
556587

557588
// if(!isset($this->routingEngineTokenMap[$routingEngine])) {

0 commit comments

Comments
 (0)