app/code/community/Adyen/Payment/Helper/Data.php
protected function formatStreet($street, $klarna)
    {
        $formatStreetOnMultiStreetLines = false;

        /*
         * If ignore second line steet is enabled for klarna only look at the first addressfield
         * and try to substract housenumber
         */
        if ($klarna) {
            if ($this->getConfigData('ignore_second_address_field', 'adyen_openinvoice')) {
                $formatStreetOnMultiStreetLines = true;
            }
        }

        if (!$formatStreetOnMultiStreetLines && count($street) != 1) {
            return $street;
        }

        preg_match('/\s(\d+.*)$/i', $street['0'], $houseNumber, PREG_OFFSET_CAPTURE);
        if (!empty($houseNumber['0'])) {
            $_houseNumber = trim($houseNumber['0']['0']);
            $position = $houseNumber['0']['1'];
            $streeName = trim(substr($street['0'], 0, $position));
            $street = array($streeName, $_houseNumber);
        }

        return $street;
    }
protected function formatStreet($street, $klarna)
    {
        $formatStreetOnMultiStreetLines = false;

        /*
         * If ignore second line steet is enabled for klarna only look at the first addressfield
         * and try to substract housenumber
         */
        if ($klarna) {
            if ($this->getConfigData('ignore_second_address_field', 'adyen_openinvoice')) {
                $formatStreetOnMultiStreetLines = true;
            }
        }

        if (!$formatStreetOnMultiStreetLines && count($street) != 1) {
            return $street;
        }

        preg_match('/\s(\d+.*)$/i', $street['0'], $houseNumber, PREG_OFFSET_CAPTURE);
        if (!empty($houseNumber['0'])) {
            $_houseNumber = trim($houseNumber['0']['0']);
            $position = $houseNumber['0']['1'];
            $streeName = trim(substr($street['0'], 0, $position));
            $street = array($streeName, $_houseNumber);
        }

        return $street;
    }
protected function formatStreet ( $ street , $ klarna ) { $ formatStreetOnMultiStreetLines = false ; /*
         * If ignore second line steet is enabled for klarna only look at the first addressfield
         * and try to substract housenumber
         */ if ( $ klarna ) { if ( $ this -> getConfigData ( 'ignore_second_address_field' , 'adyen_openinvoice' ) ) { $ formatStreetOnMultiStreetLines = true ; } } if ( ! $ formatStreetOnMultiStreetLines && count ( $ street ) != 1 ) { return $ street ; } preg_match ( '/\s(\d+.*)$/i' , $ street [ '0' ] , $ houseNumber , PREG_OFFSET_CAPTURE ) ; if ( ! empty ( $ houseNumber [ '0' ] ) ) { $ _houseNumber = trim ( $ houseNumber [ '0' ] [ '0' ] ) ; $ position = $ houseNumber [ '0' ] [ '1' ] ; $ streeName = trim ( substr ( $ street [ '0' ] , 0 , $ position ) ) ; $ street = array ( $ streeName , $ _houseNumber ) ; } return $ street ; }
Fix this one string street + number
@example street + number
@param type $street
@return type $street
Fix this one string street + number