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