Skip to content

Commit e8daa9e

Browse files
committed
Replace ReflectionType's deprecated __toString() with getName()
1 parent 97699d9 commit e8daa9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ImmutableRecordLogic.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ private static function buildPropTypeMap()
299299
);
300300
}
301301

302-
$type = (string) $method->getReturnType();
302+
/** @var \ReflectionNamedType $returnType */
303+
$returnType = $method->getReturnType();
304+
305+
$type = $returnType->getName();
303306

304307
$propTypeMap[$prop->getName()] = [$type, self::isScalarType($type), $method->getReturnType()->allowsNull()];
305308
}

0 commit comments

Comments
 (0)