Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 2 |
Lines | 7 |
Ratio | 100 % |
Tests | 2 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 2 | public function __invoke(...$arguments) // PHP 5.6+ |
|
29 | { |
||
30 | // Variadic $arguments apparently not supported when empty by Symfony 3.3.6 ArgumentResolver |
||
31 | // and viewed as a regular array by knplabs/rad-resource-resolver v2.1 |
||
32 | |||
33 | 2 | return new Response($this->templating->render($this->template, $arguments)); |
|
34 | } |
||
35 | } |
||
36 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.