Skip to content

Commit d573e03

Browse files
authored
Merge pull request #20 from shochdoerfer/fix/magicmethod_sideeffects
Mark (un)set magic methods as having side effects
2 parents 8387fe2 + 77a57dd commit d573e03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bitExpert/PHPStan/Magento/Reflection/MagicMethodReflection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ public function getThrowType(): ?\PHPStan\Type\Type
116116

117117
public function hasSideEffects(): \PHPStan\TrinaryLogic
118118
{
119+
if (in_array(substr($this->name, 0, 3), ['set', 'uns'])) {
120+
return \PHPStan\TrinaryLogic::createYes();
121+
}
122+
119123
return \PHPStan\TrinaryLogic::createNo();
120124
}
121125
}

0 commit comments

Comments
 (0)