| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | function renderBody($name, $id) |
||
| 13 | { |
||
| 14 | if ($this->value) |
||
| 15 | $chk = 'checked="checked"'; |
||
| 16 | else |
||
| 17 | $chk = ''; |
||
| 18 | |||
| 19 | echo '<input type="hidden" name="' . $name . '" id="' . $id . '_val" value="' . ($this->value ? '1' : '') . '" />'; |
||
| 20 | echo '<input type="checkbox" ' . $chk . ' name="' . $name . '_cb" id="' . $id . '" value="1" onclick="document.getElementById(\'' . $id . '_val\').value = Number(this.checked);" />'; |
||
| 21 | } |
||
| 23 |
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.