diff options
Diffstat (limited to 'apps/settings/lib')
-rw-r--r-- | apps/settings/lib/Activity/GroupProvider.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/Activity/Provider.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/Activity/SecurityProvider.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/Controller/ChangePasswordController.php | 4 | ||||
-rw-r--r-- | apps/settings/lib/Controller/UsersController.php | 4 | ||||
-rw-r--r-- | apps/settings/lib/Mailer/NewUserMailHelper.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/SetupChecks/PhpOpcacheSetup.php | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/apps/settings/lib/Activity/GroupProvider.php b/apps/settings/lib/Activity/GroupProvider.php index 32e6438d972..15b26128890 100644 --- a/apps/settings/lib/Activity/GroupProvider.php +++ b/apps/settings/lib/Activity/GroupProvider.php @@ -64,7 +64,7 @@ class GroupProvider implements IProvider { $this->groupManager = $groupManager; } - public function parse($language, IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, ?IEvent $previousEvent = null) { if ($event->getType() !== 'group_settings') { throw new InvalidArgumentException(); } diff --git a/apps/settings/lib/Activity/Provider.php b/apps/settings/lib/Activity/Provider.php index 001f75ba5e6..e10e55b5750 100644 --- a/apps/settings/lib/Activity/Provider.php +++ b/apps/settings/lib/Activity/Provider.php @@ -83,7 +83,7 @@ class Provider implements IProvider { * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent { + public function parse($language, IEvent $event, ?IEvent $previousEvent = null): IEvent { if ($event->getApp() !== 'settings') { throw new \InvalidArgumentException('Unknown app'); } diff --git a/apps/settings/lib/Activity/SecurityProvider.php b/apps/settings/lib/Activity/SecurityProvider.php index cdf7b80298d..f847a53d4bf 100644 --- a/apps/settings/lib/Activity/SecurityProvider.php +++ b/apps/settings/lib/Activity/SecurityProvider.php @@ -51,7 +51,7 @@ class SecurityProvider implements IProvider { $this->activityManager = $activityManager; } - public function parse($language, IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, ?IEvent $previousEvent = null) { if ($event->getType() !== 'security') { throw new InvalidArgumentException(); } diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php index 50d72e582dd..f9fa07ed73a 100644 --- a/apps/settings/lib/Controller/ChangePasswordController.php +++ b/apps/settings/lib/Controller/ChangePasswordController.php @@ -79,7 +79,7 @@ class ChangePasswordController extends Controller { * @NoSubAdminRequired * @BruteForceProtection(action=changePersonalPassword) */ - public function changePersonalPassword(string $oldpassword = '', string $newpassword = null): JSONResponse { + public function changePersonalPassword(string $oldpassword = '', ?string $newpassword = null): JSONResponse { $loginName = $this->userSession->getLoginName(); /** @var IUser $user */ $user = $this->userManager->checkPassword($loginName, $oldpassword); @@ -127,7 +127,7 @@ class ChangePasswordController extends Controller { * @NoAdminRequired * @PasswordConfirmationRequired */ - public function changeUserPassword(string $username = null, string $password = null, string $recoveryPassword = null): JSONResponse { + public function changeUserPassword(?string $username = null, ?string $password = null, ?string $recoveryPassword = null): JSONResponse { if ($username === null) { return new JSONResponse([ 'status' => 'error', diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 10b8f690812..2cfe9d515bf 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -391,10 +391,10 @@ class UsersController extends Controller { continue; } $property = $userAccount->getProperty($property); - if (null !== $data['value']) { + if ($data['value'] !== null) { $property->setValue($data['value']); } - if (null !== $data['scope']) { + if ($data['scope'] !== null) { $property->setScope($data['scope']); } } diff --git a/apps/settings/lib/Mailer/NewUserMailHelper.php b/apps/settings/lib/Mailer/NewUserMailHelper.php index 2d41577f554..03c5f4bc3ac 100644 --- a/apps/settings/lib/Mailer/NewUserMailHelper.php +++ b/apps/settings/lib/Mailer/NewUserMailHelper.php @@ -108,7 +108,7 @@ class NewUserMailHelper { ISecureRandom::CHAR_ALPHANUMERIC ); $tokenValue = $this->timeFactory->getTime() . ':' . $token; - $mailAddress = (null !== $user->getEMailAddress()) ? $user->getEMailAddress() : ''; + $mailAddress = ($user->getEMailAddress() !== null) ? $user->getEMailAddress() : ''; $encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress . $this->config->getSystemValue('secret')); $this->config->setUserValue($user->getUID(), 'core', 'lostpassword', $encryptedValue); $link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', ['userId' => $user->getUID(), 'token' => $token]); diff --git a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php index 07e4b513497..c6f5c9802ca 100644 --- a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php +++ b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php @@ -104,7 +104,7 @@ class PhpOpcacheSetup implements ISetupCheck { if ( // Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size - ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?? 0 < $this->iniGetWrapper->getNumeric('opcache.memory_consumption') ?? 0 / 4) && + ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?? $this->iniGetWrapper->getNumeric('opcache.memory_consumption') > 0 ?? 0 / 4) && ( empty($status['interned_strings_usage']['free_memory']) || ($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9) |