src/Google/AdsApi/Common/Util/LogMessageScrubbers.php
public static function scrubRequestHttpHeaders(
        $httpHeaders,
        array $headersToScrub
    ) {
        foreach ($headersToScrub as $header) {
            $regex = sprintf(self::$HTTP_REQUEST_HEADER_REGEX, $header);
            $httpHeaders = preg_replace($regex, '\1' . self::$REDACTED, $httpHeaders, 1);
        }

        return $httpHeaders;
    }
public static function scrubRequestHttpHeaders(
        $httpHeaders,
        array $headersToScrub
    ) {
        foreach ($headersToScrub as $header) {
            $regex = sprintf(self::$HTTP_REQUEST_HEADER_REGEX, $header);
            $httpHeaders = preg_replace($regex, '\1' . self::$REDACTED, $httpHeaders, 1);
        }

        return $httpHeaders;
    }
public static function scrubRequestHttpHeaders ( $ httpHeaders , array $ headersToScrub ) { foreach ( $ headersToScrub as $ header ) { $ regex = sprintf ( self :: $ HTTP_REQUEST_HEADER_REGEX , $ header ) ; $ httpHeaders = preg_replace ( $ regex , '\1' . self :: $ REDACTED , $ httpHeaders , 1 ) ; } return $ httpHeaders ; }
Scrubs the specified header values, replacing all occurrences in the
specified request HTTP headers with a redacted token.

@param string $httpHeaders
@param string[] $headersToScrub which HTTP headers to scrub
@return string the HTTP headers with any sensitive info removed
Scrubs the specified header values replacing all occurrences in the specified request HTTP headers with a redacted token .