public function isExpired()
    {
        if (null === $this->created || 0 === $this->lifetime) {
            throw new \LogicException(
                'Cannot define if token is expired, created datetime or/and lifetime are missing.'
            );
        }

        return time() > strtotime($this->created) + $this->lifetime;
    }
public function isExpired()
    {
        if (null === $this->created || 0 === $this->lifetime) {
            throw new \LogicException(
                'Cannot define if token is expired, created datetime or/and lifetime are missing.'
            );
        }

        return time() > strtotime($this->created) + $this->lifetime;
    }
public function isExpired ( ) { if ( null === $ this -> created || 0 === $ this -> lifetime ) { throw new \ LogicException ( 'Cannot define if token is expired, created datetime or/and lifetime are missing.' ) ; } return time ( ) > strtotime ( $ this -> created ) + $ this -> lifetime ; }
Returns true if current token is expired by comparing current timestamp
with token created datetime and its max lifetime.

@return boolean
@throws \LogicException if token max lifetime or/and token created datetime are not setted
Returns true if current token is expired by comparing current timestamp with token created datetime and its max lifetime .