mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
parent
c0a0497d1a
commit
17ea7784dd
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user