@@ -63,5 +63,5 @@ |
||
63 | 63 | * @return bool Whether $hash is a valid hash of $message |
64 | 64 | * @since 8.0.0 |
65 | 65 | */ |
66 | - public function verify(string $message, string $hash, &$newHash = null): bool ; |
|
66 | + public function verify(string $message, string $hash, &$newHash = null): bool; |
|
67 | 67 | } |
@@ -67,6 +67,6 @@ |
||
67 | 67 | $implements |= Backend::COUNT_USERS; |
68 | 68 | } |
69 | 69 | |
70 | - return (bool)($actions & $implements); |
|
70 | + return (bool) ($actions & $implements); |
|
71 | 71 | } |
72 | 72 | } |
@@ -62,6 +62,6 @@ |
||
62 | 62 | $implements |= GroupInterface::REMOVE_FROM_GOUP; |
63 | 63 | } |
64 | 64 | |
65 | - return (bool)($actions & $implements); |
|
65 | + return (bool) ($actions & $implements); |
|
66 | 66 | } |
67 | 67 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | protected function run($argument) { |
155 | 155 | |
156 | 156 | $target = $argument['url']; |
157 | - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); |
|
157 | + $created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime(); |
|
158 | 158 | $currentTime = $this->timeFactory->getTime(); |
159 | 159 | $source = $this->urlGenerator->getAbsoluteURL('/'); |
160 | 160 | $source = rtrim($source, '/'); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $endPoint = isset($endPoints['shared-secret']) ? $endPoints['shared-secret'] : $this->defaultEndPoint; |
173 | 173 | |
174 | 174 | // make sure that we have a well formated url |
175 | - $url = rtrim($target, '/') . '/' . trim($endPoint, '/'); |
|
175 | + $url = rtrim($target, '/').'/'.trim($endPoint, '/'); |
|
176 | 176 | |
177 | 177 | try { |
178 | 178 | $result = $this->httpClient->post( |
@@ -193,16 +193,16 @@ discard block |
||
193 | 193 | } catch (ClientException $e) { |
194 | 194 | $status = $e->getCode(); |
195 | 195 | if ($status === Http::STATUS_FORBIDDEN) { |
196 | - $this->logger->info($target . ' refused to ask for a shared secret.', ['app' => 'federation']); |
|
196 | + $this->logger->info($target.' refused to ask for a shared secret.', ['app' => 'federation']); |
|
197 | 197 | } else { |
198 | - $this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']); |
|
198 | + $this->logger->info($target.' responded with a '.$status.' containing: '.$e->getMessage(), ['app' => 'federation']); |
|
199 | 199 | } |
200 | 200 | } catch (RequestException $e) { |
201 | 201 | $status = -1; // There is no status code if we could not connect |
202 | - $this->logger->info('Could not connect to ' . $target, ['app' => 'federation']); |
|
202 | + $this->logger->info('Could not connect to '.$target, ['app' => 'federation']); |
|
203 | 203 | } catch (RingException $e) { |
204 | 204 | $status = -1; // There is no status code if we could not connect |
205 | - $this->logger->info('Could not connect to ' . $target, ['app' => 'federation']); |
|
205 | + $this->logger->info('Could not connect to '.$target, ['app' => 'federation']); |
|
206 | 206 | } catch (\Exception $e) { |
207 | 207 | $status = Http::STATUS_INTERNAL_SERVER_ERROR; |
208 | 208 | $this->logger->logException($e, ['app' => 'federation']); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | */ |
226 | 226 | protected function reAddJob(array $argument) { |
227 | 227 | $url = $argument['url']; |
228 | - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); |
|
228 | + $created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime(); |
|
229 | 229 | $token = $argument['token']; |
230 | 230 | |
231 | 231 | $this->jobList->add( |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | try { |
66 | 66 | return new \DateTimeZone($timeZone); |
67 | 67 | } catch (\Exception $e) { |
68 | - \OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", ILogger::DEBUG); |
|
68 | + \OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "'.$timeZone."'", ILogger::DEBUG); |
|
69 | 69 | return new \DateTimeZone($this->getDefaultTimeZone()); |
70 | 70 | } |
71 | 71 | } |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | // so a positive offset means negative timeZone |
87 | 87 | // and the other way around. |
88 | 88 | if ($offset > 0) { |
89 | - $timeZone = 'Etc/GMT-' . $offset; |
|
89 | + $timeZone = 'Etc/GMT-'.$offset; |
|
90 | 90 | } else { |
91 | - $timeZone = 'Etc/GMT+' . abs($offset); |
|
91 | + $timeZone = 'Etc/GMT+'.abs($offset); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return new \DateTimeZone($timeZone); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | // No timezone found, fallback to UTC |
113 | - \OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", ILogger::DEBUG); |
|
113 | + \OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "'.$offset."'", ILogger::DEBUG); |
|
114 | 114 | return new \DateTimeZone($this->getDefaultTimeZone()); |
115 | 115 | } |
116 | 116 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | protected function run($argument) { |
147 | 147 | $target = $argument['url']; |
148 | - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); |
|
148 | + $created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime(); |
|
149 | 149 | $currentTime = $this->timeFactory->getTime(); |
150 | 150 | $source = $this->urlGenerator->getAbsoluteURL('/'); |
151 | 151 | $source = rtrim($source, '/'); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $deadline = $currentTime - $this->maxLifespan; |
156 | 156 | if ($created < $deadline) { |
157 | 157 | $this->retainJob = false; |
158 | - $this->trustedServers->setServerStatus($target,TrustedServers::STATUS_FAILURE); |
|
158 | + $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE); |
|
159 | 159 | return; |
160 | 160 | } |
161 | 161 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $endPoint = isset($endPoints['shared-secret']) ? $endPoints['shared-secret'] : $this->defaultEndPoint; |
164 | 164 | |
165 | 165 | // make sure that we have a well formatted url |
166 | - $url = rtrim($target, '/') . '/' . trim($endPoint, '/'); |
|
166 | + $url = rtrim($target, '/').'/'.trim($endPoint, '/'); |
|
167 | 167 | |
168 | 168 | $result = null; |
169 | 169 | try { |
@@ -186,21 +186,21 @@ discard block |
||
186 | 186 | } catch (ClientException $e) { |
187 | 187 | $status = $e->getCode(); |
188 | 188 | if ($status === Http::STATUS_FORBIDDEN) { |
189 | - $this->logger->info($target . ' refused to exchange a shared secret with you.', ['app' => 'federation']); |
|
189 | + $this->logger->info($target.' refused to exchange a shared secret with you.', ['app' => 'federation']); |
|
190 | 190 | } else { |
191 | - $this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']); |
|
191 | + $this->logger->info($target.' responded with a '.$status.' containing: '.$e->getMessage(), ['app' => 'federation']); |
|
192 | 192 | } |
193 | 193 | } catch (RequestException $e) { |
194 | 194 | $status = -1; // There is no status code if we could not connect |
195 | 195 | $this->logger->logException($e, [ |
196 | - 'message' => 'Could not connect to ' . $target, |
|
196 | + 'message' => 'Could not connect to '.$target, |
|
197 | 197 | 'level' => ILogger::INFO, |
198 | 198 | 'app' => 'federation', |
199 | 199 | ]); |
200 | 200 | } catch (RingException $e) { |
201 | 201 | $status = -1; // There is no status code if we could not connect |
202 | 202 | $this->logger->logException($e, [ |
203 | - 'message' => 'Could not connect to ' . $target, |
|
203 | + 'message' => 'Could not connect to '.$target, |
|
204 | 204 | 'level' => ILogger::INFO, |
205 | 205 | 'app' => 'federation', |
206 | 206 | ]); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | ); |
228 | 228 | } else { |
229 | 229 | $this->logger->error( |
230 | - 'remote server "' . $target . '"" does not return a valid shared secret. Received data: ' . $body, |
|
230 | + 'remote server "'.$target.'"" does not return a valid shared secret. Received data: '.$body, |
|
231 | 231 | ['app' => 'federation'] |
232 | 232 | ); |
233 | 233 | $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | */ |
244 | 244 | protected function reAddJob(array $argument) { |
245 | 245 | $url = $argument['url']; |
246 | - $created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime(); |
|
246 | + $created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime(); |
|
247 | 247 | $token = $argument['token']; |
248 | 248 | $this->jobList->add( |
249 | 249 | GetSharedSecret::class, |
@@ -59,9 +59,9 @@ |
||
59 | 59 | * @since 14.0.0 |
60 | 60 | */ |
61 | 61 | protected function shouldRotateBySize():bool { |
62 | - if ((int)$this->maxSize > 0) { |
|
62 | + if ((int) $this->maxSize > 0) { |
|
63 | 63 | $filesize = @filesize($this->filePath); |
64 | - if ($filesize >= (int)$this->maxSize) { |
|
64 | + if ($filesize >= (int) $this->maxSize) { |
|
65 | 65 | return true; |
66 | 66 | } |
67 | 67 | } |
@@ -6,39 +6,39 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitAdminAudit |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\AdminAudit\\' => 15, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\AdminAudit\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\AdminAudit\\Actions\\Action' => __DIR__ . '/..' . '/../lib/Actions/Action.php', |
|
25 | - 'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__ . '/..' . '/../lib/Actions/AppManagement.php', |
|
26 | - 'OCA\\AdminAudit\\Actions\\Auth' => __DIR__ . '/..' . '/../lib/Actions/Auth.php', |
|
27 | - 'OCA\\AdminAudit\\Actions\\Console' => __DIR__ . '/..' . '/../lib/Actions/Console.php', |
|
28 | - 'OCA\\AdminAudit\\Actions\\Files' => __DIR__ . '/..' . '/../lib/Actions/Files.php', |
|
29 | - 'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__ . '/..' . '/../lib/Actions/GroupManagement.php', |
|
30 | - 'OCA\\AdminAudit\\Actions\\Security' => __DIR__ . '/..' . '/../lib/Actions/Security.php', |
|
31 | - 'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__ . '/..' . '/../lib/Actions/Sharing.php', |
|
32 | - 'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__ . '/..' . '/../lib/Actions/Trashbin.php', |
|
33 | - 'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__ . '/..' . '/../lib/Actions/UserManagement.php', |
|
34 | - 'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php', |
|
35 | - 'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
36 | - 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\AdminAudit\\Actions\\Action' => __DIR__.'/..'.'/../lib/Actions/Action.php', |
|
25 | + 'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__.'/..'.'/../lib/Actions/AppManagement.php', |
|
26 | + 'OCA\\AdminAudit\\Actions\\Auth' => __DIR__.'/..'.'/../lib/Actions/Auth.php', |
|
27 | + 'OCA\\AdminAudit\\Actions\\Console' => __DIR__.'/..'.'/../lib/Actions/Console.php', |
|
28 | + 'OCA\\AdminAudit\\Actions\\Files' => __DIR__.'/..'.'/../lib/Actions/Files.php', |
|
29 | + 'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__.'/..'.'/../lib/Actions/GroupManagement.php', |
|
30 | + 'OCA\\AdminAudit\\Actions\\Security' => __DIR__.'/..'.'/../lib/Actions/Security.php', |
|
31 | + 'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__.'/..'.'/../lib/Actions/Sharing.php', |
|
32 | + 'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__.'/..'.'/../lib/Actions/Trashbin.php', |
|
33 | + 'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__.'/..'.'/../lib/Actions/UserManagement.php', |
|
34 | + 'OCA\\AdminAudit\\Actions\\Versions' => __DIR__.'/..'.'/../lib/Actions/Versions.php', |
|
35 | + 'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
36 | + 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__.'/..'.'/../lib/BackgroundJobs/Rotate.php', |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | public static function getInitializer(ClassLoader $loader) |
40 | 40 | { |
41 | - return \Closure::bind(function () use ($loader) { |
|
41 | + return \Closure::bind(function() use ($loader) { |
|
42 | 42 | $loader->prefixLengthsPsr4 = ComposerStaticInitAdminAudit::$prefixLengthsPsr4; |
43 | 43 | $loader->prefixDirsPsr4 = ComposerStaticInitAdminAudit::$prefixDirsPsr4; |
44 | 44 | $loader->classMap = ComposerStaticInitAdminAudit::$classMap; |
@@ -6,17 +6,17 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\AdminAudit\\Actions\\Action' => $baseDir . '/../lib/Actions/Action.php', |
|
10 | - 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir . '/../lib/Actions/AppManagement.php', |
|
11 | - 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir . '/../lib/Actions/Auth.php', |
|
12 | - 'OCA\\AdminAudit\\Actions\\Console' => $baseDir . '/../lib/Actions/Console.php', |
|
13 | - 'OCA\\AdminAudit\\Actions\\Files' => $baseDir . '/../lib/Actions/Files.php', |
|
14 | - 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir . '/../lib/Actions/GroupManagement.php', |
|
15 | - 'OCA\\AdminAudit\\Actions\\Security' => $baseDir . '/../lib/Actions/Security.php', |
|
16 | - 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir . '/../lib/Actions/Sharing.php', |
|
17 | - 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir . '/../lib/Actions/Trashbin.php', |
|
18 | - 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir . '/../lib/Actions/UserManagement.php', |
|
19 | - 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php', |
|
20 | - 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
21 | - 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php', |
|
9 | + 'OCA\\AdminAudit\\Actions\\Action' => $baseDir.'/../lib/Actions/Action.php', |
|
10 | + 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir.'/../lib/Actions/AppManagement.php', |
|
11 | + 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir.'/../lib/Actions/Auth.php', |
|
12 | + 'OCA\\AdminAudit\\Actions\\Console' => $baseDir.'/../lib/Actions/Console.php', |
|
13 | + 'OCA\\AdminAudit\\Actions\\Files' => $baseDir.'/../lib/Actions/Files.php', |
|
14 | + 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir.'/../lib/Actions/GroupManagement.php', |
|
15 | + 'OCA\\AdminAudit\\Actions\\Security' => $baseDir.'/../lib/Actions/Security.php', |
|
16 | + 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir.'/../lib/Actions/Sharing.php', |
|
17 | + 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir.'/../lib/Actions/Trashbin.php', |
|
18 | + 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir.'/../lib/Actions/UserManagement.php', |
|
19 | + 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir.'/../lib/Actions/Versions.php', |
|
20 | + 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
21 | + 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir.'/../lib/BackgroundJobs/Rotate.php', |
|
22 | 22 | ); |