Skip to content

Commit

Permalink
Apply fixes from StyleCI (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0wik authored Feb 2, 2023
1 parent be1a1c6 commit 3fc95d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
21 changes: 8 additions & 13 deletions src/FirebaseAuthenticable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ trait FirebaseAuthenticable
/**
* Get User by claim.
*
* @param array $claims
*
* @param array $claims
* @return self
*/
public function resolveByClaims(array $claims): object
Expand All @@ -37,9 +36,8 @@ public function resolveByClaims(array $claims): object
/**
* Update or create user.
*
* @param int|string $id
* @param array $attributes
*
* @param int|string $id
* @param array $attributes
* @return self
*/
public function updateOrCreateUser($id, array $attributes): object
Expand All @@ -65,8 +63,7 @@ public function updateOrCreateUser($id, array $attributes): object
/**
* Transform claims to attributes.
*
* @param array $claims
*
* @param array $claims
* @return array
*/
public function transformClaims(array $claims): array
Expand All @@ -75,11 +72,11 @@ public function transformClaims(array $claims): array
'email' => (string) $claims['email'],
];

if (!empty($claims['name'])) {
if (! empty($claims['name'])) {
$attributes['name'] = (string) $claims['name'];
}

if (!empty($claims['picture'])) {
if (! empty($claims['picture'])) {
$attributes['picture'] = (string) $claims['picture'];
}

Expand All @@ -89,8 +86,7 @@ public function transformClaims(array $claims): array
/**
* Set firebase token.
*
* @param string $token
*
* @param string $token
* @return self
*/
public function setFirebaseAuthenticationToken($token)
Expand Down Expand Up @@ -153,8 +149,7 @@ public function getRememberToken()
/**
* Set the token value for the "remember me" session.
*
* @param string $value
*
* @param string $value
* @return void
*/
public function setRememberToken($value)
Expand Down
6 changes: 2 additions & 4 deletions src/FirebaseGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class FirebaseGuard
/**
* Constructor.
*
* @param Verifier $verifier
*
* @param Verifier $verifier
* @return void
*/
public function __construct(Verifier $verifier)
Expand All @@ -27,8 +26,7 @@ public function __construct(Verifier $verifier)
/**
* Get User by request claims.
*
* @param Request $request
*
* @param Request $request
* @return mixed|null
*/
public function user(Request $request)
Expand Down
5 changes: 2 additions & 3 deletions src/Http/Middleware/AddAccessTokenFromCookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ class AddAccessTokenFromCookie
/**
* Store token from cookie in authorization header.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
Expand Down

0 comments on commit 3fc95d6

Please sign in to comment.