mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Don’t suggest useless type information
This commit is contained in:
parent
a8bee2f843
commit
bdfe2396ad
@ -1128,8 +1128,12 @@ abstract class ClassLikeChecker extends SourceChecker implements StatementsSourc
|
||||
|
||||
$property_storage = $class_storage->properties[$property_name];
|
||||
|
||||
if ($property_storage->suggested_type) {
|
||||
$message .= ' - consider ' . $property_storage->suggested_type;
|
||||
if ($property_storage->suggested_type && !$property_storage->suggested_type->isNull()) {
|
||||
$message .= ' - consider ' . str_replace(
|
||||
['<mixed, mixed>', '<empty, empty>'],
|
||||
'',
|
||||
(string)$property_storage->suggested_type
|
||||
);
|
||||
}
|
||||
|
||||
if (IssueBuffer::accepts(
|
||||
|
Loading…
Reference in New Issue
Block a user