| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 75 | protected function prepareAdapter() |
||
| 76 | { |
||
| 77 | $config = []; |
||
| 78 | |||
| 79 | foreach ([ |
||
| 80 | 'baseUri', |
||
| 81 | 'userName', |
||
| 82 | 'password', |
||
| 83 | 'proxy', |
||
| 84 | 'authType', |
||
| 85 | 'encoding', |
||
| 86 | ] as $name) { |
||
| 87 | if ($this->$name !== null) { |
||
| 88 | $config[$name] = $this->$name; |
||
| 89 | } |
||
| 90 | } |
||
| 91 | |||
| 92 | return new \League\Flysystem\WebDAV\WebDAVAdapter( |
||
| 93 | new Client($config), |
||
| 94 | $this->prefix |
||
| 95 | ); |
||
| 97 | } |