src/PaymentGateway.php
private function __validateString($string, $minLength = 1, $maxLength = 0)
    {
        if (!is_string($string)) {
            $this->error = 'parameter is not string.';
            return false;
        } else if ($maxLength > 0 && strlen($string) > $maxLength) {
            $this->error = 'parameter is too long. string:' . $string;
            return false;
        } else if (strlen($string) < $minLength) {
            $this->error = 'parameter is too short. string:' . $string;
            return false;
        }
        return true;
    }
private function __validateString($string, $minLength = 1, $maxLength = 0)
    {
        if (!is_string($string)) {
            $this->error = 'parameter is not string.';
            return false;
        } else if ($maxLength > 0 && strlen($string) > $maxLength) {
            $this->error = 'parameter is too long. string:' . $string;
            return false;
        } else if (strlen($string) < $minLength) {
            $this->error = 'parameter is too short. string:' . $string;
            return false;
        }
        return true;
    }
private function __validateString ( $ string , $ minLength = 1 , $ maxLength = 0 ) { if ( ! is_string ( $ string ) ) { $ this -> error = 'parameter is not string.' ; return false ; } else if ( $ maxLength > 0 && strlen ( $ string ) > $ maxLength ) { $ this -> error = 'parameter is too long. string:' . $ string ; return false ; } else if ( strlen ( $ string ) < $ minLength ) { $ this -> error = 'parameter is too short. string:' . $ string ; return false ; } return true ; }
validate the string

@param $string
@param $minLength
@param $maxLength
@return bool
validate the string