Skip to content

Commit 77a57dd

Browse files
committed
Mark (un)set magic methods as having side effects
1 parent 8387fe2 commit 77a57dd

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)