@@ -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 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * @inheritdoc |
30 | 30 | */ |
31 | 31 | public function like($x, $y, $type = null) { |
32 | - return parent::like($x, $y, $type) . " ESCAPE '\\'"; |
|
32 | + return parent::like($x, $y, $type)." ESCAPE '\\'"; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function iLike($x, $y, $type = null) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'freeSpace' => $storageInfo['free'], |
59 | 59 | 'quota' => $storageInfo['quota'], |
60 | 60 | 'used' => $storageInfo['used'], |
61 | - 'usedSpacePercent' => (int)$storageInfo['relative'], |
|
61 | + 'usedSpacePercent' => (int) $storageInfo['relative'], |
|
62 | 62 | 'owner' => $storageInfo['owner'], |
63 | 63 | 'ownerDisplayName' => $storageInfo['ownerDisplayName'], |
64 | 64 | ]; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @return string icon URL |
72 | 72 | */ |
73 | 73 | public static function determineIcon($file) { |
74 | - if($file['type'] === 'dir') { |
|
74 | + if ($file['type'] === 'dir') { |
|
75 | 75 | $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon('dir'); |
76 | 76 | // TODO: move this part to the client side, using mountType |
77 | 77 | if ($file->isShared()) { |
@@ -79,11 +79,11 @@ discard block |
||
79 | 79 | } elseif ($file->isMounted()) { |
80 | 80 | $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon('dir-external'); |
81 | 81 | } |
82 | - }else{ |
|
82 | + } else { |
|
83 | 83 | $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon($file->getMimetype()); |
84 | 84 | } |
85 | 85 | |
86 | - return substr($icon, 0, -3) . 'svg'; |
|
86 | + return substr($icon, 0, -3).'svg'; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | try { |
72 | 72 | $mount = $this->globalService->getStorage($mountId); |
73 | 73 | } catch (NotFoundException $e) { |
74 | - $output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>'); |
|
74 | + $output->writeln('<error>Mount with id "'.$mountId.' not found, check "occ files_external:list" to get available mounts"</error>'); |
|
75 | 75 | return 404; |
76 | 76 | } |
77 | 77 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | foreach ($configInput as $configOption) { |
107 | 107 | if (!strpos($configOption, '=')) { |
108 | - $output->writeln('<error>Invalid mount configuration option "' . $configOption . '"</error>'); |
|
108 | + $output->writeln('<error>Invalid mount configuration option "'.$configOption.'"</error>'); |
|
109 | 109 | return; |
110 | 110 | } |
111 | 111 | list($key, $value) = explode('=', $configOption, 2); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | // FIXME: convert storage exceptions to StorageNotAvailableException |
138 | 138 | $storage->setStatus( |
139 | 139 | StorageNotAvailableException::STATUS_ERROR, |
140 | - get_class($e) . ': ' . $e->getMessage() |
|
140 | + get_class($e).': '.$e->getMessage() |
|
141 | 141 | ); |
142 | 142 | } |
143 | 143 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this |
50 | 50 | ->setIdentifier($invalidId) |
51 | 51 | ->setStorageClass('\OC\Files\Storage\FailedStorage') |
52 | - ->setText('Unknown storage backend ' . $invalidId); |
|
52 | + ->setText('Unknown storage backend '.$invalidId); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) { |
65 | - $storage->setBackendOption('exception', new \Exception('Unknown storage backend "' . $this->invalidId . '"', StorageNotAvailableException::STATUS_ERROR)); |
|
65 | + $storage->setBackendOption('exception', new \Exception('Unknown storage backend "'.$this->invalidId.'"', StorageNotAvailableException::STATUS_ERROR)); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $username_as_share = ($storage->getBackendOption('username_as_share') === true); |
66 | 66 | |
67 | 67 | if ($username_as_share) { |
68 | - $share = '/' . $storage->getBackendOption('user'); |
|
68 | + $share = '/'.$storage->getBackendOption('user'); |
|
69 | 69 | $storage->setBackendOption('share', $share); |
70 | 70 | } |
71 | 71 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | private function getCredentialsIdentifier($storageId) { |
64 | - return self::CREDENTIALS_IDENTIFIER_PREFIX . $storageId; |
|
64 | + return self::CREDENTIALS_IDENTIFIER_PREFIX.$storageId; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | public function saveBackendOptions(IUser $user, $id, array $options) { |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | ) { |
65 | 65 | return; |
66 | 66 | } |
67 | - $style = substr($style, strpos($style, '/')+1); |
|
67 | + $style = substr($style, strpos($style, '/') + 1); |
|
68 | 68 | $app_path = \OC_App::getAppPath($app); |
69 | 69 | $app_url = \OC_App::getAppWebPath($app); |
70 | 70 | |
71 | 71 | if ($app_path === false && $app_url === false) { |
72 | 72 | $this->logger->error('Could not find resource {resource} to load', [ |
73 | - 'resource' => $app . '/' . $style . '.css', |
|
73 | + 'resource' => $app.'/'.$style.'.css', |
|
74 | 74 | 'app' => 'cssresourceloader', |
75 | 75 | ]); |
76 | 76 | return; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | // turned into cwd. |
82 | 82 | $app_path = realpath($app_path); |
83 | 83 | |
84 | - if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) { |
|
84 | + if (!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) { |
|
85 | 85 | $this->append($app_path, $style.'.css', $app_url); |
86 | 86 | } |
87 | 87 | } |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | */ |
106 | 106 | protected function cacheAndAppendScssIfExist($root, $file, $app = 'core') { |
107 | 107 | if (is_file($root.'/'.$file)) { |
108 | - if($this->scssCacher !== null) { |
|
109 | - if($this->scssCacher->process($root, $file, $app)) { |
|
108 | + if ($this->scssCacher !== null) { |
|
109 | + if ($this->scssCacher->process($root, $file, $app)) { |
|
110 | 110 | |
111 | 111 | $this->append($root, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true); |
112 | 112 | return true; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | } |
147 | 147 | |
148 | - $this->resources[] = array($webRoot? : \OC::$WEBROOT, $webRoot, $file); |
|
148 | + $this->resources[] = array($webRoot ?: \OC::$WEBROOT, $webRoot, $file); |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | } |
@@ -122,7 +122,7 @@ |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | $eventName = $addToFavorite ? 'addFavorite' : 'removeFavorite'; |
125 | - $this->dispatcher->dispatch(self::class . '::' . $eventName, new GenericEvent(null, [ |
|
125 | + $this->dispatcher->dispatch(self::class.'::'.$eventName, new GenericEvent(null, [ |
|
126 | 126 | 'userId' => $user->getUID(), |
127 | 127 | 'fileId' => $fileId, |
128 | 128 | 'path' => $path, |