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