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

        return $soapXml;
    }
public static function scrubRequestSoapHeaders(
        $soapXml,
        array $headersToScrub
    ) {
        foreach ($headersToScrub as $header) {
            $regex = sprintf(self::$SOAP_REQUEST_HEADER_TAG_REGEX, $header);
            $soapXml = preg_replace($regex, '\1' . self::$REDACTED . '\2', $soapXml, 1);
        }

        return $soapXml;
    }
public static function scrubRequestSoapHeaders ( $ soapXml , array $ headersToScrub ) { foreach ( $ headersToScrub as $ header ) { $ regex = sprintf ( self :: $ SOAP_REQUEST_HEADER_TAG_REGEX , $ header ) ; $ soapXml = preg_replace ( $ regex , '\1' . self :: $ REDACTED . '\2' , $ soapXml , 1 ) ; } return $ soapXml ; }
Scrubs the specified header values, replacing their occurrences in the
specified request SOAP XML with a redacted token.

@param string $soapXml
@param string[] $headersToScrub which SOAP headers to scrub
@return string the SOAP XML with any sensitive info removed from its
headers
Scrubs the specified header values replacing their occurrences in the specified request SOAP XML with a redacted token .