1 | <?php |
||
9 | class CSession |
||
10 | { |
||
11 | use \Anax\TConfigure; |
||
12 | |||
13 | |||
14 | |||
15 | /** |
||
16 | * Set a session name or use one from config. |
||
17 | * |
||
18 | * @param array $aName to set as session name, default is null and then use name from config. |
||
19 | */ |
||
20 | 4 | public function name($aName = null) |
|
30 | |||
31 | |||
32 | 2 | /** |
|
33 | * Start session. |
||
34 | 2 | * |
|
35 | 2 | * @param array $options to configure options. |
|
|
|||
36 | 2 | */ |
|
37 | 1 | public function start() |
|
41 | 2 | ||
42 | |||
43 | |||
44 | /** |
||
45 | * Get values from session. |
||
46 | * |
||
47 | * @param string $key in session variable. |
||
48 | * @param mixed $default default value to return when key is not set in session. |
||
49 | * |
||
50 | * @return mixed |
||
51 | */ |
||
52 | public function get($key, $default = null) |
||
58 | |||
59 | |||
60 | |||
61 | /** |
||
62 | * Set values in session. |
||
63 | * |
||
64 | 1 | * @param string $key in session variable. |
|
65 | * @param mixed $value to set in session. |
||
66 | 1 | * |
|
67 | 1 | * @return void |
|
68 | 1 | */ |
|
69 | public function set($key, $value) |
||
73 | |||
74 | |||
75 | |||
76 | /** |
||
77 | * Unset part of session. |
||
78 | * |
||
79 | * @param string $key in session variable. |
||
80 | * |
||
81 | 1 | * @return void |
|
82 | */ |
||
83 | 1 | public function delete($key) |
|
87 | |||
88 | |||
89 | |||
90 | /** |
||
91 | * Check if a value is set in the session. |
||
92 | * |
||
93 | * @param string $key in session variable. |
||
94 | * |
||
95 | 1 | * @return boolean true if $key is set, else false. |
|
96 | */ |
||
97 | 1 | public function has($key) |
|
101 | |||
102 | |||
103 | |||
104 | /** |
||
105 | * Read a value from the session and unset it, a form of read once flash |
||
106 | * memory using the session. |
||
107 | * |
||
108 | * @param string $key in session variable. |
||
109 | * |
||
110 | * @return mixed value from session and null if not set. |
||
111 | */ |
||
112 | public function readOnce($key) |
||
118 | } |
||
119 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.