Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
50 | 15 | public function getStorage($storageParams): IStorage |
|
51 | { |
||
52 | 15 | if (empty($this->storage)) { |
|
53 | 4 | if (empty($storageParams)) { |
|
54 | 1 | throw new StorageException('Storage cannot be empty!'); |
|
55 | } |
||
56 | 3 | $this->storage = $this->factory->getStorage($storageParams); |
|
57 | } |
||
58 | 14 | return $this->storage; |
|
59 | } |
||
66 |