@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | return; |
122 | 122 | } |
123 | 123 | |
124 | - $file = $folder->newFile('photo.' . $extension); |
|
124 | + $file = $folder->newFile('photo.'.$extension); |
|
125 | 125 | $file->putContent($data['body']); |
126 | 126 | } |
127 | 127 | |
@@ -133,9 +133,9 @@ discard block |
||
133 | 133 | $ext = $this->getExtension($folder); |
134 | 134 | |
135 | 135 | if ($size === -1) { |
136 | - $path = 'photo.' . $ext; |
|
136 | + $path = 'photo.'.$ext; |
|
137 | 137 | } else { |
138 | - $path = 'photo.' . $size . '.' . $ext; |
|
138 | + $path = 'photo.'.$size.'.'.$ext; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | try { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | $photo = new \OC_Image(); |
149 | 149 | /** @var ISimpleFile $file */ |
150 | - $file = $folder->getFile('photo.' . $ext); |
|
150 | + $file = $folder->getFile('photo.'.$ext); |
|
151 | 151 | $photo->loadFromData($file->getContent()); |
152 | 152 | |
153 | 153 | $ratio = $photo->width() / $photo->height(); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @throws NotPermittedException |
176 | 176 | */ |
177 | 177 | private function getFolder(int $addressBookId, string $cardUri, bool $createIfNotExists = true): ISimpleFolder { |
178 | - $hash = md5($addressBookId . ' ' . $cardUri); |
|
178 | + $hash = md5($addressBookId.' '.$cardUri); |
|
179 | 179 | try { |
180 | 180 | return $this->appData->getFolder($hash); |
181 | 181 | } catch (NotFoundException $e) { |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | private function getExtension(ISimpleFolder $folder): string { |
198 | 198 | foreach (self::ALLOWED_CONTENT_TYPES as $extension) { |
199 | - if ($folder->fileExists('photo.' . $extension)) { |
|
199 | + if ($folder->fileExists('photo.'.$extension)) { |
|
200 | 200 | return $extension; |
201 | 201 | } |
202 | 202 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | if (strpos($type, 'image/') === 0) { |
270 | 270 | return $type; |
271 | 271 | } else { |
272 | - return 'image/' . strtolower($type); |
|
272 | + return 'image/'.strtolower($type); |
|
273 | 273 | } |
274 | 274 | } |
275 | 275 | return ''; |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $results = $folder->search($query); |
161 | 161 | |
162 | 162 | /** @var SearchResult[] $nodes */ |
163 | - $nodes = array_map(function (Node $node) { |
|
163 | + $nodes = array_map(function(Node $node) { |
|
164 | 164 | if ($node instanceof Folder) { |
165 | 165 | $davNode = new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager); |
166 | 166 | } else { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | if (!$query->limitToHome()) { |
175 | 175 | // Sort again, since the result from multiple storages is appended and not sorted |
176 | - usort($nodes, function (SearchResult $a, SearchResult $b) use ($search) { |
|
176 | + usort($nodes, function(SearchResult $a, SearchResult $b) use ($search) { |
|
177 | 177 | return $this->sort($a, $b, $search->orderBy); |
178 | 178 | }); |
179 | 179 | } |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | * @return string |
264 | 264 | */ |
265 | 265 | private function getHrefForNode(Node $node) { |
266 | - $base = '/files/' . $this->user->getUID(); |
|
267 | - return $base . $this->view->getRelativePath($node->getPath()); |
|
266 | + $base = '/files/'.$this->user->getUID(); |
|
267 | + return $base.$this->view->getRelativePath($node->getPath()); |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | return new SearchQuery( |
292 | 292 | $this->transformSearchOperation($query->where), |
293 | - (int)$limit->maxResults, |
|
293 | + (int) $limit->maxResults, |
|
294 | 294 | $offset, |
295 | 295 | $orders, |
296 | 296 | $this->user, |
@@ -325,19 +325,19 @@ discard block |
||
325 | 325 | case Operator::OPERATION_LESS_THAN: |
326 | 326 | case Operator::OPERATION_IS_LIKE: |
327 | 327 | if (count($operator->arguments) !== 2) { |
328 | - throw new \InvalidArgumentException('Invalid number of arguments for ' . $trimmedType . ' operation'); |
|
328 | + throw new \InvalidArgumentException('Invalid number of arguments for '.$trimmedType.' operation'); |
|
329 | 329 | } |
330 | 330 | if (!($operator->arguments[0] instanceof SearchPropertyDefinition)) { |
331 | - throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property'); |
|
331 | + throw new \InvalidArgumentException('Invalid argument 1 for '.$trimmedType.' operation, expected property'); |
|
332 | 332 | } |
333 | 333 | if (!($operator->arguments[1] instanceof Literal)) { |
334 | - throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal'); |
|
334 | + throw new \InvalidArgumentException('Invalid argument 2 for '.$trimmedType.' operation, expected literal'); |
|
335 | 335 | } |
336 | 336 | return new SearchComparison($trimmedType, $this->mapPropertyNameToColumn($operator->arguments[0]), $this->castValue($operator->arguments[0], $operator->arguments[1]->value)); |
337 | 337 | case Operator::OPERATION_IS_COLLECTION: |
338 | 338 | return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE); |
339 | 339 | default: |
340 | - throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType . ' (' . $operator->type . ')'); |
|
340 | + throw new \InvalidArgumentException('Unsupported operation '.$trimmedType.' ('.$operator->type.')'); |
|
341 | 341 | } |
342 | 342 | } |
343 | 343 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | case FilesPlugin::INTERNAL_FILEID_PROPERTYNAME: |
363 | 363 | return 'fileid'; |
364 | 364 | default: |
365 | - throw new \InvalidArgumentException('Unsupported property for search or order: ' . $property->name); |
|
365 | + throw new \InvalidArgumentException('Unsupported property for search or order: '.$property->name); |
|
366 | 366 | } |
367 | 367 | } |
368 | 368 |
@@ -99,7 +99,7 @@ |
||
99 | 99 | |
100 | 100 | $templateName = 'exception'; |
101 | 101 | if ($httpCode === 403 || $httpCode === 404) { |
102 | - $templateName = (string)$httpCode; |
|
102 | + $templateName = (string) $httpCode; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | $content = new OC_Template('core', $templateName, 'guest'); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | if ($request->isUserAgent([ |
205 | 205 | '/WebDAVFS/', |
206 | 206 | '/OneNote/', |
207 | - '/^Microsoft-WebDAV/',// Microsoft-WebDAV-MiniRedir/6.1.7601 |
|
207 | + '/^Microsoft-WebDAV/', // Microsoft-WebDAV-MiniRedir/6.1.7601 |
|
208 | 208 | ])) { |
209 | 209 | $this->server->addPlugin(new FakeLockerPlugin()); |
210 | 210 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $this->server->addPlugin(new SearchPlugin($lazySearchBackend)); |
218 | 218 | |
219 | 219 | // wait with registering these until auth is handled and the filesystem is setup |
220 | - $this->server->on('beforeMethod:*', function () use ($root, $lazySearchBackend) { |
|
220 | + $this->server->on('beforeMethod:*', function() use ($root, $lazySearchBackend) { |
|
221 | 221 | // custom properties plugin must be the last one |
222 | 222 | $userSession = \OC::$server->getUserSession(); |
223 | 223 | $user = $userSession->getUser(); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | \OC::$server->getThemingDefaults(), |
296 | 296 | \OC::$server->getRequest(), |
297 | 297 | \OC::$server->getL10N('dav'), |
298 | - function () { |
|
298 | + function() { |
|
299 | 299 | return UUIDUtil::getUUID(); |
300 | 300 | } |
301 | 301 | )); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $offset = (int) $arguments['offset']; |
87 | 87 | $stopAt = (int) $arguments['stopAt']; |
88 | 88 | |
89 | - $this->logger->info('Building calendar reminder index (' . $offset .'/' . $stopAt . ')'); |
|
89 | + $this->logger->info('Building calendar reminder index ('.$offset.'/'.$stopAt.')'); |
|
90 | 90 | |
91 | 91 | $offset = $this->buildIndex($offset, $stopAt); |
92 | 92 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'offset' => $offset, |
98 | 98 | 'stopAt' => $stopAt |
99 | 99 | ]); |
100 | - $this->logger->info('Scheduled a new BuildReminderIndexBackgroundJob with offset ' . $offset); |
|
100 | + $this->logger->info('Scheduled a new BuildReminderIndexBackgroundJob with offset '.$offset); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <div class="update"> |
2 | - <p class="message"><?php p($l->t('There was an error updating your attendance status.'));?></p> |
|
3 | - <p class="message"><?php p($l->t('Please contact the organizer directly.'));?></p> |
|
2 | + <p class="message"><?php p($l->t('There was an error updating your attendance status.')); ?></p> |
|
3 | + <p class="message"><?php p($l->t('Please contact the organizer directly.')); ?></p> |
|
4 | 4 | <?php if (isset($_['organizer'])): ?> |
5 | 5 | <p class="message"><a href="<?php p($_['organizer']) ?>"><?php p(substr($_['organizer'], 7)) ?></a></p> |
6 | 6 | <?php endif; ?> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | require '../../../../3rdparty/autoload.php'; |
24 | 24 | |
25 | 25 | if ($argc !== 6) { |
26 | - echo "Invalid number of arguments" . PHP_EOL; |
|
26 | + echo "Invalid number of arguments".PHP_EOL; |
|
27 | 27 | exit; |
28 | 28 | } |
29 | 29 | |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | $t0 = microtime(true); |
38 | 38 | $result = $client->request($method, $uploadUrl, $data, $headers); |
39 | 39 | $t1 = microtime(true); |
40 | - echo $result['statusCode'] . " - " . ($t1 - $t0) . ' seconds' . PHP_EOL; |
|
41 | - if (!in_array($result['statusCode'], [200, 201])) { |
|
42 | - echo $result['body'] . PHP_EOL; |
|
40 | + echo $result['statusCode']." - ".($t1 - $t0).' seconds'.PHP_EOL; |
|
41 | + if (!in_array($result['statusCode'], [200, 201])) { |
|
42 | + echo $result['body'].PHP_EOL; |
|
43 | 43 | } |
44 | 44 | return $result; |
45 | 45 | } |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | |
50 | 50 | private function evaluateScopeId(string $scopeId = null): string { |
51 | 51 | if ($this->scope === IManager::SCOPE_USER |
52 | - && trim((string)$scopeId) === '') { |
|
52 | + && trim((string) $scopeId) === '') { |
|
53 | 53 | throw new \InvalidArgumentException('user scope requires a user id'); |
54 | 54 | } |
55 | - return trim((string)$scopeId); |
|
55 | + return trim((string) $scopeId); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function getHash(): string { |
73 | 73 | if ($this->hash === null) { |
74 | - $this->hash = \hash('sha256', $this->getScope() . '::' . $this->getScopeId()); |
|
74 | + $this->hash = \hash('sha256', $this->getScope().'::'.$this->getScopeId()); |
|
75 | 75 | } |
76 | 76 | return $this->hash; |
77 | 77 | } |
@@ -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 |