| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | protected function addMethods(PhpTrait $trait, ActionSchema $action) { |
||
| 15 | $modelName = $this->modelService->getModelNameByAction($action); |
||
|
|
|||
| 16 | $modelVariableName = NameUtils::toCamelCase($modelName); |
||
| 17 | $modelObjectName = NameUtils::toStudlyCase($modelName); |
||
| 18 | $fullModelObjectName = $this->modelService->getFullModelObjectName($action); |
||
| 19 | |||
| 20 | // method: configureParams(OptionsResolver $resolver) |
||
| 21 | $this->addConfigureParamsMethod($trait, $this->twig->render('update-configureParams.twig')); |
||
| 22 | |||
| 23 | // method: run(Request $request) |
||
| 24 | $trait->addUseStatement($fullModelObjectName . 'Query'); |
||
| 25 | $trait->addUseStatement('keeko\\core\\exceptions\\ValidationException'); |
||
| 26 | $trait->addUseStatement('keeko\\core\\utils\\HydrateUtils'); |
||
| 27 | $trait->addUseStatement('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException'); |
||
| 28 | $trait->setMethod($this->generateRunMethod($this->twig->render('update-run.twig', [ |
||
| 29 | 'model' => $modelVariableName, |
||
| 30 | 'class' => $modelObjectName, |
||
| 31 | 'fields' => $this->codegenService->getWriteFields($modelName) |
||
| 32 | ]))); |
||
| 33 | } |
||
| 34 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.