protected function parseStatementPrice($key)
    {
        $results = [];
        if (preg_match('/:' . $key . ':([CD])?.*[A-Z]{3}([\d,\.]+)*/', $this->getCurrentStatementData(), $results)
            && !empty($results[2])
        ) {
            $sanitizedPrice = $this->sanitizePrice($results[2]);

            return (!empty($results[1]) && $results[1] === 'D') ? -$sanitizedPrice : $sanitizedPrice;
        }

        return '';
    }
protected function parseStatementPrice($key)
    {
        $results = [];
        if (preg_match('/:' . $key . ':([CD])?.*[A-Z]{3}([\d,\.]+)*/', $this->getCurrentStatementData(), $results)
            && !empty($results[2])
        ) {
            $sanitizedPrice = $this->sanitizePrice($results[2]);

            return (!empty($results[1]) && $results[1] === 'D') ? -$sanitizedPrice : $sanitizedPrice;
        }

        return '';
    }
protected function parseStatementPrice ( $ key ) { $ results = [ ] ; if ( preg_match ( '/:' . $ key . ':([CD])?.*[A-Z]{3}([\d,\.]+)*/' , $ this -> getCurrentStatementData ( ) , $ results ) && ! empty ( $ results [ 2 ] ) ) { $ sanitizedPrice = $ this -> sanitizePrice ( $ results [ 2 ] ) ; return ( ! empty ( $ results [ 1 ] ) && $ results [ 1 ] === 'D' ) ? - $ sanitizedPrice : $ sanitizedPrice ; } return '' ; }
The actual pricing parser for statements.

@param string $key

@return float|string
The actual pricing parser for statements .