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