@@ -21,8 +21,8 @@ |
||
| 21 | 21 | // method: run(Request $request) : Response |
| 22 | 22 | $class->addUseStatement('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException'); |
| 23 | 23 | $class->addUseStatement('Tobscure\\JsonApi\\Exception\\InvalidParameterException'); |
| 24 | - $class->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName() . 'Query'); |
|
| 25 | - $class->addUseStatement($model->getNamespace() . '\\' . $foreignModel->getPhpName() . 'Query'); |
|
| 24 | + $class->addUseStatement($model->getNamespace().'\\'.$model->getPhpName().'Query'); |
|
| 25 | + $class->addUseStatement($model->getNamespace().'\\'.$foreignModel->getPhpName().'Query'); |
|
| 26 | 26 | $class->setMethod($this->generateRunMethod($this->twig->render('to-many-delete-run.twig', [ |
| 27 | 27 | 'model' => $model->getCamelCaseName(), |
| 28 | 28 | 'class' => $model->getPhpName(), |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | // method: run(Request $request) : Response |
| 22 | 22 | $class->addUseStatement('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException'); |
| 23 | - $class->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName() . 'Query'); |
|
| 23 | + $class->addUseStatement($model->getNamespace().'\\'.$model->getPhpName().'Query'); |
|
| 24 | 24 | $class->setMethod($this->generateRunMethod($this->twig->render('to-many-read-run.twig', [ |
| 25 | 25 | 'model' => $model->getCamelCaseName(), |
| 26 | 26 | 'class' => $model->getPhpName() |
@@ -21,9 +21,9 @@ |
||
| 21 | 21 | // method: run(Request $request) : Response |
| 22 | 22 | $class->addUseStatement('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException'); |
| 23 | 23 | $class->addUseStatement('Tobscure\\JsonApi\\Exception\\InvalidParameterException'); |
| 24 | - $class->addUseStatement($middle->getNamespace() . '\\' . $middle->getPhpName() . 'Query'); |
|
| 25 | - $class->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName() . 'Query'); |
|
| 26 | - $class->addUseStatement($model->getNamespace() . '\\' . $foreignModel->getPhpName() . 'Query'); |
|
| 24 | + $class->addUseStatement($middle->getNamespace().'\\'.$middle->getPhpName().'Query'); |
|
| 25 | + $class->addUseStatement($model->getNamespace().'\\'.$model->getPhpName().'Query'); |
|
| 26 | + $class->addUseStatement($model->getNamespace().'\\'.$foreignModel->getPhpName().'Query'); |
|
| 27 | 27 | $class->setMethod($this->generateRunMethod($this->twig->render('to-many-update-run.twig', [ |
| 28 | 28 | 'model' => $model->getCamelCaseName(), |
| 29 | 29 | 'class' => $model->getPhpName(), |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | $this->addConfigureParamsMethod($class, $this->twig->render('delete-configureParams.twig')); |
| 18 | 18 | |
| 19 | 19 | // method: run(Request $request) |
| 20 | - $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()) . '\\' . $model->getPhpName() . 'Domain'); |
|
| 20 | + $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()).'\\'.$model->getPhpName().'Domain'); |
|
| 21 | 21 | $class->setMethod($this->generateRunMethod($this->twig->render('delete-run.twig', [ |
| 22 | - 'domain' => $model->getPhpName() . 'Domain' |
|
| 22 | + 'domain' => $model->getPhpName().'Domain' |
|
| 23 | 23 | ]))); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -15,9 +15,9 @@ |
||
| 15 | 15 | |
| 16 | 16 | // method: run(Request $request) |
| 17 | 17 | $class->addUseStatement('phootwork\\json\\Json'); |
| 18 | - $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()) . '\\' . $model->getPhpName() . 'Domain'); |
|
| 18 | + $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()).'\\'.$model->getPhpName().'Domain'); |
|
| 19 | 19 | $class->setMethod($this->generateRunMethod($this->twig->render('create-run.twig', [ |
| 20 | - 'domain' => $model->getPhpName() . 'Domain' |
|
| 20 | + 'domain' => $model->getPhpName().'Domain' |
|
| 21 | 21 | ]))); |
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | \ No newline at end of file |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | // method: run(Request $request) : Response |
| 22 | 22 | $class->addUseStatement('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException'); |
| 23 | 23 | $class->addUseStatement('Tobscure\\JsonApi\\Exception\\InvalidParameterException'); |
| 24 | - $class->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName() . 'Query'); |
|
| 25 | - $class->addUseStatement($model->getNamespace() . '\\' . $foreignModel->getPhpName() . 'Query'); |
|
| 24 | + $class->addUseStatement($model->getNamespace().'\\'.$model->getPhpName().'Query'); |
|
| 25 | + $class->addUseStatement($model->getNamespace().'\\'.$foreignModel->getPhpName().'Query'); |
|
| 26 | 26 | $class->setMethod($this->generateRunMethod($this->twig->render('to-many-add-run.twig', [ |
| 27 | 27 | 'model' => $model->getCamelCaseName(), |
| 28 | 28 | 'class' => $model->getPhpName(), |
@@ -18,9 +18,9 @@ |
||
| 18 | 18 | |
| 19 | 19 | // method: run(Request $request) |
| 20 | 20 | $class->addUseStatement('phootwork\\json\\Json'); |
| 21 | - $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()) . '\\' . $model->getPhpName() . 'Domain'); |
|
| 21 | + $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()).'\\'.$model->getPhpName().'Domain'); |
|
| 22 | 22 | $class->setMethod($this->generateRunMethod($this->twig->render('update-run.twig', [ |
| 23 | - 'domain' => $model->getPhpName() . 'Domain' |
|
| 23 | + 'domain' => $model->getPhpName().'Domain' |
|
| 24 | 24 | ]))); |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | 'model' => NameUtils::toCamelCase($model->getOriginCommonName()), |
| 30 | 30 | 'class' => $model->getPhpName() |
| 31 | 31 | ])) |
| 32 | - ->setDescription('Creates a new ' . $model->getPhpName() . ' with the provided data') |
|
| 32 | + ->setDescription('Creates a new '.$model->getPhpName().' with the provided data') |
|
| 33 | 33 | ); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | 'model' => NameUtils::toCamelCase($model->getOriginCommonName()), |
| 47 | 47 | 'class' => $model->getPhpName() |
| 48 | 48 | ])) |
| 49 | - ->setDescription('Updates a ' . $model->getPhpName() . ' with the given id' . |
|
| 49 | + ->setDescription('Updates a '.$model->getPhpName().' with the given id'. |
|
| 50 | 50 | 'and the provided data') |
| 51 | 51 | ); |
| 52 | 52 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | 'model' => NameUtils::toCamelCase($model->getOriginCommonName()), |
| 63 | 63 | 'class' => $model->getPhpName() |
| 64 | 64 | ])) |
| 65 | - ->setDescription('Deletes a ' . $model->getPhpName() . ' with the given id') |
|
| 65 | + ->setDescription('Deletes a '.$model->getPhpName().' with the given id') |
|
| 66 | 66 | ); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | protected function generateTrait(Table $model) { |
| 22 | 22 | $trait = PhpTrait::create() |
| 23 | 23 | ->setNamespace(str_replace('model', 'domain\\base', $model->getNamespace())) |
| 24 | - ->setName($model->getPhpName() . 'DomainTrait') |
|
| 25 | - ->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName()) |
|
| 26 | - ->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName() . 'Query') |
|
| 24 | + ->setName($model->getPhpName().'DomainTrait') |
|
| 25 | + ->addUseStatement($model->getNamespace().'\\'.$model->getPhpName()) |
|
| 26 | + ->addUseStatement($model->getNamespace().'\\'.$model->getPhpName().'Query') |
|
| 27 | 27 | ->addUseStatement('keeko\\framework\\service\\ServiceContainer') |
| 28 | 28 | ->setMethod(PhpMethod::create('getServiceContainer') |
| 29 | 29 | ->setVisibility(PhpMethod::VISIBILITY_PROTECTED) |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | 'model' => NameUtils::toCamelCase($model->getOriginCommonName()), |
| 47 | 47 | 'class' => $model->getPhpName() |
| 48 | 48 | ])) |
| 49 | - ->setDescription('Returns one ' . $model->getPhpName() . ' with the given id') |
|
| 49 | + ->setDescription('Returns one '.$model->getPhpName().' with the given id') |
|
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -68,16 +68,16 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $trait->setMethod(PhpMethod::create('applyFilter') |
| 70 | 70 | ->addParameter(PhpParameter::create('query') |
| 71 | - ->setType($model->getPhpName() . 'Query') |
|
| 71 | + ->setType($model->getPhpName().'Query') |
|
| 72 | 72 | ) |
| 73 | 73 | ->setVisibility(PhpMethod::VISIBILITY_PROTECTED) |
| 74 | 74 | ->setAbstract(true) |
| 75 | - ->setDescription('Implement this functionality at ' . $this->getClassName($model)) |
|
| 75 | + ->setDescription('Implement this functionality at '.$this->getClassName($model)) |
|
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | protected function getClassName(Table $model) { |
| 80 | - return str_replace('model', 'domain', $model->getNamespace()) . |
|
| 81 | - '\\' . $model->getPhpName() . 'Domain'; |
|
| 80 | + return str_replace('model', 'domain', $model->getNamespace()). |
|
| 81 | + '\\'.$model->getPhpName().'Domain'; |
|
| 82 | 82 | } |
| 83 | 83 | } |