src/Jobs/EsiBase.php
public function logWarnings(EsiResponse $response): void
    {

        if (! is_null($response->pages) && $this->page === null) {

            $this->eseye()->getLogger()->warning('Response contained pages but none was expected');

            dispatch((new Analytics((new AnalyticsContainer)
                ->set('type', 'endpoint_warning')
                ->set('ec', 'unexpected_page')
                ->set('el', $this->version)
                ->set('ev', $this->endpoint))));
        }

        if (! is_null($this->page) && $response->pages === null) {

            $this->eseye()->getLogger()->warning('Expected a paged response but had none');

            dispatch((new Analytics((new AnalyticsContainer)
                ->set('type', 'endpoint_warning')
                ->set('ec', 'missing_pages')
                ->set('el', $this->version)
                ->set('ev', $this->endpoint))));
        }

        if (array_key_exists('Warning', $response->headers)) {

            $this->eseye()->getLogger()->warning('A response contained a warning: ' .
                $response->headers['Warning']);

            dispatch((new Analytics((new AnalyticsContainer)
                ->set('type', 'generic_warning')
                ->set('ec', 'missing_pages')
                ->set('el', $this->endpoint)
                ->set('ev', $response->headers['Warning']))));
        }
    }
public function logWarnings(EsiResponse $response): void
    {

        if (! is_null($response->pages) && $this->page === null) {

            $this->eseye()->getLogger()->warning('Response contained pages but none was expected');

            dispatch((new Analytics((new AnalyticsContainer)
                ->set('type', 'endpoint_warning')
                ->set('ec', 'unexpected_page')
                ->set('el', $this->version)
                ->set('ev', $this->endpoint))));
        }

        if (! is_null($this->page) && $response->pages === null) {

            $this->eseye()->getLogger()->warning('Expected a paged response but had none');

            dispatch((new Analytics((new AnalyticsContainer)
                ->set('type', 'endpoint_warning')
                ->set('ec', 'missing_pages')
                ->set('el', $this->version)
                ->set('ev', $this->endpoint))));
        }

        if (array_key_exists('Warning', $response->headers)) {

            $this->eseye()->getLogger()->warning('A response contained a warning: ' .
                $response->headers['Warning']);

            dispatch((new Analytics((new AnalyticsContainer)
                ->set('type', 'generic_warning')
                ->set('ec', 'missing_pages')
                ->set('el', $this->endpoint)
                ->set('ev', $response->headers['Warning']))));
        }
    }
public function logWarnings ( EsiResponse $ response ) : void { if ( ! is_null ( $ response -> pages ) && $ this -> page === null ) { $ this -> eseye ( ) -> getLogger ( ) -> warning ( 'Response contained pages but none was expected' ) ; dispatch ( ( new Analytics ( ( new AnalyticsContainer ) -> set ( 'type' , 'endpoint_warning' ) -> set ( 'ec' , 'unexpected_page' ) -> set ( 'el' , $ this -> version ) -> set ( 'ev' , $ this -> endpoint ) ) ) ) ; } if ( ! is_null ( $ this -> page ) && $ response -> pages === null ) { $ this -> eseye ( ) -> getLogger ( ) -> warning ( 'Expected a paged response but had none' ) ; dispatch ( ( new Analytics ( ( new AnalyticsContainer ) -> set ( 'type' , 'endpoint_warning' ) -> set ( 'ec' , 'missing_pages' ) -> set ( 'el' , $ this -> version ) -> set ( 'ev' , $ this -> endpoint ) ) ) ) ; } if ( array_key_exists ( 'Warning' , $ response -> headers ) ) { $ this -> eseye ( ) -> getLogger ( ) -> warning ( 'A response contained a warning: ' . $ response -> headers [ 'Warning' ] ) ; dispatch ( ( new Analytics ( ( new AnalyticsContainer ) -> set ( 'type' , 'generic_warning' ) -> set ( 'ec' , 'missing_pages' ) -> set ( 'el' , $ this -> endpoint ) -> set ( 'ev' , $ response -> headers [ 'Warning' ] ) ) ) ) ; } }
Logs warnings to the Eseye logger.

These warnings will also cause analytics jobs to be
sent to allow for monitoring of endpoint changes.

@param \Seat\Eseye\Containers\EsiResponse $response

@throws \Throwable
Logs warnings to the Eseye logger .