| 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 | 6 | public function get($key = null): ProductFixture |
|
| 32 | { |
||
| 33 | 6 | if ($key === null) { |
|
| 34 | 3 | $key = \array_key_last($this->productFixtures); |
|
| 35 | } |
||
| 36 | 6 | if (!array_key_exists($key, $this->productFixtures)) { |
|
| 37 | 3 | throw new \OutOfBoundsException('No matching product found in fixture pool'); |
|
| 38 | } |
||
| 39 | 3 | return $this->productFixtures[$key]; |
|
| 40 | } |
||
| 48 |