public function compose($keyId = null, $head = null) {
        if (!$this->payload)
            throw new \Firebase\JWT\BeforeValidException(ExceptionMessages::JWT_PAYLOAD_NOT_FOUND);

        return parent::encode($this->payload, $this->key, $this->algorithm, $keyId, $head);
    }
public function compose($keyId = null, $head = null) {
        if (!$this->payload)
            throw new \Firebase\JWT\BeforeValidException(ExceptionMessages::JWT_PAYLOAD_NOT_FOUND);

        return parent::encode($this->payload, $this->key, $this->algorithm, $keyId, $head);
    }
public function compose ( $ keyId = null , $ head = null ) { if ( ! $ this -> payload ) throw new \ Firebase \ JWT \ BeforeValidException ( ExceptionMessages :: JWT_PAYLOAD_NOT_FOUND ) ; return parent :: encode ( $ this -> payload , $ this -> key , $ this -> algorithm , $ keyId , $ head ) ; }
Composes and signs the JWT

@param mixed $keyId
@param mixed $head
@return string
@throws \Firebase\JWT\BeforeValidException
Composes and signs the JWT