public function notify(Report $report, callable $callback = null)
    {
        $this->pipeline->execute($report, function ($report) use ($callback) {
            if ($callback) {
                $resolvedReport = null;

                $bridge = new CallbackBridge($callback);
                $bridge($report, function ($report) use (&$resolvedReport) {
                    $resolvedReport = $report;
                });
                if ($resolvedReport) {
                    $report = $resolvedReport;
                } else {
                    return;
                }
            }

            $this->http->queue($report);
        });

        $this->leaveBreadcrumb($report->getName(), Breadcrumb::ERROR_TYPE, $report->getSummary());

        if (!$this->config->isBatchSending()) {
            $this->flush();
        }
    }
public function notify(Report $report, callable $callback = null)
    {
        $this->pipeline->execute($report, function ($report) use ($callback) {
            if ($callback) {
                $resolvedReport = null;

                $bridge = new CallbackBridge($callback);
                $bridge($report, function ($report) use (&$resolvedReport) {
                    $resolvedReport = $report;
                });
                if ($resolvedReport) {
                    $report = $resolvedReport;
                } else {
                    return;
                }
            }

            $this->http->queue($report);
        });

        $this->leaveBreadcrumb($report->getName(), Breadcrumb::ERROR_TYPE, $report->getSummary());

        if (!$this->config->isBatchSending()) {
            $this->flush();
        }
    }
public function notify ( Report $ report , callable $ callback = null ) { $ this -> pipeline -> execute ( $ report , function ( $ report ) use ( $ callback ) { if ( $ callback ) { $ resolvedReport = null ; $ bridge = new CallbackBridge ( $ callback ) ; $ bridge ( $ report , function ( $ report ) use ( & $ resolvedReport ) { $ resolvedReport = $ report ; } ) ; if ( $ resolvedReport ) { $ report = $ resolvedReport ; } else { return ; } } $ this -> http -> queue ( $ report ) ; } ) ; $ this -> leaveBreadcrumb ( $ report -> getName ( ) , Breadcrumb :: ERROR_TYPE , $ report -> getSummary ( ) ) ; if ( ! $ this -> config -> isBatchSending ( ) ) { $ this -> flush ( ) ; } }
Notify Bugsnag of the given error report.

This may simply involve queuing it for later if we're batching.

@param \Bugsnag\Report $report   the error report to send
@param callable|null   $callback the customization callback

@return void
Notify Bugsnag of the given error report .