| @@ -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 | /** | 
| @@ -22,7 +22,7 @@ | ||
| 22 | 22 |  	protected function generateClass(ActionSchema $action) { | 
| 23 | 23 | $class = PhpClass::create($action->getClass()); | 
| 24 | 24 | $class->setDescription($action->getTitle()); | 
| 25 | - $class->setLongDescription($action->getDescription() . "\n\n". | |
| 25 | + $class->setLongDescription($action->getDescription() . "\n\n" . | |
| 26 | 26 | 'This code is automatically created. Modifications will probably be overwritten.'); | 
| 27 | 27 | $this->codegenService->addAuthors($class); | 
| 28 | 28 | $this->ensureBasicSetup($class); | 
| @@ -4,7 +4,6 @@ | ||
| 4 | 4 | use keeko\tools\command\AbstractGenerateCommand; | 
| 5 | 5 | use Symfony\Component\Console\Output\OutputInterface; | 
| 6 | 6 | use Symfony\Component\Console\Input\InputInterface; | 
| 7 | -use Symfony\Component\Console\Command\Command; | |
| 8 | 7 | use Symfony\Component\Console\Input\ArrayInput; | 
| 9 | 8 | |
| 10 | 9 |  class MagicCommand extends AbstractGenerateCommand { | 
| @@ -107,13 +107,13 @@ | ||
| 107 | 107 | // constructor | 
| 108 | 108 |  		$class->setMethod(PhpMethod::create('__construct') | 
| 109 | 109 | ->addParameter(PhpParameter::create($modelVariableName)->setType($model->getPhpName())) | 
| 110 | -			->setBody('$this->' . $modelVariableName . ' = $' . $modelVariableName .';') | |
| 110 | +			->setBody('$this->' . $modelVariableName . ' = $' . $modelVariableName . ';') | |
| 111 | 111 | ); | 
| 112 | 112 | |
| 113 | 113 | // getModel() | 
| 114 | 114 |  		$class->setMethod(PhpMethod::create('get' . $model->getPhpName()) | 
| 115 | 115 | ->setType($model->getPhpName()) | 
| 116 | -			->setBody('return $this->' . $modelVariableName .';') | |
| 116 | +			->setBody('return $this->' . $modelVariableName . ';') | |
| 117 | 117 | ); | 
| 118 | 118 | |
| 119 | 119 | $this->codegenService->dumpStruct($class, true); | 
| @@ -10,7 +10,6 @@ | ||
| 10 | 10 | use keeko\tools\generator\responder\TwigHtmlResponderGenerator; | 
| 11 | 11 | use keeko\tools\generator\Types; | 
| 12 | 12 | use keeko\tools\helpers\QuestionHelperTrait; | 
| 13 | -use keeko\tools\model\Relationship; | |
| 14 | 13 | use keeko\tools\ui\ResponseUI; | 
| 15 | 14 | use keeko\tools\utils\NamespaceResolver; | 
| 16 | 15 | use phootwork\collection\Set; | 
| @@ -139,7 +139,7 @@ | ||
| 139 | 139 | // find reflexive many-to-many relationships | 
| 140 | 140 |  			if ($relationship->getType() == Relationship::MANY_TO_MANY && $relationship->isReflexive()) { | 
| 141 | 141 | $prop = NameUtils::toCamelCase($relationship->getRelatedPluralName()); | 
| 142 | - $inverses[$prop] = '\''.NameUtils::toCamelCase($relationship->getReverseRelatedPluralName()) . '\''; | |
| 142 | + $inverses[$prop] = '\'' . NameUtils::toCamelCase($relationship->getReverseRelatedPluralName()) . '\''; | |
| 143 | 143 | } | 
| 144 | 144 | } | 
| 145 | 145 | |
| @@ -126,7 +126,7 @@ | ||
| 126 | 126 | $types = ['module', 'app']; | 
| 127 | 127 |  			$question = new Question('Package type (module|app)', $type); | 
| 128 | 128 | $question->setAutocompleterValues($types); | 
| 129 | -			$question->setValidator(function($answer) use ($types) { | |
| 129 | +			$question->setValidator(function ($answer) use ($types) { | |
| 130 | 130 |  				if (!in_array($answer, $types)) { | 
| 131 | 131 |  					throw new \RuntimeException('The name of the type should be one of: ' . | 
| 132 | 132 |  						implode(',', $types)); | 
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | $this->setDispatcher($dispatcher); | 
| 35 | 35 | $this->keekoDispatcher = $dispatcher; | 
| 36 | 36 | |
| 37 | -		$dispatcher->addListener(ConsoleEvents::TERMINATE, function(ConsoleTerminateEvent $event) { | |
| 37 | +		$dispatcher->addListener(ConsoleEvents::TERMINATE, function (ConsoleTerminateEvent $event) { | |
| 38 | 38 | $command = $event->getCommand(); | 
| 39 | 39 | $this->finishedCommands[] = $command->getName(); | 
| 40 | 40 | }); | 
| @@ -36,10 +36,10 @@ | ||
| 36 | 36 | $name = $split; | 
| 37 | 37 |  				} else { | 
| 38 | 38 | $name .= '_' . $split; | 
| 39 | - $idColumns []= $split . '_id'; | |
| 39 | + $idColumns [] = $split . '_id'; | |
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | - $idColumns []= $name . '_id'; | |
| 42 | + $idColumns [] = $name . '_id'; | |
| 43 | 43 | } | 
| 44 | 44 | } | 
| 45 | 45 | |