Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | 1 | public function create($adapterName): FilesystemOperator |
|
40 | { |
||
41 | 1 | $adapterConfiguration = $this->pluginConfiguration->getAdapterConfiguration($adapterName); |
|
42 | 1 | $adapter = $this->adapterFactory->create($adapterConfiguration); |
|
43 | |||
44 | 1 | $options = []; |
|
45 | 1 | $publicUrl = $adapterConfiguration->getPublicUrl(); |
|
46 | 1 | if ($publicUrl) { |
|
47 | 1 | $options['public_url'] = $publicUrl; |
|
48 | } |
||
49 | |||
50 | 1 | return new Filesystem($adapter, $options); |
|
51 | } |
||
53 |