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