| Conditions | 6 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 49 | public function getRoutes(): array |
||
| 50 | { |
||
| 51 | $routes = []; |
||
| 52 | foreach ($this->routes->getRoutes() as $route) { |
||
| 53 | if ((!$route->getHost() || $route->getHost() === $this->request->getUri()->getHost()) |
||
| 54 | && (!$route->getScheme() || $route->getScheme() === $this->request->getUri()->getScheme()) |
||
| 55 | ) { |
||
| 56 | $routes[] = $route; |
||
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 60 | return $routes; |
||
| 61 | } |
||
| 62 | |||
| 64 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.