Skip to content

Commit 2b0e5f9

Browse files
authored
Merge pull request #47 from kidunot89/patch-1
Fixes Type hinting
2 parents 042e9d7 + 546ad9f commit 2b0e5f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ManageTokens.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static function add_user_fields( $fields ) {
156156
$fields['jwtAuthExpiration'] = [
157157
'type' => Types::string(),
158158
'description' => __( 'The expiration for the JWT Token for the user. If not set custom for the user, it will use the default sitewide expiration setting', 'wp-graphql-jwt-authentication' ),
159-
'resolve' => function ( \WP_User $user ) {
159+
'resolve' => function () {
160160
$expiration = Auth::get_token_expiration();
161161

162162
return ! empty( $expiration ) ? $expiration : null;
@@ -166,7 +166,7 @@ public static function add_user_fields( $fields ) {
166166
$fields['isJwtAuthSecretRevoked'] = [
167167
'type' => Types::non_null( Types::boolean() ),
168168
'description' => __( 'Whether the JWT User secret has been revoked. If the secret has been revoked, auth tokens will not be issued until an admin, or user with proper capabilities re-issues a secret for the user.', 'wp-graphql-jwt-authentication' ),
169-
'resolve' => function ( \WP_User $user ) {
169+
'resolve' => function ( User $user ) {
170170
$revoked = Auth::is_jwt_secret_revoked( $user->ID );
171171

172172
return true == $revoked ? true : false;

0 commit comments

Comments
 (0)