Skip to content

Commit 6cb3702

Browse files
committed
PHPStan: Ignore dynamic properties in TypesAssignedByHasMutatorRule
1 parent b3fbed4 commit 6cb3702

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Toolkit/PHPStan/Core/Rules/TypesAssignedByHasMutatorRule.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function processNode(Node $node, Scope $scope): array
6767
/** @var string */
6868
$propertyName = $propertyName->getConstantScalarValues()[0];
6969
$has = $calledOnType->hasProperty($propertyName);
70-
if (!$has->yes() && !($has->maybe() && $this->allowsDynamicProperties($calledOnType))) {
70+
if (!$has->yes() /* && !($has->maybe() && $this->allowsDynamicProperties($calledOnType)) */) {
7171
return [
7272
RuleErrorBuilder::message(sprintf(
7373
'Access to an undefined property %s::$%s.',
@@ -104,13 +104,13 @@ public function processNode(Node $node, Scope $scope): array
104104
return [];
105105
}
106106

107-
private function allowsDynamicProperties(Type $type): bool
107+
/* private function allowsDynamicProperties(Type $type): bool
108108
{
109109
foreach ($type->getObjectClassReflections() as $reflection) {
110110
if ($reflection->allowsDynamicProperties()) {
111111
return true;
112112
}
113113
}
114114
return false;
115-
}
115+
} */
116116
}

0 commit comments

Comments
 (0)