We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dad63c7 commit 9e9d38fCopy full SHA for 9e9d38f
src/Reflection/Php/PhpMethodReflection.php
@@ -332,7 +332,11 @@ private function getNativeReturnType(): Type
332
if ($name === '__tostring') {
333
return $this->nativeReturnType = $this->declaringClass->isBuiltin()
334
? new StringType()
335
- : new MixedType();
+ : TypehintHelper::decideTypeFromReflection(
336
+ $returnType,
337
+ null,
338
+ $this->declaringClass,
339
+ );
340
}
341
if ($name === '__isset') {
342
return $this->nativeReturnType = new BooleanType();
0 commit comments