| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 21 | protected function connect(): MountManager |
||
| 22 | { |
||
| 23 | $mounts = []; |
||
| 24 | foreach ($this->settings['mounts'] as $mountName => $mountConfig) { |
||
| 25 | $adapterClass = $mountConfig['adapter']; |
||
| 26 | /** @var AdapterInterface $adapter */ |
||
| 27 | $adapter = new $adapterClass($mountConfig['location']); |
||
| 28 | $mounts[$mountName] = new Filesystem($adapter); |
||
| 29 | } |
||
| 30 | return new MountManager($mounts); |
||
|
|
|||
| 31 | } |
||
| 33 |