Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
19 | 2 | public function createRoute( |
|
20 | string $name, |
||
21 | string $path, |
||
22 | array $options, |
||
23 | callable $callable |
||
24 | ): RouteDataProvider |
||
25 | { |
||
26 | 2 | $route = new RouteDataProvider(); |
|
27 | |||
28 | $route |
||
29 | 2 | ->setName($name) |
|
30 | 2 | ->setPath($path) |
|
31 | 2 | ->setDefaults( |
|
32 | [ |
||
33 | 2 | '_controller' => $callable |
|
34 | ] |
||
35 | ) |
||
36 | 2 | ->setMethods( |
|
37 | 2 | $options['methods'] ?? [] |
|
38 | ); |
||
39 | |||
40 | 2 | return $route; |
|
41 | } |
||
42 | } |