protected function build()
    {
        $events = [];

        foreach ($this->queue as $report) {
            $event = $report->toArray();

            if ($event) {
                $events[] = $event;
            }
        }

        return [
            'apiKey' => $this->config->getApiKey(),
            'notifier' => $this->config->getNotifier(),
            'events' => $events,
        ];
    }
protected function build()
    {
        $events = [];

        foreach ($this->queue as $report) {
            $event = $report->toArray();

            if ($event) {
                $events[] = $event;
            }
        }

        return [
            'apiKey' => $this->config->getApiKey(),
            'notifier' => $this->config->getNotifier(),
            'events' => $events,
        ];
    }
protected function build ( ) { $ events = [ ] ; foreach ( $ this -> queue as $ report ) { $ event = $ report -> toArray ( ) ; if ( $ event ) { $ events [ ] = $ event ; } } return [ 'apiKey' => $ this -> config -> getApiKey ( ) , 'notifier' => $ this -> config -> getNotifier ( ) , 'events' => $ events , ] ; }
Build the request data to send.

@return array
Build the request data to send .