diff options
author | Faraz Samapoor <f.samapoor@gmail.com> | 2023-06-23 23:03:56 +0330 |
---|---|---|
committer | Faraz Samapoor <fsa@adlas.at> | 2023-06-23 23:03:56 +0330 |
commit | e98cf3c37481ef92fbb2f50de16ea00d2958f3c3 (patch) | |
tree | cba89a58c0a9634e8d687a4d99a29b4158fa6aa8 /core/Events | |
parent | 877ddd28277e6bd263832209f4d22e713b4bdd87 (diff) | |
download | nextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.tar.gz nextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.zip |
Uses PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/Events')
-rw-r--r-- | core/Events/BeforePasswordResetEvent.php | 10 | ||||
-rw-r--r-- | core/Events/PasswordResetEvent.php | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/core/Events/BeforePasswordResetEvent.php b/core/Events/BeforePasswordResetEvent.php index d560a723dde..15f6344fa24 100644 --- a/core/Events/BeforePasswordResetEvent.php +++ b/core/Events/BeforePasswordResetEvent.php @@ -35,16 +35,14 @@ use OCP\IUser; * @since 25.0.0 */ class BeforePasswordResetEvent extends Event { - private IUser $user; - private string $password; - /** * @since 25.0.0 */ - public function __construct(IUser $user, string $password) { + public function __construct( + private IUser $user, + private string $password, + ) { parent::__construct(); - $this->user = $user; - $this->password = $password; } /** diff --git a/core/Events/PasswordResetEvent.php b/core/Events/PasswordResetEvent.php index 8846004920c..1c3d0398ff0 100644 --- a/core/Events/PasswordResetEvent.php +++ b/core/Events/PasswordResetEvent.php @@ -35,16 +35,14 @@ use OCP\IUser; * @since 25.0.0 */ class PasswordResetEvent extends Event { - private IUser $user; - private string $password; - /** * @since 25.0.0 */ - public function __construct(IUser $user, string $password) { + public function __construct( + private IUser $user, + private string $password, + ) { parent::__construct(); - $this->user = $user; - $this->password = $password; } /** |