| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function render() { |
||
| 16 | $html = '<select ' . Html::renderAttributes($this->getAttributes()) . ' >'; |
||
| 17 | $currentValue = $this->getValue(); |
||
| 18 | |||
| 19 | foreach ($this->options as $value => $text) { |
||
| 20 | $html .= '<option' |
||
| 21 | . ($currentValue == $value ? ' selected="1" ' : '') |
||
| 22 | . ' value="' . $value . '"' |
||
| 23 | . '>' |
||
| 24 | . $text |
||
| 25 | . '</option>'; |
||
| 26 | } |
||
| 27 | $html .= '</select>'; |
||
| 28 | return $html; |
||
| 29 | } |
||
| 30 | |||
| 31 | } |