| 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): InvoiceFixture |
|
| 32 | { |
||
| 33 | 4 | if ($key === null) { |
|
| 34 | 2 | $key = \array_key_last($this->invoiceFixtures); |
|
| 35 | } |
||
| 36 | 4 | if (!array_key_exists($key, $this->invoiceFixtures)) { |
|
| 37 | 2 | throw new \OutOfBoundsException('No matching invoice found in fixture pool'); |
|
| 38 | } |
||
| 39 | 2 | return $this->invoiceFixtures[$key]; |
|
| 40 | } |
||
| 43 |