getName()) === 'get'; } public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type { $args = $methodCall->getArgs(); if (count($args) < 1) { return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType(); } $keyType = $scope->getType($args[0]->value); if ($keyType instanceof ConstantStringType) { if ($keyType->getValue() == 'allow-plugins') { return TypeCombinator::addNull( new ArrayType(new StringType(), new BooleanType()) ); } } return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType(); } }