diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-23 15:10:27 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-25 19:34:58 +0200 |
commit | af6de04e9e141466dc229e444ff3f146f4a34765 (patch) | |
tree | 7b93f521865cdecdadb33637dea33bea242e7969 /apps/provisioning_api/lib | |
parent | 1cc6b3577fdbeadece7e4e6478e7f7755555b41a (diff) | |
download | nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.tar.gz nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.zip |
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/provisioning_api/lib')
4 files changed, 8 insertions, 7 deletions
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 8879672c561..44087a91791 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -262,7 +262,7 @@ abstract class AUserData extends OCSController { ]; } catch (\Exception $e) { \OC::$server->get(\Psr\Log\LoggerInterface::class)->error( - "Could not load storage info for {user}", + 'Could not load storage info for {user}', [ 'app' => 'provisioning_api', 'user' => $userId, diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index 2ff82213997..5061a0ffc8f 100644 --- a/apps/provisioning_api/lib/Controller/AppConfigController.php +++ b/apps/provisioning_api/lib/Controller/AppConfigController.php @@ -113,7 +113,7 @@ class AppConfigController extends OCSController { public function setValue(string $app, string $key, string $value): DataResponse { $user = $this->userSession->getUser(); if ($user === null) { - throw new \Exception("User is not logged in."); // Should not happen, since method is guarded by middleware + throw new \Exception('User is not logged in.'); // Should not happen, since method is guarded by middleware } if (!$this->isAllowedToChangedKey($user, $app, $key)) { diff --git a/apps/provisioning_api/lib/Controller/PreferencesController.php b/apps/provisioning_api/lib/Controller/PreferencesController.php index affacb4fb32..2a31e076c83 100644 --- a/apps/provisioning_api/lib/Controller/PreferencesController.php +++ b/apps/provisioning_api/lib/Controller/PreferencesController.php @@ -134,6 +134,7 @@ class PreferencesController extends OCSController { * @param string[] $configKeys Keys to delete * * @return DataResponse<Http::STATUS_OK|Http::STATUS_BAD_REQUEST, array<empty>, array{}> + * * 200: Preferences deleted successfully * 400: Preference invalid */ diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index b0ddd4329af..4cab2341b00 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -167,7 +167,7 @@ class UsersController extends AUserData { $usersDetails = []; foreach ($users as $userId) { - $userId = (string) $userId; + $userId = (string)$userId; try { $userData = $this->getUserData($userId); } catch (OCSNotFoundException $e) { @@ -360,7 +360,7 @@ class UsersController extends AUserData { foreach ($phoneNumbers as $phone) { $normalizedNumber = $this->phoneNumberUtil->convertToStandardFormat($phone, $location); if ($normalizedNumber !== null) { - $normalizedNumberToKey[$normalizedNumber] = (string) $key; + $normalizedNumberToKey[$normalizedNumber] = (string)$key; } if ($defaultPhoneRegion !== '' && $defaultPhoneRegion !== $location && str_starts_with($phone, '0')) { @@ -369,7 +369,7 @@ class UsersController extends AUserData { // when it's different to the user's given region. $normalizedNumber = $this->phoneNumberUtil->convertToStandardFormat($phone, $defaultPhoneRegion); if ($normalizedNumber !== null) { - $normalizedNumberToKey[$normalizedNumber] = (string) $key; + $normalizedNumberToKey[$normalizedNumber] = (string)$key; } } } @@ -1023,7 +1023,7 @@ class UsersController extends AUserData { $quota = $value; if ($quota !== 'none' && $quota !== 'default') { if (is_numeric($quota)) { - $quota = (float) $quota; + $quota = (float)$quota; } else { $quota = \OCP\Util::computerFileSize($quota); } @@ -1033,7 +1033,7 @@ class UsersController extends AUserData { if ($quota === -1) { $quota = 'none'; } else { - $maxQuota = (int) $this->config->getAppValue('files', 'max_quota', '-1'); + $maxQuota = (int)$this->config->getAppValue('files', 'max_quota', '-1'); if ($maxQuota !== -1 && $quota > $maxQuota) { throw new OCSException($this->l10n->t('Invalid quota value. %1$s is exceeding the maximum quota', [$value]), 102); } |