@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | return SearchResult::complete($this->getName(), []); |
96 | 96 | } |
97 | 97 | |
98 | - $principalUri = 'principals/users/' . $user->getUID(); |
|
98 | + $principalUri = 'principals/users/'.$user->getUID(); |
|
99 | 99 | $calendarsById = $this->getSortedCalendars($principalUri); |
100 | 100 | $subscriptionsById = $this->getSortedSubscriptions($principalUri); |
101 | 101 | |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | 'offset' => $query->getCursor(), |
111 | 111 | ] |
112 | 112 | ); |
113 | - $formattedResults = \array_map(function (array $eventRow) use ($calendarsById, $subscriptionsById):SearchResultEntry { |
|
113 | + $formattedResults = \array_map(function(array $eventRow) use ($calendarsById, $subscriptionsById):SearchResultEntry { |
|
114 | 114 | $component = $this->getPrimaryComponent($eventRow['calendardata'], self::$componentType); |
115 | - $title = (string)($component->SUMMARY ?? $this->l10n->t('Untitled event')); |
|
115 | + $title = (string) ($component->SUMMARY ?? $this->l10n->t('Untitled event')); |
|
116 | 116 | $subline = $this->generateSubline($component); |
117 | 117 | |
118 | 118 | if ($eventRow['calendartype'] === CalDavBackend::CALENDAR_TYPE_CALENDAR) { |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | string $calendarObjectUri): string { |
162 | 162 | [,, $principalId] = explode('/', $principalUri, 3); |
163 | 163 | |
164 | - return $this->urlGenerator->linkTo('', 'remote.php') . '/dav/calendars/' |
|
165 | - . $principalId . '/' |
|
166 | - . $calendarUri . '/' |
|
164 | + return $this->urlGenerator->linkTo('', 'remote.php').'/dav/calendars/' |
|
165 | + . $principalId.'/' |
|
166 | + . $calendarUri.'/' |
|
167 | 167 | . $calendarObjectUri; |
168 | 168 | } |
169 | 169 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return SearchResult::complete($this->getName(), []); |
109 | 109 | } |
110 | 110 | |
111 | - $principalUri = 'principals/users/' . $user->getUID(); |
|
111 | + $principalUri = 'principals/users/'.$user->getUID(); |
|
112 | 112 | $addressBooks = $this->backend->getAddressBooksForUser($principalUri); |
113 | 113 | $addressBooksById = []; |
114 | 114 | foreach ($addressBooks as $addressBook) { |
@@ -124,17 +124,17 @@ discard block |
||
124 | 124 | 'offset' => $query->getCursor(), |
125 | 125 | ] |
126 | 126 | ); |
127 | - $formattedResults = \array_map(function (array $contactRow) use ($addressBooksById):SearchResultEntry { |
|
127 | + $formattedResults = \array_map(function(array $contactRow) use ($addressBooksById):SearchResultEntry { |
|
128 | 128 | $addressBook = $addressBooksById[$contactRow['addressbookid']]; |
129 | 129 | |
130 | 130 | /** @var VCard $vCard */ |
131 | 131 | $vCard = Reader::read($contactRow['carddata']); |
132 | 132 | $thumbnailUrl = ''; |
133 | 133 | if ($vCard->PHOTO) { |
134 | - $thumbnailUrl = $this->getDavUrlForContact($addressBook['principaluri'], $addressBook['uri'], $contactRow['uri']) . '?photo'; |
|
134 | + $thumbnailUrl = $this->getDavUrlForContact($addressBook['principaluri'], $addressBook['uri'], $contactRow['uri']).'?photo'; |
|
135 | 135 | } |
136 | 136 | |
137 | - $title = (string)$vCard->FN; |
|
137 | + $title = (string) $vCard->FN; |
|
138 | 138 | $subline = $this->generateSubline($vCard); |
139 | 139 | $resourceUrl = $this->getDeepLinkToContactsApp($addressBook['uri'], (string) $vCard->UID); |
140 | 140 | |
@@ -160,10 +160,10 @@ discard block |
||
160 | 160 | [, $principalType, $principalId] = explode('/', $principalUri, 3); |
161 | 161 | |
162 | 162 | return $this->urlGenerator->getAbsoluteURL( |
163 | - $this->urlGenerator->linkTo('', 'remote.php') . '/dav/addressbooks/' |
|
164 | - . $principalType . '/' |
|
165 | - . $principalId . '/' |
|
166 | - . $addressBookUri . '/' |
|
163 | + $this->urlGenerator->linkTo('', 'remote.php').'/dav/addressbooks/' |
|
164 | + . $principalType.'/' |
|
165 | + . $principalId.'/' |
|
166 | + . $addressBookUri.'/' |
|
167 | 167 | . $contactsUri |
168 | 168 | ); |
169 | 169 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | string $contactUid): string { |
178 | 178 | return $this->urlGenerator->getAbsoluteURL( |
179 | 179 | $this->urlGenerator->linkToRoute('contacts.contacts.direct', [ |
180 | - 'contact' => $contactUid . '~' . $addressBookUri |
|
180 | + 'contact' => $contactUid.'~'.$addressBookUri |
|
181 | 181 | ]) |
182 | 182 | ); |
183 | 183 | } |
@@ -192,6 +192,6 @@ discard block |
||
192 | 192 | return ''; |
193 | 193 | } |
194 | 194 | |
195 | - return (string)$emailAddresses[0]; |
|
195 | + return (string) $emailAddresses[0]; |
|
196 | 196 | } |
197 | 197 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->navigationManager = \OC::$server->get(INavigationManager::class); |
91 | 91 | |
92 | 92 | parent::__construct('core', 'layout.user'); |
93 | - if (in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) { |
|
93 | + if (in_array(\OC_App::getCurrentApp(), ['settings', 'admin', 'help']) !== false) { |
|
94 | 94 | $this->assign('bodyid', 'body-settings'); |
95 | 95 | } else { |
96 | 96 | $this->assign('bodyid', 'body-user'); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | foreach ($jsFiles as $info) { |
216 | 216 | $web = $info[1]; |
217 | 217 | $file = $info[2]; |
218 | - $this->append('jsfiles', $web.'/'.$file . $this->getVersionHashSuffix()); |
|
218 | + $this->append('jsfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | try { |
@@ -248,14 +248,14 @@ discard block |
||
248 | 248 | $file = $info[2]; |
249 | 249 | |
250 | 250 | if (substr($file, -strlen('print.css')) === 'print.css') { |
251 | - $this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix()); |
|
251 | + $this->append('printcssfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
252 | 252 | } else { |
253 | 253 | $suffix = $this->getVersionHashSuffix($web, $file); |
254 | 254 | |
255 | 255 | if (strpos($file, '?v=') == false) { |
256 | - $this->append('cssfiles', $web.'/'.$file . $suffix); |
|
256 | + $this->append('cssfiles', $web.'/'.$file.$suffix); |
|
257 | 257 | } else { |
258 | - $this->append('cssfiles', $web.'/'.$file . '-' . substr($suffix, 3)); |
|
258 | + $this->append('cssfiles', $web.'/'.$file.'-'.substr($suffix, 3)); |
|
259 | 259 | } |
260 | 260 | } |
261 | 261 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | if ($this->config->getSystemValue('installed', false)) { |
280 | 280 | if (\OC::$server->getAppManager()->isInstalled('theming')) { |
281 | - $themingSuffix = '-' . $this->config->getAppValue('theming', 'cachebuster', '0'); |
|
281 | + $themingSuffix = '-'.$this->config->getAppValue('theming', 'cachebuster', '0'); |
|
282 | 282 | } |
283 | 283 | $v = \OC_App::getAppVersions(); |
284 | 284 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $appName = $this->getAppNamefromPath($path); |
289 | 289 | if (array_key_exists($appName, $v)) { |
290 | 290 | $appVersion = $v[$appName]; |
291 | - return '?v=' . substr(md5($appVersion), 0, 8) . $themingSuffix; |
|
291 | + return '?v='.substr(md5($appVersion), 0, 8).$themingSuffix; |
|
292 | 292 | } |
293 | 293 | } |
294 | 294 | // fallback to the file path instead |
@@ -296,11 +296,11 @@ discard block |
||
296 | 296 | $appName = $this->getAppNamefromPath($file); |
297 | 297 | if (array_key_exists($appName, $v)) { |
298 | 298 | $appVersion = $v[$appName]; |
299 | - return '?v=' . substr(md5($appVersion), 0, 8) . $themingSuffix; |
|
299 | + return '?v='.substr(md5($appVersion), 0, 8).$themingSuffix; |
|
300 | 300 | } |
301 | 301 | } |
302 | 302 | |
303 | - return '?v=' . self::$versionHash . $themingSuffix; |
|
303 | + return '?v='.self::$versionHash.$themingSuffix; |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
@@ -320,8 +320,8 @@ discard block |
||
320 | 320 | $locator = new \OC\Template\CSSResourceLocator( |
321 | 321 | \OC::$server->getLogger(), |
322 | 322 | $theme, |
323 | - [ \OC::$SERVERROOT => \OC::$WEBROOT ], |
|
324 | - [ \OC::$SERVERROOT => \OC::$WEBROOT ], |
|
323 | + [\OC::$SERVERROOT => \OC::$WEBROOT], |
|
324 | + [\OC::$SERVERROOT => \OC::$WEBROOT], |
|
325 | 325 | $SCSSCacher |
326 | 326 | ); |
327 | 327 | $locator->find($styles); |
@@ -355,8 +355,8 @@ discard block |
||
355 | 355 | $locator = new \OC\Template\JSResourceLocator( |
356 | 356 | \OC::$server->getLogger(), |
357 | 357 | $theme, |
358 | - [ \OC::$SERVERROOT => \OC::$WEBROOT ], |
|
359 | - [ \OC::$SERVERROOT => \OC::$WEBROOT ], |
|
358 | + [\OC::$SERVERROOT => \OC::$WEBROOT], |
|
359 | + [\OC::$SERVERROOT => \OC::$WEBROOT], |
|
360 | 360 | \OC::$server->query(JSCombiner::class) |
361 | 361 | ); |
362 | 362 | $locator->find($scripts); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @return string|null |
86 | 86 | * @since 20.0.0 |
87 | 87 | */ |
88 | - public function getMessage():?string; |
|
88 | + public function getMessage(): ?string; |
|
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Get a custom icon provided by the user |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @return string|null |
94 | 94 | * @since 20.0.0 |
95 | 95 | */ |
96 | - public function getIcon():?string; |
|
96 | + public function getIcon(): ?string; |
|
97 | 97 | |
98 | 98 | /** |
99 | 99 | * Gets the time that the custom status will be cleared at |
@@ -101,5 +101,5 @@ discard block |
||
101 | 101 | * @return DateTimeImmutable|null |
102 | 102 | * @since 20.0.0 |
103 | 103 | */ |
104 | - public function getClearAt():?DateTimeImmutable; |
|
104 | + public function getClearAt(): ?DateTimeImmutable; |
|
105 | 105 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | $provider = $this->container->get($this->providerClass); |
95 | 95 | } catch (ContainerExceptionInterface $e) { |
96 | 96 | $this->logger->logException($e, [ |
97 | - 'message' => 'Could not load user-status provider dynamically: ' . $e->getMessage(), |
|
97 | + 'message' => 'Could not load user-status provider dynamically: '.$e->getMessage(), |
|
98 | 98 | 'level' => ILogger::ERROR, |
99 | 99 | ]); |
100 | 100 | return; |
@@ -285,10 +285,10 @@ discard block |
||
285 | 285 | |
286 | 286 | if ($search !== '') { |
287 | 287 | $query->where($query->expr()->iLike('gid', $query->createNamedParameter( |
288 | - '%' . $this->dbConn->escapeLikeParameter($search) . '%' |
|
288 | + '%'.$this->dbConn->escapeLikeParameter($search).'%' |
|
289 | 289 | ))); |
290 | 290 | $query->orWhere($query->expr()->iLike('displayname', $query->createNamedParameter( |
291 | - '%' . $this->dbConn->escapeLikeParameter($search) . '%' |
|
291 | + '%'.$this->dbConn->escapeLikeParameter($search).'%' |
|
292 | 292 | ))); |
293 | 293 | } |
294 | 294 | |
@@ -363,9 +363,9 @@ discard block |
||
363 | 363 | // sqlite doesn't like re-using a single named parameter here |
364 | 364 | ->andWhere( |
365 | 365 | $query->expr()->orX( |
366 | - $query->expr()->ilike('g.uid', $query->createNamedParameter('%' . $this->dbConn->escapeLikeParameter($search) . '%')), |
|
367 | - $query->expr()->ilike('u.displayname', $query->createNamedParameter('%' . $this->dbConn->escapeLikeParameter($search) . '%')), |
|
368 | - $query->expr()->ilike('p.configvalue', $query->createNamedParameter('%' . $this->dbConn->escapeLikeParameter($search) . '%')) |
|
366 | + $query->expr()->ilike('g.uid', $query->createNamedParameter('%'.$this->dbConn->escapeLikeParameter($search).'%')), |
|
367 | + $query->expr()->ilike('u.displayname', $query->createNamedParameter('%'.$this->dbConn->escapeLikeParameter($search).'%')), |
|
368 | + $query->expr()->ilike('p.configvalue', $query->createNamedParameter('%'.$this->dbConn->escapeLikeParameter($search).'%')) |
|
369 | 369 | ) |
370 | 370 | ) |
371 | 371 | ->orderBy('u.uid_lower', 'ASC'); |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | |
406 | 406 | if ($search !== '') { |
407 | 407 | $query->andWhere($query->expr()->like('uid', $query->createNamedParameter( |
408 | - '%' . $this->dbConn->escapeLikeParameter($search) . '%' |
|
408 | + '%'.$this->dbConn->escapeLikeParameter($search).'%' |
|
409 | 409 | ))); |
410 | 410 | } |
411 | 411 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $result->closeCursor(); |
415 | 415 | |
416 | 416 | if ($count !== false) { |
417 | - $count = (int)$count; |
|
417 | + $count = (int) $count; |
|
418 | 418 | } else { |
419 | 419 | $count = 0; |
420 | 420 | } |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | $this->fixDI(); |
434 | 434 | |
435 | 435 | $query = $this->dbConn->getQueryBuilder(); |
436 | - $query->select($query->createFunction('COUNT(DISTINCT ' . $query->getColumnName('uid') . ')')) |
|
436 | + $query->select($query->createFunction('COUNT(DISTINCT '.$query->getColumnName('uid').')')) |
|
437 | 437 | ->from('preferences', 'p') |
438 | 438 | ->innerJoin('p', 'group_user', 'g', $query->expr()->eq('p.userid', 'g.uid')) |
439 | 439 | ->where($query->expr()->eq('appid', $query->createNamedParameter('core'))) |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $result->closeCursor(); |
447 | 447 | |
448 | 448 | if ($count !== false) { |
449 | - $count = (int)$count; |
|
449 | + $count = (int) $count; |
|
450 | 450 | } else { |
451 | 451 | $count = 0; |
452 | 452 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | continue; |
83 | 83 | } |
84 | 84 | |
85 | - if (strpos($query->getRoute(), $entry['id'] . '.') === 0) { |
|
85 | + if (strpos($query->getRoute(), $entry['id'].'.') === 0) { |
|
86 | 86 | // Skip the current app, unlikely this is intended |
87 | 87 | continue; |
88 | 88 | } |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | |
107 | 107 | public function getEvents(): array { |
108 | 108 | return [ |
109 | - new GenericEntityEvent($this->l10n->t('File created'), self::EVENT_NAMESPACE . 'postCreate'), |
|
110 | - new GenericEntityEvent($this->l10n->t('File updated'), self::EVENT_NAMESPACE . 'postWrite'), |
|
111 | - new GenericEntityEvent($this->l10n->t('File renamed'), self::EVENT_NAMESPACE . 'postRename'), |
|
112 | - new GenericEntityEvent($this->l10n->t('File deleted'), self::EVENT_NAMESPACE . 'postDelete'), |
|
113 | - new GenericEntityEvent($this->l10n->t('File accessed'), self::EVENT_NAMESPACE . 'postTouch'), |
|
114 | - new GenericEntityEvent($this->l10n->t('File copied'), self::EVENT_NAMESPACE . 'postCopy'), |
|
109 | + new GenericEntityEvent($this->l10n->t('File created'), self::EVENT_NAMESPACE.'postCreate'), |
|
110 | + new GenericEntityEvent($this->l10n->t('File updated'), self::EVENT_NAMESPACE.'postWrite'), |
|
111 | + new GenericEntityEvent($this->l10n->t('File renamed'), self::EVENT_NAMESPACE.'postRename'), |
|
112 | + new GenericEntityEvent($this->l10n->t('File deleted'), self::EVENT_NAMESPACE.'postDelete'), |
|
113 | + new GenericEntityEvent($this->l10n->t('File accessed'), self::EVENT_NAMESPACE.'postTouch'), |
|
114 | + new GenericEntityEvent($this->l10n->t('File copied'), self::EVENT_NAMESPACE.'postCopy'), |
|
115 | 115 | new GenericEntityEvent($this->l10n->t('Tag assigned'), MapperEvent::EVENT_ASSIGN), |
116 | 116 | ]; |
117 | 117 | } |
@@ -156,19 +156,19 @@ discard block |
||
156 | 156 | throw new NotFoundException(); |
157 | 157 | } |
158 | 158 | switch ($this->eventName) { |
159 | - case self::EVENT_NAMESPACE . 'postCreate': |
|
160 | - case self::EVENT_NAMESPACE . 'postWrite': |
|
161 | - case self::EVENT_NAMESPACE . 'postDelete': |
|
162 | - case self::EVENT_NAMESPACE . 'postTouch': |
|
159 | + case self::EVENT_NAMESPACE.'postCreate': |
|
160 | + case self::EVENT_NAMESPACE.'postWrite': |
|
161 | + case self::EVENT_NAMESPACE.'postDelete': |
|
162 | + case self::EVENT_NAMESPACE.'postTouch': |
|
163 | 163 | return $this->event->getSubject(); |
164 | - case self::EVENT_NAMESPACE . 'postRename': |
|
165 | - case self::EVENT_NAMESPACE . 'postCopy': |
|
164 | + case self::EVENT_NAMESPACE.'postRename': |
|
165 | + case self::EVENT_NAMESPACE.'postCopy': |
|
166 | 166 | return $this->event->getSubject()[1]; |
167 | 167 | case MapperEvent::EVENT_ASSIGN: |
168 | 168 | if (!$this->event instanceof MapperEvent || $this->event->getObjectType() !== 'files') { |
169 | 169 | throw new NotFoundException(); |
170 | 170 | } |
171 | - $nodes = $this->root->getById((int)$this->event->getObjectId()); |
|
171 | + $nodes = $this->root->getById((int) $this->event->getObjectId()); |
|
172 | 172 | if (is_array($nodes) && isset($nodes[0])) { |
173 | 173 | $this->node = $nodes[0]; |
174 | 174 | return $this->node; |
@@ -191,17 +191,17 @@ discard block |
||
191 | 191 | ]; |
192 | 192 | |
193 | 193 | switch ($this->eventName) { |
194 | - case self::EVENT_NAMESPACE . 'postCreate': |
|
194 | + case self::EVENT_NAMESPACE.'postCreate': |
|
195 | 195 | return $this->l10n->t('%s created %s', $options); |
196 | - case self::EVENT_NAMESPACE . 'postWrite': |
|
196 | + case self::EVENT_NAMESPACE.'postWrite': |
|
197 | 197 | return $this->l10n->t('%s modified %s', $options); |
198 | - case self::EVENT_NAMESPACE . 'postDelete': |
|
198 | + case self::EVENT_NAMESPACE.'postDelete': |
|
199 | 199 | return $this->l10n->t('%s deleted %s', $options); |
200 | - case self::EVENT_NAMESPACE . 'postTouch': |
|
200 | + case self::EVENT_NAMESPACE.'postTouch': |
|
201 | 201 | return $this->l10n->t('%s accessed %s', $options); |
202 | - case self::EVENT_NAMESPACE . 'postRename': |
|
202 | + case self::EVENT_NAMESPACE.'postRename': |
|
203 | 203 | return $this->l10n->t('%s renamed %s', $options); |
204 | - case self::EVENT_NAMESPACE . 'postCopy': |
|
204 | + case self::EVENT_NAMESPACE.'postCopy': |
|
205 | 205 | return $this->l10n->t('%s copied %s', $options); |
206 | 206 | case MapperEvent::EVENT_ASSIGN: |
207 | 207 | $tagNames = []; |
@@ -34,11 +34,11 @@ |
||
34 | 34 | if (!isset($params['internal-id'])) { |
35 | 35 | throw new \Exception('missing id in parameters'); |
36 | 36 | } |
37 | - $this->internalId = (string)$params['internal-id']; |
|
37 | + $this->internalId = (string) $params['internal-id']; |
|
38 | 38 | parent::__construct($params); |
39 | 39 | } |
40 | 40 | |
41 | 41 | public function getId() { |
42 | - return 'object::appdata::preview:' . $this->internalId; |
|
42 | + return 'object::appdata::preview:'.$this->internalId; |
|
43 | 43 | } |
44 | 44 | } |