From b0c97e767e3fa49ef8069e7115f8765f304489ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Wed, 18 Aug 2021 21:36:02 +0200 Subject: [PATCH] InjectDefault: Codestyle. --- src/User/Entity/CmsUser.php | 7 ++++++- src/User/Entity/User.php | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/User/Entity/CmsUser.php b/src/User/Entity/CmsUser.php index 01933e0..58740b5 100644 --- a/src/User/Entity/CmsUser.php +++ b/src/User/Entity/CmsUser.php @@ -14,7 +14,12 @@ interface CmsUser extends IIdentity // Constructor will be reverted in Doctrine 3.0 // public function __construct(string $username, string $password, string $email, string $role = self::ROLE_USER); - public function injectDefault(string $username, string $password, string $email, string $role = self::ROLE_USER): void; + public function injectDefault( + string $username, + string $password, + string $email, + string $role = self::ROLE_USER, + ): void; /** * @return string[] diff --git a/src/User/Entity/User.php b/src/User/Entity/User.php index ac832cd..34ede2c 100644 --- a/src/User/Entity/User.php +++ b/src/User/Entity/User.php @@ -118,8 +118,12 @@ public function __construct(string $username, string $password, string $email, s } - public function injectDefault(string $username, string $password, string $email, string $role = self::ROLE_USER): void - { + public function injectDefault( + string $username, + string $password, + string $email, + string $role = self::ROLE_USER, + ): void { $this->username = trim(Strings::lower($username)); $this->password = $password ? (new Passwords)->hash($password)