| Conditions | 6 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 8.6047 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 63 | 2 | public function getRoutes(): array |
|
| 64 | { |
||
| 65 | 2 | $routes = []; |
|
| 66 | 2 | foreach ($this->routes->getRoutes() as $route) { |
|
| 67 | 1 | if ((!$route->getHost() || $route->getHost() === $this->request->getUri()->getHost()) |
|
| 68 | 1 | && (!$route->getScheme() || $route->getScheme() === $this->request->getUri()->getScheme()) |
|
| 69 | ) { |
||
| 70 | 1 | $routes[] = $route; |
|
| 71 | } |
||
| 72 | } |
||
| 73 | |||
| 74 | 2 | return $routes; |
|
| 75 | } |
||
| 76 | |||
| 78 |
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.