@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitShareByMail::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitTesting::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitFiles_Trashbin::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitUser_LDAP::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitProvisioning_API::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitOAuth2::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitAdminAudit::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $secure = $protocol === 'https'; |
79 | 79 | $federatedSharingEndpoints = $discoveryService->discover($this->cloudId->getRemote(), 'FEDERATED_SHARING'); |
80 | 80 | $webDavEndpoint = isset($federatedSharingEndpoints['webdav']) ? $federatedSharingEndpoints['webdav'] : '/public.php/webdav'; |
81 | - $root = rtrim($root, '/') . $webDavEndpoint; |
|
81 | + $root = rtrim($root, '/').$webDavEndpoint; |
|
82 | 82 | $this->mountPoint = $options['mountpoint']; |
83 | 83 | $this->token = $options['token']; |
84 | 84 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'host' => $host, |
88 | 88 | 'root' => $root, |
89 | 89 | 'user' => $options['token'], |
90 | - 'password' => (string)$options['password'] |
|
90 | + 'password' => (string) $options['password'] |
|
91 | 91 | )); |
92 | 92 | } |
93 | 93 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @return string |
128 | 128 | */ |
129 | 129 | public function getId() { |
130 | - return 'shared::' . md5($this->token . '@' . $this->getRemote()); |
|
130 | + return 'shared::'.md5($this->token.'@'.$this->getRemote()); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | public function getCache($path = '', $storage = null) { |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | */ |
249 | 249 | protected function testRemote() { |
250 | 250 | try { |
251 | - return $this->testRemoteUrl($this->getRemote() . '/ocs-provider/index.php') |
|
252 | - || $this->testRemoteUrl($this->getRemote() . '/ocs-provider/') |
|
253 | - || $this->testRemoteUrl($this->getRemote() . '/status.php'); |
|
251 | + return $this->testRemoteUrl($this->getRemote().'/ocs-provider/index.php') |
|
252 | + || $this->testRemoteUrl($this->getRemote().'/ocs-provider/') |
|
253 | + || $this->testRemoteUrl($this->getRemote().'/status.php'); |
|
254 | 254 | } catch (\Exception $e) { |
255 | 255 | return false; |
256 | 256 | } |
@@ -262,8 +262,8 @@ discard block |
||
262 | 262 | */ |
263 | 263 | private function testRemoteUrl($url) { |
264 | 264 | $cache = $this->memcacheFactory->createDistributed('files_sharing_remote_url'); |
265 | - if($cache->hasKey($url)) { |
|
266 | - return (bool)$cache->get($url); |
|
265 | + if ($cache->hasKey($url)) { |
|
266 | + return (bool) $cache->get($url); |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | $client = $this->httpClient->newClient(); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $returnValue = false; |
281 | 281 | } |
282 | 282 | |
283 | - $cache->set($url, $returnValue, 60*60*24); |
|
283 | + $cache->set($url, $returnValue, 60 * 60 * 24); |
|
284 | 284 | return $returnValue; |
285 | 285 | } |
286 | 286 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | * @return bool |
292 | 292 | */ |
293 | 293 | public function remoteIsOwnCloud() { |
294 | - if(defined('PHPUNIT_RUN') || !$this->testRemoteUrl($this->getRemote() . '/status.php')) { |
|
294 | + if (defined('PHPUNIT_RUN') || !$this->testRemoteUrl($this->getRemote().'/status.php')) { |
|
295 | 295 | return false; |
296 | 296 | } |
297 | 297 | return true; |
@@ -309,11 +309,11 @@ discard block |
||
309 | 309 | $password = $this->getPassword(); |
310 | 310 | |
311 | 311 | // If remote is not an ownCloud do not try to get any share info |
312 | - if(!$this->remoteIsOwnCloud()) { |
|
312 | + if (!$this->remoteIsOwnCloud()) { |
|
313 | 313 | return ['status' => 'unsupported']; |
314 | 314 | } |
315 | 315 | |
316 | - $url = rtrim($remote, '/') . '/index.php/apps/files_sharing/shareinfo?t=' . $token; |
|
316 | + $url = rtrim($remote, '/').'/index.php/apps/files_sharing/shareinfo?t='.$token; |
|
317 | 317 | |
318 | 318 | // TODO: DI |
319 | 319 | $client = \OC::$server->getHTTPClientService()->newClient(); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $request = $this->prepareRequest($request, $credentials); |
46 | 46 | $stringToSign = $this->createCanonicalizedString($request); |
47 | 47 | $auth = 'AWS ' |
48 | - . $credentials->getAccessKeyId() . ':' |
|
48 | + . $credentials->getAccessKeyId().':' |
|
49 | 49 | . $this->signString($stringToSign, $credentials); |
50 | 50 | |
51 | 51 | return $request->withHeader('Authorization', $auth); |
@@ -130,11 +130,11 @@ discard block |
||
130 | 130 | RequestInterface $request, |
131 | 131 | $expires = null |
132 | 132 | ) { |
133 | - $buffer = $request->getMethod() . "\n"; |
|
133 | + $buffer = $request->getMethod()."\n"; |
|
134 | 134 | |
135 | 135 | // Add the interesting headers |
136 | 136 | foreach ($this->signableHeaders as $header) { |
137 | - $buffer .= $request->getHeaderLine($header) . "\n"; |
|
137 | + $buffer .= $request->getHeaderLine($header)."\n"; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $date = $expires ?: $request->getHeaderLine('date'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | if (strpos($name, 'x-amz-') === 0) { |
154 | 154 | $value = implode(',', $header); |
155 | 155 | if (strlen($value) > 0) { |
156 | - $headers[$name] = $name . ':' . $value; |
|
156 | + $headers[$name] = $name.':'.$value; |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | ksort($headers); |
166 | 166 | |
167 | - return implode("\n", $headers) . "\n"; |
|
167 | + return implode("\n", $headers)."\n"; |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | private function createCanonicalizedResource(RequestInterface $request) |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | if ($data['bucket']) { |
176 | 176 | $buffer .= $data['bucket']; |
177 | 177 | if (!empty($data['key']) || !$data['path_style']) { |
178 | - $buffer .= '/' . $data['key']; |
|
178 | + $buffer .= '/'.$data['key']; |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 |