From c915e7d68f98b4365f3a53ffca5f381bbf72ef20 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sun, 12 Nov 2017 18:42:00 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Exceptions/CannotCreateUser.php | 4 ++-- app/User.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Exceptions/CannotCreateUser.php b/app/Exceptions/CannotCreateUser.php index cb2acbe37..c97f5486a 100644 --- a/app/Exceptions/CannotCreateUser.php +++ b/app/Exceptions/CannotCreateUser.php @@ -6,12 +6,12 @@ class CannotCreateUser extends Exception { - public static function duplicateEmailAddress(string $emailAddress): CannotCreateUser + public static function duplicateEmailAddress(string $emailAddress): self { return new static("The email address [$emailAddress] already exists."); } - public static function duplicateUsername(string $username): CannotCreateUser + public static function duplicateUsername(string $username): self { return new static("The username [$username] already exists."); } diff --git a/app/User.php b/app/User.php index f2999939b..0dbf4faf2 100644 --- a/app/User.php +++ b/app/User.php @@ -216,17 +216,17 @@ public function countSolutions(): int })->count(); } - public static function findByUsername(string $username): User + public static function findByUsername(string $username): self { return static::where('username', $username)->firstOrFail(); } - public static function findByEmailAddress(string $emailAddress): User + public static function findByEmailAddress(string $emailAddress): self { return static::where('email', $emailAddress)->firstOrFail(); } - public static function findByGithubId(string $githubId): User + public static function findByGithubId(string $githubId): self { return static::where('github_id', $githubId)->firstOrFail(); }