Merge pull request #42 from mr-feek/fix-app-helper-typehint

fix: return class instance of type
This commit is contained in:
Matthew Brown 2020-04-14 00:37:12 -04:00 committed by GitHub
commit 081d62d2ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,8 @@ final class AppReturnTypeProvider implements FunctionReturnTypeProviderInterface
}
// @todo: this should really proxy to \Illuminate\Foundation\Application::make, but i was struggling with that
return $statements_source->getNodeTypeProvider()->getType($call_args[0]->value);
return new Union([
new TNamedObject($call_args[0]->value),
]);
}
}