Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
38 | 2 | public function getComments($sql, $params) |
|
39 | { |
||
40 | 2 | $comments = $this->findAllWhere("$sql", $params); |
|
41 | |||
42 | 2 | return array_map(function ($comment) { |
|
43 | 2 | $user = new User($this->db); |
|
44 | 2 | $user->find("name", $comment->user); |
|
45 | 2 | $comment->img = $this->gravatar($user->email); |
|
46 | 2 | $comment->markdown = $this->getMD($comment->text); |
|
47 | |||
48 | 2 | return $comment; |
|
49 | 2 | }, $comments); |
|
50 | } |
||
51 | } |
||
52 |
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.