Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | 8 | public function __construct($name, $attributes = []) |
|
20 | { |
||
21 | 8 | parent::__construct($name, $attributes); |
|
22 | 8 | $this['type'] = 'select'; |
|
23 | 8 | $this->UseNameAsDefaultLabel(); |
|
24 | |||
25 | 8 | if (!is_array($this['options'])) { |
|
26 | 2 | throw new Exception("Select needs options, did you forget to specify them when creating the element?"); |
|
27 | } |
||
65 |