Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
34 | 3 | public function get($id) |
|
35 | { |
||
36 | try { |
||
37 | 3 | $item = $this->offsetGet($id); |
|
38 | 1 | return $item; |
|
39 | 2 | } catch (UnknownIdentifierException $e) { |
|
40 | 1 | throw new NotFoundException("Key $id not found."); |
|
41 | 1 | } catch (Exception $e) { |
|
42 | 1 | throw new ContainerException("Problem fetching key $id.\n" . $e->getMessage(), $e->getCode()); |
|
43 | } |
||
63 |