| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | function dispatcherBasic(callable $definitionCollection, $options = []) |
||
| 16 | { |
||
| 17 | $options += [ |
||
| 18 | 3 | "dispatcher" => RegexDispatcher::class, |
|
| 19 | "routeCollection" => RegexRouteCollector::class |
||
| 20 | 3 | ]; |
|
| 21 | |||
| 22 | 3 | $routeCollection = new $options["routeCollection"](); |
|
| 23 | 3 | $definitionCollection($routeCollection); |
|
| 24 | |||
| 25 | 3 | return new $options['dispatcher']($routeCollection); |
|
| 26 | } |
||
| 27 | } |
||
| 28 |