| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class UrlMatcherInterfaceProxy implements UrlMatcherInterface |
||
| 15 | { |
||
| 16 | private UrlMatcherInterface $urlMatcher; |
||
| 17 | private RouterCollectorInterface $routerCollector; |
||
| 18 | |||
| 19 | 1 | public function __construct(UrlMatcherInterface $urlMatcher, RouterCollectorInterface $routerCollector) |
|
| 20 | { |
||
| 21 | 1 | $this->urlMatcher = $urlMatcher; |
|
| 22 | 1 | $this->routerCollector = $routerCollector; |
|
| 23 | 1 | } |
|
| 24 | |||
| 25 | 1 | public function match(ServerRequestInterface $request): MatchingResult |
|
| 26 | { |
||
| 27 | 1 | $timeStart = microtime(true); |
|
| 28 | 1 | $result = $this->urlMatcher->match($request); |
|
| 29 | 1 | $this->routerCollector->collect(microtime(true) - $timeStart); |
|
| 30 | |||
| 31 | 1 | return $result; |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @codeCoverageIgnore |
||
| 36 | */ |
||
| 37 | public function getCurrentRoute(): ?Route |
||
| 38 | { |
||
| 39 | return $this->urlMatcher->getCurrentRoute(); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @codeCoverageIgnore |
||
| 44 | */ |
||
| 45 | public function getCurrentUri(): ?UriInterface |
||
| 48 | } |
||
| 49 | } |
||
| 50 |