| Conditions | 3 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | public function _editable($value, Field $field, HTMLElement $previous): HTMLElement |
||
| 18 | { |
||
| 19 | // add extra classes |
||
| 20 | $newContent = []; |
||
| 21 | $input = $previous->get('input'); |
||
| 22 | $input[0]->setAttributes([ |
||
| 23 | 'class' => 'validate', |
||
| 24 | ]); |
||
| 25 | $newContent[] = $input[0]; |
||
| 26 | $label = $previous->get('label'); |
||
| 27 | if ($label) { |
||
| 28 | $newContent[] = $label[0]; |
||
| 29 | } |
||
| 30 | $comment = $previous->get('div.comment'); |
||
| 31 | if ($comment) { |
||
| 32 | $comment[0]->setTag('span')->setAttributes([ |
||
| 33 | 'class' => 'helper-text', |
||
| 34 | 'data-error' => "wrong", |
||
| 35 | 'data-success' => "right" |
||
| 36 | ]); |
||
| 37 | $newContent[] = $comment[0]; |
||
| 38 | } |
||
| 39 | $previous->setContent($newContent); |
||
| 40 | return $previous; |
||
| 41 | } |
||
| 43 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.