Skip to content

Commit e99cd42

Browse files
committed
Use Stringable whenever possible
1 parent e74a756 commit e99cd42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/CheckTypeDeclarationsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ private function checkType(Definition $checkedDefinition, mixed $value, \Reflect
274274
return;
275275
}
276276

277-
if ('string' === $type && method_exists($class, '__toString')) {
277+
if ('string' === $type && $class instanceof \Stringable) {
278278
return;
279279
}
280280

0 commit comments

Comments
 (0)