Total Complexity | 16 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class getset |
||
11 | { |
||
12 | |||
13 | |||
14 | /** Method |
||
15 | */ |
||
16 | function getGet($key) |
||
|
|||
17 | { |
||
18 | if (isset($_GET[$key])) { |
||
19 | return $_GET[$key]; |
||
20 | } |
||
21 | } |
||
22 | |||
23 | |||
24 | /** Method |
||
25 | */ |
||
26 | function setGet($key, $value) |
||
27 | { |
||
28 | if ($key != null && $value != null) { |
||
29 | $_GET[$key] = $value; |
||
30 | } |
||
31 | } |
||
32 | |||
33 | |||
34 | /** Method |
||
35 | */ |
||
36 | function getPost($key) |
||
37 | { |
||
38 | if (isset($_POST[$key])) { |
||
39 | return $_POST[$key]; |
||
40 | } |
||
41 | } |
||
42 | |||
43 | |||
44 | /** Method |
||
45 | */ |
||
46 | function setPost($key, $value) |
||
47 | { |
||
48 | if ($key != null && $value != null) { |
||
49 | $_POST[$key] = $value; |
||
50 | } |
||
51 | } |
||
52 | |||
53 | /** Method |
||
54 | */ |
||
55 | function getServer($key) |
||
56 | { |
||
57 | if (isset($_SESSION[$key])) { |
||
58 | return $_SESSION[$key]; |
||
59 | } |
||
60 | } |
||
61 | |||
62 | |||
63 | /** Method |
||
64 | */ |
||
65 | function setServer($key, $value) |
||
69 | } |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * Method |
||
74 | */ |
||
75 | public function logoutSession() |
||
79 | } |
||
80 | |||
81 | } |
||
82 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.