public function addBreadcrumb(Breadcrumb $breadcrumb)
    {
        $data = $breadcrumb->toArray();

        if ($metaData = $this->cleanupObj($breadcrumb->getMetaData(), true)) {
            $data['metaData'] = $metaData;

            if (strlen(json_encode($data)) > Breadcrumb::MAX_SIZE) {
                unset($data['metaData']);
            }
        }

        $this->breadcrumbs[] = $data;
    }
public function addBreadcrumb(Breadcrumb $breadcrumb)
    {
        $data = $breadcrumb->toArray();

        if ($metaData = $this->cleanupObj($breadcrumb->getMetaData(), true)) {
            $data['metaData'] = $metaData;

            if (strlen(json_encode($data)) > Breadcrumb::MAX_SIZE) {
                unset($data['metaData']);
            }
        }

        $this->breadcrumbs[] = $data;
    }
public function addBreadcrumb ( Breadcrumb $ breadcrumb ) { $ data = $ breadcrumb -> toArray ( ) ; if ( $ metaData = $ this -> cleanupObj ( $ breadcrumb -> getMetaData ( ) , true ) ) { $ data [ 'metaData' ] = $ metaData ; if ( strlen ( json_encode ( $ data ) ) > Breadcrumb :: MAX_SIZE ) { unset ( $ data [ 'metaData' ] ) ; } } $ this -> breadcrumbs [ ] = $ data ; }
Add a breadcrumb to the report.

@param \Bugsnag\Breadcrumbs\Breadcrumb $breadcrumb

@return void
Add a breadcrumb to the report .