kamermans / guzzle-oauth2-subscriber

OAuth 2.0 Client for Guzzle 4, 5, 6 and 7 with PHP 5.4 - PHP 8.0 - no more dependency hell!
MIT License
140 stars 31 forks source link

Return type of the restoreToken function, in the TokenPersistenceInterface can't be null #56

Closed GabGr25 closed 6 months ago

GabGr25 commented 11 months ago

We can see here, the restoreToken function must return sometimes null.

InUse

But in the TokenPersistenceInterface, we can see the return type of the function restoreToken is just TokenInterface.

TokenPersistenceInterface

An example, in this implementation of the TokenPersistenceInterface, where the return type is null.

NullTokenPersistence

I create this issues because i have a Psalm error.

Capture d’écran 2023-11-30 à 10 00 31

kamermans commented 6 months ago

Good point, I'll release this shortly!