| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 3 | private function processOption(FieldInterface $field, $value, $label) |
|
| 40 | { |
||
| 41 | 3 | $option = $this->dom->createElement('option'); |
|
| 42 | 3 | $option->setAttribute('value', $value); |
|
| 43 | 3 | $option->textContent = $label; |
|
| 44 | 3 | if($field->getValue() == $option->getAttribute('value')) { |
|
| 45 | 1 | $option->setAttribute('selected', 'selected'); |
|
| 46 | } |
||
| 47 | 3 | return $option; |
|
| 48 | } |
||
| 49 | } |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.