Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.0054 |
Changes | 0 |
1 | <?php |
||
25 | 2 | public function getConfig(): array |
|
26 | { |
||
27 | $middleware = [ |
||
28 | 2 | '\SlayerBirden\DataFlowServer\Authentication\Middleware\TokenMiddleware::class', |
|
29 | ]; |
||
30 | 2 | if ($this->dataProvider->provide()['has_owner']) { |
|
31 | $middleware[] = '\SlayerBirden\DataFlowServer\Domain\Middleware\SetOwnerFilterMiddleware::class'; |
||
32 | } |
||
33 | 2 | $middleware[] = $this->getControllerFullName(); |
|
34 | 2 | $pluralRefName = $this->dataProvider->provide()['pluralRefName']; |
|
35 | return [ |
||
36 | [ |
||
37 | 2 | 'path' => '/' . $pluralRefName, |
|
38 | 2 | 'middleware' => $middleware, |
|
39 | 2 | 'name' => 'get_' . $pluralRefName, |
|
40 | 'allowed_methods' => ['GET'], |
||
41 | ], |
||
59 |