| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.0123 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 3 | public function compile($elseIfStatement, Context $context) |
|
| 17 | { |
||
| 18 | 3 | $context->getExpressionCompiler()->compile($elseIfStatement->cond); |
|
| 19 | |||
| 20 | 3 | if (count($elseIfStatement->stmts) > 0) { |
|
| 21 | 3 | foreach ($elseIfStatement->stmts as $stmt) { |
|
| 22 | 3 | \PHPSA\nodeVisitorFactory($stmt, $context); |
|
| 23 | 3 | } |
|
| 24 | 3 | } else { |
|
| 25 | $context->notice('not-implemented-body', 'Missing body', $elseIfStatement); |
||
| 26 | } |
||
| 27 | 3 | } |
|
| 28 | } |
||
| 29 |
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.