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