| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 3 | public function renderWith() |
|
| 30 | { |
||
| 31 | 3 | $properties = [ |
|
| 32 | 3 | 'value' => $this->value, |
|
| 33 | 3 | 'options' => [], |
|
| 34 | ]; |
||
| 35 | 3 | ||
| 36 | foreach ($this->options as $value => $label) { |
||
| 37 | $properties['options'][] = [ |
||
| 38 | 7 | 'value' => $value, |
|
| 39 | 'label' => $label, |
||
| 40 | 7 | 'selected' => $this->value == $value |
|
| 41 | 7 | ]; |
|
| 42 | } |
||
| 43 | 1 | ||
| 44 | return $properties; |
||
| 45 | 1 | } |
|
| 46 | 1 | ||
| 73 |