| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 17 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function doCreateService(ServiceLocatorInterface $serviceLocator) |
||
| 17 | { |
||
| 18 | if (!class_exists(\Spatie\FlysystemDropbox\DropboxAdapter::class)) { |
||
| 19 | throw new RequirementsException( |
||
| 20 | ['spatie/flysystem-dropbox'], |
||
| 21 | 'Dropbox' |
||
| 22 | ); |
||
| 23 | } |
||
| 24 | |||
| 25 | $client = new \Spatie\Dropbox\Client( |
||
| 26 | $this->options['access_token'] |
||
| 27 | ); |
||
| 28 | |||
| 29 | $adapter = new Adapter($client, $this->options['prefix']); |
||
| 30 | |||
| 31 | return $adapter; |
||
| 32 | } |
||
| 33 | |||
| 48 |