Skip to content

Commit 1f66930

Browse files
committed
hasSideEffects default true
1 parent c4999be commit 1f66930

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Reflection/Php/PhpClassReflectionExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ private function createMethod(
678678
}
679679

680680
if ($this->signatureMapProvider->hasMethodMetadata($declaringClassName, $methodReflection->getName())) {
681-
$hasSideEffects = TrinaryLogic::createFromBoolean($this->signatureMapProvider->getMethodMetadata($declaringClassName, $methodReflection->getName())['hasSideEffects'] ?? false);
681+
$hasSideEffects = TrinaryLogic::createFromBoolean($this->signatureMapProvider->getMethodMetadata($declaringClassName, $methodReflection->getName())['hasSideEffects'] ?? true);
682682
} else {
683683
$hasSideEffects = TrinaryLogic::createMaybe();
684684
}
@@ -842,7 +842,7 @@ public function createUserlandMethodReflection(ClassReflection $fileDeclaringCla
842842
$isPure = null;
843843
foreach ($actualDeclaringClass->getAncestors() as $className => $ancestor) {
844844
if ($this->signatureMapProvider->hasMethodMetadata($className, $methodReflection->getName())) {
845-
$hasSideEffects = $this->signatureMapProvider->getMethodMetadata($className, $methodReflection->getName())['hasSideEffects'];
845+
$hasSideEffects = $this->signatureMapProvider->getMethodMetadata($className, $methodReflection->getName())['hasSideEffects'] ?? true;
846846
$isPure = !$hasSideEffects;
847847

848848
break;

0 commit comments

Comments
 (0)