| Conditions | 6 |
| Paths | 6 |
| Total Lines | 27 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function route() |
||
| 30 | { |
||
| 31 | $requestAction = WebRequest::getString('action'); |
||
| 32 | |||
| 33 | switch ($requestAction) { |
||
| 34 | case "count": |
||
| 35 | $result = new CountAction(); |
||
| 36 | break; |
||
| 37 | case "status": |
||
| 38 | $result = new StatusAction(); |
||
| 39 | break; |
||
| 40 | case "stats": |
||
| 41 | $result = new StatsAction(); |
||
| 42 | break; |
||
| 43 | case "help": |
||
| 44 | $result = new HelpAction(); |
||
| 45 | break; |
||
| 46 | case "monitor": |
||
| 47 | $result = new MonitorAction(); |
||
| 48 | break; |
||
| 49 | default: |
||
| 50 | $result = new UnknownAction(); |
||
| 51 | break; |
||
| 52 | } |
||
| 53 | |||
| 54 | return $result; |
||
| 55 | } |
||
| 56 | } |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.