Skip to content

Commit fe7a8a6

Browse files
authored
Merge pull request #354 from benpitman/7.2-object-return-type-support
Added object return type support for PHP 7.2
2 parents a46438e + b6ef8b4 commit fe7a8a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/collector/backend/parser/UnitCollectingVisitor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private function processMethodReturnType(MethodObject $method, $returnType): voi
262262
return;
263263
}
264264

265-
if (\in_array($returnType, ['void', 'float', 'int', 'string', 'bool', 'callable', 'array'])) {
265+
if (\in_array($returnType, ['void', 'float', 'int', 'string', 'bool', 'callable', 'array', 'object'])) {
266266
$returnTypeObject = $method->setReturnType($returnType);
267267
$returnTypeObject->setNullable(false);
268268

0 commit comments

Comments
 (0)