| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 2 | public function compile($elseStatement, Context $context) |
|
| 17 | { |
||
| 18 | 2 | if (count($elseStatement->stmts) > 0) { |
|
| 19 | 2 | foreach ($elseStatement->stmts as $stmt) { |
|
| 20 | 2 | \PHPSA\nodeVisitorFactory($stmt, $context); |
|
| 21 | 2 | } |
|
| 22 | 2 | } else { |
|
| 23 | $context->notice('not-implemented-body', 'Missing body', $elseStatement); |
||
| 24 | } |
||
| 25 | 2 | } |
|
| 26 | } |
||
| 27 |
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
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.