@@ -111,7 +111,7 @@ |
||
111 | 111 | while (!empty($parents)) { |
112 | 112 | $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); |
113 | 113 | |
114 | - $parents = array_map(function ($parent) use ($qb) { |
|
114 | + $parents = array_map(function($parent) use ($qb) { |
|
115 | 115 | return $qb->createNamedParameter($parent); |
116 | 116 | }, $parents); |
117 | 117 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
62 | 62 | /** @var Node[] $nodes */ |
63 | - $nodes = $userFolder->getById((int)$context['itemId']); |
|
63 | + $nodes = $userFolder->getById((int) $context['itemId']); |
|
64 | 64 | if (count($nodes) === 0) { |
65 | 65 | return; |
66 | 66 | } |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | // at least on PHP 5.6 usort turned out to be not stable. So we add |
75 | 75 | // the current index to the value and compare it on a draw |
76 | 76 | $i = 0; |
77 | - $workArray = array_map(function ($element) use (&$i) { |
|
77 | + $workArray = array_map(function($element) use (&$i) { |
|
78 | 78 | return [$i++, $element]; |
79 | 79 | }, $byType); |
80 | 80 | |
81 | - usort($workArray, function ($a, $b) use ($al, $type) { |
|
81 | + usort($workArray, function($a, $b) use ($al, $type) { |
|
82 | 82 | $result = $this->compare($a[1], $b[1], $al[$type]); |
83 | 83 | if ($result === 0) { |
84 | 84 | $result = $a[0] - $b[0]; |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | $a = $a['value']['shareWith']; |
102 | 102 | $b = $b['value']['shareWith']; |
103 | 103 | |
104 | - $valueA = (int)in_array($a, $al, true); |
|
105 | - $valueB = (int)in_array($b, $al, true); |
|
104 | + $valueA = (int) in_array($a, $al, true); |
|
105 | + $valueB = (int) in_array($b, $al, true); |
|
106 | 106 | |
107 | 107 | return $valueB - $valueA; |
108 | 108 | } |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $client = $this->httpClientService->newClient(); |
232 | 232 | try { |
233 | 233 | $result = $client->get( |
234 | - $url . '/status.php', |
|
234 | + $url.'/status.php', |
|
235 | 235 | [ |
236 | 236 | 'timeout' => 3, |
237 | 237 | 'connect_timeout' => 3, |
@@ -284,6 +284,6 @@ discard block |
||
284 | 284 | return $url; |
285 | 285 | } |
286 | 286 | |
287 | - return 'https://' . $url; |
|
287 | + return 'https://'.$url; |
|
288 | 288 | } |
289 | 289 | } |
@@ -20,12 +20,12 @@ |
||
20 | 20 | <ul id="listOfTrustedServers"> |
21 | 21 | <?php foreach ($_['trustedServers'] as $trustedServer) { ?> |
22 | 22 | <li id="<?php p($trustedServer['id']); ?>"> |
23 | - <?php if ((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?> |
|
23 | + <?php if ((int) $trustedServer['status'] === TrustedServers::STATUS_OK) { ?> |
|
24 | 24 | <span class="status success"></span> |
25 | 25 | <?php |
26 | 26 | } elseif ( |
27 | - (int)$trustedServer['status'] === TrustedServers::STATUS_PENDING || |
|
28 | - (int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED |
|
27 | + (int) $trustedServer['status'] === TrustedServers::STATUS_PENDING || |
|
28 | + (int) $trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED |
|
29 | 29 | ) { ?> |
30 | 30 | <span class="status indeterminate"></span> |
31 | 31 | <?php } else {?> |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this |
39 | 39 | ->setIdentifier($invalidId) |
40 | 40 | ->setScheme(self::SCHEME_NULL) |
41 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | + ->setText('Unknown auth mechanism backend '.$invalidId) |
|
42 | 42 | ; |
43 | 43 | } |
44 | 44 | } |
@@ -65,13 +65,13 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | if (isset($params['root'])) { |
68 | - $root = '/' . ltrim($params['root'], '/'); |
|
68 | + $root = '/'.ltrim($params['root'], '/'); |
|
69 | 69 | } else { |
70 | 70 | $root = '/'; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $params['host'] = $host; |
74 | - $params['root'] = $contextPath . self::OC_URL_SUFFIX . $root; |
|
74 | + $params['root'] = $contextPath.self::OC_URL_SUFFIX.$root; |
|
75 | 75 | $params['authType'] = Client::AUTH_BASIC; |
76 | 76 | |
77 | 77 | parent::__construct($params); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | protected function checkPlaceholder(): void { |
65 | 65 | $this->sanitizedPlaceholder = trim(strtolower($this->placeholder)); |
66 | - if (!(bool)\preg_match('/^[a-z0-9]*$/', $this->sanitizedPlaceholder)) { |
|
66 | + if (!(bool) \preg_match('/^[a-z0-9]*$/', $this->sanitizedPlaceholder)) { |
|
67 | 67 | throw new \RuntimeException(sprintf( |
68 | 68 | 'Invalid placeholder %s, only [a-z0-9] are allowed', $this->sanitizedPlaceholder |
69 | 69 | )); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | protected function substituteIfString($value, string $replacement) { |
82 | 82 | if (is_string($value)) { |
83 | - return str_ireplace('$' . $this->sanitizedPlaceholder, $replacement, $value); |
|
83 | + return str_ireplace('$'.$this->sanitizedPlaceholder, $replacement, $value); |
|
84 | 84 | } |
85 | 85 | return $value; |
86 | 86 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @return Backend[] |
217 | 217 | */ |
218 | 218 | public function getAvailableBackends() { |
219 | - return array_filter($this->getBackends(), function ($backend) { |
|
219 | + return array_filter($this->getBackends(), function($backend) { |
|
220 | 220 | return !$backend->checkDependencies(); |
221 | 221 | }); |
222 | 222 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | * @return AuthMechanism[] |
256 | 256 | */ |
257 | 257 | public function getAuthMechanismsByScheme(array $schemes) { |
258 | - return array_filter($this->getAuthMechanisms(), function ($authMech) use ($schemes) { |
|
258 | + return array_filter($this->getAuthMechanisms(), function($authMech) use ($schemes) { |
|
259 | 259 | return in_array($authMech->getScheme(), $schemes, true); |
260 | 260 | }); |
261 | 261 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | public function registerConfigHandler(string $placeholder, callable $configHandlerLoader) { |
324 | 324 | $placeholder = trim(strtolower($placeholder)); |
325 | - if (!(bool)\preg_match('/^[a-z0-9]*$/', $placeholder)) { |
|
325 | + if (!(bool) \preg_match('/^[a-z0-9]*$/', $placeholder)) { |
|
326 | 326 | throw new \RuntimeException(sprintf( |
327 | 327 | 'Invalid placeholder %s, only [a-z0-9] are allowed', $placeholder |
328 | 328 | )); |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | if ($newLoaded) { |
354 | 354 | // ensure those with longest placeholders come first, |
355 | 355 | // to avoid substring matches |
356 | - uksort($this->configHandlers, function ($phA, $phB) { |
|
356 | + uksort($this->configHandlers, function($phA, $phB) { |
|
357 | 357 | return strlen($phB) <=> strlen($phA); |
358 | 358 | }); |
359 | 359 | } |
@@ -60,11 +60,11 @@ |
||
60 | 60 | // at least on PHP 5.6 usort turned out to be not stable. So we add |
61 | 61 | // the current index to the value and compare it on a draw |
62 | 62 | $i = 0; |
63 | - $workArray = array_map(function ($element) use (&$i) { |
|
63 | + $workArray = array_map(function($element) use (&$i) { |
|
64 | 64 | return [$i++, $element]; |
65 | 65 | }, $byType); |
66 | 66 | |
67 | - usort($workArray, function ($a, $b) use ($commenters, $type) { |
|
67 | + usort($workArray, function($a, $b) use ($commenters, $type) { |
|
68 | 68 | $r = $this->compare($a[1], $b[1], $commenters[$type]); |
69 | 69 | if ($r === 0) { |
70 | 70 | $r = $a[0] - $b[0]; |