Conditions | 2 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
47 | 12 | public function getDispatcher() |
|
48 | { |
||
49 | // Generic Dispatcher for RestServer |
||
50 | 12 | return simpleDispatcher(function (RouteCollector $r) { |
|
51 | |||
52 | 12 | foreach ($this->getRoutes() as $route) { |
|
53 | 12 | $r->addRoute( |
|
54 | 12 | $route->getMethod(), |
|
55 | 12 | $route->getPath(), |
|
56 | 12 | [ |
|
57 | 12 | "output_processor" => $route->getOutputProcessor(), |
|
58 | 12 | "class" => $route->getClass(), |
|
59 | 12 | ] |
|
65 | } |