Laracasts\Behat\Context\Services\MailTrap::fetchInbox PHP Method

fetchInbox() protected method

Fetch a MailTrap inbox.
protected fetchInbox ( integer | null $inboxId = null ) : mixed
$inboxId integer | null
return mixed
    protected function fetchInbox($inboxId = null)
    {
        if (!$this->alreadyConfigured()) {
            $this->applyMailTrapConfiguration($inboxId);
        }
        $body = $this->requestClient()->get($this->getMailTrapMessagesUrl())->getBody();
        return $this->parseJson($body);
    }