Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public static function has($name) |
||
2 ignored issues
–
show
|
|||
20 | { |
||
21 | if (isset($_REQUEST[$name])) { |
||
22 | return true; |
||
23 | } |
||
24 | |||
25 | return isset($_GET[$name]); |
||
26 | } |
||
27 | |||
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: