@@ -53,9 +53,9 @@ public function __construct(string $cacheKeyPrefix = null, int $expiresInSeconds
5353 *
5454 * @return \Laravel\Passport\Token
5555 */
56- public function find ($ id )
56+ public function find ($ id ): Token
5757 {
58- return $ this ->store ()->remember (
58+ return $ this ->cacheStore ()->remember (
5959 $ this ->itemKey ($ id ),
6060 \now ()->addSeconds ($ this ->expiresInSeconds ),
6161 function () use ($ id ) {
@@ -72,9 +72,9 @@ function () use ($id) {
7272 *
7373 * @return \Laravel\Passport\Token|null
7474 */
75- public function findForUser ($ id , $ userId )
75+ public function findForUser ($ id , $ userId ): ? Token
7676 {
77- return $ this ->store ()->remember (
77+ return $ this ->cacheStore ()->remember (
7878 $ this ->itemKey ($ id ),
7979 \now ()->addSeconds ($ this ->expiresInSeconds ),
8080 function () use ($ id , $ userId ) {
@@ -92,7 +92,7 @@ function () use ($id, $userId) {
9292 */
9393 public function forUser ($ userId ): Collection
9494 {
95- return $ this ->store ()->remember (
95+ return $ this ->cacheStore ()->remember (
9696 $ this ->itemKey ($ userId ),
9797 \now ()->addSeconds ($ this ->expiresInSeconds ),
9898 function () use ($ userId ) {
@@ -109,9 +109,9 @@ function () use ($userId) {
109109 *
110110 * @return \Laravel\Passport\Token|null
111111 */
112- public function getValidToken ($ user , $ client )
112+ public function getValidToken ($ user , $ client ): ? Token
113113 {
114- return $ this ->store ()->remember (
114+ return $ this ->cacheStore ()->remember (
115115 $ this ->itemKey ($ user ->getKey ()),
116116 \now ()->addSeconds ($ this ->expiresInSeconds ),
117117 function () use ($ client , $ user ) {
@@ -124,22 +124,22 @@ function () use ($client, $user) {
124124 );
125125 }
126126
127- public function itemKey (string $ key )
127+ public function itemKey (string $ key ): string
128128 {
129129 return $ this ->cacheKeyPrefix . $ key ;
130130 }
131131
132- public function store (): Repository
132+ public function cacheStore (): Repository
133133 {
134134 $ store = Cache::store ($ this ->cacheStore );
135135
136- return $ store instanceof TaggableStore ? $ store ->tags ($ this ->cacheTags ) : $ store ;
136+ return $ store-> getStore () instanceof TaggableStore ? $ store ->tags ($ this ->cacheTags ) : $ store ;
137137 }
138138
139139 public function revokeAccessToken ($ id )
140140 {
141141 parent ::revokeAccessToken ($ id );
142142
143- $ this ->store ()->forget ($ this ->itemKey ($ id ));
143+ $ this ->cacheStore ()->forget ($ this ->itemKey ($ id ));
144144 }
145145}
0 commit comments