Skip to content

Commit 443a796

Browse files
committed
Fixing another cast to string of ReflectionType
1 parent 626d3d6 commit 443a796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MissingTypeHintException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static function missingReturnType(ReflectionMethod $method): self
1818

1919
public static function invalidReturnType(ReflectionMethod $method): self
2020
{
21-
return new self(sprintf('The return type of factory "%s::%s" must be an object, "%s" passed instead.', $method->getDeclaringClass()->getName(), $method->getName(), $method->getReturnType()));
21+
return new self(sprintf('The return type of factory "%s::%s" must be an object, "%s" passed instead.', $method->getDeclaringClass()->getName(), $method->getName(), $method->getReturnType() ? $method->getReturnType()->getName() : 'mixed'));
2222
}
2323

2424
public static function nullableReturnType(ReflectionMethod $method): self

0 commit comments

Comments
 (0)