diff --git a/docs/running_psalm/issues/MutableDependency.md b/docs/running_psalm/issues/MutableDependency.md index fb855305a..47ccee3ae 100644 --- a/docs/running_psalm/issues/MutableDependency.md +++ b/docs/running_psalm/issues/MutableDependency.md @@ -1,6 +1,6 @@ # MutableDependency -Emitted when an immutable class inherits from a class or trait not marked immutable +Emitted when an immutable class inherits from a class or trait not marked @psalm-immutable ```php suppressed_issues + $this->getSuppressedIssues() @@ -328,7 +328,7 @@ class ClassAnalyzer extends ClassLikeAnalyzer ) { if (IssueBuffer::accepts( new MutableDependency( - $fq_class_name . ' is marked immutable but ' . $parent_fq_class_name . ' is not', + $fq_class_name . ' is marked @psalm-immutable but ' . $parent_fq_class_name . ' is not', $code_location ), $storage->suppressed_issues + $this->getSuppressedIssues() @@ -550,8 +550,8 @@ class ClassAnalyzer extends ClassLikeAnalyzer ) { if (IssueBuffer::accepts( new MissingImmutableAnnotation( - $interface_name . ' is marked immutable, but ' - . $fq_class_name . ' is not marked immutable', + $interface_name . ' is marked @psalm-immutable, but ' + . $fq_class_name . ' is not marked @psalm-immutable', $code_location ), $storage->suppressed_issues + $this->getSuppressedIssues() @@ -1615,7 +1615,7 @@ class ClassAnalyzer extends ClassLikeAnalyzer if ($storage->mutation_free && !$trait_storage->mutation_free) { if (IssueBuffer::accepts( new MutableDependency( - $storage->name . ' is marked immutable but ' . $fq_trait_name . ' is not', + $storage->name . ' is marked @psalm-immutable but ' . $fq_trait_name . ' is not', new CodeLocation($previous_trait_analyzer ?: $this, $trait_name) ), $storage->suppressed_issues + $this->getSuppressedIssues() diff --git a/src/Psalm/Internal/Analyzer/MethodComparator.php b/src/Psalm/Internal/Analyzer/MethodComparator.php index a50d77692..11a4ff8ef 100644 --- a/src/Psalm/Internal/Analyzer/MethodComparator.php +++ b/src/Psalm/Internal/Analyzer/MethodComparator.php @@ -281,10 +281,10 @@ class MethodComparator ) { if (IssueBuffer::accepts( new MissingImmutableAnnotation( - $cased_guide_method_id . ' is marked immutable, but ' + $cased_guide_method_id . ' is marked @psalm-immutable, but ' . $implementer_classlike_storage->name . '::' . ($guide_method_storage->cased_name ?: '') - . ' is not marked immutable', + . ' is not marked @psalm-immutable', $code_location ), $suppressed_issues