Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
23 | 5 | public function execute(): void |
|
24 | { |
||
25 | 5 | $parsedConfiguration = (array) Yaml::parse(File::read($this->configurationFile)); |
|
26 | |||
27 | 5 | $routeCollection = $this->createRouteCollection($parsedConfiguration); |
|
28 | 5 | $matcher = new UrlMatcher($routeCollection, new RequestContext()); |
|
29 | 5 | $matchingRoute = $matcher->match($this->filter); |
|
30 | |||
31 | 5 | $filteredConfiguration = array_filter($parsedConfiguration, function ($key) use ($matchingRoute) { |
|
32 | 5 | return $key === $matchingRoute['_route']; |
|
33 | 5 | }, ARRAY_FILTER_USE_KEY); |
|
34 | |||
35 | 5 | $pages = $this->parsePageConfiguration($filteredConfiguration); |
|
36 | |||
37 | 5 | $this->renderPages($pages); |
|
38 | 5 | } |
|
39 | |||
51 |