mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Add more specific __toString error issue
This commit is contained in:
parent
a31ef0ae5f
commit
3f0a87f6fe
@ -997,7 +997,7 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
|
||||
if (!$inferred_return_type->isMixed() && (string)$inferred_return_type !== 'string') {
|
||||
if (IssueBuffer::accepts(
|
||||
new InvalidToString(
|
||||
'__toString methods must return a string',
|
||||
'__toString methods must return a string, ' . $inferred_return_type . ' returned',
|
||||
$secondary_return_type_location ?: $return_type_location
|
||||
)
|
||||
)) {
|
||||
|
Loading…
Reference in New Issue
Block a user