@@ -116,7 +116,7 @@ |
||
116 | 116 | $res['group'] = []; |
117 | 117 | $res['group']['enabled'] = $this->shareManager->allowGroupSharing(); |
118 | 118 | $res['group']['expire_date']['enabled'] = true; |
119 | - $res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', (string)Constants::PERMISSION_ALL); |
|
119 | + $res['default_permissions'] = (int) $this->config->getAppValue('core', 'shareapi_default_permissions', (string) Constants::PERMISSION_ALL); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | //Federated sharing |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $mounts = $this->globalService->getStorageForAllUsers(); |
88 | 88 | $userId = self::ALL; |
89 | 89 | } else { |
90 | - $userId = (string)$input->getArgument('user_id'); |
|
90 | + $userId = (string) $input->getArgument('user_id'); |
|
91 | 91 | $storageService = $this->getStorageService($userId); |
92 | 92 | $mounts = $storageService->getAllStorages(); |
93 | 93 | } |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
143 | - $keys = array_map(function ($header) { |
|
143 | + $keys = array_map(function($header) { |
|
144 | 144 | return strtolower(str_replace(' ', '_', $header)); |
145 | 145 | }, $headers); |
146 | 146 | |
147 | - $pairs = array_map(function (StorageConfig $config) use ($keys, $userId) { |
|
147 | + $pairs = array_map(function(StorageConfig $config) use ($keys, $userId) { |
|
148 | 148 | $values = [ |
149 | 149 | $config->getId(), |
150 | 150 | $config->getMountPoint(), |
@@ -178,23 +178,23 @@ discard block |
||
178 | 178 | 'encoding_compatibility' => false, |
179 | 179 | 'readonly' => false, |
180 | 180 | ]; |
181 | - $rows = array_map(function (StorageConfig $config) use ($userId, $defaultMountOptions, $full) { |
|
181 | + $rows = array_map(function(StorageConfig $config) use ($userId, $defaultMountOptions, $full) { |
|
182 | 182 | $storageConfig = $config->getBackendOptions(); |
183 | 183 | $keys = array_keys($storageConfig); |
184 | 184 | $values = array_values($storageConfig); |
185 | 185 | |
186 | 186 | if (!$full) { |
187 | - $values = array_map(function ($value) { |
|
187 | + $values = array_map(function($value) { |
|
188 | 188 | if (is_string($value) && strlen($value) > 32) { |
189 | - return substr($value, 0, 6) . '...' . substr($value, -6, 6); |
|
189 | + return substr($value, 0, 6).'...'.substr($value, -6, 6); |
|
190 | 190 | } else { |
191 | 191 | return $value; |
192 | 192 | } |
193 | 193 | }, $values); |
194 | 194 | } |
195 | 195 | |
196 | - $configStrings = array_map(function ($key, $value) { |
|
197 | - return $key . ': ' . json_encode($value); |
|
196 | + $configStrings = array_map(function($key, $value) { |
|
197 | + return $key.': '.json_encode($value); |
|
198 | 198 | }, $keys, $values); |
199 | 199 | $configString = implode(', ', $configStrings); |
200 | 200 | |
@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | $keys = array_keys($mountOptions); |
209 | 209 | $values = array_values($mountOptions); |
210 | 210 | |
211 | - $optionsStrings = array_map(function ($key, $value) { |
|
212 | - return $key . ': ' . json_encode($value); |
|
211 | + $optionsStrings = array_map(function($key, $value) { |
|
212 | + return $key.': '.json_encode($value); |
|
213 | 213 | }, $keys, $values); |
214 | 214 | $optionsString = implode(', ', $optionsStrings); |
215 | 215 |
@@ -20,6 +20,6 @@ |
||
20 | 20 | ); |
21 | 21 | } |
22 | 22 | |
23 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
23 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
24 | 24 | |
25 | 25 | return ComposerAutoloaderInitSettings::getLoader(); |
@@ -62,9 +62,9 @@ |
||
62 | 62 | } |
63 | 63 | /* Replace by normalized form */ |
64 | 64 | if ($parsedIp instanceof IPv6) { |
65 | - $ip = (string)($parsedIp->toIPv4() ?? $parsedIp); |
|
65 | + $ip = (string) ($parsedIp->toIPv4() ?? $parsedIp); |
|
66 | 66 | } else { |
67 | - $ip = (string)$parsedIp; |
|
67 | + $ip = (string) $parsedIp; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function onShutdown(): void { |
56 | 56 | $error = error_get_last(); |
57 | 57 | if ($error) { |
58 | - $msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line']; |
|
58 | + $msg = $error['message'].' at '.$error['file'].'#'.$error['line']; |
|
59 | 59 | $this->logger->critical(self::removePassword($msg), ['app' => 'PHP']); |
60 | 60 | } |
61 | 61 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | public function onException(Throwable $exception): void { |
67 | 67 | $class = get_class($exception); |
68 | 68 | $msg = $exception->getMessage(); |
69 | - $msg = "$class: $msg at " . $exception->getFile() . '#' . $exception->getLine(); |
|
69 | + $msg = "$class: $msg at ".$exception->getFile().'#'.$exception->getLine(); |
|
70 | 70 | $this->logger->critical(self::removePassword($msg), ['app' => 'PHP']); |
71 | 71 | } |
72 | 72 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (!(error_reporting() & $number)) { |
78 | 78 | return true; |
79 | 79 | } |
80 | - $msg = $message . ' at ' . $file . '#' . $line; |
|
80 | + $msg = $message.' at '.$file.'#'.$line; |
|
81 | 81 | $e = new Error(self::removePassword($msg)); |
82 | 82 | $this->logger->log(self::errnoToLogLevel($number), $e->getMessage(), ['app' => 'PHP']); |
83 | 83 | return true; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * Recoverable handler which catch all errors, warnings and notices |
88 | 88 | */ |
89 | 89 | public function onAll(int $number, string $message, string $file, int $line): bool { |
90 | - $msg = $message . ' at ' . $file . '#' . $line; |
|
90 | + $msg = $message.' at '.$file.'#'.$line; |
|
91 | 91 | $e = new Error(self::removePassword($msg)); |
92 | 92 | $this->logger->log(self::errnoToLogLevel($number), $e->getMessage(), ['app' => 'PHP']); |
93 | 93 | return true; |
@@ -20,6 +20,6 @@ |
||
20 | 20 | ); |
21 | 21 | } |
22 | 22 | |
23 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
23 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
24 | 24 | |
25 | 25 | return ComposerAutoloaderInitDAV::getLoader(); |
@@ -20,6 +20,6 @@ |
||
20 | 20 | ); |
21 | 21 | } |
22 | 22 | |
23 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
23 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
24 | 24 | |
25 | 25 | return ComposerAutoloaderInitFiles_Versions::getLoader(); |
@@ -20,6 +20,6 @@ |
||
20 | 20 | ); |
21 | 21 | } |
22 | 22 | |
23 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
23 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
24 | 24 | |
25 | 25 | return ComposerAutoloaderInitLookupServerConnector::getLoader(); |
@@ -20,6 +20,6 @@ |
||
20 | 20 | ); |
21 | 21 | } |
22 | 22 | |
23 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
23 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
24 | 24 | |
25 | 25 | return ComposerAutoloaderInitCloudFederationAPI::getLoader(); |