@@ -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 |
@@ -10,11 +10,9 @@ |
||
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; |
17 | -use phootwork\file\File; |
|
18 | 16 | use phootwork\lang\Text; |
19 | 17 | use Symfony\Component\Console\Input\InputArgument; |
20 | 18 | use Symfony\Component\Console\Input\InputInterface; |
@@ -246,6 +246,9 @@ |
||
246 | 246 | return $action; |
247 | 247 | } |
248 | 248 | |
249 | + /** |
|
250 | + * @param string $type |
|
251 | + */ |
|
249 | 252 | private function generateRelationshipAction(Relationship $relationship, $type) { |
250 | 253 | $model = $relationship->getModel(); |
251 | 254 | $module = $this->package->getKeeko()->getModule(); |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use keeko\tools\utils\NamespaceResolver; |
9 | 9 | use phootwork\file\File; |
10 | 10 | use phootwork\file\Path; |
11 | -use Propel\Generator\Model\Table; |
|
12 | 11 | |
13 | 12 | class CodeService extends AbstractService { |
14 | 13 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | * Returns all attributes that aren't written onto a model (because manually filter or computed) |
88 | 88 | * |
89 | 89 | * @param Table $model |
90 | - * @return array |
|
90 | + * @return string[] |
|
91 | 91 | */ |
92 | 92 | public function getWriteFilter(Table $model) { |
93 | 93 | $modelName = $model->getOriginCommonName(); |