| Conditions | 5 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function getStorage($name = null): ?StorageService |
||
| 35 | { |
||
| 36 | if (empty($name)) { |
||
| 37 | return $this->getStorage('default'); |
||
| 38 | } |
||
| 39 | |||
| 40 | if (isset($this->storages[$name])) { |
||
| 41 | return $this->storages[$name]; |
||
| 42 | } |
||
| 43 | |||
| 44 | if ('default' === $name) { |
||
| 45 | $name = $this->getFirstName(); |
||
| 46 | if (isset($this->storages[$name])) { |
||
| 47 | return $this->storages[$name]; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | return null; |
||
| 52 | } |
||
| 68 |