private function adjustNamespace(ReflectionMethod $method, string $type): string
    {
        $namespace = $method->getDeclaringClass()->getNamespaceName();
        if ($namespace) {
            $namespace = $namespace . '\\';
        }
        $namespacedType = $namespace . $type;

        return class_exists($namespacedType) ? $namespacedType : $type;
    }
private function adjustNamespace(ReflectionMethod $method, string $type): string
    {
        $namespace = $method->getDeclaringClass()->getNamespaceName();
        if ($namespace) {
            $namespace = $namespace . '\\';
        }
        $namespacedType = $namespace . $type;

        return class_exists($namespacedType) ? $namespacedType : $type;
    }
private function adjustNamespace ( ReflectionMethod $ method , string $ type ) : string { $ namespace = $ method -> getDeclaringClass ( ) -> getNamespaceName ( ) ; if ( $ namespace ) { $ namespace = $ namespace . '\\' ; } $ namespacedType = $ namespace . $ type ; return class_exists ( $ namespacedType ) ? $ namespacedType : $ type ; }
Prepend namespace of the method if the class actually exists

@param ReflectionMethod $method
@param string $type

@return string
Prepend namespace of the method if the class actually exists