Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function generate(PhpClass $class, Table $model, Table $foreign, Table $middle) { |
||
1 ignored issue
–
show
|
|||
16 | // add use statements |
||
17 | $this->ensureBasicSetup($class); |
||
18 | |||
19 | // method: configureParams(OptionsResolver $resolver) |
||
20 | $this->addConfigureParamsMethod($class, $this->twig->render('relationship-configureParams.twig')); |
||
21 | |||
22 | // method: run(Request $request) : Response |
||
23 | $class->addUseStatement('Symfony\\Component\\HttpFoundation\\Request'); |
||
24 | $class->addUseStatement('Symfony\\Component\\HttpFoundation\\Response'); |
||
25 | $class->addUseStatement('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException'); |
||
26 | $class->addUseStatement('Tobscure\\JsonApi\\Exception\\InvalidParameterException'); |
||
27 | $class->addUseStatement($model->getNamespace() . '\\' . $model->getPhpName() . 'Query'); |
||
28 | $class->setMethod($this->generateRunMethod($this->twig->render('to-many-read-run.twig', [ |
||
29 | 'model' => $model->getCamelCaseName(), |
||
30 | 'class' => $model->getPhpName() |
||
31 | ]))); |
||
32 | |||
33 | return $class; |
||
34 | } |
||
35 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.