| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 58 | 2 | private function build(): ChoiceInterface |
|
| 59 | { |
||
| 60 | 2 | if ($this->choices !== null) { |
|
| 61 | 1 | return $this->choices; |
|
| 62 | } |
||
| 63 | |||
| 64 | 2 | $choices = ($this->resolver)(); |
|
| 65 | |||
| 66 | 2 | if (!$choices instanceof ChoiceInterface) { |
|
| 67 | 1 | $choices = new ArrayChoice((array) $choices); |
|
| 68 | } |
||
| 69 | |||
| 70 | 2 | return $this->choices = $choices; |
|
| 71 | } |
||
| 73 |