1 | <?php |
||
8 | class User extends ActiveRecordModelExtender |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var string $tableName name of the database table. |
||
13 | */ |
||
14 | protected $tableName = "ramverk1_users"; |
||
15 | |||
16 | /** |
||
17 | * Columns in the table. |
||
18 | * |
||
19 | * @var integer $id primary key auto incremented. |
||
20 | */ |
||
21 | public $id; |
||
22 | public $name; |
||
23 | public $email; |
||
24 | public $pass; |
||
25 | public $authority = "user"; |
||
26 | public $question; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Returns post with markdown and gravatar |
||
31 | * @param string $sql |
||
32 | * @param array $param |
||
|
|||
33 | * |
||
34 | * @return array |
||
35 | */ |
||
36 | 1 | public function getAllUsers($sql = null, $params = null) |
|
58 | |||
59 | /** |
||
60 | * return question/answer, three attributes are set, comments connected to them is an array. |
||
61 | * |
||
62 | * @return object |
||
63 | */ |
||
64 | 1 | public function getUser($name) |
|
80 | |||
81 | |||
82 | /** |
||
83 | * Check if user exists |
||
84 | * |
||
85 | * @param string $name |
||
86 | * |
||
87 | * @return boolean true if user exists in database else false |
||
88 | */ |
||
89 | 1 | public function userExists($name) |
|
94 | /** |
||
95 | * Returns gravatar link |
||
96 | * |
||
97 | * @param string $email |
||
98 | * |
||
99 | * @return string as gravatar link |
||
100 | */ |
||
101 | 5 | public function setGravatar() |
|
105 | |||
106 | /** |
||
107 | * Returns gravatar link |
||
108 | * |
||
109 | * @param string $name |
||
110 | * |
||
111 | * @return string as gravatar link |
||
112 | */ |
||
113 | 6 | public function getGravatar($name) |
|
118 | |||
119 | /** |
||
120 | * Set the pass. |
||
121 | * |
||
122 | * @param string $pass the pass to use. |
||
123 | * |
||
124 | * @return void |
||
125 | */ |
||
126 | 5 | public function setPassword($pass) |
|
130 | |||
131 | /** |
||
132 | * Verify the name and the pass, if successful the object contains |
||
133 | * all details from the database row. |
||
134 | * |
||
135 | * @param string $name name to check. |
||
136 | * @param string $pass the pass to use. |
||
137 | * |
||
138 | * @return boolean true if name and pass matches, else false. |
||
139 | */ |
||
140 | 3 | public function verifyPassword($name, $pass) |
|
145 | |||
146 | /** |
||
147 | * Verify the name and the anaswer, if successful the object contains |
||
148 | * all details from the database row. |
||
149 | * |
||
150 | * @param string $name name to check. |
||
151 | * @param string $answer the answer. |
||
152 | * |
||
153 | * @return boolean true if name and pass matches, else false. |
||
154 | */ |
||
155 | 1 | public function verifyQuestion($name, $answer) |
|
160 | |||
161 | |||
162 | /** |
||
163 | * Check if a post belongs to user |
||
164 | * |
||
165 | * |
||
166 | * @return boolean |
||
167 | */ |
||
168 | 1 | public function controlAuthority($loggedUser, $name) |
|
177 | } |
||
178 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.