src/Scrubber.php
public function scrub(&$data, $replacement = '********', $path = '')
    {
        $fields = $this->getScrubFields();

        if (!$fields || !$data) {
            return $data;
        }

        // Scrub fields is case insensitive, so force all fields to lowercase
        $fields = array_change_key_case(array_flip($fields), CASE_LOWER);

        return $this->internalScrub($data, $fields, $replacement, $path);
    }
public function scrub(&$data, $replacement = '********', $path = '')
    {
        $fields = $this->getScrubFields();

        if (!$fields || !$data) {
            return $data;
        }

        // Scrub fields is case insensitive, so force all fields to lowercase
        $fields = array_change_key_case(array_flip($fields), CASE_LOWER);

        return $this->internalScrub($data, $fields, $replacement, $path);
    }
public function scrub ( & $ data , $ replacement = '********' , $ path = '' ) { $ fields = $ this -> getScrubFields ( ) ; if ( ! $ fields || ! $ data ) { return $ data ; } // Scrub fields is case insensitive, so force all fields to lowercase $ fields = array_change_key_case ( array_flip ( $ fields ) , CASE_LOWER ) ; return $ this -> internalScrub ( $ data , $ fields , $ replacement , $ path ) ; }
Scrub a data structure including arrays and query strings.

@param mixed $data Data to be scrubbed.
@param array $fields Sequence of field names to scrub.
@param string $replacement Character used for scrubbing.
@param string $path Path of traversal in the array
Scrub a data structure including arrays and query strings .