@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | $matches = []; |
| 293 | 293 | foreach ($userMatches as $phone => $userId) { |
| 294 | 294 | // Not using the ICloudIdManager as that would run a search for each contact to find the display name in the address book |
| 295 | - $matches[$normalizedNumberToKey[$phone]] = $userId . '@' . $cloudUrl; |
|
| 295 | + $matches[$normalizedNumberToKey[$phone]] = $userId.'@'.$cloudUrl; |
|
| 296 | 296 | $this->knownUserService->storeIsKnownToUser($knownTo, $userId); |
| 297 | 297 | } |
| 298 | 298 | |
@@ -355,10 +355,10 @@ discard block |
||
| 355 | 355 | if ($groups !== []) { |
| 356 | 356 | foreach ($groups as $group) { |
| 357 | 357 | if (!$this->groupManager->groupExists($group)) { |
| 358 | - throw new OCSException('group ' . $group . ' does not exist', 104); |
|
| 358 | + throw new OCSException('group '.$group.' does not exist', 104); |
|
| 359 | 359 | } |
| 360 | 360 | if (!$isAdmin && !$subAdminManager->isSubAdminOfGroup($user, $this->groupManager->get($group))) { |
| 361 | - throw new OCSException('insufficient privileges for group ' . $group, 105); |
|
| 361 | + throw new OCSException('insufficient privileges for group '.$group, 105); |
|
| 362 | 362 | } |
| 363 | 363 | } |
| 364 | 364 | } else { |
@@ -417,11 +417,11 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | try { |
| 419 | 419 | $newUser = $this->userManager->createUser($userid, $password); |
| 420 | - $this->logger->info('Successful addUser call with userid: ' . $userid, ['app' => 'ocs_api']); |
|
| 420 | + $this->logger->info('Successful addUser call with userid: '.$userid, ['app' => 'ocs_api']); |
|
| 421 | 421 | |
| 422 | 422 | foreach ($groups as $group) { |
| 423 | 423 | $this->groupManager->get($group)->addUser($newUser); |
| 424 | - $this->logger->info('Added userid ' . $userid . ' to group ' . $group, ['app' => 'ocs_api']); |
|
| 424 | + $this->logger->info('Added userid '.$userid.' to group '.$group, ['app' => 'ocs_api']); |
|
| 425 | 425 | } |
| 426 | 426 | foreach ($subadminGroups as $group) { |
| 427 | 427 | $subAdminManager->createSubAdmin($newUser, $group); |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | if ($targetUser->getUID() === $currentLoggedInUser->getUID()) { |
| 662 | 662 | // Editing self (display, email) |
| 663 | 663 | $permittedFields[] = IAccountManager::COLLECTION_EMAIL; |
| 664 | - $permittedFields[] = IAccountManager::COLLECTION_EMAIL . self::SCOPE_SUFFIX; |
|
| 664 | + $permittedFields[] = IAccountManager::COLLECTION_EMAIL.self::SCOPE_SUFFIX; |
|
| 665 | 665 | } else { |
| 666 | 666 | // Check if admin / subadmin |
| 667 | 667 | if ($isAdminOrSubadmin) { |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | $this->accountManager->updateAccount($userAccount); |
| 695 | 695 | break; |
| 696 | 696 | |
| 697 | - case IAccountManager::COLLECTION_EMAIL . self::SCOPE_SUFFIX: |
|
| 697 | + case IAccountManager::COLLECTION_EMAIL.self::SCOPE_SUFFIX: |
|
| 698 | 698 | $userAccount = $this->accountManager->getAccount($targetUser); |
| 699 | 699 | $mailCollection = $userAccount->getPropertyCollection(IAccountManager::COLLECTION_EMAIL); |
| 700 | 700 | $targetProperty = null; |
@@ -757,8 +757,8 @@ discard block |
||
| 757 | 757 | $permittedFields[] = IAccountManager::PROPERTY_EMAIL; |
| 758 | 758 | } |
| 759 | 759 | |
| 760 | - $permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME . self::SCOPE_SUFFIX; |
|
| 761 | - $permittedFields[] = IAccountManager::PROPERTY_EMAIL . self::SCOPE_SUFFIX; |
|
| 760 | + $permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME.self::SCOPE_SUFFIX; |
|
| 761 | + $permittedFields[] = IAccountManager::PROPERTY_EMAIL.self::SCOPE_SUFFIX; |
|
| 762 | 762 | |
| 763 | 763 | $permittedFields[] = IAccountManager::COLLECTION_EMAIL; |
| 764 | 764 | |
@@ -788,18 +788,18 @@ discard block |
||
| 788 | 788 | $permittedFields[] = IAccountManager::PROPERTY_HEADLINE; |
| 789 | 789 | $permittedFields[] = IAccountManager::PROPERTY_BIOGRAPHY; |
| 790 | 790 | $permittedFields[] = IAccountManager::PROPERTY_PROFILE_ENABLED; |
| 791 | - $permittedFields[] = IAccountManager::PROPERTY_PHONE . self::SCOPE_SUFFIX; |
|
| 792 | - $permittedFields[] = IAccountManager::PROPERTY_ADDRESS . self::SCOPE_SUFFIX; |
|
| 793 | - $permittedFields[] = IAccountManager::PROPERTY_WEBSITE . self::SCOPE_SUFFIX; |
|
| 794 | - $permittedFields[] = IAccountManager::PROPERTY_TWITTER . self::SCOPE_SUFFIX; |
|
| 795 | - $permittedFields[] = IAccountManager::PROPERTY_FEDIVERSE . self::SCOPE_SUFFIX; |
|
| 796 | - $permittedFields[] = IAccountManager::PROPERTY_ORGANISATION . self::SCOPE_SUFFIX; |
|
| 797 | - $permittedFields[] = IAccountManager::PROPERTY_ROLE . self::SCOPE_SUFFIX; |
|
| 798 | - $permittedFields[] = IAccountManager::PROPERTY_HEADLINE . self::SCOPE_SUFFIX; |
|
| 799 | - $permittedFields[] = IAccountManager::PROPERTY_BIOGRAPHY . self::SCOPE_SUFFIX; |
|
| 800 | - $permittedFields[] = IAccountManager::PROPERTY_PROFILE_ENABLED . self::SCOPE_SUFFIX; |
|
| 801 | - |
|
| 802 | - $permittedFields[] = IAccountManager::PROPERTY_AVATAR . self::SCOPE_SUFFIX; |
|
| 791 | + $permittedFields[] = IAccountManager::PROPERTY_PHONE.self::SCOPE_SUFFIX; |
|
| 792 | + $permittedFields[] = IAccountManager::PROPERTY_ADDRESS.self::SCOPE_SUFFIX; |
|
| 793 | + $permittedFields[] = IAccountManager::PROPERTY_WEBSITE.self::SCOPE_SUFFIX; |
|
| 794 | + $permittedFields[] = IAccountManager::PROPERTY_TWITTER.self::SCOPE_SUFFIX; |
|
| 795 | + $permittedFields[] = IAccountManager::PROPERTY_FEDIVERSE.self::SCOPE_SUFFIX; |
|
| 796 | + $permittedFields[] = IAccountManager::PROPERTY_ORGANISATION.self::SCOPE_SUFFIX; |
|
| 797 | + $permittedFields[] = IAccountManager::PROPERTY_ROLE.self::SCOPE_SUFFIX; |
|
| 798 | + $permittedFields[] = IAccountManager::PROPERTY_HEADLINE.self::SCOPE_SUFFIX; |
|
| 799 | + $permittedFields[] = IAccountManager::PROPERTY_BIOGRAPHY.self::SCOPE_SUFFIX; |
|
| 800 | + $permittedFields[] = IAccountManager::PROPERTY_PROFILE_ENABLED.self::SCOPE_SUFFIX; |
|
| 801 | + |
|
| 802 | + $permittedFields[] = IAccountManager::PROPERTY_AVATAR.self::SCOPE_SUFFIX; |
|
| 803 | 803 | |
| 804 | 804 | // If admin they can edit their own quota |
| 805 | 805 | if ($this->groupManager->isAdmin($currentLoggedInUser->getUID())) { |
@@ -865,14 +865,14 @@ discard block |
||
| 865 | 865 | $quota = \OCP\Util::computerFileSize($quota); |
| 866 | 866 | } |
| 867 | 867 | if ($quota === false) { |
| 868 | - throw new OCSException('Invalid quota value ' . $value, 102); |
|
| 868 | + throw new OCSException('Invalid quota value '.$value, 102); |
|
| 869 | 869 | } |
| 870 | 870 | if ($quota === -1) { |
| 871 | 871 | $quota = 'none'; |
| 872 | 872 | } else { |
| 873 | 873 | $maxQuota = (int) $this->config->getAppValue('files', 'max_quota', '-1'); |
| 874 | 874 | if ($maxQuota !== -1 && $quota > $maxQuota) { |
| 875 | - throw new OCSException('Invalid quota value. ' . $value . ' is exceeding the maximum quota', 102); |
|
| 875 | + throw new OCSException('Invalid quota value. '.$value.' is exceeding the maximum quota', 102); |
|
| 876 | 876 | } |
| 877 | 877 | $quota = \OCP\Util::humanFileSize($quota); |
| 878 | 878 | } |
@@ -973,7 +973,7 @@ discard block |
||
| 973 | 973 | $this->knownUserService->deleteByContactUserId($targetUser->getUID()); |
| 974 | 974 | } |
| 975 | 975 | } catch (InvalidArgumentException $e) { |
| 976 | - throw new OCSException('Invalid ' . $e->getMessage(), 102); |
|
| 976 | + throw new OCSException('Invalid '.$e->getMessage(), 102); |
|
| 977 | 977 | } |
| 978 | 978 | } |
| 979 | 979 | } catch (PropertyDoesNotExistException $e) { |
@@ -982,7 +982,7 @@ discard block |
||
| 982 | 982 | try { |
| 983 | 983 | $this->accountManager->updateAccount($userAccount); |
| 984 | 984 | } catch (InvalidArgumentException $e) { |
| 985 | - throw new OCSException('Invalid ' . $e->getMessage(), 102); |
|
| 985 | + throw new OCSException('Invalid '.$e->getMessage(), 102); |
|
| 986 | 986 | } |
| 987 | 987 | break; |
| 988 | 988 | case IAccountManager::PROPERTY_PROFILE_ENABLED: |
@@ -997,19 +997,19 @@ discard block |
||
| 997 | 997 | } |
| 998 | 998 | $this->accountManager->updateAccount($userAccount); |
| 999 | 999 | break; |
| 1000 | - case IAccountManager::PROPERTY_DISPLAYNAME . self::SCOPE_SUFFIX: |
|
| 1001 | - case IAccountManager::PROPERTY_EMAIL . self::SCOPE_SUFFIX: |
|
| 1002 | - case IAccountManager::PROPERTY_PHONE . self::SCOPE_SUFFIX: |
|
| 1003 | - case IAccountManager::PROPERTY_ADDRESS . self::SCOPE_SUFFIX: |
|
| 1004 | - case IAccountManager::PROPERTY_WEBSITE . self::SCOPE_SUFFIX: |
|
| 1005 | - case IAccountManager::PROPERTY_TWITTER . self::SCOPE_SUFFIX: |
|
| 1006 | - case IAccountManager::PROPERTY_FEDIVERSE . self::SCOPE_SUFFIX: |
|
| 1007 | - case IAccountManager::PROPERTY_ORGANISATION . self::SCOPE_SUFFIX: |
|
| 1008 | - case IAccountManager::PROPERTY_ROLE . self::SCOPE_SUFFIX: |
|
| 1009 | - case IAccountManager::PROPERTY_HEADLINE . self::SCOPE_SUFFIX: |
|
| 1010 | - case IAccountManager::PROPERTY_BIOGRAPHY . self::SCOPE_SUFFIX: |
|
| 1011 | - case IAccountManager::PROPERTY_PROFILE_ENABLED . self::SCOPE_SUFFIX: |
|
| 1012 | - case IAccountManager::PROPERTY_AVATAR . self::SCOPE_SUFFIX: |
|
| 1000 | + case IAccountManager::PROPERTY_DISPLAYNAME.self::SCOPE_SUFFIX: |
|
| 1001 | + case IAccountManager::PROPERTY_EMAIL.self::SCOPE_SUFFIX: |
|
| 1002 | + case IAccountManager::PROPERTY_PHONE.self::SCOPE_SUFFIX: |
|
| 1003 | + case IAccountManager::PROPERTY_ADDRESS.self::SCOPE_SUFFIX: |
|
| 1004 | + case IAccountManager::PROPERTY_WEBSITE.self::SCOPE_SUFFIX: |
|
| 1005 | + case IAccountManager::PROPERTY_TWITTER.self::SCOPE_SUFFIX: |
|
| 1006 | + case IAccountManager::PROPERTY_FEDIVERSE.self::SCOPE_SUFFIX: |
|
| 1007 | + case IAccountManager::PROPERTY_ORGANISATION.self::SCOPE_SUFFIX: |
|
| 1008 | + case IAccountManager::PROPERTY_ROLE.self::SCOPE_SUFFIX: |
|
| 1009 | + case IAccountManager::PROPERTY_HEADLINE.self::SCOPE_SUFFIX: |
|
| 1010 | + case IAccountManager::PROPERTY_BIOGRAPHY.self::SCOPE_SUFFIX: |
|
| 1011 | + case IAccountManager::PROPERTY_PROFILE_ENABLED.self::SCOPE_SUFFIX: |
|
| 1012 | + case IAccountManager::PROPERTY_AVATAR.self::SCOPE_SUFFIX: |
|
| 1013 | 1013 | $propertyName = substr($key, 0, strlen($key) - strlen(self::SCOPE_SUFFIX)); |
| 1014 | 1014 | $userAccount = $this->accountManager->getAccount($targetUser); |
| 1015 | 1015 | $userProperty = $userAccount->getProperty($propertyName); |
@@ -1018,7 +1018,7 @@ discard block |
||
| 1018 | 1018 | $userProperty->setScope($value); |
| 1019 | 1019 | $this->accountManager->updateAccount($userAccount); |
| 1020 | 1020 | } catch (InvalidArgumentException $e) { |
| 1021 | - throw new OCSException('Invalid ' . $e->getMessage(), 102); |
|
| 1021 | + throw new OCSException('Invalid '.$e->getMessage(), 102); |
|
| 1022 | 1022 | } |
| 1023 | 1023 | } |
| 1024 | 1024 | break; |
@@ -1273,7 +1273,7 @@ discard block |
||
| 1273 | 1273 | } elseif (!$this->groupManager->isAdmin($loggedInUser->getUID())) { |
| 1274 | 1274 | /** @var IGroup[] $subAdminGroups */ |
| 1275 | 1275 | $subAdminGroups = $subAdminManager->getSubAdminsGroups($loggedInUser); |
| 1276 | - $subAdminGroups = array_map(function (IGroup $subAdminGroup) { |
|
| 1276 | + $subAdminGroups = array_map(function(IGroup $subAdminGroup) { |
|
| 1277 | 1277 | return $subAdminGroup->getGID(); |
| 1278 | 1278 | }, $subAdminGroups); |
| 1279 | 1279 | $userGroups = $this->groupManager->getUserGroupIds($targetUser); |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | if ($now - $previousLogin > 60) { |
| 255 | 255 | $this->lastLogin = time(); |
| 256 | 256 | $this->config->setUserValue( |
| 257 | - $this->uid, 'login', 'lastLogin', (string)$this->lastLogin); |
|
| 257 | + $this->uid, 'login', 'lastLogin', (string) $this->lastLogin); |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | return $firstTimeLogin; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | */ |
| 268 | 268 | public function delete() { |
| 269 | 269 | /** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */ |
| 270 | - $this->legacyDispatcher->dispatch(IUser::class . '::preDelete', new GenericEvent($this)); |
|
| 270 | + $this->legacyDispatcher->dispatch(IUser::class.'::preDelete', new GenericEvent($this)); |
|
| 271 | 271 | if ($this->emitter) { |
| 272 | 272 | /** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */ |
| 273 | 273 | $this->emitter->emit('\OC\User', 'preDelete', [$this]); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $accountManager->deleteUser($this); |
| 307 | 307 | |
| 308 | 308 | /** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */ |
| 309 | - $this->legacyDispatcher->dispatch(IUser::class . '::postDelete', new GenericEvent($this)); |
|
| 309 | + $this->legacyDispatcher->dispatch(IUser::class.'::postDelete', new GenericEvent($this)); |
|
| 310 | 310 | if ($this->emitter) { |
| 311 | 311 | /** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */ |
| 312 | 312 | $this->emitter->emit('\OC\User', 'postDelete', [$this]); |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | * @return bool |
| 325 | 325 | */ |
| 326 | 326 | public function setPassword($password, $recoveryPassword = null) { |
| 327 | - $this->legacyDispatcher->dispatch(IUser::class . '::preSetPassword', new GenericEvent($this, [ |
|
| 327 | + $this->legacyDispatcher->dispatch(IUser::class.'::preSetPassword', new GenericEvent($this, [ |
|
| 328 | 328 | 'password' => $password, |
| 329 | 329 | 'recoveryPassword' => $recoveryPassword, |
| 330 | 330 | ])); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $result = $backend->setPassword($this->uid, $password); |
| 338 | 338 | |
| 339 | 339 | if ($result !== false) { |
| 340 | - $this->legacyDispatcher->dispatch(IUser::class . '::postSetPassword', new GenericEvent($this, [ |
|
| 340 | + $this->legacyDispatcher->dispatch(IUser::class.'::postSetPassword', new GenericEvent($this, [ |
|
| 341 | 341 | 'password' => $password, |
| 342 | 342 | 'recoveryPassword' => $recoveryPassword, |
| 343 | 343 | ])); |
@@ -363,9 +363,9 @@ discard block |
||
| 363 | 363 | if (($this->backend instanceof IGetHomeBackend || $this->backend->implementsActions(Backend::GET_HOME)) && $home = $this->backend->getHome($this->uid)) { |
| 364 | 364 | $this->home = $home; |
| 365 | 365 | } elseif ($this->config) { |
| 366 | - $this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $this->uid; |
|
| 366 | + $this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$this->uid; |
|
| 367 | 367 | } else { |
| 368 | - $this->home = \OC::$SERVERROOT . '/data/' . $this->uid; |
|
| 368 | + $this->home = \OC::$SERVERROOT.'/data/'.$this->uid; |
|
| 369 | 369 | } |
| 370 | 370 | } |
| 371 | 371 | return $this->home; |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | $this->config->setUserValue($this->uid, 'files', 'quota', $quota); |
| 530 | 530 | $this->triggerChange('quota', $quota, $oldQuota); |
| 531 | 531 | } |
| 532 | - \OC_Helper::clearStorageInfo('/' . $this->uid . '/files'); |
|
| 532 | + \OC_Helper::clearStorageInfo('/'.$this->uid.'/files'); |
|
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | /** |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | $server = substr($server, 0, -10); |
| 568 | 568 | } |
| 569 | 569 | $server = $this->removeProtocolFromUrl($server); |
| 570 | - return $uid . '@' . $server; |
|
| 570 | + return $uid.'@'.$server; |
|
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | private function removeProtocolFromUrl(string $url): string { |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | public function triggerChange($feature, $value = null, $oldValue = null) { |
| 582 | - $this->legacyDispatcher->dispatch(IUser::class . '::changeUser', new GenericEvent($this, [ |
|
| 582 | + $this->legacyDispatcher->dispatch(IUser::class.'::changeUser', new GenericEvent($this, [ |
|
| 583 | 583 | 'feature' => $feature, |
| 584 | 584 | 'value' => $value, |
| 585 | 585 | 'oldValue' => $oldValue, |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * Makes 2048 to 2 kB. |
| 67 | 67 | */ |
| 68 | - public static function humanFileSize(int|float $bytes): string { |
|
| 68 | + public static function humanFileSize(int | float $bytes): string { |
|
| 69 | 69 | if ($bytes < 0) { |
| 70 | 70 | return "?"; |
| 71 | 71 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * |
| 103 | 103 | * Inspired by: https://www.php.net/manual/en/function.filesize.php#92418 |
| 104 | 104 | */ |
| 105 | - public static function computerFileSize(string $str): false|int|float { |
|
| 105 | + public static function computerFileSize(string $str): false | int | float { |
|
| 106 | 106 | $str = strtolower($str); |
| 107 | 107 | if (is_numeric($str)) { |
| 108 | 108 | return Util::numericToNumber($str); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | 'p' => 1024 * 1024 * 1024 * 1024 * 1024, |
| 123 | 123 | ]; |
| 124 | 124 | |
| 125 | - $bytes = (float)$str; |
|
| 125 | + $bytes = (float) $str; |
|
| 126 | 126 | |
| 127 | 127 | if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && !empty($bytes_array[$matches[1]])) { |
| 128 | 128 | $bytes *= $bytes_array[$matches[1]]; |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | } |
| 236 | 236 | foreach ($dirs as $dir) { |
| 237 | 237 | foreach ($exts as $ext) { |
| 238 | - if ($check_fn("$dir/$name" . $ext)) { |
|
| 238 | + if ($check_fn("$dir/$name".$ext)) { |
|
| 239 | 239 | return true; |
| 240 | 240 | } |
| 241 | 241 | } |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | $ext = ''; |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | - $newpath = $path . '/' . $filename; |
|
| 310 | + $newpath = $path.'/'.$filename; |
|
| 311 | 311 | if ($view->file_exists($newpath)) { |
| 312 | 312 | if (preg_match_all('/\((\d+)\)/', $name, $matches, PREG_OFFSET_CAPTURE)) { |
| 313 | 313 | //Replace the last "(number)" with "(number+1)" |
@@ -323,11 +323,11 @@ discard block |
||
| 323 | 323 | do { |
| 324 | 324 | if ($offset) { |
| 325 | 325 | //Replace the last "(number)" with "(number+1)" |
| 326 | - $newname = substr_replace($name, '(' . $counter . ')', $offset, $match_length); |
|
| 326 | + $newname = substr_replace($name, '('.$counter.')', $offset, $match_length); |
|
| 327 | 327 | } else { |
| 328 | - $newname = $name . ' (' . $counter . ')'; |
|
| 328 | + $newname = $name.' ('.$counter.')'; |
|
| 329 | 329 | } |
| 330 | - $newpath = $path . '/' . $newname . $ext; |
|
| 330 | + $newpath = $path.'/'.$newname.$ext; |
|
| 331 | 331 | $counter++; |
| 332 | 332 | } while ($view->file_exists($newpath)); |
| 333 | 333 | } |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $freeSpace = max($freeSpace, 0); |
| 409 | 409 | return $freeSpace; |
| 410 | 410 | } else { |
| 411 | - return (INF > 0)? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 |
|
| 411 | + return (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 |
|
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | } |
| 476 | 476 | $fullPath = Filesystem::normalizePath($view->getAbsolutePath($path)); |
| 477 | 477 | |
| 478 | - $cacheKey = $fullPath. '::' . ($includeMountPoints ? 'include' : 'exclude'); |
|
| 478 | + $cacheKey = $fullPath.'::'.($includeMountPoints ? 'include' : 'exclude'); |
|
| 479 | 479 | if ($useCache) { |
| 480 | 480 | $cached = $memcache->get($cacheKey); |
| 481 | 481 | if ($cached) { |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | /** |
| 582 | 582 | * Get storage info including all mount points and quota |
| 583 | 583 | */ |
| 584 | - private static function getGlobalStorageInfo(int|float $quota, IUser $user, IMountPoint $mount): array { |
|
| 584 | + private static function getGlobalStorageInfo(int | float $quota, IUser $user, IMountPoint $mount): array { |
|
| 585 | 585 | $rootInfo = \OC\Files\Filesystem::getFileInfo('', 'ext'); |
| 586 | 586 | $used = $rootInfo['size']; |
| 587 | 587 | if ($used < 0) { |
@@ -624,9 +624,9 @@ discard block |
||
| 624 | 624 | /** @var ICacheFactory $cacheFactory */ |
| 625 | 625 | $cacheFactory = \OC::$server->get(ICacheFactory::class); |
| 626 | 626 | $memcache = $cacheFactory->createLocal('storage_info'); |
| 627 | - $cacheKeyPrefix = Filesystem::normalizePath($absolutePath) . '::'; |
|
| 628 | - $memcache->remove($cacheKeyPrefix . 'include'); |
|
| 629 | - $memcache->remove($cacheKeyPrefix . 'exclude'); |
|
| 627 | + $cacheKeyPrefix = Filesystem::normalizePath($absolutePath).'::'; |
|
| 628 | + $memcache->remove($cacheKeyPrefix.'include'); |
|
| 629 | + $memcache->remove($cacheKeyPrefix.'exclude'); |
|
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | /** |