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 |
||
32 | 6 | public function get(string $key = null): OrderFixture |
|
33 | { |
||
34 | 6 | if ($key === null) { |
|
35 | 4 | $key = \array_key_last($this->orderFixtures); |
|
36 | } |
||
37 | 6 | if ($key === null || !array_key_exists($key, $this->orderFixtures)) { |
|
38 | 4 | throw new \OutOfBoundsException('No matching order found in fixture pool'); |
|
39 | } |
||
40 | 2 | return $this->orderFixtures[$key]; |
|
41 | } |
||
49 |