diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index b8e3304c3..47831d3b7 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -11,7 +11,6 @@ class AuthController extends RestController public function __construct(AuthService $authService) { - $this->authService = $authService; } diff --git a/src/Exceptions/SanctumUserException.php b/src/Exceptions/SanctumUserException.php index a8263d71b..ac97e7280 100644 --- a/src/Exceptions/SanctumUserException.php +++ b/src/Exceptions/SanctumUserException.php @@ -11,6 +11,6 @@ class SanctumUserException extends Exception { public static function wrongConfiguration() { - return new static("Auth provider should be [sanctum] in the configuration [restify.auth.provider]."); + return new static('Auth provider should be [sanctum] in the configuration [restify.auth.provider].'); } } diff --git a/src/Services/AuthService.php b/src/Services/AuthService.php index 1f4c0f9cd..e74819e52 100644 --- a/src/Services/AuthService.php +++ b/src/Services/AuthService.php @@ -44,7 +44,6 @@ public function forgotPassword(Request $request) return ForgotPasswordService::make($request); } - /* * @param $id * @param null $hash @@ -60,7 +59,7 @@ public function verify($id, $hash = null) */ $user = $this->userQuery()->query()->find($id); - if ($user instanceof Sanctumable && !hash_equals((string)$hash, sha1($user->getEmailForVerification()))) { + if ($user instanceof Sanctumable && ! hash_equals((string) $hash, sha1($user->getEmailForVerification()))) { throw new AuthorizationException('Invalid hash'); } diff --git a/src/Services/ForgotPasswordService.php b/src/Services/ForgotPasswordService.php index 930e77a55..a0c96245c 100644 --- a/src/Services/ForgotPasswordService.php +++ b/src/Services/ForgotPasswordService.php @@ -6,7 +6,6 @@ use Illuminate\Http\Request; /** - * @package Binaryk\LaravelRestify\Services; * @author Eduard Lupacescu */ class ForgotPasswordService diff --git a/src/Services/LoginService.php b/src/Services/LoginService.php index e9a46872a..9966b6557 100644 --- a/src/Services/LoginService.php +++ b/src/Services/LoginService.php @@ -6,7 +6,6 @@ use Illuminate\Http\Request; /** - * @package Binaryk\LaravelRestify\Services; * @author Eduard Lupacescu */ class LoginService diff --git a/src/Services/LogoutService.php b/src/Services/LogoutService.php index d383efbfb..72b36a8bb 100644 --- a/src/Services/LogoutService.php +++ b/src/Services/LogoutService.php @@ -10,7 +10,6 @@ use Illuminate\Support\Facades\Auth; /** - * @package Binaryk\LaravelRestify\Services; * @author Eduard Lupacescu */ class LogoutService diff --git a/src/Services/PassportService.php b/src/Services/PassportService.php index e3360dadc..dbe2fd5b6 100644 --- a/src/Services/PassportService.php +++ b/src/Services/PassportService.php @@ -21,7 +21,7 @@ class PassportService extends RestifyService { /** - * Create user token based on credentials + * Create user token based on credentials. * * @param array $credentials * @return string|null diff --git a/src/Services/RegisterService.php b/src/Services/RegisterService.php index 482993dec..3647075c7 100644 --- a/src/Services/RegisterService.php +++ b/src/Services/RegisterService.php @@ -15,12 +15,10 @@ use ReflectionException; /** - * @package Binaryk\LaravelRestify\Services; * @author Eduard Lupacescu */ class RegisterService { - /** * The callback that should be used to create the registered user. * @@ -80,5 +78,4 @@ public function validateRegister(array $payload) return true; } - } diff --git a/src/Services/ResetPasswordService.php b/src/Services/ResetPasswordService.php index 4eba3d863..2b3f8c13a 100644 --- a/src/Services/ResetPasswordService.php +++ b/src/Services/ResetPasswordService.php @@ -6,7 +6,6 @@ use Illuminate\Http\Request; /** - * @package Binaryk\LaravelRestify\Services; * @author Eduard Lupacescu */ class ResetPasswordService diff --git a/tests/AuthServiceLoginTest.php b/tests/AuthServiceLoginTest.php index 8567d068d..8fb340655 100644 --- a/tests/AuthServiceLoginTest.php +++ b/tests/AuthServiceLoginTest.php @@ -5,10 +5,10 @@ use Binaryk\LaravelRestify\Contracts\Passportable; use Binaryk\LaravelRestify\Events\UserLoggedIn; use Binaryk\LaravelRestify\Events\UserLogout; -use Binaryk\LaravelRestify\Exceptions\SanctumUserException; use Binaryk\LaravelRestify\Exceptions\AuthenticatableUserException; use Binaryk\LaravelRestify\Exceptions\CredentialsDoesntMatch; use Binaryk\LaravelRestify\Exceptions\PassportUserException; +use Binaryk\LaravelRestify\Exceptions\SanctumUserException; use Binaryk\LaravelRestify\Exceptions\UnverifiedUser; use Binaryk\LaravelRestify\Services\AuthService; use Binaryk\LaravelRestify\Tests\Fixtures\SimpleUser as User;