| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 4 |
| Ratio | 26.67 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function render() |
||
| 43 | { |
||
| 44 | $ret = ''; |
||
| 45 | View Code Duplication | if (count($this->getOptions()) > 1 && '[]' !== substr($this->getName(), -2, 2)) { |
|
| 46 | $newname = $this->getName() . '[]'; |
||
| 47 | $this->setName($newname); |
||
| 48 | } |
||
| 49 | foreach ($this->getOptions() as $value => $name) { |
||
| 50 | $ret .= "<input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'"; |
||
| 51 | $ret .= ' checked'; |
||
| 52 | $ret .= $this->getExtra() . '>' . $name . "<br>\n"; |
||
| 53 | } |
||
| 54 | |||
| 55 | return $ret; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.