1 | <?php |
||
8 | class Comment extends ActiveRecordModelExtender |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var string $tableName name of the database table. |
||
13 | */ |
||
14 | protected $tableName = "ramverk1_comments"; |
||
15 | |||
16 | /** |
||
17 | * Columns in the table. |
||
18 | * |
||
19 | * @var integer $id primary key auto incremented. |
||
20 | */ |
||
21 | public $id; |
||
22 | public $di; |
||
23 | |||
24 | |||
25 | public $text; |
||
26 | |||
27 | public $parentId; # All posts have different ids |
||
28 | public $type; # question/answer/comment |
||
29 | |||
30 | public $created; |
||
31 | public $status; # default is active |
||
32 | |||
33 | |||
34 | |||
35 | |||
36 | /** |
||
37 | * HA EN FOREACH I En FOREACH FÖR ATT HA COMMENTS CONNECTED |
||
38 | * |
||
39 | |||
40 | */ |
||
41 | |||
42 | /** |
||
43 | * Constructor injects with DI container. |
||
44 | * |
||
45 | */ |
||
46 | public function __construct($di = null) |
||
50 | /** |
||
51 | * Returns post with markdown and gravatar |
||
52 | * @param string $sql |
||
53 | * @param array $param |
||
|
|||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getPosts($sql, $params) |
||
72 | |||
73 | /** |
||
74 | * return question/answer, three attributes are set, comments connected to them is an array. |
||
75 | * |
||
76 | * @return object |
||
77 | */ |
||
78 | public function getPost($id) |
||
94 | |||
95 | |||
96 | |||
97 | /** |
||
98 | * Check if a post belongs to user |
||
99 | * |
||
100 | * |
||
101 | * @return boolean |
||
102 | */ |
||
103 | public function controlAuthority($name) |
||
115 | } |
||
116 |
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.