| Conditions | 5 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | protected function getRouteInformation(Route $route, $filter, $namespace) |
||
| 35 | { |
||
| 36 | $uri = $route->uri(); |
||
| 37 | $name = $route->getName(); |
||
| 38 | $laroute = array_get($route->getAction(), 'laroute', null); |
||
| 39 | |||
| 40 | switch ($filter) { |
||
| 41 | case 'all': |
||
| 42 | if ($laroute === false) { |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | break; |
||
| 46 | case 'only': |
||
| 47 | if ($laroute !== true) { |
||
| 48 | return; |
||
| 49 | } |
||
| 50 | break; |
||
| 51 | } |
||
| 52 | |||
| 53 | return compact('uri', 'name'); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]orarray<String>.