mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2025-01-22 21:31:21 +01:00
fix: offsetget is an alias for make
This commit is contained in:
parent
4651588756
commit
09b500ee87
@ -100,7 +100,12 @@ class AppInterfaceProvider implements
|
||||
string $called_fq_classlike_name = null,
|
||||
string $called_method_name_lowercase = null
|
||||
) : ?Type\Union {
|
||||
if ($method_name_lowercase === 'offsetget' || $method_name_lowercase === 'offsetset') {
|
||||
if ($method_name_lowercase === 'offsetget') {
|
||||
// offsetget is an alias for make
|
||||
return ContainerResolver::resolvePsalmTypeFromApplicationContainerViaArgs($source->getNodeTypeProvider(), $call_args);
|
||||
}
|
||||
|
||||
if ($method_name_lowercase === 'offsetset') {
|
||||
return $source->getCodebase()->getMethodReturnType(
|
||||
get_class(ApplicationHelper::getApp()) . '::' . $method_name_lowercase,
|
||||
$fq_classlike_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user