1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Add back interface complaint

This commit is contained in:
Matthew Brown 2019-09-22 20:42:31 -04:00
parent 3205d1b752
commit 56d250777e

View File

@ -516,6 +516,21 @@ class ClassAnalyzer extends ClassLikeAnalyzer
}
}
if ($interface_storage->external_mutation_free
&& !$storage->external_mutation_free
) {
if (IssueBuffer::accepts(
new MissingImmutableAnnotation(
$interface_name . ' is marked immutable, but '
. $fq_class_name . ' is not marked immutable',
$code_location
),
$storage->suppressed_issues + $this->getSuppressedIssues()
)) {
// fall through
}
}
foreach ($interface_storage->methods as $method_name => $interface_method_storage) {
if ($interface_method_storage->visibility === self::VISIBILITY_PUBLIC) {
$implementer_declaring_method_id = $codebase->methods->getDeclaringMethodId(