src/TheTVDbAPI.php
private function getDefaultHttpClientOptions(array $options = []): array
    {
        $headers = [];

        if ($this->token !== null) {
            $headers['Authorization'] = 'Bearer '.$this->token;
        }

        $languagesInOptions = (array_key_exists('headers', $options) &&
            array_key_exists('Accept-Language', $options['headers']));
        if ($this->languages !== null && $languagesInOptions === false) {
            $headers['Accept-Language'] = join(', ', $this->languages);
        }

        if ($this->version !== null) {
            $headers['Accept'] = 'application/vnd.thetvdb.v'.$this->version;
        }

        $options['http_errors'] = false;

        return array_merge_recursive(['headers' => $headers], $options);
    }
private function getDefaultHttpClientOptions(array $options = []): array
    {
        $headers = [];

        if ($this->token !== null) {
            $headers['Authorization'] = 'Bearer '.$this->token;
        }

        $languagesInOptions = (array_key_exists('headers', $options) &&
            array_key_exists('Accept-Language', $options['headers']));
        if ($this->languages !== null && $languagesInOptions === false) {
            $headers['Accept-Language'] = join(', ', $this->languages);
        }

        if ($this->version !== null) {
            $headers['Accept'] = 'application/vnd.thetvdb.v'.$this->version;
        }

        $options['http_errors'] = false;

        return array_merge_recursive(['headers' => $headers], $options);
    }
private function getDefaultHttpClientOptions ( array $ options = [ ] ) : array { $ headers = [ ] ; if ( $ this -> token !== null ) { $ headers [ 'Authorization' ] = 'Bearer ' . $ this -> token ; } $ languagesInOptions = ( array_key_exists ( 'headers' , $ options ) && array_key_exists ( 'Accept-Language' , $ options [ 'headers' ] ) ) ; if ( $ this -> languages !== null && $ languagesInOptions === false ) { $ headers [ 'Accept-Language' ] = join ( ', ' , $ this -> languages ) ; } if ( $ this -> version !== null ) { $ headers [ 'Accept' ] = 'application/vnd.thetvdb.v' . $ this -> version ; } $ options [ 'http_errors' ] = false ; return array_merge_recursive ( [ 'headers' => $ headers ] , $ options ) ; }
Returns the default client options.

@param array $options A list of options to start with (optional)

@return array An array containing the passed in options, as well as the added ones
Returns the default client options .