@@ -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 | } |
@@ -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 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | $result = []; |
117 | 117 | foreach ($storagesByMountpoint as $storageList) { |
118 | - $storage = array_reduce($storageList, function ($carry, $item) { |
|
118 | + $storage = array_reduce($storageList, function($carry, $item) { |
|
119 | 119 | if (isset($carry)) { |
120 | 120 | $carryPriorityType = $this->getPriorityType($carry); |
121 | 121 | $itemPriorityType = $this->getPriorityType($item); |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | $groupIds = $this->groupManager->getUserGroupIds($user); |
192 | 192 | $mounts = $this->dbConfig->getMountsForUser($user->getUID(), $groupIds); |
193 | 193 | $configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts); |
194 | - $configs = array_filter($configs, function ($config) { |
|
194 | + $configs = array_filter($configs, function($config) { |
|
195 | 195 | return $config instanceof StorageConfig; |
196 | 196 | }); |
197 | 197 | |
198 | - $keys = array_map(function (StorageConfig $config) { |
|
198 | + $keys = array_map(function(StorageConfig $config) { |
|
199 | 199 | return $config->getId(); |
200 | 200 | }, $configs); |
201 | 201 |
@@ -54,10 +54,10 @@ |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | protected function run($argument) { |
57 | - $this->userManager->callForSeenUsers(function (IUser $user) { |
|
57 | + $this->userManager->callForSeenUsers(function(IUser $user) { |
|
58 | 58 | $storages = $this->userGlobalStoragesService->getAllStoragesForUser($user); |
59 | 59 | |
60 | - $usesLoginCredentials = array_reduce($storages, function (bool $uses, StorageConfig $storage) { |
|
60 | + $usesLoginCredentials = array_reduce($storages, function(bool $uses, StorageConfig $storage) { |
|
61 | 61 | return $uses || $storage->getAuthMechanism() instanceof LoginCredentials; |
62 | 62 | }, false); |
63 | 63 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | // pre and post-rename, disable trash logic for the copy+unlink case |
67 | 67 | \OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook'); |
68 | 68 | |
69 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
69 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
70 | 70 | $l = \OC::$server->getL10N('files_trashbin'); |
71 | 71 | return [ |
72 | 72 | 'id' => 'trashbin', |