| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function doCreateService(ContainerInterface $container): AdapterInterface |
||
| 16 | { |
||
| 17 | if (! class_exists(\League\Flysystem\Replicate\ReplicateAdapter::class)) { |
||
| 18 | throw new RequirementsException( |
||
| 19 | ['league/flysystem-replicate-adapter'], |
||
| 20 | 'Replicate' |
||
| 21 | ); |
||
| 22 | } |
||
| 23 | |||
| 24 | $connectionManager = $container->get('BsbFlysystemAdapterManager'); |
||
| 25 | |||
| 26 | $adapter = new Adapter( |
||
| 27 | $connectionManager->get($this->options['source']), |
||
| 28 | $connectionManager->get($this->options['replicate']) |
||
| 29 | ); |
||
| 30 | |||
| 31 | return $adapter; |
||
| 32 | } |
||
| 33 | |||
| 45 |