@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | // Replace %n first (won't interfere with vsprintf) |
77 | - $text = str_replace('%n', (string)$this->count, $text); |
|
77 | + $text = str_replace('%n', (string) $this->count, $text); |
|
78 | 78 | return vsprintf($text, $this->parameters); |
79 | 79 | } |
80 | 80 |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $result = $this->entries; |
122 | 122 | if ($type !== 'all') { |
123 | - $result = array_filter($this->entries, function ($entry) use ($type) { |
|
123 | + $result = array_filter($this->entries, function($entry) use ($type) { |
|
124 | 124 | return $entry['type'] === $type; |
125 | 125 | }); |
126 | 126 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * @return array |
136 | 136 | */ |
137 | 137 | private function proceedNavigation(array $list): array { |
138 | - uasort($list, function ($a, $b) { |
|
138 | + uasort($list, function($a, $b) { |
|
139 | 139 | if (isset($a['order']) && isset($b['order'])) { |
140 | 140 | return ($a['order'] < $b['order']) ? -1 : 1; |
141 | 141 | } elseif (isset($a['order']) || isset($b['order'])) { |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | continue; |
289 | 289 | } |
290 | 290 | $l = $this->l10nFac->get($app); |
291 | - $id = $nav['id'] ?? $app . ($key === 0 ? '' : $key); |
|
291 | + $id = $nav['id'] ?? $app.($key === 0 ? '' : $key); |
|
292 | 292 | $order = isset($nav['order']) ? $nav['order'] : 100; |
293 | 293 | $type = isset($nav['type']) ? $nav['type'] : 'link'; |
294 | 294 | $route = $nav['route'] !== '' ? $this->urlGenerator->linkToRoute($nav['route']) : ''; |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $emailAddressType = $emailAddressData['type']; |
100 | 100 | } |
101 | 101 | if (isset($contact['FN'])) { |
102 | - $displayName = $contact['FN'] . ' (' . $emailAddress . ')'; |
|
102 | + $displayName = $contact['FN'].' ('.$emailAddress.')'; |
|
103 | 103 | } |
104 | 104 | $exactEmailMatch = strtolower($emailAddress) === $lowerSearch; |
105 | 105 |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function search($search, $limit, $offset, ISearchResult $searchResult) { |
66 | 66 | $isGlobalScaleEnabled = $this->config->getSystemValue('gs.enabled', false); |
67 | 67 | $isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes'; |
68 | - $hasInternetConnection = (bool)$this->config->getSystemValue('has_internet_connection', true); |
|
68 | + $hasInternetConnection = (bool) $this->config->getSystemValue('has_internet_connection', true); |
|
69 | 69 | |
70 | 70 | // if case of Global Scale we always search the lookup server |
71 | 71 | if (!$isGlobalScaleEnabled && (!$isLookupServerEnabled || !$hasInternetConnection)) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | try { |
83 | 83 | $client = $this->clientService->newClient(); |
84 | 84 | $response = $client->get( |
85 | - $lookupServerUrl . '/users?search=' . urlencode($search), |
|
85 | + $lookupServerUrl.'/users?search='.urlencode($search), |
|
86 | 86 | [ |
87 | 87 | 'timeout' => 10, |
88 | 88 | 'connect_timeout' => 3, |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | try { |
96 | 96 | $remote = $this->cloudIdManager->resolveCloudId($lookup['federationId'])->getRemote(); |
97 | 97 | } catch (\Exception $e) { |
98 | - $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"'); |
|
98 | + $this->logger->error('Can not parse federated cloud ID "'.$lookup['federationId'].'"'); |
|
99 | 99 | $this->logger->error($e->getMessage()); |
100 | 100 | continue; |
101 | 101 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | continue; |
104 | 104 | } |
105 | 105 | $name = isset($lookup['name']['value']) ? $lookup['name']['value'] : ''; |
106 | - $label = empty($name) ? $lookup['federationId'] : $name . ' (' . $lookup['federationId'] . ')'; |
|
106 | + $label = empty($name) ? $lookup['federationId'] : $name.' ('.$lookup['federationId'].')'; |
|
107 | 107 | $result[] = [ |
108 | 108 | 'label' => $label, |
109 | 109 | 'value' => [ |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $request = $this->prepareRequest($request, $credentials); |
65 | 65 | $stringToSign = $this->createCanonicalizedString($request); |
66 | 66 | $auth = 'AWS ' |
67 | - . $credentials->getAccessKeyId() . ':' |
|
67 | + . $credentials->getAccessKeyId().':' |
|
68 | 68 | . $this->signString($stringToSign, $credentials); |
69 | 69 | |
70 | 70 | return $request->withHeader('Authorization', $auth); |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | RequestInterface $request, |
149 | 149 | $expires = null |
150 | 150 | ) { |
151 | - $buffer = $request->getMethod() . "\n"; |
|
151 | + $buffer = $request->getMethod()."\n"; |
|
152 | 152 | |
153 | 153 | // Add the interesting headers |
154 | 154 | foreach ($this->signableHeaders as $header) { |
155 | - $buffer .= $request->getHeaderLine($header) . "\n"; |
|
155 | + $buffer .= $request->getHeaderLine($header)."\n"; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | $date = $expires ?: $request->getHeaderLine('date'); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | if (strpos($name, 'x-amz-') === 0) { |
171 | 171 | $value = implode(',', $header); |
172 | 172 | if (strlen($value) > 0) { |
173 | - $headers[$name] = $name . ':' . $value; |
|
173 | + $headers[$name] = $name.':'.$value; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | ksort($headers); |
183 | 183 | |
184 | - return implode("\n", $headers) . "\n"; |
|
184 | + return implode("\n", $headers)."\n"; |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | private function createCanonicalizedResource(RequestInterface $request) { |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | if ($data['bucket']) { |
192 | 192 | $buffer .= $data['bucket']; |
193 | 193 | if (!empty($data['key']) || !$data['path_style']) { |
194 | - $buffer .= '/' . $data['key']; |
|
194 | + $buffer .= '/'.$data['key']; |
|
195 | 195 | } |
196 | 196 | } |
197 | 197 |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | return; |
174 | 174 | } |
175 | 175 | |
176 | - $this->dispatcher->dispatch(IGroup::class . '::preAddUser', new GenericEvent($this, [ |
|
176 | + $this->dispatcher->dispatch(IGroup::class.'::preAddUser', new GenericEvent($this, [ |
|
177 | 177 | 'user' => $user, |
178 | 178 | ])); |
179 | 179 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $this->users[$user->getUID()] = $user; |
188 | 188 | } |
189 | 189 | |
190 | - $this->dispatcher->dispatch(IGroup::class . '::postAddUser', new GenericEvent($this, [ |
|
190 | + $this->dispatcher->dispatch(IGroup::class.'::postAddUser', new GenericEvent($this, [ |
|
191 | 191 | 'user' => $user, |
192 | 192 | ])); |
193 | 193 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function removeUser($user) { |
208 | 208 | $result = false; |
209 | - $this->dispatcher->dispatch(IGroup::class . '::preRemoveUser', new GenericEvent($this, [ |
|
209 | + $this->dispatcher->dispatch(IGroup::class.'::preRemoveUser', new GenericEvent($this, [ |
|
210 | 210 | 'user' => $user, |
211 | 211 | ])); |
212 | 212 | if ($this->emitter) { |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | if ($result) { |
222 | - $this->dispatcher->dispatch(IGroup::class . '::postRemoveUser', new GenericEvent($this, [ |
|
222 | + $this->dispatcher->dispatch(IGroup::class.'::postRemoveUser', new GenericEvent($this, [ |
|
223 | 223 | 'user' => $user, |
224 | 224 | ])); |
225 | 225 | if ($this->emitter) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | |
331 | 331 | $result = false; |
332 | - $this->dispatcher->dispatch(IGroup::class . '::preDelete', new GenericEvent($this)); |
|
332 | + $this->dispatcher->dispatch(IGroup::class.'::preDelete', new GenericEvent($this)); |
|
333 | 333 | if ($this->emitter) { |
334 | 334 | $this->emitter->emit('\OC\Group', 'preDelete', [$this]); |
335 | 335 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | } |
341 | 341 | } |
342 | 342 | if ($result) { |
343 | - $this->dispatcher->dispatch(IGroup::class . '::postDelete', new GenericEvent($this)); |
|
343 | + $this->dispatcher->dispatch(IGroup::class.'::postDelete', new GenericEvent($this)); |
|
344 | 344 | if ($this->emitter) { |
345 | 345 | $this->emitter->emit('\OC\Group', 'postDelete', [$this]); |
346 | 346 | } |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | * @since 16.0.0 |
399 | 399 | */ |
400 | 400 | public function hideFromCollaboration(): bool { |
401 | - return array_reduce($this->backends, function (bool $hide, GroupInterface $backend) { |
|
401 | + return array_reduce($this->backends, function(bool $hide, GroupInterface $backend) { |
|
402 | 402 | return $hide | ($backend instanceof IHideFromCollaborationBackend && $backend->hideGroup($this->gid)); |
403 | 403 | }, false); |
404 | 404 | } |
@@ -142,12 +142,12 @@ |
||
142 | 142 | $xml = @simplexml_load_string($body); |
143 | 143 | libxml_disable_entity_loader($loadEntities); |
144 | 144 | if ($xml !== false) { |
145 | - $data['changelogURL'] = (string)$xml->changelog['href']; |
|
145 | + $data['changelogURL'] = (string) $xml->changelog['href']; |
|
146 | 146 | $data['whatsNew'] = []; |
147 | 147 | foreach ($xml->whatsNew as $infoSet) { |
148 | - $data['whatsNew'][(string)$infoSet['lang']] = [ |
|
149 | - 'regular' => (array)$infoSet->regular->item, |
|
150 | - 'admin' => (array)$infoSet->admin->item, |
|
148 | + $data['whatsNew'][(string) $infoSet['lang']] = [ |
|
149 | + 'regular' => (array) $infoSet->regular->item, |
|
150 | + 'admin' => (array) $infoSet->admin->item, |
|
151 | 151 | ]; |
152 | 152 | } |
153 | 153 | } else { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | $subQuery = $this->connection->getQueryBuilder(); |
114 | 114 | $subQuery->select('s1.id') |
115 | - ->from($subQuery->createFunction('(' . $subSubQuery->getSQL() . ')'), 's1') |
|
115 | + ->from($subQuery->createFunction('('.$subSubQuery->getSQL().')'), 's1') |
|
116 | 116 | ->join( |
117 | 117 | 's1', 'share', 's2', |
118 | 118 | $subQuery->expr()->eq('s1.parent', 's2.id') |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $query = $this->connection->getQueryBuilder(); |
127 | 127 | $query->select($query->func()->count('*', 'total')) |
128 | 128 | ->from('share') |
129 | - ->where($query->expr()->in('id', $query->createFunction('(' . $subQuery->getSQL() . ')'))); |
|
129 | + ->where($query->expr()->in('id', $query->createFunction('('.$subQuery->getSQL().')'))); |
|
130 | 130 | |
131 | 131 | $result = $query->execute(); |
132 | 132 | $data = $result->fetch(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | $query = $this->connection->getQueryBuilder(); |
151 | 151 | $query->select('s1.id', 's1.uid_owner', 's1.uid_initiator') |
152 | - ->from($query->createFunction('(' . $subQuery->getSQL() . ')'), 's1') |
|
152 | + ->from($query->createFunction('('.$subQuery->getSQL().')'), 's1') |
|
153 | 153 | ->join( |
154 | 154 | 's1', 'share', 's2', |
155 | 155 | $query->expr()->eq('s1.parent', 's2.id') |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $this->addToNotify($data['uid_owner']); |
174 | 174 | $this->addToNotify($data['uid_initiator']); |
175 | 175 | |
176 | - $this->deleteShare((int)$id); |
|
176 | + $this->deleteShare((int) $id); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | class Streamer { |
41 | 41 | // array of regexp. Matching user agents will get tar instead of zip |
42 | - private $preferTarFor = [ '/macintosh|mac os x/i' ]; |
|
42 | + private $preferTarFor = ['/macintosh|mac os x/i']; |
|
43 | 43 | |
44 | 44 | // streamer instance |
45 | 45 | private $streamerInstance; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function sendHeaders($name) { |
93 | 93 | $extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar'; |
94 | - $fullName = $name . $extension; |
|
94 | + $fullName = $name.$extension; |
|
95 | 95 | $this->streamerInstance->sendHeaders($fullName); |
96 | 96 | } |
97 | 97 | |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function addDirRecursive(string $dir, string $internalDir = ''): void { |
106 | 106 | $dirname = basename($dir); |
107 | - $rootDir = $internalDir . $dirname; |
|
107 | + $rootDir = $internalDir.$dirname; |
|
108 | 108 | if (!empty($rootDir)) { |
109 | 109 | $this->streamerInstance->addEmptyDir($rootDir); |
110 | 110 | } |
111 | - $internalDir .= $dirname . '/'; |
|
111 | + $internalDir .= $dirname.'/'; |
|
112 | 112 | // prevent absolute dirs |
113 | 113 | $internalDir = ltrim($internalDir, '/'); |
114 | 114 | |
@@ -126,14 +126,14 @@ discard block |
||
126 | 126 | } |
127 | 127 | $this->addFileFromStream( |
128 | 128 | $fh, |
129 | - $internalDir . $file->getName(), |
|
129 | + $internalDir.$file->getName(), |
|
130 | 130 | $file->getSize(), |
131 | 131 | $file->getMTime() |
132 | 132 | ); |
133 | 133 | fclose($fh); |
134 | 134 | } elseif ($file instanceof Folder) { |
135 | 135 | if ($file->isReadable()) { |
136 | - $this->addDirRecursive($dir . '/' . $file->getName(), $internalDir); |
|
136 | + $this->addDirRecursive($dir.'/'.$file->getName(), $internalDir); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | } |