@@ -53,9 +53,9 @@ public function __construct(string $cacheKeyPrefix = null, int $expiresInSeconds
53
53
*
54
54
* @return \Laravel\Passport\Token
55
55
*/
56
- public function find ($ id )
56
+ public function find ($ id ): Token
57
57
{
58
- return $ this ->store ()->remember (
58
+ return $ this ->cacheStore ()->remember (
59
59
$ this ->itemKey ($ id ),
60
60
\now ()->addSeconds ($ this ->expiresInSeconds ),
61
61
function () use ($ id ) {
@@ -72,9 +72,9 @@ function () use ($id) {
72
72
*
73
73
* @return \Laravel\Passport\Token|null
74
74
*/
75
- public function findForUser ($ id , $ userId )
75
+ public function findForUser ($ id , $ userId ): ? Token
76
76
{
77
- return $ this ->store ()->remember (
77
+ return $ this ->cacheStore ()->remember (
78
78
$ this ->itemKey ($ id ),
79
79
\now ()->addSeconds ($ this ->expiresInSeconds ),
80
80
function () use ($ id , $ userId ) {
@@ -92,7 +92,7 @@ function () use ($id, $userId) {
92
92
*/
93
93
public function forUser ($ userId ): Collection
94
94
{
95
- return $ this ->store ()->remember (
95
+ return $ this ->cacheStore ()->remember (
96
96
$ this ->itemKey ($ userId ),
97
97
\now ()->addSeconds ($ this ->expiresInSeconds ),
98
98
function () use ($ userId ) {
@@ -109,9 +109,9 @@ function () use ($userId) {
109
109
*
110
110
* @return \Laravel\Passport\Token|null
111
111
*/
112
- public function getValidToken ($ user , $ client )
112
+ public function getValidToken ($ user , $ client ): ? Token
113
113
{
114
- return $ this ->store ()->remember (
114
+ return $ this ->cacheStore ()->remember (
115
115
$ this ->itemKey ($ user ->getKey ()),
116
116
\now ()->addSeconds ($ this ->expiresInSeconds ),
117
117
function () use ($ client , $ user ) {
@@ -124,22 +124,22 @@ function () use ($client, $user) {
124
124
);
125
125
}
126
126
127
- public function itemKey (string $ key )
127
+ public function itemKey (string $ key ): string
128
128
{
129
129
return $ this ->cacheKeyPrefix . $ key ;
130
130
}
131
131
132
- public function store (): Repository
132
+ public function cacheStore (): Repository
133
133
{
134
134
$ store = Cache::store ($ this ->cacheStore );
135
135
136
- return $ store instanceof TaggableStore ? $ store ->tags ($ this ->cacheTags ) : $ store ;
136
+ return $ store-> getStore () instanceof TaggableStore ? $ store ->tags ($ this ->cacheTags ) : $ store ;
137
137
}
138
138
139
139
public function revokeAccessToken ($ id )
140
140
{
141
141
parent ::revokeAccessToken ($ id );
142
142
143
- $ this ->store ()->forget ($ this ->itemKey ($ id ));
143
+ $ this ->cacheStore ()->forget ($ this ->itemKey ($ id ));
144
144
}
145
145
}
0 commit comments