Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4.0961 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
52 | 12 | public function match($method, $uri) |
|
53 | { |
||
54 | 12 | $result = $this->dispatcher->dispatch($method, $uri); |
|
55 | |||
56 | 12 | switch ($result[0]) { |
|
57 | 12 | case Dispatcher::FOUND: |
|
58 | 6 | return new Result($this->routes[$result[1]], $result[2]); |
|
59 | 6 | case Dispatcher::METHOD_NOT_ALLOWED: |
|
60 | 3 | throw new MethodNotAllowedException($method, $result[1]); |
|
61 | 3 | case Dispatcher::NOT_FOUND: |
|
62 | 3 | throw new NotFoundException($uri); |
|
63 | } |
||
64 | } |
||
65 | } |
||
66 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..