1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
This commit is contained in:
orklah 2020-11-28 15:03:03 +01:00 committed by Daniil Gentili
parent c0a0497d1a
commit 17ea7784dd
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 9 additions and 9 deletions

View File

@ -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
<?php

View File

@ -313,8 +313,8 @@ class ClassAnalyzer extends ClassLikeAnalyzer
) {
if (IssueBuffer::accepts(
new MissingImmutableAnnotation(
$parent_fq_class_name . ' is marked immutable, but '
. $fq_class_name . ' is not marked immutable',
$parent_fq_class_name . ' is marked @psalm-immutable, but '
. $fq_class_name . ' is not marked @psalm-immutable',
$code_location
),
$storage->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()

View File

@ -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