| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | function renderBody($name, $id) |
||
| 29 | { |
||
| 30 | echo '<select id="' . $id . '" name="' . $name . '">'; |
||
| 31 | foreach ($this->options as $option) |
||
| 32 | { |
||
| 33 | if ($this->value == $option) |
||
| 34 | $sel = 'selected="selected"'; |
||
| 35 | else |
||
| 36 | $sel = ''; |
||
| 37 | |||
| 38 | echo '<option ' . $sel . ' value="' . $option . '">' . $option . '</option>'; |
||
| 39 | } |
||
| 40 | echo '</select>'; |
||
| 41 | } |
||
| 43 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.