| Conditions | 4 |
| Paths | 4 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 5 | public function get(string $key = null): OptionFixture |
|
| 36 | { |
||
| 37 | 5 | if ($key === null) { |
|
| 38 | 3 | $key = \array_key_last($this->optionFixtures); |
|
| 39 | } |
||
| 40 | 5 | if ($key === null || !\array_key_exists($key, $this->optionFixtures)) { |
|
| 41 | 3 | throw new \OutOfBoundsException('No matching option found in fixture pool'); |
|
| 42 | } |
||
| 43 | 2 | return $this->optionFixtures[$key]; |
|
| 44 | } |
||
| 52 |