| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public static function get($name) |
||
|
2 ignored issues
–
show
|
|||
| 36 | { |
||
| 37 | if (isset($_REQUEST[$name])) { |
||
| 38 | return $_REQUEST[$name]; |
||
| 39 | } |
||
| 40 | |||
| 41 | if (isset($_GET[$name])) { |
||
| 42 | return $_GET[$name]; |
||
| 43 | } |
||
| 44 | |||
| 45 | return; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: