| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | protected function addMethods(PhpClass $class, ActionSchema $action) { |
||
| 13 | $modelName = $this->modelService->getModelNameByAction($action); |
||
| 14 | $model = $this->modelService->getModel($modelName); |
||
| 15 | |||
| 16 | // method: run(Request $request) |
||
| 17 | $class->addUseStatement('phootwork\\json\\Json'); |
||
| 18 | $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()) . '\\' . $model->getPhpName() . 'Domain'); |
||
| 19 | $class->setMethod($this->generateRunMethod($this->twig->render('create-run.twig', [ |
||
| 20 | 'domain' => $model->getPhpName() . 'Domain' |
||
| 21 | ]))); |
||
| 22 | } |
||
| 23 | } |