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 | * Check if user exists |
||
30 | * |
||
31 | * @param string $name |
||
32 | * |
||
33 | * @return boolean true if user exists in database else false |
||
34 | */ |
||
35 | 1 | public function userExists($name) |
|
40 | /** |
||
41 | * Returns gravatar link |
||
42 | * |
||
43 | * @param string $email |
||
|
|||
44 | * |
||
45 | * @return string as gravatar link |
||
46 | */ |
||
47 | 5 | public function setGravatar() |
|
51 | |||
52 | /** |
||
53 | * Returns gravatar link |
||
54 | * |
||
55 | * @param string $name |
||
56 | * |
||
57 | * @return string as gravatar link |
||
58 | */ |
||
59 | 4 | public function getGravatar($name) |
|
64 | |||
65 | |||
66 | |||
67 | |||
68 | /** |
||
69 | * Set the pass. |
||
70 | * |
||
71 | * @param string $pass the pass to use. |
||
72 | * |
||
73 | * @return void |
||
74 | */ |
||
75 | 5 | public function setPassword($pass) |
|
79 | |||
80 | /** |
||
81 | * Verify the name and the pass, if successful the object contains |
||
82 | * all details from the database row. |
||
83 | * |
||
84 | * @param string $name name to check. |
||
85 | * @param string $pass the pass to use. |
||
86 | * |
||
87 | * @return boolean true if name and pass matches, else false. |
||
88 | */ |
||
89 | 3 | public function verifyPassword($name, $pass) |
|
94 | |||
95 | /** |
||
96 | * Verify the name and the anaswer, if successful the object contains |
||
97 | * all details from the database row. |
||
98 | * |
||
99 | * @param string $name name to check. |
||
100 | * @param string $answer the answer. |
||
101 | * |
||
102 | * @return boolean true if name and pass matches, else false. |
||
103 | */ |
||
104 | 1 | public function verifyQuestion($name, $answer) |
|
109 | |||
110 | |||
111 | /** |
||
112 | * Check if a post belongs to user |
||
113 | * |
||
114 | * |
||
115 | * @return boolean |
||
116 | */ |
||
117 | 1 | public function controlAuthority($loggedUser, $name) |
|
126 | } |
||
127 |
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.