public static function create(array $options, array $tokens) {
        $headers = empty($options['CURLOPT_HTTPHEADER']) ? [] : $options['CURLOPT_HTTPHEADER'];

        $headers = empty($headers) ? [] : $headers;
        $headers = is_string($headers) ? explode(',', $headers) : $headers;

        $headers = array_merge(
            $headers,
            // Send pagination headers if pagination is not sent as query params
            !isset($options['pagination_as_query']) || !$options['pagination_as_query'] ? PaginationHeaders::create($tokens) : [],
            OrderingHeaders::create($tokens)
        );
        return ['CURLOPT_HTTPHEADER'=>$headers];
    }
public static function create(array $options, array $tokens) {
        $headers = empty($options['CURLOPT_HTTPHEADER']) ? [] : $options['CURLOPT_HTTPHEADER'];

        $headers = empty($headers) ? [] : $headers;
        $headers = is_string($headers) ? explode(',', $headers) : $headers;

        $headers = array_merge(
            $headers,
            // Send pagination headers if pagination is not sent as query params
            !isset($options['pagination_as_query']) || !$options['pagination_as_query'] ? PaginationHeaders::create($tokens) : [],
            OrderingHeaders::create($tokens)
        );
        return ['CURLOPT_HTTPHEADER'=>$headers];
    }
public static function create ( array $ options , array $ tokens ) { $ headers = empty ( $ options [ 'CURLOPT_HTTPHEADER' ] ) ? [ ] : $ options [ 'CURLOPT_HTTPHEADER' ] ; $ headers = empty ( $ headers ) ? [ ] : $ headers ; $ headers = is_string ( $ headers ) ? explode ( ',' , $ headers ) : $ headers ; $ headers = array_merge ( $ headers , // Send pagination headers if pagination is not sent as query params ! isset ( $ options [ 'pagination_as_query' ] ) || ! $ options [ 'pagination_as_query' ] ? PaginationHeaders :: create ( $ tokens ) : [ ] , OrderingHeaders :: create ( $ tokens ) ) ; return [ 'CURLOPT_HTTPHEADER' => $ headers ] ; }
Returns an array containing CURLOPT_HTTPHEADER options that can be added to
the PHP internal curl library by using curl_setopt_array

@param  array $options
@param  array $tokens
@return array

@SuppressWarnings("PHPMD.StaticAccess")
Returns an array containing CURLOPT_HTTPHEADER options that can be added to the PHP internal curl library by using curl_setopt_array