static function getParamType(\ReflectionParameter $refParam)
    {
        $export = \ReflectionParameter::export([
                $refParam->getDeclaringClass()->name,
                $refParam->getDeclaringFunction()->name
            ],
            $refParam->name,
            true
        );

        $export =  str_replace(' or NULL', '', $export);

        $type = preg_replace('/.*?([\w\\\]+)\s+\$'.current(explode('=', $refParam->name)).'.*/', '\\1', $export);
        if( strpos($type, 'Parameter ') !== false ) {
            return '';
        }

        if( $type != 'array' && strpos($type, '\\') !== 0 ) {
            $type = '\\'.$type;
        }

        return $type;
    }