Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
38 | 4 | public function getItemForId( ItemId $itemId ) { |
|
39 | 4 | $item = $this->entityCache->fetch( $itemId ); |
|
40 | |||
41 | 4 | if( $item === null ) { |
|
42 | 3 | $item = $this->itemLookup->getItemForId( $itemId ); |
|
43 | 3 | if( $item !== null ) { |
|
44 | 2 | $this->entityCache->save( $item ); |
|
45 | 2 | } |
|
46 | 3 | } |
|
47 | |||
48 | 4 | return $item; |
|
49 | } |
||
50 | } |
||
51 |