Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 0 |
1 | <?php |
||
24 | 1 | public function renderBlock(FieldInterface $field, DOMElement $element) |
|
25 | { |
||
26 | 1 | if (!$field instanceof Select) { |
|
27 | throw new InvalidArgumentException('Must be a Del\Form\Field\Select'); |
||
28 | } |
||
29 | 1 | foreach ($field->getOptions() as $value => $label) { |
|
30 | 1 | $option = $this->dom->createElement('option'); |
|
31 | 1 | $option->setAttribute('value', $value); |
|
32 | 1 | $option->textContent = $label; |
|
33 | 1 | $element->appendChild($option); |
|
34 | } |
||
35 | 1 | return $element; |
|
36 | } |
||
37 | } |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.