Skip to content

Commit f8b53a3

Browse files
committed
Psalm comments.
1 parent 287da8b commit f8b53a3

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/Services/AuthService.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
use Illuminate\Support\Facades\Password;
2121
use ReflectionException;
2222

23-
/**
24-
* @author Eduard Lupacescu <[email protected]>
25-
*/
2623
class AuthService extends RestifyService
2724
{
2825
public function login(Request $request)
@@ -46,22 +43,12 @@ public function forgotPassword(Request $request)
4643
return ForgotPasswordService::make($request);
4744
}
4845

49-
/*
50-
* @param $id
51-
* @param null $hash
52-
* @return Builder|Builder[]|\Illuminate\Database\Eloquent\Collection|Model|null
53-
* @throws AuthorizationException
54-
* @throws EntityNotFoundException
55-
* @throws PassportUserException
56-
*/
5746
public function verify($id, $hash = null)
5847
{
59-
/**
60-
* @var Authenticatable
61-
*/
48+
/** * @var Authenticatable */
6249
$user = $this->userQuery()->query()->find($id);
6350

64-
if ($user instanceof Sanctumable && ! hash_equals((string) $hash, sha1($user->getEmailForVerification()))) {
51+
if ($user instanceof Sanctumable && ! hash_equals((string)$hash, sha1($user->getEmailForVerification()))) {
6552
throw new AuthorizationException('Invalid hash');
6653
}
6754

0 commit comments

Comments
 (0)