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