lib/Jejik/MT940/Parser/Rabobank.php
protected function contraAccountName(array $lines)
    {
        switch ($this->format) {
            case self::FORMAT_CLASSIC:
                if (preg_match('/(\d{6})((?:C|D)R?)([0-9,]{15})(N\d{3}|NMSC)([0-9P ]{16}|NONREF)(.*)/', $lines[0], $match)) {
                    return trim($match[6]) ?: null;
                }
                break;

            case self::FORMAT_STRUCTURED:
                if (preg_match('#/NAME/([^/]+)/#', $lines[1], $match)) {
                    return trim(str_replace("\r\n", '', $match[1])) ?: null;
                }
                break;
        }
    }
protected function contraAccountName(array $lines)
    {
        switch ($this->format) {
            case self::FORMAT_CLASSIC:
                if (preg_match('/(\d{6})((?:C|D)R?)([0-9,]{15})(N\d{3}|NMSC)([0-9P ]{16}|NONREF)(.*)/', $lines[0], $match)) {
                    return trim($match[6]) ?: null;
                }
                break;

            case self::FORMAT_STRUCTURED:
                if (preg_match('#/NAME/([^/]+)/#', $lines[1], $match)) {
                    return trim(str_replace("\r\n", '', $match[1])) ?: null;
                }
                break;
        }
    }
protected function contraAccountName ( array $ lines ) { switch ( $ this -> format ) { case self :: FORMAT_CLASSIC : if ( preg_match ( '/(\d{6})((?:C|D)R?)([0-9,]{15})(N\d{3}|NMSC)([0-9P ]{16}|NONREF)(.*)/' , $ lines [ 0 ] , $ match ) ) { return trim ( $ match [ 6 ] ) ? : null ; } break ; case self :: FORMAT_STRUCTURED : if ( preg_match ( '#/NAME/([^/]+)/#' , $ lines [ 1 ] , $ match ) ) { return trim ( str_replace ( "\r\n" , '' , $ match [ 1 ] ) ) ? : null ; } break ; } }
Get the contra account holder name from a transaction

@param array $lines The transaction text at offset 0 and the description at offset 1
@return string|null
Get the contra account holder name from a transaction