public function getEnvelope(): Envelope
    {
        if (null === $this->envelope) {
            throw new MissingEnvelopeException('No Envelope provided! Provide one beforehand');
        }

        // Check for recipients
        if (empty($this->envelope->getRecipients())) {
            throw new MissingRecipientException('No recipients provided! Add them beforehand');
        }

        return $this->envelope;
    }
public function getEnvelope(): Envelope
    {
        if (null === $this->envelope) {
            throw new MissingEnvelopeException('No Envelope provided! Provide one beforehand');
        }

        // Check for recipients
        if (empty($this->envelope->getRecipients())) {
            throw new MissingRecipientException('No recipients provided! Add them beforehand');
        }

        return $this->envelope;
    }
public function getEnvelope ( ) : Envelope { if ( null === $ this -> envelope ) { throw new MissingEnvelopeException ( 'No Envelope provided! Provide one beforehand' ) ; } // Check for recipients if ( empty ( $ this -> envelope -> getRecipients ( ) ) ) { throw new MissingRecipientException ( 'No recipients provided! Add them beforehand' ) ; } return $ this -> envelope ; }
Get the envelope

@return Envelope
@throws MissingEnvelopeException If the envelope is missing
@throws MissingRecipientException If there are no recipients
Get the envelope