public function isTokenValid(string $token): bool
    {
        $tokenData = $this->decryptToken($token);

        return is_array($tokenData)
            && isset(
                $tokenData['user_id'],
                $tokenData['generated'],
                $tokenData['validForSeconds']
            );
    }
public function isTokenValid(string $token): bool
    {
        $tokenData = $this->decryptToken($token);

        return is_array($tokenData)
            && isset(
                $tokenData['user_id'],
                $tokenData['generated'],
                $tokenData['validForSeconds']
            );
    }
public function isTokenValid ( string $ token ) : bool { $ tokenData = $ this -> decryptToken ( $ token ) ; return is_array ( $ tokenData ) && isset ( $ tokenData [ 'user_id' ] , $ tokenData [ 'generated' ] , $ tokenData [ 'validForSeconds' ] ) ; }
Checks if the given token is valid, meaning it is valid by format. This method
does not check the validity

@param string $token The string token
@return bool
Checks if the given token is valid meaning it is valid by format . This method does not check the validity