From 04247a5ddf7ff594ad8dc0ad0046893e05599f69 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 21 Oct 2026 09:24:05 +0200 Subject: [PATCH 1/2] Drop the @phpstan-impure tip and the PossiblyImpureCallExpr entries behind it The tip was the only reader of the PossiblyImpureCallExpr entries the call handlers put into the scope after every call to a possibly impure user function or method - a quarter of all expression-table entries, copied, merged, compared and freed by every later scope derivation. Remembering possibly impure values (rememberPossiblyImpureFunctionValues) is unchanged. tips.possiblyImpure stays in the schema as a no-op so existing configs keep working; RuleErrorBuilder::possiblyImpureTip() stays as @api. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MMNnG2Zo7wgvSZCzjdk17X --- .../Helper/FuncCallScopeEffectsHelper.php | 19 - .../ExprHandler/MethodCallHandler.php | 22 - .../ExprHandler/StaticCallHandler.php | 21 - .../Virtual/PossiblyImpureCallExprHandler.php | 60 - src/Analyser/MutatingScope.php | 123 +- src/Analyser/ScopeOps.php | 2 +- src/Node/Expr/PossiblyImpureCallExpr.php | 43 - src/Node/Printer/Printer.php | 6 - .../Classes/ImpossibleInstanceOfRule.php | 14 +- .../BooleanAndConstantConditionRule.php | 31 +- .../BooleanNotConstantConditionRule.php | 11 +- .../BooleanOrConstantConditionRule.php | 31 +- .../ConstantLooseComparisonRule.php | 11 +- .../DoWhileLoopConstantConditionRule.php | 11 +- .../ElseIfConstantConditionRule.php | 11 +- .../Comparison/IfConstantConditionRule.php | 11 +- .../ImpossibleCheckTypeFunctionCallRule.php | 13 +- .../ImpossibleCheckTypeMethodCallRule.php | 13 +- ...mpossibleCheckTypeStaticMethodCallRule.php | 13 +- .../LogicalXorConstantConditionRule.php | 21 +- src/Rules/Comparison/MatchExpressionRule.php | 3 - ...mparisonOperatorsConstantConditionRule.php | 11 +- .../Comparison/PossiblyImpureTipHelper.php | 50 - .../StrictComparisonOfDifferentTypesRule.php | 13 +- src/Rules/Comparison/SwitchConditionRule.php | 3 - .../TernaryOperatorConstantConditionRule.php | 11 +- .../WhileLoopAlwaysFalseConditionRule.php | 11 +- .../WhileLoopAlwaysTrueConditionRule.php | 11 +- tests/PHPStan/Analyser/ScopeTest.php | 38 - .../Classes/ImpossibleInstanceOfRuleTest.php | 10 +- ...anceOfRuleWithUncertainPhpDocTypesTest.php | 2 - .../BooleanAndConstantConditionRuleTest.php | 4 - .../BooleanNotConstantConditionRuleTest.php | 4 - .../BooleanOrConstantConditionRuleTest.php | 4 - ...ditionRuleWithUncertainPhpDocTypesTest.php | 4 - .../PHPStan/Rules/Comparison/Bug14534Test.php | 1 - .../ConstantLooseComparisonRuleTest.php | 1 - .../DoWhileLoopConstantConditionRuleTest.php | 4 - .../ElseIfConstantConditionRuleTest.php | 6 +- .../IfConstantConditionRuleTest.php | 4 - ...mpossibleCheckTypeFunctionCallRuleTest.php | 1 - ...onCallRuleWithUncertainPhpDocTypesTest.php | 1 - ...sibleCheckTypeGenericOverwriteRuleTest.php | 1 - ...sibleCheckTypeMethodCallRuleEqualsTest.php | 1 - .../ImpossibleCheckTypeMethodCallRuleTest.php | 2 - ...sibleCheckTypeStaticMethodCallRuleTest.php | 1 - .../LogicalXorConstantConditionRuleTest.php | 4 - .../Comparison/MatchExpressionRuleTest.php | 4 - ...isonOperatorsConstantConditionRuleTest.php | 1 - ...nditionRuleWithoutForeachPollutionTest.php | 1 - ...rictComparisonOfDifferentTypesRuleTest.php | 36 +- ...ntTypesRuleWithoutForeachPollutionTest.php | 1 - .../Comparison/SwitchConditionRuleTest.php | 1 - ...rnaryOperatorConstantConditionRuleTest.php | 4 - .../WhileLoopAlwaysFalseConditionRuleTest.php | 4 - .../WhileLoopAlwaysTrueConditionRuleTest.php | 4 - turbo-ext/src/CallHandlerSupport.h | 27 +- turbo-ext/src/FuncCallScopeEffectsHelper.cpp | 36 +- turbo-ext/src/MethodCallHandler.cpp | 43 - turbo-ext/src/MutatingScope.cpp | 232 +-- .../src/PossiblyImpureCallExprHandler.cpp | 150 -- turbo-ext/src/ScopeOps.cpp | 1 - turbo-ext/src/StaticCallHandler.cpp | 34 - turbo-ext/src/VirtualExprHandlers.h | 1 - .../generated/FuncCallScopeEffectsHelper.h | 146 +- turbo-ext/src/generated/MutatingScope.h | 1632 ++++++++--------- .../generated/PossiblyImpureCallExprHandler.h | 81 - turbo-ext/src/support.cpp | 1 - turbo-ext/src/support.h | 2 - turbo-ext/tests/scope-family.php | 1 - turbo-ext/tests/smoke.php | 2 - 71 files changed, 1002 insertions(+), 2136 deletions(-) delete mode 100644 src/Analyser/ExprHandler/Virtual/PossiblyImpureCallExprHandler.php delete mode 100644 src/Node/Expr/PossiblyImpureCallExpr.php delete mode 100644 src/Rules/Comparison/PossiblyImpureTipHelper.php delete mode 100644 turbo-ext/src/PossiblyImpureCallExprHandler.cpp delete mode 100644 turbo-ext/src/generated/PossiblyImpureCallExprHandler.h diff --git a/src/Analyser/ExprHandler/Helper/FuncCallScopeEffectsHelper.php b/src/Analyser/ExprHandler/Helper/FuncCallScopeEffectsHelper.php index 0e66e50d134..5faa2c0a09a 100644 --- a/src/Analyser/ExprHandler/Helper/FuncCallScopeEffectsHelper.php +++ b/src/Analyser/ExprHandler/Helper/FuncCallScopeEffectsHelper.php @@ -15,10 +15,8 @@ use PHPStan\Analyser\MutatingScope; use PHPStan\Analyser\NodeScopeResolver; use PHPStan\Analyser\Scope; -use PHPStan\DependencyInjection\AutowiredParameter; use PHPStan\DependencyInjection\AutowiredService; use PHPStan\Node\Expr\NativeTypeExpr; -use PHPStan\Node\Expr\PossiblyImpureCallExpr; use PHPStan\Node\InvalidateExprNode; use PHPStan\Reflection\Callables\CallableParametersAcceptor; use PHPStan\Reflection\FunctionReflection; @@ -45,7 +43,6 @@ use function array_slice; use function count; use function in_array; -use function sprintf; use function str_starts_with; /** @@ -65,8 +62,6 @@ final class FuncCallScopeEffectsHelper public function __construct( private OutputBufferHelper $outputBufferHelper, - #[AutowiredParameter] - private bool $rememberPossiblyImpureFunctionValues, private AssignHandler $assignHandler, ) { @@ -129,20 +124,6 @@ public function applyCallScopeEffects(NodeScopeResolver $nodeScopeResolver, Stmt $scope = $scope->invalidateExpression(new Variable('this'), true, null, $keepPropertyFetches); } - if ( - $functionReflection !== null - && $parametersAcceptor !== null - && $this->rememberPossiblyImpureFunctionValues - && $functionReflection->hasSideEffects()->maybe() - && !$functionReflection->isBuiltin() - ) { - $scope = $scope->assignExpression( - new PossiblyImpureCallExpr($normalizedExpr, $normalizedExpr, sprintf('%s()', $functionReflection->getName())), - $parametersAcceptor->getReturnType(), - new MixedType(), - ); - } - if ( $functionReflection !== null && in_array($functionReflection->getName(), ['json_encode', 'json_decode'], true) diff --git a/src/Analyser/ExprHandler/MethodCallHandler.php b/src/Analyser/ExprHandler/MethodCallHandler.php index 0046e09a93f..79c730ef67e 100644 --- a/src/Analyser/ExprHandler/MethodCallHandler.php +++ b/src/Analyser/ExprHandler/MethodCallHandler.php @@ -22,7 +22,6 @@ use PHPStan\Analyser\ExprHandler\Helper\MethodCallReturnTypeHelper; use PHPStan\Analyser\ExprHandler\Helper\MethodThrowPointHelper; use PHPStan\Analyser\Generics\ClosureSignatureInference; -use PHPStan\Analyser\Generics\TemplateArgumentFrame; use PHPStan\Analyser\ImpurePoint; use PHPStan\Analyser\InternalThrowPoint; use PHPStan\Analyser\MutatingScope; @@ -37,7 +36,6 @@ use PHPStan\Dependency\DependencyTypes; use PHPStan\DependencyInjection\AutowiredParameter; use PHPStan\DependencyInjection\AutowiredService; -use PHPStan\Node\Expr\PossiblyImpureCallExpr; use PHPStan\Node\InvalidateExprNode; use PHPStan\Reflection\Callables\SimpleImpurePoint; use PHPStan\Reflection\ExtendedMethodReflection; @@ -60,7 +58,6 @@ use function array_map; use function array_merge; use function count; -use function sprintf; use function strtolower; /** @@ -327,25 +324,6 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex if ($methodReflection->getName() === '__construct' || $methodReflection->hasSideEffects()->yes()) { $nodeScopeResolver->callNodeCallback($nodeCallback, new InvalidateExprNode($normalizedExpr->var), $scope, $storage); $scope = $scope->invalidateExpression($normalizedExpr->var, true, $methodReflection->getDeclaringClass(), $methodReflection->isStatic()); - } elseif ($this->rememberPossiblyImpureFunctionValues && $methodReflection->hasSideEffects()->maybe() && !$methodReflection->getDeclaringClass()->isBuiltin()) { - // the remembered call value and the @phpstan-self-out type are - // generic-sensitive: resolve them from the type-driven acceptor - // processArgs() selected (generics resolved against the actual arg - // types), falling back to the structural acceptor for dynamic callees. - $acceptorForGenerics = $resolvedParametersAcceptor ?? $parametersAcceptor; - $rememberedType = TemplateArgumentFrame::returnTypeOfCall($acceptorForGenerics, $scope, $expr); - if ($varResult->containsNullsafe() && TypeCombinator::containsNull($calledOnType)) { - // a call on a nullsafe chain whose receiver is nullable - // short-circuits to null - the tracked entry is keyed by the - // whole chain, so it must remember the propagated type, or a - // later ?? over the same chain reads it as never-null - $rememberedType = TypeCombinator::addNull($rememberedType); - } - $scope = $scope->assignExpression( - new PossiblyImpureCallExpr($normalizedExpr, $normalizedExpr->var, sprintf('%s::%s()', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName())), - $rememberedType, - new MixedType(), - ); } if (!$methodReflection->isStatic()) { $selfOutType = $methodReflection->getSelfOutType(); diff --git a/src/Analyser/ExprHandler/StaticCallHandler.php b/src/Analyser/ExprHandler/StaticCallHandler.php index 2b3d12f6ef3..a90ba1d98b2 100644 --- a/src/Analyser/ExprHandler/StaticCallHandler.php +++ b/src/Analyser/ExprHandler/StaticCallHandler.php @@ -21,7 +21,6 @@ use PHPStan\Analyser\ExprHandler\Helper\EarlyTerminatingCallHelper; use PHPStan\Analyser\ExprHandler\Helper\MethodCallReturnTypeHelper; use PHPStan\Analyser\ExprHandler\Helper\MethodThrowPointHelper; -use PHPStan\Analyser\Generics\TemplateArgumentFrame; use PHPStan\Analyser\ImpurePoint; use PHPStan\Analyser\InternalThrowPoint; use PHPStan\Analyser\MutatingScope; @@ -36,7 +35,6 @@ use PHPStan\Dependency\DependencyTypes; use PHPStan\DependencyInjection\AutowiredParameter; use PHPStan\DependencyInjection\AutowiredService; -use PHPStan\Node\Expr\PossiblyImpureCallExpr; use PHPStan\Reflection\Callables\SimpleImpurePoint; use PHPStan\Reflection\ExtendedMethodReflection; use PHPStan\Reflection\ExtendedParametersAcceptor; @@ -62,7 +60,6 @@ use function array_merge; use function count; use function in_array; -use function sprintf; use function strtolower; /** @@ -391,24 +388,6 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex ) { // a static method never receives $this, so property fetches on it survive $scope = $scope->invalidateExpression(new Variable('this'), true, $methodReflection->getDeclaringClass(), $methodReflection->isStatic()); - } elseif ( - $expr->class instanceof Name - && $methodReflection !== null - && $this->rememberPossiblyImpureFunctionValues - && $scope->isInClass() - && $scope->getClassReflection()->is($methodReflection->getDeclaringClass()->getName()) - && $methodReflection->hasSideEffects()->maybe() - && !$methodReflection->getDeclaringClass()->isBuiltin() - ) { - // the remembered call value is generic-sensitive: resolve it from the - // type-driven acceptor processArgs() selected (generics resolved against - // the actual arg types), falling back to the structural acceptor. - $acceptorForGenerics = $resolvedParametersAcceptor ?? $parametersAcceptor; - $scope = $scope->assignExpression( - new PossiblyImpureCallExpr($normalizedExpr, new Variable('this'), sprintf('%s::%s()', $methodReflection->getDeclaringClass()->getDisplayName(), $methodReflection->getName())), - TemplateArgumentFrame::returnTypeOfCall($acceptorForGenerics, $scope, $expr), - new MixedType(), - ); } if ( diff --git a/src/Analyser/ExprHandler/Virtual/PossiblyImpureCallExprHandler.php b/src/Analyser/ExprHandler/Virtual/PossiblyImpureCallExprHandler.php deleted file mode 100644 index 6d6f78f8416..00000000000 --- a/src/Analyser/ExprHandler/Virtual/PossiblyImpureCallExprHandler.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -#[AutowiredService] -#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../../turbo-ext/src/PossiblyImpureCallExprHandler.cpp')] -final class PossiblyImpureCallExprHandler implements ExprHandler -{ - - public function __construct( - private ExpressionResultFactory $expressionResultFactory, - private DefaultNarrowingHelper $defaultNarrowingHelper, - ) - { - } - - public function supports(Expr $expr): bool - { - return $expr instanceof PossiblyImpureCallExpr; - } - - public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Expr $expr, MutatingScope $scope, ExpressionResultStorage $storage, callable $nodeCallback, ExpressionContext $context): ExpressionResult - { - return $this->expressionResultFactory->create( - $scope, - beforeScope: $scope, - expr: $expr, - hasYield: false, - isAlwaysTerminating: false, - throwPoints: [], - impurePoints: [], - typeCallback: static fn (bool $nativeTypesPromoted): Type => $nodeScopeResolver->readScopeStateOrSyntheticType($expr->callExpr, $nativeTypesPromoted ? $scope->doNotTreatPhpDocTypesAsCertain() : $scope), - specifyTypesCallback: fn (TypeSpecifierContext $context, bool $nativeTypesPromoted) => $this->defaultNarrowingHelper->specifyDefaultTypes($expr, $context), - ); - } - -} diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index f3e325d7f7d..6f640432a87 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -37,7 +37,6 @@ use PHPStan\Node\Expr\OriginalForeachKeyExpr; use PHPStan\Node\Expr\OriginalForeachValueExpr; use PHPStan\Node\Expr\ParameterVariableOriginalValueExpr; -use PHPStan\Node\Expr\PossiblyImpureCallExpr; use PHPStan\Node\Expr\PropertyInitializationExpr; use PHPStan\Node\Expr\SetExistingOffsetValueTypeExpr; use PHPStan\Node\IssetExpr; @@ -114,9 +113,7 @@ use function array_pop; use function array_shift; use function array_slice; -use function array_unique; use function array_values; -use function assert; use function count; use function ctype_alnum; use function explode; @@ -847,114 +844,6 @@ public function getMaybeDefinedVariables(): array return $variables; } - /** - * @return list - */ - public function findPossiblyImpureCallDescriptions(Expr $expr): array - { - $nodeFinder = new NodeFinder(); - $callExprDescriptions = []; - $foundCallExprMatch = false; - $matchedCallExprKeys = []; - foreach ($this->expressionTypes as $holder) { - $holderExpr = $holder->getExpr(); - if (!$holderExpr instanceof PossiblyImpureCallExpr) { - continue; - } - - $callExprKey = $this->getNodeKey($holderExpr->callExpr); - - $found = $nodeFinder->findFirst([$expr], function (Node $node) use ($callExprKey): bool { - if (!$node instanceof Expr) { - return false; - } - - return $this->getNodeKey($node) === $callExprKey; - }); - - if ($found === null) { - continue; - } - - $foundCallExprMatch = true; - $matchedCallExprKeys[$callExprKey] = true; - - // Only show the tip when the scope's type for the call expression - // differs from the declared return type, meaning control flow - // narrowing affected the type (the cached value was narrowed). - assert($found instanceof Expr); - $scopeType = $this->getType($found); - $declaredReturnType = $holder->getType(); - if ($declaredReturnType->isSuperTypeOf($scopeType)->yes() && $scopeType->isSuperTypeOf($declaredReturnType)->yes()) { - continue; - } - - $callExprDescriptions[] = $holderExpr->getCallDescription(); - } - - // If the first pass found a callExpr in the error expression but - // filtered it out (return type wasn't narrowed), the error is - // explained by the return type alone - skip the fallback. - if ($foundCallExprMatch && count($callExprDescriptions) === 0) { - return []; - } - - // Second pass: match by impactedExpr for cases where a maybe-impure method - // on an object didn't invalidate it, but a different method's return - // value was narrowed on that object. - // Skip when the expression itself is a direct method/static call - - // those are passed by ImpossibleCheckType rules where the error is - // about the call's arguments, not about object state. - if (!($expr instanceof Expr\MethodCall || $expr instanceof Expr\StaticCall)) { - $impactedExprDescriptions = []; - foreach ($this->expressionTypes as $holder) { - $holderExpr = $holder->getExpr(); - if (!$holderExpr instanceof PossiblyImpureCallExpr) { - continue; - } - - $impactedExprKey = $this->getNodeKey($holderExpr->impactedExpr); - - // Skip if impactedExpr is the same as callExpr (function calls) - if ($impactedExprKey === $this->getNodeKey($holderExpr->callExpr)) { - continue; - } - - // Skip if this entry's callExpr was already matched in the first pass - $callExprKey = $this->getNodeKey($holderExpr->callExpr); - if (isset($matchedCallExprKeys[$callExprKey])) { - continue; - } - - $found = $nodeFinder->findFirst([$expr], function (Node $node) use ($impactedExprKey): bool { - if (!$node instanceof Expr) { - return false; - } - - return $this->getNodeKey($node) === $impactedExprKey; - }); - - if ($found === null) { - continue; - } - - $impactedExprDescriptions[] = $holderExpr->getCallDescription(); - } - - // Prefer impactedExpr matches (intermediate calls that could have - // invalidated the object) over callExpr matches - if (count($impactedExprDescriptions) > 0) { - return array_values(array_unique($impactedExprDescriptions)); - } - } - - if (count($callExprDescriptions) > 0) { - return array_values(array_unique($callExprDescriptions)); - } - - return []; - } - private function isGlobalVariable(string $variableName): bool { return in_array($variableName, self::SUPERGLOBAL_VARIABLES, true); @@ -1537,9 +1426,6 @@ public function getDifferingVariableRoots(self $other): ?array ]; foreach ($tables as [$ours, $theirs]) { foreach ($ours as $key => $holder) { - if ($holder->getExpr() instanceof PossiblyImpureCallExpr) { - continue; - } $theirHolder = $theirs[$key] ?? null; if ($theirHolder !== null && ($theirHolder === $holder || $holder->equals($theirHolder))) { continue; @@ -1553,7 +1439,7 @@ public function getDifferingVariableRoots(self $other): ?array } } foreach ($theirs as $key => $holder) { - if (isset($ours[$key]) || $holder->getExpr() instanceof PossiblyImpureCallExpr) { + if (isset($ours[$key])) { continue; } $variables = self::getVariablesOfExpressionKey($key); @@ -1576,12 +1462,7 @@ public function getDifferingVariableRoots(self $other): ?array } $variables = self::getVariablesOfExpressionKey($key); if ($variables === null) { - foreach ($holders as $holder) { - if (!$holder->getTypeHolder()->getExpr() instanceof PossiblyImpureCallExpr) { - return null; - } - } - continue; + return null; } foreach ($variables as $variable) { $roots[$variable] = true; diff --git a/src/Analyser/ScopeOps.php b/src/Analyser/ScopeOps.php index 046d1ddc78e..eba525ce1c0 100644 --- a/src/Analyser/ScopeOps.php +++ b/src/Analyser/ScopeOps.php @@ -55,7 +55,7 @@ final class ScopeOps // parameter original-value markers (__phpstanOriginalForeachKey etc.) hide a // synthesized Variable child on purpose - reassigning the variable must // invalidate them through containment - so they can never be listed here. - private const COMPOSITIONAL_VIRTUAL_KEY_PREFIXES = ['__phpstanForeachValueByRef(', '__phpstanIntertwinedVariableByReference(', '__phpstanPossiblyImpure(', '__phpstanPropertyInitialization(', '__phpstanRemembered(']; + private const COMPOSITIONAL_VIRTUAL_KEY_PREFIXES = ['__phpstanForeachValueByRef(', '__phpstanIntertwinedVariableByReference(', '__phpstanPropertyInitialization(', '__phpstanRemembered(']; /** * Mirrors MutatingScope::getNodeKey(). diff --git a/src/Node/Expr/PossiblyImpureCallExpr.php b/src/Node/Expr/PossiblyImpureCallExpr.php deleted file mode 100644 index b3bd7b544ab..00000000000 --- a/src/Node/Expr/PossiblyImpureCallExpr.php +++ /dev/null @@ -1,43 +0,0 @@ -callDescription; - } - - #[Override] - public function getType(): string - { - return 'PHPStan_Node_PossiblyImpureCallExpr'; - } - - /** - * @return string[] - */ - #[Override] - public function getSubNodeNames(): array - { - return ['callExpr', 'impactedExpr']; - } - -} diff --git a/src/Node/Printer/Printer.php b/src/Node/Printer/Printer.php index 1f9d3c5ede8..bc868a46c52 100644 --- a/src/Node/Printer/Printer.php +++ b/src/Node/Printer/Printer.php @@ -19,7 +19,6 @@ use PHPStan\Node\Expr\OriginalForeachKeyExpr; use PHPStan\Node\Expr\OriginalForeachValueExpr; use PHPStan\Node\Expr\ParameterVariableOriginalValueExpr; -use PHPStan\Node\Expr\PossiblyImpureCallExpr; use PHPStan\Node\Expr\PropertyInitializationExpr; use PHPStan\Node\Expr\SetExistingOffsetValueTypeExpr; use PHPStan\Node\Expr\SetOffsetValueTypeExpr; @@ -140,11 +139,6 @@ protected function pPHPStan_Node_AlwaysRememberedExpr(AlwaysRememberedExpr $expr return sprintf('__phpstanRemembered(%s)', $this->p($expr->getExpr())); } - protected function pPHPStan_Node_PossiblyImpureCallExpr(PossiblyImpureCallExpr $expr): string // phpcs:ignore - { - return sprintf('__phpstanPossiblyImpure(%s, %s)', $this->p($expr->callExpr), $this->p($expr->impactedExpr)); - } - protected function pPHPStan_Node_PropertyInitializationExpr(PropertyInitializationExpr $expr): string // phpcs:ignore { return sprintf('__phpstanPropertyInitialization(%s)', $expr->getPropertyName()); diff --git a/src/Rules/Classes/ImpossibleInstanceOfRule.php b/src/Rules/Classes/ImpossibleInstanceOfRule.php index abe66acfdfa..a885531a081 100644 --- a/src/Rules/Classes/ImpossibleInstanceOfRule.php +++ b/src/Rules/Classes/ImpossibleInstanceOfRule.php @@ -10,7 +10,6 @@ use PHPStan\DependencyInjection\RegisteredRule; use PHPStan\Parser\LastConditionVisitor; use PHPStan\Rules\Comparison\ConstantConditionInTraitHelper; -use PHPStan\Rules\Comparison\PossiblyImpureTipHelper; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleErrorBuilder; use PHPStan\Rules\RuleLevelHelper; @@ -33,7 +32,6 @@ final class ImpossibleInstanceOfRule implements Rule public function __construct( private RuleLevelHelper $ruleLevelHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, #[AutowiredParameter] private bool $treatPhpDocTypesAsCertain, @@ -89,25 +87,23 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node, $reasons): RuleErrorBuilder { if ($reasons !== []) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder->acceptsReasonsTip($reasons)); + return $ruleErrorBuilder->acceptsReasonsTip($reasons); } if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } $instanceofTypeWithoutPhpDocs = $scope->getNativeType($node); if ($instanceofTypeWithoutPhpDocs instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; if (!$instanceofType->getValue()) { diff --git a/src/Rules/Comparison/BooleanAndConstantConditionRule.php b/src/Rules/Comparison/BooleanAndConstantConditionRule.php index 2947e6d3eed..d1fcbb63c98 100644 --- a/src/Rules/Comparison/BooleanAndConstantConditionRule.php +++ b/src/Rules/Comparison/BooleanAndConstantConditionRule.php @@ -26,7 +26,6 @@ final class BooleanAndConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -59,20 +58,18 @@ public function processNode( if ($leftType instanceof ConstantBooleanType) { $addTipLeft = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $originalNode->left); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); @@ -111,7 +108,7 @@ public function processNode( if ($rightType instanceof ConstantBooleanType && !$scope->isInFirstLevelStatement()) { $addTipRight = function (RuleErrorBuilder $ruleErrorBuilder) use ($rightScope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType( @@ -119,15 +116,13 @@ public function processNode( $originalNode->right, ); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); @@ -163,20 +158,18 @@ public function processNode( if ($nodeType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $scope->getNativeType($originalNode); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); diff --git a/src/Rules/Comparison/BooleanNotConstantConditionRule.php b/src/Rules/Comparison/BooleanNotConstantConditionRule.php index 0052f9f8ab4..4ac38e9b216 100644 --- a/src/Rules/Comparison/BooleanNotConstantConditionRule.php +++ b/src/Rules/Comparison/BooleanNotConstantConditionRule.php @@ -23,7 +23,6 @@ final class BooleanNotConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -50,20 +49,18 @@ public function processNode( if ($exprType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->expr, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->expr); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->expr, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->expr, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->expr, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); diff --git a/src/Rules/Comparison/BooleanOrConstantConditionRule.php b/src/Rules/Comparison/BooleanOrConstantConditionRule.php index a010342caa7..be1478c7c09 100644 --- a/src/Rules/Comparison/BooleanOrConstantConditionRule.php +++ b/src/Rules/Comparison/BooleanOrConstantConditionRule.php @@ -26,7 +26,6 @@ final class BooleanOrConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -59,20 +58,18 @@ public function processNode( if ($leftType instanceof ConstantBooleanType) { $addTipLeft = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $originalNode->left); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->left, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); @@ -111,7 +108,7 @@ public function processNode( if ($rightType instanceof ConstantBooleanType && !$scope->isInFirstLevelStatement()) { $addTipRight = function (RuleErrorBuilder $ruleErrorBuilder) use ($rightScope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType( @@ -119,15 +116,13 @@ public function processNode( $originalNode->right, ); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($rightScope, $originalNode->right, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); @@ -163,20 +158,18 @@ public function processNode( if ($nodeType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $scope->getNativeType($originalNode); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); diff --git a/src/Rules/Comparison/ConstantLooseComparisonRule.php b/src/Rules/Comparison/ConstantLooseComparisonRule.php index d872f60a016..ce3078c42aa 100644 --- a/src/Rules/Comparison/ConstantLooseComparisonRule.php +++ b/src/Rules/Comparison/ConstantLooseComparisonRule.php @@ -22,7 +22,6 @@ final class ConstantLooseComparisonRule implements Rule { public function __construct( - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, #[AutowiredParameter] private bool $treatPhpDocTypesAsCertain, @@ -53,20 +52,18 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } $instanceofTypeWithoutPhpDocs = $scope->getNativeType($node); if ($instanceofTypeWithoutPhpDocs->isTrue()->yes() || $instanceofTypeWithoutPhpDocs->isFalse()->yes()) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; if ($nodeType->isFalse()->yes()) { diff --git a/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php b/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php index 603d6613fba..bdcfb8ca250 100644 --- a/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php +++ b/src/Rules/Comparison/DoWhileLoopConstantConditionRule.php @@ -27,7 +27,6 @@ final class DoWhileLoopConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -79,20 +78,18 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->getCond(), $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->getCond()); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->getCond(), $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->getCond(), $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->getCond(), $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $ruleError = $addTip(RuleErrorBuilder::message(sprintf( diff --git a/src/Rules/Comparison/ElseIfConstantConditionRule.php b/src/Rules/Comparison/ElseIfConstantConditionRule.php index f4c02a62a79..dcc53ce1452 100644 --- a/src/Rules/Comparison/ElseIfConstantConditionRule.php +++ b/src/Rules/Comparison/ElseIfConstantConditionRule.php @@ -23,7 +23,6 @@ final class ElseIfConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -50,20 +49,18 @@ public function processNode( if ($exprType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->cond->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); diff --git a/src/Rules/Comparison/IfConstantConditionRule.php b/src/Rules/Comparison/IfConstantConditionRule.php index 5d43388b75f..27a15fa3e70 100644 --- a/src/Rules/Comparison/IfConstantConditionRule.php +++ b/src/Rules/Comparison/IfConstantConditionRule.php @@ -22,7 +22,6 @@ final class IfConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -47,20 +46,18 @@ public function processNode( if ($exprType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $ruleError = $addTip(RuleErrorBuilder::message(sprintf( diff --git a/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php b/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php index e39c73a4428..f13db23fff0 100644 --- a/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php +++ b/src/Rules/Comparison/ImpossibleCheckTypeFunctionCallRule.php @@ -23,7 +23,6 @@ final class ImpossibleCheckTypeFunctionCallRule implements Rule public function __construct( private ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -62,24 +61,22 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $funcCall, $nodeResult, $reasons, $argsResult): RuleErrorBuilder { if ($reasons !== []) { - return $this->possiblyImpureTipHelper->addTip($scope, $funcCall, $ruleErrorBuilder->acceptsReasonsTip($reasons)); + return $ruleErrorBuilder->acceptsReasonsTip($reasons); } if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $funcCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } $isAlways = $this->impossibleCheckTypeHelper->doNotTreatPhpDocTypesAsCertain()->findSpecifiedType($scope, $funcCall, $nodeResult, $argsResult, $reasons); if ($isAlways !== null) { - return $this->possiblyImpureTipHelper->addTip($scope, $funcCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $funcCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $funcCall, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; if (!$isAlways) { diff --git a/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php b/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php index 977c9d7c6b5..8be07ea5f35 100644 --- a/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php +++ b/src/Rules/Comparison/ImpossibleCheckTypeMethodCallRule.php @@ -26,7 +26,6 @@ final class ImpossibleCheckTypeMethodCallRule implements Rule public function __construct( private ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -65,24 +64,22 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $methodCall, $nodeResult, $reasons, $argsResult): RuleErrorBuilder { if ($reasons !== []) { - return $this->possiblyImpureTipHelper->addTip($scope, $methodCall, $ruleErrorBuilder->acceptsReasonsTip($reasons)); + return $ruleErrorBuilder->acceptsReasonsTip($reasons); } if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $methodCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } $isAlways = $this->impossibleCheckTypeHelper->doNotTreatPhpDocTypesAsCertain()->findSpecifiedType($scope, $methodCall, $nodeResult, $argsResult); if ($isAlways !== null) { - return $this->possiblyImpureTipHelper->addTip($scope, $methodCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $methodCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $methodCall, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; if (!$isAlways) { diff --git a/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php b/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php index baedea4008b..c0175eaab03 100644 --- a/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php +++ b/src/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRule.php @@ -26,7 +26,6 @@ final class ImpossibleCheckTypeStaticMethodCallRule implements Rule public function __construct( private ImpossibleCheckTypeHelper $impossibleCheckTypeHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -65,24 +64,22 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $staticCall, $nodeResult, $reasons, $argsResult): RuleErrorBuilder { if ($reasons !== []) { - return $this->possiblyImpureTipHelper->addTip($scope, $staticCall, $ruleErrorBuilder->acceptsReasonsTip($reasons)); + return $ruleErrorBuilder->acceptsReasonsTip($reasons); } if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $staticCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } $isAlways = $this->impossibleCheckTypeHelper->doNotTreatPhpDocTypesAsCertain()->findSpecifiedType($scope, $staticCall, $nodeResult, $argsResult); if ($isAlways !== null) { - return $this->possiblyImpureTipHelper->addTip($scope, $staticCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $staticCall, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $staticCall, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; if (!$isAlways) { diff --git a/src/Rules/Comparison/LogicalXorConstantConditionRule.php b/src/Rules/Comparison/LogicalXorConstantConditionRule.php index c4566be9ea8..eacc61e3356 100644 --- a/src/Rules/Comparison/LogicalXorConstantConditionRule.php +++ b/src/Rules/Comparison/LogicalXorConstantConditionRule.php @@ -25,7 +25,6 @@ final class LogicalXorConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -51,20 +50,18 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE if ($leftType instanceof ConstantBooleanType) { $addTipLeft = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->left); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->left, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->left, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); @@ -97,7 +94,7 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE if ($rightType instanceof ConstantBooleanType) { $addTipRight = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType( @@ -105,15 +102,13 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $node->right, ); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->right, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->right, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $isLast = $node->getAttribute(LastConditionVisitor::ATTRIBUTE_NAME); diff --git a/src/Rules/Comparison/MatchExpressionRule.php b/src/Rules/Comparison/MatchExpressionRule.php index 519afcc1d34..c2d6a09c87c 100644 --- a/src/Rules/Comparison/MatchExpressionRule.php +++ b/src/Rules/Comparison/MatchExpressionRule.php @@ -33,7 +33,6 @@ final class MatchExpressionRule implements Rule public function __construct( private ConstantConditionRuleHelper $constantConditionRuleHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -117,7 +116,6 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $armConditionScope->getType($matchCondition)->describe(VerbosityLevel::value()), $armConditionScope->getType($rawCondition)->describe(VerbosityLevel::value()), ))->line($armLine)->identifier('match.alwaysFalse'); - $this->possiblyImpureTipHelper->addTip($armConditionScope, $armConditionExpr, $errorBuilder); $ruleError = $errorBuilder->build(); if ($isTypeCheckCandidate) { // the constant-ness of a type-check call is owned by the @@ -145,7 +143,6 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE ->line($armLine) ->identifier('match.alwaysTrue') ->tip('Remove remaining cases below this one and this error will disappear too.'); - $this->possiblyImpureTipHelper->addTip($armConditionScope, $armConditionExpr, $errorBuilder); $ruleError = $errorBuilder->build(); if ($isTypeCheckCandidate) { $this->functionCallConstantConditionHelper->emitFunctionCallError(self::class, $scope, $rawCondition, true, $ruleError); diff --git a/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php b/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php index 392e702f497..4080801f6d0 100644 --- a/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php +++ b/src/Rules/Comparison/NumberComparisonOperatorsConstantConditionRule.php @@ -25,7 +25,6 @@ final class NumberComparisonOperatorsConstantConditionRule implements Rule { public function __construct( - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, #[AutowiredParameter] private bool $treatPhpDocTypesAsCertain, @@ -58,20 +57,18 @@ public function processNode( if ($exprType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $scope->getNativeType($node); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; switch (get_class($node)) { diff --git a/src/Rules/Comparison/PossiblyImpureTipHelper.php b/src/Rules/Comparison/PossiblyImpureTipHelper.php deleted file mode 100644 index cf65c783842..00000000000 --- a/src/Rules/Comparison/PossiblyImpureTipHelper.php +++ /dev/null @@ -1,50 +0,0 @@ - $ruleErrorBuilder - * @return RuleErrorBuilder - */ - public function addTip( - Scope $scope, - Expr $conditionExpr, - RuleErrorBuilder $ruleErrorBuilder, - ): RuleErrorBuilder - { - if (!$this->possiblyImpureTip) { - return $ruleErrorBuilder; - } - if (!$scope instanceof MutatingScope) { - return $ruleErrorBuilder; - } - $descriptions = $scope->findPossiblyImpureCallDescriptions($conditionExpr); - if (count($descriptions) === 0) { - return $ruleErrorBuilder; - } - - return $ruleErrorBuilder->possiblyImpureTip($descriptions); - } - -} diff --git a/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php b/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php index dc2889aa170..4683e2dc2bb 100644 --- a/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php +++ b/src/Rules/Comparison/StrictComparisonOfDifferentTypesRule.php @@ -29,7 +29,6 @@ final class StrictComparisonOfDifferentTypesRule implements Rule public function __construct( private RicherScopeGetTypeHelper $richerScopeGetTypeHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, #[AutowiredParameter] private bool $treatPhpDocTypesAsCertain, @@ -73,24 +72,22 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $reasons = $nodeTypeResult->reasons; if (count($reasons) > 0) { $ruleErrorBuilder = $ruleErrorBuilder->acceptsReasonsTip($reasons); - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } $instanceofTypeWithoutPhpDocs = $scope->getNativeType($node); if ($instanceofTypeWithoutPhpDocs instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $verbosity = VerbosityLevel::value(); diff --git a/src/Rules/Comparison/SwitchConditionRule.php b/src/Rules/Comparison/SwitchConditionRule.php index cc030c0b9ad..923550c3d3e 100644 --- a/src/Rules/Comparison/SwitchConditionRule.php +++ b/src/Rules/Comparison/SwitchConditionRule.php @@ -25,7 +25,6 @@ final class SwitchConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $constantConditionRuleHelper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private ExprPrinter $exprPrinter, private PhpVersion $phpVersion, @@ -124,7 +123,6 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $subjectType->describe(VerbosityLevel::value()), $caseConditionType->describe(VerbosityLevel::value()), ))->line($arm->getLine())->identifier('switch.alwaysFalse'); - $this->possiblyImpureTipHelper->addTip($armScope, $conditionExpr, $errorBuilder); $ruleError = $errorBuilder->build(); if ($scope->isInTrait()) { $this->constantConditionInTraitHelper->emitError(self::class, $scope, $conditionExpr, false, $ruleError); @@ -145,7 +143,6 @@ public function processNode(Node $node, Scope&NodeCallbackInvoker&CollectedDataE $armScope->getType($caseCondition)->describe(VerbosityLevel::value()), ))->line($arm->getLine())->identifier('switch.alwaysTrue') ->tip('Remove remaining cases below this one and this error will disappear too.'); - $this->possiblyImpureTipHelper->addTip($armScope, $conditionExpr, $errorBuilder); $ruleError = $errorBuilder->build(); if ($scope->isInTrait()) { $this->constantConditionInTraitHelper->emitError(self::class, $scope, $conditionExpr, true, $ruleError); diff --git a/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php b/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php index d1732bcb416..f535067f83d 100644 --- a/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php +++ b/src/Rules/Comparison/TernaryOperatorConstantConditionRule.php @@ -22,7 +22,6 @@ final class TernaryOperatorConstantConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -47,20 +46,18 @@ public function processNode( if ($exprType instanceof ConstantBooleanType) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $ruleError = $addTip(RuleErrorBuilder::message(sprintf( 'Ternary operator condition is always %s.', diff --git a/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php b/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php index 4859e0270cb..f731e14d3e2 100644 --- a/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php +++ b/src/Rules/Comparison/WhileLoopAlwaysFalseConditionRule.php @@ -22,7 +22,6 @@ final class WhileLoopAlwaysFalseConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -47,20 +46,18 @@ public function processNode( if ($exprType->isFalse()->yes()) { $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $node): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $node->cond); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $node->cond, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $ruleError = $addTip(RuleErrorBuilder::message('While loop condition is always false.'))->line($node->cond->getStartLine()) diff --git a/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php b/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php index 2acdc51da6b..41c1d23b33f 100644 --- a/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php +++ b/src/Rules/Comparison/WhileLoopAlwaysTrueConditionRule.php @@ -26,7 +26,6 @@ final class WhileLoopAlwaysTrueConditionRule implements Rule public function __construct( private ConstantConditionRuleHelper $helper, - private PossiblyImpureTipHelper $possiblyImpureTipHelper, private ConstantConditionInTraitHelper $constantConditionInTraitHelper, private FunctionCallConstantConditionHelper $functionCallConstantConditionHelper, #[AutowiredParameter] @@ -96,20 +95,18 @@ public function processNode( $addTip = function (RuleErrorBuilder $ruleErrorBuilder) use ($scope, $originalNode): RuleErrorBuilder { if (!$this->treatPhpDocTypesAsCertain) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } $booleanNativeType = $this->helper->getNativeBooleanType($scope, $originalNode->cond); if ($booleanNativeType instanceof ConstantBooleanType) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } if (!$this->treatPhpDocTypesAsCertainTip) { - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->cond, $ruleErrorBuilder); + return $ruleErrorBuilder; } - $ruleErrorBuilder = $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); - - return $this->possiblyImpureTipHelper->addTip($scope, $originalNode->cond, $ruleErrorBuilder); + return $ruleErrorBuilder->treatPhpDocTypesAsCertainTip(); }; $ruleError = $addTip(RuleErrorBuilder::message('While loop condition is always true.'))->line($originalNode->cond->getStartLine()) diff --git a/tests/PHPStan/Analyser/ScopeTest.php b/tests/PHPStan/Analyser/ScopeTest.php index 78d88cf8d1d..1912d549581 100644 --- a/tests/PHPStan/Analyser/ScopeTest.php +++ b/tests/PHPStan/Analyser/ScopeTest.php @@ -3,11 +3,8 @@ namespace PHPStan\Analyser; use PhpParser\Node\Expr\ConstFetch; -use PhpParser\Node\Expr\MethodCall; -use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name\FullyQualified; use PHPStan\DependencyInjection\BleedingEdgeToggle; -use PHPStan\Node\Expr\PossiblyImpureCallExpr; use PHPStan\Testing\PHPStanTestCase; use PHPStan\TrinaryLogic; use PHPStan\Type\Constant\ConstantArrayType; @@ -15,7 +12,6 @@ use PHPStan\Type\Constant\ConstantIntegerType; use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\IntegerRangeType; -use PHPStan\Type\IntegerType; use PHPStan\Type\ObjectType; use PHPStan\Type\StringType; use PHPStan\Type\Type; @@ -280,38 +276,4 @@ public function testMaybeDefinedVariables(): void $this->assertSame(['b'], $scope->getMaybeDefinedVariables()); } - public function testPossiblyImpureCallsDoNotAffectDifferingVariableRoots(): void - { - $scope = self::getContainer()->getByType(ScopeFactory::class)->create(ScopeContext::create('file.php')); - $variable = new Variable('a'); - $expr = new PossiblyImpureCallExpr(new MethodCall($variable, 'remember'), $variable, 'Collection::remember()'); - $intScope = $scope->assignExpression($expr, new IntegerType(), new IntegerType()); - $stringScope = $scope->assignExpression($expr, new StringType(), new StringType()); - - $this->assertSame([], $intScope->getDifferingVariableRoots($scope)); - $this->assertSame([], $scope->getDifferingVariableRoots($intScope)); - $this->assertSame([], $intScope->getDifferingVariableRoots($stringScope)); - $this->assertSame([], $stringScope->getDifferingVariableRoots($intScope)); - - $variableScope = $intScope->assignVariable('a', new StringType(), new StringType(), TrinaryLogic::createYes()); - $this->assertSame(['a'], $variableScope->getDifferingVariableRoots($stringScope)); - $this->assertSame(['a'], $stringScope->getDifferingVariableRoots($variableScope)); - } - - public function testPossiblyImpureConditionalCallsDoNotAffectDifferingVariableRoots(): void - { - $scope = self::getContainer()->getByType(ScopeFactory::class)->create(ScopeContext::create('file.php')); - $variable = new Variable('a'); - $expr = new PossiblyImpureCallExpr(new MethodCall($variable, 'remember'), $variable, 'Collection::remember()'); - $conditionalScope = $scope->addConditionalExpressions($scope->getExprPrinter()->printExpr($expr), [ - new ConditionalExpressionHolder( - ['$condition' => ExpressionTypeHolder::createYes(new Variable('condition'), new ConstantBooleanType(true))], - ExpressionTypeHolder::createYes($expr, new IntegerType()), - ), - ]); - - $this->assertSame([], $scope->getDifferingVariableRoots($conditionalScope)); - $this->assertSame([], $conditionalScope->getDifferingVariableRoots($scope)); - } - } diff --git a/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php b/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php index 81d5ef2aee3..3e84a66d073 100644 --- a/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php @@ -4,7 +4,6 @@ use PHPStan\Rules\Comparison\ConstantConditionInTraitHelper; use PHPStan\Rules\Comparison\ConstantConditionInTraitRule; -use PHPStan\Rules\Comparison\PossiblyImpureTipHelper; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleLevelHelper; use PHPStan\Testing\CompositeRule; @@ -37,7 +36,6 @@ protected function getRule(): Rule return new CompositeRule([ new ImpossibleInstanceOfRule( $ruleLevelHelper, - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), treatPhpDocTypesAsCertain: true, reportAlwaysTrueInLastCondition: $this->reportAlwaysTrueInLastCondition, @@ -506,17 +504,15 @@ public function testBug13975(string $file): void $this->analyse([$file], []); } - public function testPossiblyImpureTip(): void + public function testRememberedPossiblyImpureValues(): void { - $learnMore = ' Learn more: https://phpstan.org/blog/remembering-and-forgetting-returned-values'; $this->analyse([__DIR__ . '/data/possibly-impure-instanceof-tip.php'], [ - // maybe-impure: tip expected + // maybe-impure: the value is remembered [ 'Instanceof between PossiblyImpureInstanceofTip\Cat and PossiblyImpureInstanceofTip\Cat will always evaluate to true.', 41, - 'If PossiblyImpureInstanceofTip\Holder::maybeImpureMethod() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore, ], - // pure: no tip, error explained by type + // pure [ 'Instanceof between PossiblyImpureInstanceofTip\Cat and PossiblyImpureInstanceofTip\Cat will always evaluate to true.', 53, diff --git a/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleWithUncertainPhpDocTypesTest.php b/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleWithUncertainPhpDocTypesTest.php index 2ee8db20e0d..ff7da0ad122 100644 --- a/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleWithUncertainPhpDocTypesTest.php +++ b/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleWithUncertainPhpDocTypesTest.php @@ -4,7 +4,6 @@ use PHPStan\Rules\Comparison\ConstantConditionInTraitHelper; use PHPStan\Rules\Comparison\ConstantConditionInTraitRule; -use PHPStan\Rules\Comparison\PossiblyImpureTipHelper; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleLevelHelper; use PHPStan\Testing\CompositeRule; @@ -36,7 +35,6 @@ protected function getRule(): Rule return new CompositeRule([ new ImpossibleInstanceOfRule( $ruleLevelHelper, - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), treatPhpDocTypesAsCertain: false, reportAlwaysTrueInLastCondition: false, diff --git a/tests/PHPStan/Rules/Comparison/BooleanAndConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/BooleanAndConstantConditionRuleTest.php index 91a5f8be57a..28fa224f201 100644 --- a/tests/PHPStan/Rules/Comparison/BooleanAndConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/BooleanAndConstantConditionRuleTest.php @@ -26,7 +26,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -38,7 +37,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -50,7 +48,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -62,7 +59,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/BooleanNotConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/BooleanNotConstantConditionRuleTest.php index 438b542441f..0bf53bc3808 100644 --- a/tests/PHPStan/Rules/Comparison/BooleanNotConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/BooleanNotConstantConditionRuleTest.php @@ -25,7 +25,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -37,7 +36,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -49,7 +47,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -61,7 +58,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php index 348fc70f524..e638858bc0d 100644 --- a/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php @@ -26,7 +26,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -38,7 +37,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -50,7 +48,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -62,7 +59,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleWithUncertainPhpDocTypesTest.php b/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleWithUncertainPhpDocTypesTest.php index b78733e32bc..79a577db09e 100644 --- a/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleWithUncertainPhpDocTypesTest.php +++ b/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleWithUncertainPhpDocTypesTest.php @@ -24,7 +24,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -36,7 +35,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -48,7 +46,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -60,7 +57,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/Bug14534Test.php b/tests/PHPStan/Rules/Comparison/Bug14534Test.php index cc8f02a3973..387ca7ef996 100644 --- a/tests/PHPStan/Rules/Comparison/Bug14534Test.php +++ b/tests/PHPStan/Rules/Comparison/Bug14534Test.php @@ -17,7 +17,6 @@ protected function getRule(): Rule { return new StrictComparisonOfDifferentTypesRule( self::getContainer()->getByType(RicherScopeGetTypeHelper::class), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), treatPhpDocTypesAsCertain: true, reportAlwaysTrueInLastCondition: true, diff --git a/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php b/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php index 60c19d9bcc9..adf633d0cd0 100644 --- a/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php @@ -25,7 +25,6 @@ protected function getRule(): Rule // @phpstan-ignore argument.type return new CompositeRule([ new ConstantLooseComparisonRule( - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), $this->treatPhpDocTypesAsCertain, $this->reportAlwaysTrueInLastCondition, diff --git a/tests/PHPStan/Rules/Comparison/DoWhileLoopConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/DoWhileLoopConstantConditionRuleTest.php index ce4efddafd7..7c4d2abcc5f 100644 --- a/tests/PHPStan/Rules/Comparison/DoWhileLoopConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/DoWhileLoopConstantConditionRuleTest.php @@ -21,7 +21,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -32,7 +31,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -44,7 +42,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -56,7 +53,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), diff --git a/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php index 8f706ac679f..75ec432594b 100644 --- a/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php @@ -26,7 +26,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -38,7 +37,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -50,7 +48,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -62,7 +59,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -185,7 +181,7 @@ public function testBug6947(): void [ 'Elseif condition is always false.', 13, - "• Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.\n• If Bug6947\HelloWorld::getValue() is impure, add @phpstan-impure PHPDoc tag above its declaration. Learn more: https://phpstan.org/blog/remembering-and-forgetting-returned-values", + 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.', ], ]); } diff --git a/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php index cda215da42c..10fd1c6a98f 100644 --- a/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php @@ -23,7 +23,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -34,7 +33,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -46,7 +44,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -58,7 +55,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php index 64470d7ba3c..efc9757e99b 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php @@ -26,7 +26,6 @@ protected function getRule(): Rule self::createReflectionProvider(), true, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), true, diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleWithUncertainPhpDocTypesTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleWithUncertainPhpDocTypesTest.php index 635d4eff976..3fff9077bce 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleWithUncertainPhpDocTypesTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleWithUncertainPhpDocTypesTest.php @@ -26,7 +26,6 @@ protected function getRule(): Rule self::createReflectionProvider(), false, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), false, diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeGenericOverwriteRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeGenericOverwriteRuleTest.php index 9e7ed77f674..23f49fd2939 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeGenericOverwriteRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeGenericOverwriteRuleTest.php @@ -18,7 +18,6 @@ public function getRule(): Rule self::createReflectionProvider(), true, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), true, diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleEqualsTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleEqualsTest.php index 5252c264e67..8ddaf48e513 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleEqualsTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleEqualsTest.php @@ -18,7 +18,6 @@ public function getRule(): Rule self::createReflectionProvider(), true, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), true, diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php index ff111cce5e7..076a291bb79 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php @@ -27,7 +27,6 @@ public function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -339,7 +338,6 @@ public function testBug14705(): void [ 'Call to method Bug14705\Foo::isValid() with non-empty-string will always evaluate to true.', 87, - 'If Bug14705\Foo::isValid() is impure, add @phpstan-impure PHPDoc tag above its declaration. Learn more: https://phpstan.org/blog/remembering-and-forgetting-returned-values', ], [ 'Call to method Bug14705\Foo::assertValid() with non-empty-string will always evaluate to true.', diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php index 75c47afe7f7..1cf941dafd9 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php @@ -27,7 +27,6 @@ public function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/LogicalXorConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/LogicalXorConstantConditionRuleTest.php index 834386423f5..7c0384749c4 100644 --- a/tests/PHPStan/Rules/Comparison/LogicalXorConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/LogicalXorConstantConditionRuleTest.php @@ -21,7 +21,6 @@ protected function getRule(): TRule new ConstantConditionRuleHelper( $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -33,7 +32,6 @@ protected function getRule(): TRule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -45,7 +43,6 @@ protected function getRule(): TRule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -57,7 +54,6 @@ protected function getRule(): TRule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), diff --git a/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php b/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php index 3171da7f961..600a95e868d 100644 --- a/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php @@ -23,7 +23,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -33,7 +32,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -45,7 +43,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -57,7 +54,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php index 106ddee426d..4e1074b480a 100644 --- a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php @@ -21,7 +21,6 @@ protected function getRule(): Rule // @phpstan-ignore argument.type return new CompositeRule([ new NumberComparisonOperatorsConstantConditionRule( - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), $this->treatPhpDocTypesAsCertain, true, diff --git a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleWithoutForeachPollutionTest.php b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleWithoutForeachPollutionTest.php index 035af5cacba..c80e29a9eb9 100644 --- a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleWithoutForeachPollutionTest.php +++ b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleWithoutForeachPollutionTest.php @@ -18,7 +18,6 @@ protected function getRule(): Rule // @phpstan-ignore argument.type return new CompositeRule([ new NumberComparisonOperatorsConstantConditionRule( - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), true, true, diff --git a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php index 36770adb30a..1c58d5e3338 100644 --- a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php @@ -27,7 +27,6 @@ protected function getRule(): Rule return new CompositeRule([ new StrictComparisonOfDifferentTypesRule( self::getContainer()->getByType(RicherScopeGetTypeHelper::class), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), $this->treatPhpDocTypesAsCertain, $this->reportAlwaysTrueInLastCondition, @@ -1106,21 +1105,15 @@ public function testBug11609(): void ]); } - public function testPossiblyImpureTip(): void + public function testRememberedPossiblyImpureValues(): void { - $learnMore = ' Learn more: https://phpstan.org/blog/remembering-and-forgetting-returned-values'; - $impureTipFunction = 'If PossiblyImpureTip\maybeImpureFunction() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore; - $impureTipMethod = 'If PossiblyImpureTip\MethodCallTest::maybeImpureMethod() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore; - $impureTipStatic = 'If PossiblyImpureTip\StaticCallTest::maybeImpureStatic() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore; - $impureTipIntermediate = 'If PossiblyImpureTip\ObjectInvalidationTest::maybeImpureIntermediate() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore; $this->analyse([__DIR__ . '/data/possibly-impure-tip.php'], [ - // Function calls: maybe-impure (tip expected) + // Function calls: maybe-impure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 34, - $impureTipFunction, ], - // Function calls: @phpstan-pure (no tip) + // Function calls: @phpstan-pure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 40, @@ -1128,31 +1121,29 @@ public function testPossiblyImpureTip(): void // Function calls: @phpstan-impure - no error at all (value not remembered) // Function calls: void - cannot appear in === comparison - // Method calls: maybe-impure (tip expected) + // Method calls: maybe-impure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 85, - $impureTipMethod, ], - // Method calls: @phpstan-pure (no tip) + // Method calls: @phpstan-pure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 94, ], // Method calls: @phpstan-impure - no error at all (value not remembered) - // Method calls: void - return type explains the error (no tip) + // Method calls: void - return type explains the error [ 'Strict comparison using === between null and null will always evaluate to true.', 114, ], - // Static method calls: maybe-impure (tip expected) + // Static method calls: maybe-impure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 156, - $impureTipStatic, ], - // Static method calls: @phpstan-pure (no tip) + // Static method calls: @phpstan-pure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 165, @@ -1160,14 +1151,13 @@ public function testPossiblyImpureTip(): void // Static method calls: @phpstan-impure - no error at all (value not remembered) // Static method calls: void - hasSideEffects()->yes() invalidates - // Object invalidation: maybe-impure intermediate (tip expected) + // Object invalidation: maybe-impure intermediate // getValue() is @phpstan-pure, intermediate is maybe-impure [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 233, - $impureTipIntermediate, ], - // Object invalidation: @phpstan-pure intermediate (no tip) + // Object invalidation: @phpstan-pure intermediate [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 244, @@ -1179,16 +1169,14 @@ public function testPossiblyImpureTip(): void [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 294, - 'If PossiblyImpureTip\IntermediateCallPriority::next() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore, ], - // No intermediate call: tip points to fetch() itself + // No intermediate call [ 'Strict comparison using === between 1 and 2 will always evaluate to false.', 303, - 'If PossiblyImpureTip\IntermediateCallPriority::fetch() is impure, add @phpstan-impure PHPDoc tag above its declaration.' . $learnMore, ], - // No tip when return type alone explains the error + // The return type alone explains the error [ 'Strict comparison using === between string and null will always evaluate to false.', 324, diff --git a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleWithoutForeachPollutionTest.php b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleWithoutForeachPollutionTest.php index 10d86a63661..bfd42116ca3 100644 --- a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleWithoutForeachPollutionTest.php +++ b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleWithoutForeachPollutionTest.php @@ -20,7 +20,6 @@ protected function getRule(): Rule return new CompositeRule([ new StrictComparisonOfDifferentTypesRule( self::getContainer()->getByType(RicherScopeGetTypeHelper::class), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), true, false, diff --git a/tests/PHPStan/Rules/Comparison/SwitchConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/SwitchConditionRuleTest.php index cb11c9ba967..6c064f96132 100644 --- a/tests/PHPStan/Rules/Comparison/SwitchConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/SwitchConditionRuleTest.php @@ -28,7 +28,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(ExprPrinter::class), self::getContainer()->getByType(PhpVersion::class), diff --git a/tests/PHPStan/Rules/Comparison/TernaryOperatorConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/TernaryOperatorConstantConditionRuleTest.php index ba69d01a77f..858bb4c9aca 100644 --- a/tests/PHPStan/Rules/Comparison/TernaryOperatorConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/TernaryOperatorConstantConditionRuleTest.php @@ -23,7 +23,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -34,7 +33,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -46,7 +44,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, @@ -58,7 +55,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->treatPhpDocTypesAsCertain, ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->treatPhpDocTypesAsCertain, diff --git a/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysFalseConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysFalseConditionRuleTest.php index 0ed691a60b4..9fd4e635eba 100644 --- a/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysFalseConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysFalseConditionRuleTest.php @@ -21,7 +21,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -32,7 +31,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -44,7 +42,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -56,7 +53,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), diff --git a/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php index 23846895d88..93aab91f503 100644 --- a/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php @@ -21,7 +21,6 @@ protected function getRule(): Rule new ConstantConditionRuleHelper( $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -32,7 +31,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -44,7 +42,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), @@ -56,7 +53,6 @@ protected function getRule(): Rule self::createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), ), - new PossiblyImpureTipHelper(true), self::getContainer()->getByType(ConstantConditionInTraitHelper::class), self::getContainer()->getByType(FunctionCallConstantConditionHelper::class), $this->shouldTreatPhpDocTypesAsCertain(), diff --git a/turbo-ext/src/CallHandlerSupport.h b/turbo-ext/src/CallHandlerSupport.h index 204aa3b6e98..8a7f6634d2e 100644 --- a/turbo-ext/src/CallHandlerSupport.h +++ b/turbo-ext/src/CallHandlerSupport.h @@ -8,7 +8,7 @@ * one place), the php-parser node property reads, and the small value helpers * the twins spell alike (array_merge(), `$type instanceof NeverType && * $type->isExplicit()`, TemplateTypeHelper::resolveTemplateTypes() against an - * acceptor, the `%s::%s()` description of a PossiblyImpureCallExpr). + * acceptor). */ #ifndef PHPSTANTURBO_CALL_HANDLER_SUPPORT_H @@ -238,31 +238,6 @@ inline zv::Val arrayMerge(zval *a, zval *b) return pt_never_type_is_explicit(Z_OBJ_P(type), out); } -/* the sprintf('%s::%s()', $methodReflection->getDeclaringClass()->getDisplayName(), - * $methodReflection->getName()) of a PossiblyImpureCallExpr; UNDEF = pending - * exception */ -inline zv::Val possiblyImpureCallDescription(zval *methodReflection) -{ - zv::Val declaringClass = pt_extended_method_reflection_call(methodReflection, PT_MR_GET_DECLARING_CLASS); - if (UNEXPECTED(declaringClass.isUndef())) return zv::Val(); - zv::Val displayName = pt_class_reflection_get_display_name(Z_OBJ_P(declaringClass.raw()), true); - if (UNEXPECTED(displayName.isUndef())) return zv::Val(); - zv::Val methodName = pt_extended_method_reflection_call(methodReflection, PT_MR_GET_NAME); - if (UNEXPECTED(methodName.isUndef())) return zv::Val(); - zend_string *displayNameString = zval_get_string(displayName.raw()); - zend_string *methodNameString = zval_get_string(methodName.raw()); - smart_str description = {NULL, 0}; - smart_str_append(&description, displayNameString); - smart_str_appends(&description, "::"); - smart_str_append(&description, methodNameString); - smart_str_appends(&description, "()"); - zend_string_release(displayNameString); - zend_string_release(methodNameString); - zval value; - ZVAL_STR(&value, smart_str_extract(&description)); - return zv::Val::adopt(value); -} - /* TemplateTypeHelper::resolveTemplateTypes($type, * $acceptor->getResolvedTemplateTypeMap(), $acceptor instanceof * ExtendedParametersAcceptor ? $acceptor->getCallSiteVarianceMap() : diff --git a/turbo-ext/src/FuncCallScopeEffectsHelper.cpp b/turbo-ext/src/FuncCallScopeEffectsHelper.cpp index 6876a2a71b0..d9e07fe0662 100644 --- a/turbo-ext/src/FuncCallScopeEffectsHelper.cpp +++ b/turbo-ext/src/FuncCallScopeEffectsHelper.cpp @@ -259,11 +259,10 @@ class FuncCallScopeEffectsHelper explicit FuncCallScopeEffectsHelper(zend_object *self) : self(self) {} /* the constructor body: the promoted properties */ - void construct(zval *outputBufferHelper, bool rememberPossiblyImpureFunctionValues, zval *assignHandler) const + void construct(zval *outputBufferHelper, zval *assignHandler) const { zv::ObjRef object(self); object.propAtWrite(slots::outputBufferHelper, zv::Val::copyOf(zv::Ref(outputBufferHelper))); - object.propAtWrite(slots::rememberPossiblyImpureFunctionValues, zv::Val::boolean(rememberPossiblyImpureFunctionValues)); object.propAtWrite(slots::assignHandler, zv::Val::copyOf(zv::Ref(assignHandler))); } @@ -335,34 +334,6 @@ class FuncCallScopeEffectsHelper } } - if (functionReflection != NULL && parametersAcceptor != NULL && Z_TYPE_P(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) == IS_TRUE) { - zv::Val sideEffectsHold; - zval *sideEffects = pt_function_reflection_has_side_effects(functionReflection, sideEffectsHold); - if (UNEXPECTED(sideEffects == NULL)) return zv::Val(); - zend_long sideEffectsValue = trinaryOf(sideEffects, "maybe"); - if (UNEXPECTED(sideEffectsValue < 0)) return zv::Val(); - bool isBuiltin = false; - if (sideEffectsValue == PT_TRI_MAYBE && UNEXPECTED(!pt_function_reflection_is_builtin(functionReflection, isBuiltin))) return zv::Val(); - if (sideEffectsValue == PT_TRI_MAYBE && !isBuiltin) { - zv::Val nameHold; - zend_string *name = functionName(functionReflection, nameHold); - if (UNEXPECTED(name == NULL)) return zv::Val(); - zv::Val description = zv::Val::adoptString(zend_string_concat2(ZSTR_VAL(name), ZSTR_LEN(name), PT_LC("()"))); - zv::Args exprArgv{normalizedExpr, normalizedExpr, description.raw()}; - zv::Val possiblyImpureCallExpr = pt_type_new(PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, 3, exprArgv); - if (UNEXPECTED(possiblyImpureCallExpr.isUndef())) return zv::Val(); - zv::Val returnTypeHold; - zval *returnType = pt_parameters_acceptor_return_type(parametersAcceptor, returnTypeHold); - if (UNEXPECTED(returnType == NULL)) return zv::Val(); - zval mixed; - if (UNEXPECTED(!pt_mixed_type_new(&mixed))) return zv::Val(); - zv::Val mixedHold = zv::Val::adopt(mixed); - zv::Val assigned = pt_mutating_scope_assign_expression(Z_OBJ_P(scope.raw()), Z_OBJ_P(possiblyImpureCallExpr.raw()), returnType, mixedHold.raw()); - if (UNEXPECTED(assigned.isUndef())) return zv::Val(); - scope = std::move(assigned); - } - } - bool matches; if (UNEXPECTED(!nameIsOneOf<2>(functionReflection, pt_fcse_json, matches))) return zv::Val(); if (matches) { @@ -1426,9 +1397,8 @@ PT_MINIT_REGISTRATION(pt_register_func_call_scope_effects_helper) * service by reflecting the constructor */ cls.method(sigs::__construct, [](INTERNAL_FUNCTION_PARAMETERS) { zval *outputBufferHelper, *assignHandler; - bool rememberPossiblyImpureFunctionValues; - if (!zp::parse(execute_data, outputBufferHelper, rememberPossiblyImpureFunctionValues, assignHandler)) RETURN_THROWS(); - FuncCallScopeEffectsHelper(Z_OBJ_P(ZEND_THIS)).construct(outputBufferHelper, rememberPossiblyImpureFunctionValues, assignHandler); + if (!zp::parse(execute_data, outputBufferHelper, assignHandler)) RETURN_THROWS(); + FuncCallScopeEffectsHelper(Z_OBJ_P(ZEND_THIS)).construct(outputBufferHelper, assignHandler); }); cls.method(sigs::applyArrayWalkResult, [](INTERNAL_FUNCTION_PARAMETERS) { diff --git a/turbo-ext/src/MethodCallHandler.cpp b/turbo-ext/src/MethodCallHandler.cpp index 914bf7f2daa..7a32051e52c 100644 --- a/turbo-ext/src/MethodCallHandler.cpp +++ b/turbo-ext/src/MethodCallHandler.cpp @@ -462,49 +462,6 @@ class MethodCallHandler if (UNEXPECTED(isStatic.isUndef())) return zv::Val(); currentScope = pt_mutating_scope_invalidate_expression(Z_OBJ_P(currentScope.raw()), normalizedVar, true, declaringClass.raw(), zend_is_true(isStatic.raw())); if (UNEXPECTED(currentScope.isUndef())) return zv::Val(); - } else if (zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues))) { - zend_long hasSideEffects = reflectionTrinary(methodReflection.raw(), PT_MR_HAS_SIDE_EFFECTS); - if (UNEXPECTED(hasSideEffects < 0)) return zv::Val(); - bool remember = false; - if (hasSideEffects == PT_TRI_MAYBE) { - zv::Val declaringClass = pt_extended_method_reflection_call(methodReflection.raw(), PT_MR_GET_DECLARING_CLASS); - if (UNEXPECTED(declaringClass.isUndef())) return zv::Val(); - bool builtin; - if (UNEXPECTED(!pt_class_reflection_is_builtin(Z_OBJ_P(declaringClass.raw()), builtin))) return zv::Val(); - remember = !builtin; - } - if (remember) { - // the remembered call value and the @phpstan-self-out type are - // generic-sensitive: resolve them from the type-driven acceptor - // processArgs() selected, falling back to the structural acceptor - zval *acceptorForGenerics = resolvedParametersAcceptor.isNull() ? parametersAcceptor.raw() : resolvedParametersAcceptor.raw(); - zv::Val rememberedType = pt_template_argument_frame_return_type_of_call(acceptorForGenerics, currentScope.raw(), expr); - if (UNEXPECTED(rememberedType.isUndef())) return zv::Val(); - bool varContainsNullsafe; - if (UNEXPECTED(!pt_expression_result_contains_nullsafe(varResult.raw(), varContainsNullsafe))) return zv::Val(); - if (varContainsNullsafe) { - bool calledOnContainsNull; - if (UNEXPECTED(!pt_type_combinator_contains_null(calledOnType.raw(), calledOnContainsNull))) return zv::Val(); - if (calledOnContainsNull) { - // a call on a nullsafe chain whose receiver is nullable - // short-circuits to null - the tracked entry is keyed by the - // whole chain, so it must remember the propagated type - rememberedType = pt_type_combinator_add_null(rememberedType.raw()); - if (UNEXPECTED(rememberedType.isUndef())) return zv::Val(); - } - } - zval *normalizedVar = exprVar(normalizedExpr.raw()); - if (UNEXPECTED(normalizedVar == NULL)) return zv::Val(); - zv::Val description = possiblyImpureCallDescription(methodReflection.raw()); - if (UNEXPECTED(description.isUndef())) return zv::Val(); - zv::Args exprArgv{normalizedExpr.raw(), normalizedVar, description.raw()}; - zv::Val possiblyImpureCallExpr = pt_type_new(PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, 3, exprArgv); - if (UNEXPECTED(possiblyImpureCallExpr.isUndef())) return zv::Val(); - zv::Val mixed = pt_type_new_mixed_type(); - if (UNEXPECTED(mixed.isUndef())) return zv::Val(); - currentScope = pt_mutating_scope_assign_expression(Z_OBJ_P(currentScope.raw()), Z_OBJ_P(possiblyImpureCallExpr.raw()), rememberedType.raw(), mixed.raw()); - if (UNEXPECTED(currentScope.isUndef())) return zv::Val(); - } } zv::Val isStatic = pt_extended_method_reflection_call(methodReflection.raw(), PT_MR_IS_STATIC); if (UNEXPECTED(isStatic.isUndef())) return zv::Val(); diff --git a/turbo-ext/src/MutatingScope.cpp b/turbo-ext/src/MutatingScope.cpp index 899d5e30270..26b8d2767f5 100644 --- a/turbo-ext/src/MutatingScope.cpp +++ b/turbo-ext/src/MutatingScope.cpp @@ -1770,76 +1770,6 @@ class MutatingScope zv::Val getDefinedVariables() { return definedVariables(PT_TRI_YES); } zv::Val getMaybeDefinedVariables() { return definedVariables(PT_TRI_MAYBE); } - /* {{{ findPossiblyImpureCallDescriptions(): the NodeFinder::findFirst() - * walks natively (pt_find_first_recursive visits the same pre-order), - * the filter closure's `$this->getNodeKey($node) === $key` in the - * matcher; the walker's failure flag lives in the embedded pt_find_ctx */ - struct KeyMatchCtx - { - pt_find_ctx base; - MutatingScope *scope; - zend_class_entry *exprCe; - zend_string *key; - }; - - static bool keyMatcher(zend_object *node, void *vctx) - { - KeyMatchCtx *ctx = (KeyMatchCtx *) vctx; - if (!instanceof_function(node->ce, ctx->exprCe)) return false; - zval nodeZv; - ZVAL_OBJ(&nodeZv, node); - zv::Val key = ctx->scope->thisGetNodeKey(&nodeZv); - if (UNEXPECTED(key.isUndef())) { - ctx->base.failed = true; - return false; - } - return Z_TYPE_P(key.raw()) == IS_STRING && zend_string_equals(Z_STR_P(key.raw()), ctx->key); - } - - /* $nodeFinder->findFirst([$expr], fn => getNodeKey($node) === $key); - * NULL for no match — with `failed` set when an exception is pending */ - zend_object *findFirstByKey(zend_object *expr, zend_string *key, bool &failed) - { - zend_class_entry *exprCe = pt_class(PT_CLASS_EXPR); - if (UNEXPECTED(exprCe == NULL)) { - failed = true; - return NULL; - } - KeyMatchCtx ctx; - memset(&ctx, 0, sizeof(ctx)); - ctx.scope = this; - ctx.exprCe = exprCe; - ctx.key = key; - zend_object *found = pt_find_first_recursive(expr, keyMatcher, &ctx); - failed = ctx.base.failed; - return found; - } - - /* array_values(array_unique($descriptions)) for a list of strings */ - static zv::Val uniqueValues(zv::Arr &descriptions) - { - zv::Arr result = zv::Arr::create(descriptions.arrRef().size()); - zv::ScratchTable seen(descriptions.arrRef().size()); - for (auto entry : descriptions.arrRef()) { - zend_string *description = Z_STR_P(entry.value().raw()); - if (zend_hash_exists(seen.table(), description)) continue; - zval marker; - ZVAL_TRUE(&marker); - zend_hash_add_new(seen.table(), description, &marker); - result.push(entry.value()); - } - return zv::Val(std::move(result)); - } - - /* the key of $holderExpr->callExpr / ->impactedExpr through - * $this->getNodeKey(); UNDEF = pending exception */ - zv::Val impureExprKey(zend_object *holderExpr, const char *prop, size_t len) - { - zv::Ref expr = nodeProp(holderExpr, prop, len); - if (UNEXPECTED(expr.raw() == NULL)) return zv::Val(); - return thisGetNodeKey(expr.deref().raw()); - } - /* the string of a getNodeKey() result (an Error when a subclass * returned something else) */ static zend_string *keyString(zv::Val &key) @@ -1851,121 +1781,6 @@ class MutatingScope return Z_STR_P(key.raw()); } - zv::Val findPossiblyImpureCallDescriptions(zend_object *expr) - { - zend_class_entry *impureCe = pt_class(PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR); - if (UNEXPECTED(impureCe == NULL)) return zv::Val(); - zv::Arr callExprDescriptions = zv::Arr::create(0); - bool foundCallExprMatch = false; - zv::ScratchTable matchedCallExprKeys(0); - for (auto entry : zv::ArrRef(slot(PT_MS_PROP_EXPRESSION_TYPES).raw())) { - zv::Val holderExprVal = holderExpr(entry.value()); - if (UNEXPECTED(holderExprVal.isUndef())) return zv::Val(); - if (!holderExprVal.ref().instanceOf(impureCe)) continue; - zend_object *holderExprObject = Z_OBJ_P(holderExprVal.raw()); - - zv::Val callExprKeyVal = impureExprKey(holderExprObject, PT_LC("callExpr")); - if (UNEXPECTED(callExprKeyVal.isUndef())) return zv::Val(); - zend_string *callExprKey = keyString(callExprKeyVal); - if (UNEXPECTED(callExprKey == NULL)) return zv::Val(); - - bool failed; - zend_object *found = findFirstByKey(expr, callExprKey, failed); - if (UNEXPECTED(failed)) return zv::Val(); - if (found == NULL) continue; - - foundCallExprMatch = true; - zval marker; - ZVAL_TRUE(&marker); - zend_symtable_update(matchedCallExprKeys.table(), callExprKey, &marker); - - /* Only show the tip when the scope's type for the call expression - * differs from the declared return type, meaning control flow - * narrowing affected the type (the cached value was narrowed). */ - zval foundZv; - ZVAL_OBJ(&foundZv, found); - zv::Val scopeType = thisGetType(&foundZv); - if (UNEXPECTED(scopeType.isUndef())) return zv::Val(); - zv::Val declaredReturnType = holderType(entry.value()); - if (UNEXPECTED(declaredReturnType.isUndef())) return zv::Val(); - if (UNEXPECTED(Z_TYPE_P(scopeType.raw()) != IS_OBJECT || Z_TYPE_P(declaredReturnType.raw()) != IS_OBJECT)) { - zend_throw_error(NULL, "Call to a member function isSuperTypeOf() on a non-object"); - return zv::Val(); - } - bool declaredAccepts, scopeAccepts; - if (UNEXPECTED(!isSuperTypeOfYes(Z_OBJ_P(declaredReturnType.raw()), scopeType.raw(), declaredAccepts))) return zv::Val(); - if (declaredAccepts) { - if (UNEXPECTED(!isSuperTypeOfYes(Z_OBJ_P(scopeType.raw()), declaredReturnType.raw(), scopeAccepts))) return zv::Val(); - if (scopeAccepts) continue; - } - - zv::Val description = pt_type_call(holderExprObject, PT_LC("getcalldescription"), 0, NULL); - if (UNEXPECTED(description.isUndef())) return zv::Val(); - callExprDescriptions.push(std::move(description)); - } - - /* If the first pass found a callExpr in the error expression but - * filtered it out (return type wasn't narrowed), the error is - * explained by the return type alone - skip the fallback. */ - if (foundCallExprMatch && callExprDescriptions.arrRef().size() == 0) return pt_op_empty_array(); - - /* Second pass: match by impactedExpr for cases where a maybe-impure method - * on an object didn't invalidate it, but a different method's return - * value was narrowed on that object. - * Skip when the expression itself is a direct method/static call - - * those are passed by ImpossibleCheckType rules where the error is - * about the call's arguments, not about object state. */ - zend_class_entry *methodCallCe = pt_class(PT_CLASS_METHOD_CALL); - zend_class_entry *staticCallCe = pt_class(PT_CLASS_STATIC_CALL); - if (UNEXPECTED(methodCallCe == NULL || staticCallCe == NULL)) return zv::Val(); - if (!(instanceof_function(expr->ce, methodCallCe) || instanceof_function(expr->ce, staticCallCe))) { - zv::Arr impactedExprDescriptions = zv::Arr::create(0); - for (auto entry : zv::ArrRef(slot(PT_MS_PROP_EXPRESSION_TYPES).raw())) { - zv::Val holderExprVal = holderExpr(entry.value()); - if (UNEXPECTED(holderExprVal.isUndef())) return zv::Val(); - if (!holderExprVal.ref().instanceOf(impureCe)) continue; - zend_object *holderExprObject = Z_OBJ_P(holderExprVal.raw()); - - zv::Val impactedExprKeyVal = impureExprKey(holderExprObject, PT_LC("impactedExpr")); - if (UNEXPECTED(impactedExprKeyVal.isUndef())) return zv::Val(); - zend_string *impactedExprKey = keyString(impactedExprKeyVal); - if (UNEXPECTED(impactedExprKey == NULL)) return zv::Val(); - - /* Skip if impactedExpr is the same as callExpr (function calls) */ - zv::Val callExprKeyVal = impureExprKey(holderExprObject, PT_LC("callExpr")); - if (UNEXPECTED(callExprKeyVal.isUndef())) return zv::Val(); - zend_string *callExprKey = keyString(callExprKeyVal); - if (UNEXPECTED(callExprKey == NULL)) return zv::Val(); - if (zend_string_equals(impactedExprKey, callExprKey)) continue; - - /* Skip if this entry's callExpr was already matched in the first pass - * ($callExprKey = $this->getNodeKey($holderExpr->callExpr) again) */ - zv::Val callExprKeyAgain = impureExprKey(holderExprObject, PT_LC("callExpr")); - if (UNEXPECTED(callExprKeyAgain.isUndef())) return zv::Val(); - zend_string *callExprKey2 = keyString(callExprKeyAgain); - if (UNEXPECTED(callExprKey2 == NULL)) return zv::Val(); - if (zend_symtable_exists(matchedCallExprKeys.table(), callExprKey2)) continue; - - bool failed; - zend_object *found = findFirstByKey(expr, impactedExprKey, failed); - if (UNEXPECTED(failed)) return zv::Val(); - if (found == NULL) continue; - - zv::Val description = pt_type_call(holderExprObject, PT_LC("getcalldescription"), 0, NULL); - if (UNEXPECTED(description.isUndef())) return zv::Val(); - impactedExprDescriptions.push(std::move(description)); - } - - /* Prefer impactedExpr matches (intermediate calls that could have - * invalidated the object) over callExpr matches */ - if (impactedExprDescriptions.arrRef().size() > 0) return uniqueValues(impactedExprDescriptions); - } - - if (callExprDescriptions.arrRef().size() > 0) return uniqueValues(callExprDescriptions); - - return pt_op_empty_array(); - } - /* $a->isSuperTypeOf($b)->yes(); false = pending exception */ [[nodiscard]] static bool isSuperTypeOfYes(zend_object *a, zval *b, bool &out) { @@ -1981,7 +1796,6 @@ class MutatingScope return true; } - /* }}} */ /* private */ static bool isGlobalVariable(zend_string *variableName) { return pt_is_superglobal_name(variableName); } @@ -2189,14 +2003,6 @@ class MutatingScope return true; } - /* $holder->getExpr() instanceof PossiblyImpureCallExpr; false = pending exception */ - [[nodiscard]] static bool holderExprIsPossiblyImpureCall(zv::Ref holder, bool &out) - { - zv::Val expr = holderExpr(holder); - if (UNEXPECTED(expr.isUndef())) return false; - return isInstance(expr.ref(), PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, out); - } - /* $a->equals($b): the native holders' body when both are native, the * method of anything else; false = pending exception */ [[nodiscard]] static bool holderEquals(zv::Ref a, zv::Ref b, bool &out) @@ -3099,9 +2905,6 @@ class MutatingScope HashTable *ours = Z_ARRVAL_P(slot(table.slot).raw()); HashTable *theirs = Z_ARRVAL_P(other.slot(table.slot).raw()); for (auto entry : zv::TableRef(ours)) { - bool impure; - if (UNEXPECTED(!holderExprIsPossiblyImpureCall(entry.value(), impure))) return zv::Val(); - if (impure) continue; zval *theirHolder = findByEntryKey(theirs, entry); if (theirHolder != NULL && Z_TYPE_P(theirHolder) != IS_NULL) { bool equal = sameObject(entry.value(), zv::Ref(theirHolder)); @@ -3114,9 +2917,6 @@ class MutatingScope } for (auto entry : zv::TableRef(theirs)) { if (issetByEntryKey(ours, entry)) continue; - bool impure; - if (UNEXPECTED(!holderExprIsPossiblyImpureCall(entry.value(), impure))) return zv::Val(); - if (impure) continue; bool noRoot; if (UNEXPECTED(!addVariableRoot(roots, entry, noRoot))) return zv::Val(); if (noRoot) return zv::Val::null(); @@ -3138,27 +2938,7 @@ class MutatingScope if (theirHolders != NULL && Z_TYPE_P(theirHolders) != IS_NULL && zend_is_identical(theirHolders, entry.value().raw())) continue; zend_string *key = entryKeyString(entry, "getVariablesOfExpressionKey", "key"); if (UNEXPECTED(key == NULL)) return zv::Val(); - if (!addVariablesOfExpressionKey(roots, key)) { - zv::Ref holders = entry.value().deref(); - if (UNEXPECTED(!holders.isArray())) { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(holders.raw())); - if (UNEXPECTED(EG(exception))) return zv::Val(); - continue; - } - for (auto holderEntry : zv::ArrRef(holders.raw())) { - zv::Ref holder = holderEntry.value().deref(); - if (UNEXPECTED(!holder.isObject())) { - zend_throw_error(NULL, "Call to a member function getTypeHolder() on %s", zend_zval_value_name(holder.raw())); - return zv::Val(); - } - zv::Val typeHolder = pt_type_call(holder.asObject(), PT_LC("gettypeholder"), 0, NULL); - if (UNEXPECTED(typeHolder.isUndef())) return zv::Val(); - bool impure; - if (UNEXPECTED(!holderExprIsPossiblyImpureCall(typeHolder.ref(), impure))) return zv::Val(); - if (!impure) return zv::Val::null(); - } - continue; - } + if (!addVariablesOfExpressionKey(roots, key)) return zv::Val::null(); } } @@ -12618,16 +12398,6 @@ PT_MINIT_REGISTRATION(pt_register_mutating_scope) cls.method<&MutatingScope::getMaybeDefinedVariables>(sigs::getMaybeDefinedVariables); - cls.method(sigs::findPossiblyImpureCallDescriptions, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *exprArg; - zend_class_entry *exprCe = pt_class(PT_CLASS_EXPR); - if (UNEXPECTED(exprCe == NULL)) RETURN_THROWS(); - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_OBJECT_OF_CLASS(exprArg, exprCe) - ZEND_PARSE_PARAMETERS_END(); - PT_RETURN_VAL(PT_THIS.findPossiblyImpureCallDescriptions(Z_OBJ_P(exprArg))); - }); - cls.method(sigs::hasConstant, [](INTERNAL_FUNCTION_PARAMETERS) { zval *nameArg; zend_class_entry *nameCe = pt_class(PT_CLASS_NAME); diff --git a/turbo-ext/src/PossiblyImpureCallExprHandler.cpp b/turbo-ext/src/PossiblyImpureCallExprHandler.cpp deleted file mode 100644 index d646327de3b..00000000000 --- a/turbo-ext/src/PossiblyImpureCallExprHandler.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - * PHPStanTurbo\PossiblyImpureCallExprHandler — native implementation of - * PHPStan\Analyser\ExprHandler\Virtual\PossiblyImpureCallExprHandler. - * - * A DI service (#[AutowiredService]): the constructor keeps the twin's - * arginfo so Nette autowires it. processExpr() is registered as the class's - * handler entry (Engine.h). The twin's closures are native closures capturing - * what the PHP closures capture: the typeCallback ($nodeScopeResolver, $expr, - * $scope) and the specifyTypesCallback ($this, $expr). - * - * NodeScopeResolver, MutatingScope, SpecifiedTypes and DefaultNarrowingHelper - * are called through their direct entries; the virtual node stays PHP and is - * read in its slot (VirtualExprHandlers.h). - */ - -#include "support.h" -#include "generated/PossiblyImpureCallExprHandler.h" - -namespace slots = ptdecl::PossiblyImpureCallExprHandler::slot; -namespace sigs = ptdecl::PossiblyImpureCallExprHandler::sig; -#include "VirtualExprHandlers.h" - -zend_class_entry *pt_ce_possibly_impure_call_expr_handler = nullptr; - -namespace phpstanturbo { - -/* Mirrors PHPStan\Analyser\ExprHandler\Virtual\PossiblyImpureCallExprHandler; UNDEF = pending - * exception. */ -class PossiblyImpureCallExprHandler -{ -public: - explicit PossiblyImpureCallExprHandler(zend_object *self) : self(self) {} - - /* the constructor body: the promoted properties */ - void construct(zval *expressionResultFactory, zval *defaultNarrowingHelper) const - { - pt_write_slot(self, slots::expressionResultFactory, expressionResultFactory); - pt_write_slot(self, slots::defaultNarrowingHelper, defaultNarrowingHelper); - } - - /* Mirrors supports(); false = pending exception */ - [[nodiscard]] static bool supports(zval *expr, bool &out) - { - return ptveh::supportsInstance(expr, PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, out); - } - - /* Mirrors processExpr(). */ - zv::Val processExpr(zval *nodeScopeResolver, zval *stmt, zval *expr, zval *scope, zval *storage, zval *nodeCallback, zval *context) const - { - (void) stmt; - (void) storage; - (void) nodeCallback; - (void) context; - zv::Val typeCallback = pt_native_closure(&typeCallbackBody, nodeScopeResolver, expr, scope); - zv::Val specifyTypesCallback = pt_native_closure(&specifyTypesCallbackBody, self, expr); - pt_expression_result_args args(scope, scope, expr, false, false, NULL, NULL, typeCallback.raw(), specifyTypesCallback.raw()); - return pt_expression_result_create(OBJ_PROP_NUM(self, slots::expressionResultFactory), args); - } - - /* the handler entry (Engine.h) */ - static zv::Val processExprEntry(zend_object *handler, zval *nodeScopeResolver, zval *stmt, zval *expr, zval *scope, zval *storage, zval *nodeCallback, zval *context) - { - return PossiblyImpureCallExprHandler(handler).processExpr(nodeScopeResolver, stmt, expr, scope, storage, nodeCallback, context); - } - - static constexpr char closureName[] = "PHPStan\\Analyser\\ExprHandler\\Virtual\\PossiblyImpureCallExprHandler::{closure}"; - -private: - zend_object *self; - - /* static fn (bool $nativeTypesPromoted): Type => - * $nodeScopeResolver->readScopeStateOrSyntheticType($expr->callExpr, - * $nativeTypesPromoted ? $scope->doNotTreatPhpDocTypesAsCertain() : $scope) - * — captures: $nodeScopeResolver, $expr, $scope */ - static void typeCallbackBody(zval *captures, uint32_t argc, zval *argv, zval *return_value) - { - if (UNEXPECTED(!ptveh::requireArgs(argc, 1, closureName))) return; - bool nativeTypesPromoted = zend_is_true(&argv[0]); - zv::Val type; - pt_engine_with_stack([&]() { - zv::Val innerHold; - zval *inner = ptveh::publicRead(ptveh::possiblyImpureCallExprCallExpr, &captures[1], pt_ce_possibly_impure_call_expr_handler, innerHold); - if (UNEXPECTED(inner == NULL)) return; - zv::Val scopeHold; - zval *scope = ptveh::promotedScope(&captures[2], nativeTypesPromoted, scopeHold); - if (UNEXPECTED(scope == NULL)) return; - type = pt_node_scope_resolver_read_scope_state_or_synthetic_type(&captures[0], inner, scope); - }); - if (UNEXPECTED(type.isUndef())) return; - type.intoReturnValue(return_value); - } - - /* fn (TypeSpecifierContext $context, bool $nativeTypesPromoted) => - * $this->defaultNarrowingHelper->specifyDefaultTypes($expr, $context) — - * captures: $this, $expr */ - static void specifyTypesCallbackBody(zval *captures, uint32_t argc, zval *argv, zval *return_value) - { - ptveh::specifyDefaultTypesBody(captures, argc, argv, return_value); - } -}; - -} // namespace phpstanturbo - -using phpstanturbo::PossiblyImpureCallExprHandler; - -/* {{{ engine ABI glue: parameter parsing + registration */ - -#include "reg.h" - -PT_MINIT_REGISTRATION(pt_register_possibly_impure_call_expr_handler) -{ - reg::Class cls("PHPStan\\Analyser\\ExprHandler\\Virtual\\PossiblyImpureCallExprHandler"); - ptdecl::PossiblyImpureCallExprHandler::declareClass(cls); - ptdecl::PossiblyImpureCallExprHandler::declareProperties(cls); - - /* the real parameter class names: the DI container autowires the - * service by reflecting the constructor */ - cls.method(sigs::__construct, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *expressionResultFactory, *defaultNarrowingHelper; - if (!zp::parse(execute_data, expressionResultFactory, defaultNarrowingHelper)) RETURN_THROWS(); - PossiblyImpureCallExprHandler(Z_OBJ_P(ZEND_THIS)).construct(expressionResultFactory, defaultNarrowingHelper); - }); - - cls.method(sigs::supports, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *expr; - if (!zp::parse(execute_data, expr)) RETURN_THROWS(); - bool out; - if (UNEXPECTED(!PossiblyImpureCallExprHandler::supports(expr, out))) RETURN_THROWS(); - RETURN_BOOL(out); - }); - - cls.method(sigs::processExpr, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *nodeScopeResolver, *stmt, *expr, *scope, *storage, *nodeCallback, *context; - ZEND_PARSE_PARAMETERS_START(7, 7) - Z_PARAM_OBJECT(nodeScopeResolver) - Z_PARAM_OBJECT(stmt) - Z_PARAM_OBJECT(expr) - Z_PARAM_OBJECT(scope) - Z_PARAM_OBJECT(storage) - Z_PARAM_ZVAL(nodeCallback) - Z_PARAM_OBJECT(context) - ZEND_PARSE_PARAMETERS_END(); - PT_RETURN_VAL(PossiblyImpureCallExprHandler(Z_OBJ_P(ZEND_THIS)).processExpr(nodeScopeResolver, stmt, expr, scope, storage, nodeCallback, context)); - }); - - cls.shadow(&pt_ce_possibly_impure_call_expr_handler); - pt_expr_handler_entry_register(&pt_ce_possibly_impure_call_expr_handler, &PossiblyImpureCallExprHandler::processExprEntry); -} - -/* }}} */ diff --git a/turbo-ext/src/ScopeOps.cpp b/turbo-ext/src/ScopeOps.cpp index e537a059053..7ec827529dd 100644 --- a/turbo-ext/src/ScopeOps.cpp +++ b/turbo-ext/src/ScopeOps.cpp @@ -29,7 +29,6 @@ static zend_class_entry *pt_ce_scope_ops; static const pt_superglobal_name pt_so_compositional_virtual_key_prefixes[] = { { PT_LC("__phpstanForeachValueByRef(") }, { PT_LC("__phpstanIntertwinedVariableByReference(") }, - { PT_LC("__phpstanPossiblyImpure(") }, { PT_LC("__phpstanPropertyInitialization(") }, { PT_LC("__phpstanRemembered(") }, }; diff --git a/turbo-ext/src/StaticCallHandler.cpp b/turbo-ext/src/StaticCallHandler.cpp index 2a3d0246406..b951a7df69d 100644 --- a/turbo-ext/src/StaticCallHandler.cpp +++ b/turbo-ext/src/StaticCallHandler.cpp @@ -692,40 +692,6 @@ class StaticCallHandler if (UNEXPECTED(!reflectionIsStatic(methodReflection.raw(), isStatic))) return zv::Val(); currentScope = pt_mutating_scope_invalidate_expression(Z_OBJ_P(currentScope.raw()), thisVariable.raw(), true, declaringClass.raw(), isStatic); if (UNEXPECTED(currentScope.isUndef())) return zv::Val(); - } else if (zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues))) { - bool remember; - if (UNEXPECTED(!scopeClassIsDeclaringClass(currentScope.raw(), methodReflection.raw(), remember))) return zv::Val(); - if (remember) { - zend_long hasSideEffects = reflectionTrinary(methodReflection.raw(), PT_MR_HAS_SIDE_EFFECTS); - if (UNEXPECTED(hasSideEffects < 0)) return zv::Val(); - remember = hasSideEffects == PT_TRI_MAYBE; - } - if (remember) { - zv::Val declaringClass = pt_extended_method_reflection_call(methodReflection.raw(), PT_MR_GET_DECLARING_CLASS); - if (UNEXPECTED(declaringClass.isUndef())) return zv::Val(); - bool builtin; - if (UNEXPECTED(!pt_class_reflection_is_builtin(Z_OBJ_P(declaringClass.raw()), builtin))) return zv::Val(); - remember = !builtin; - } - if (remember) { - // the remembered call value is generic-sensitive: resolve it from the - // type-driven acceptor processArgs() selected, falling back to the - // structural acceptor. - zval *acceptorForGenerics = resolvedParametersAcceptor.isNull() ? parametersAcceptor.raw() : resolvedParametersAcceptor.raw(); - zv::Val thisVariable = newThisVariable(); - if (UNEXPECTED(thisVariable.isUndef())) return zv::Val(); - zv::Val description = possiblyImpureCallDescription(methodReflection.raw()); - if (UNEXPECTED(description.isUndef())) return zv::Val(); - zv::Args exprArgv{normalizedExpr.raw(), thisVariable.raw(), description.raw()}; - zv::Val possiblyImpureCallExpr = pt_type_new(PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, 3, exprArgv); - if (UNEXPECTED(possiblyImpureCallExpr.isUndef())) return zv::Val(); - zv::Val rememberedType = pt_template_argument_frame_return_type_of_call(acceptorForGenerics, currentScope.raw(), expr); - if (UNEXPECTED(rememberedType.isUndef())) return zv::Val(); - zv::Val mixed = pt_type_new_mixed_type(); - if (UNEXPECTED(mixed.isUndef())) return zv::Val(); - currentScope = pt_mutating_scope_assign_expression(Z_OBJ_P(currentScope.raw()), Z_OBJ_P(possiblyImpureCallExpr.raw()), rememberedType.raw(), mixed.raw()); - if (UNEXPECTED(currentScope.isUndef())) return zv::Val(); - } } } diff --git a/turbo-ext/src/VirtualExprHandlers.h b/turbo-ext/src/VirtualExprHandlers.h index a07d56dad48..de28871e48c 100644 --- a/turbo-ext/src/VirtualExprHandlers.h +++ b/turbo-ext/src/VirtualExprHandlers.h @@ -41,7 +41,6 @@ inline NodeProp alwaysRememberedExprNativeType = PT_NODE_PROP(PT_CLASS_ALWAYS_RE inline NodeProp existingArrayDimFetchVar = PT_NODE_PROP(PT_CLASS_EXISTING_ARRAY_DIM_FETCH, "var"); inline NodeProp existingArrayDimFetchDim = PT_NODE_PROP(PT_CLASS_EXISTING_ARRAY_DIM_FETCH, "dim"); inline NodeProp issetExprExpr = PT_NODE_PROP(PT_CLASS_ISSET_EXPR, "expr"); -inline NodeProp possiblyImpureCallExprCallExpr = PT_NODE_PROP(PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, "callExpr"); inline NodeProp setOffsetValueTypeExprVar = PT_NODE_PROP(PT_CLASS_SET_OFFSET_VALUE_TYPE_EXPR, "var"); inline NodeProp setOffsetValueTypeExprDim = PT_NODE_PROP(PT_CLASS_SET_OFFSET_VALUE_TYPE_EXPR, "dim"); inline NodeProp setOffsetValueTypeExprValue = PT_NODE_PROP(PT_CLASS_SET_OFFSET_VALUE_TYPE_EXPR, "value"); diff --git a/turbo-ext/src/generated/FuncCallScopeEffectsHelper.h b/turbo-ext/src/generated/FuncCallScopeEffectsHelper.h index 43066d14139..575cffebc30 100644 --- a/turbo-ext/src/generated/FuncCallScopeEffectsHelper.h +++ b/turbo-ext/src/generated/FuncCallScopeEffectsHelper.h @@ -11,8 +11,7 @@ namespace ptdecl::FuncCallScopeEffectsHelper { /* the OBJ_PROP_NUM slots of the instance properties the class declares (the inherited ones come first) */ namespace slot { inline constexpr uint32_t outputBufferHelper = 0; -inline constexpr uint32_t rememberPossiblyImpureFunctionValues = 1; -inline constexpr uint32_t assignHandler = 2; +inline constexpr uint32_t assignHandler = 1; } // namespace slot inline void declareClass(reg::Class &cls) @@ -24,7 +23,6 @@ inline void declareClass(reg::Class &cls) inline void declareProperties(reg::Class &cls) { cls.property("outputBufferHelper", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\OutputBufferHelper"); - cls.property("rememberPossiblyImpureFunctionValues", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, MAY_BE_BOOL); cls.property("assignHandler", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\AssignHandler"); } @@ -33,86 +31,84 @@ namespace sigtab { inline constexpr char strings[] = "outputBufferHelper\0" /* 0 */ "PHPStan\\Analyser\\ExprHandler\\Helper\\OutputBufferHelper\0" /* 19 */ - "rememberPossiblyImpureFunctionValues\0" /* 74 */ - "assignHandler\0" /* 111 */ - "PHPStan\\Analyser\\ExprHandler\\AssignHandler\0" /* 125 */ - "__construct\0" /* 168 */ - "nodeScopeResolver\0" /* 180 */ - "PHPStan\\Analyser\\NodeScopeResolver\0" /* 198 */ - "stmt\0" /* 233 */ - "PhpParser\\Node\\Stmt\0" /* 238 */ - "arrayWalkArrayArg\0" /* 258 */ - "PhpParser\\Node\\Expr\0" /* 276 */ - "arrayWalkValueTypes\0" /* 296 */ - "argsResult\0" /* 316 */ - "PHPStan\\Analyser\\ArgsResult\0" /* 327 */ - "scope\0" /* 355 */ - "PHPStan\\Analyser\\MutatingScope\0" /* 361 */ - "storage\0" /* 392 */ - "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 400 */ - "nodeCallback\0" /* 441 */ - "\0" /* 454 */ - "applyArrayWalkResult\0" /* 455 */ - "normalizedExpr\0" /* 476 */ - "PhpParser\\Node\\Expr\\FuncCall\0" /* 491 */ - "functionReflection\0" /* 520 */ - "PHPStan\\Reflection\\FunctionReflection\0" /* 539 */ - "parametersAcceptor\0" /* 577 */ - "PHPStan\\Reflection\\ParametersAcceptor\0" /* 596 */ - "scopeBeforeArgs\0" /* 634 */ - "applyCallScopeEffects\0" /* 650 */ - "invalidateObjectArgs\0" /* 672 */ - "PHPStan\\Analyser\\Scope\0" /* 693 */ - "expr\0" /* 716 */ - "PHPStan\\Type\\Type\0" /* 721 */ - "getArrayFunctionAppendingType"; /* 739 */ + "assignHandler\0" /* 74 */ + "PHPStan\\Analyser\\ExprHandler\\AssignHandler\0" /* 88 */ + "__construct\0" /* 131 */ + "nodeScopeResolver\0" /* 143 */ + "PHPStan\\Analyser\\NodeScopeResolver\0" /* 161 */ + "stmt\0" /* 196 */ + "PhpParser\\Node\\Stmt\0" /* 201 */ + "arrayWalkArrayArg\0" /* 221 */ + "PhpParser\\Node\\Expr\0" /* 239 */ + "arrayWalkValueTypes\0" /* 259 */ + "argsResult\0" /* 279 */ + "PHPStan\\Analyser\\ArgsResult\0" /* 290 */ + "scope\0" /* 318 */ + "PHPStan\\Analyser\\MutatingScope\0" /* 324 */ + "storage\0" /* 355 */ + "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 363 */ + "nodeCallback\0" /* 404 */ + "\0" /* 417 */ + "applyArrayWalkResult\0" /* 418 */ + "normalizedExpr\0" /* 439 */ + "PhpParser\\Node\\Expr\\FuncCall\0" /* 454 */ + "functionReflection\0" /* 483 */ + "PHPStan\\Reflection\\FunctionReflection\0" /* 502 */ + "parametersAcceptor\0" /* 540 */ + "PHPStan\\Reflection\\ParametersAcceptor\0" /* 559 */ + "scopeBeforeArgs\0" /* 597 */ + "applyCallScopeEffects\0" /* 613 */ + "invalidateObjectArgs\0" /* 635 */ + "PHPStan\\Analyser\\Scope\0" /* 656 */ + "expr\0" /* 679 */ + "PHPStan\\Type\\Type\0" /* 684 */ + "getArrayFunctionAppendingType"; /* 702 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, 0, 19), /* __construct $outputBufferHelper */ - reg::packed(74, MAY_BE_BOOL), /* __construct $rememberPossiblyImpureFunctionValues */ - reg::packed(111, 0, 125), /* __construct $assignHandler */ - reg::packed(180, 0, 198), /* applyArrayWalkResult $nodeScopeResolver */ - reg::packed(233, 0, 238), /* applyArrayWalkResult $stmt */ - reg::packed(258, 0, 276), /* applyArrayWalkResult $arrayWalkArrayArg */ - reg::packed(296, MAY_BE_ARRAY), /* applyArrayWalkResult $arrayWalkValueTypes */ - reg::packed(316, 0, 327), /* applyArrayWalkResult $argsResult */ - reg::packed(355, 0, 361), /* applyArrayWalkResult $scope */ - reg::packed(392, 0, 400), /* applyArrayWalkResult $storage */ - reg::packed(441, MAY_BE_CALLABLE), /* applyArrayWalkResult $nodeCallback */ - reg::packed(454, 0, 361), /* applyArrayWalkResult return */ - reg::packed(180, 0, 198), /* applyCallScopeEffects $nodeScopeResolver */ - reg::packed(233, 0, 238), /* applyCallScopeEffects $stmt */ - reg::packed(476, 0, 491), /* applyCallScopeEffects $normalizedExpr */ - reg::packed(520, MAY_BE_NULL, 539), /* applyCallScopeEffects $functionReflection */ - reg::packed(577, MAY_BE_NULL, 596), /* applyCallScopeEffects $parametersAcceptor */ - reg::packed(316, 0, 327), /* applyCallScopeEffects $argsResult */ - reg::packed(355, 0, 361), /* applyCallScopeEffects $scope */ - reg::packed(634, 0, 361), /* applyCallScopeEffects $scopeBeforeArgs */ - reg::packed(392, 0, 400), /* applyCallScopeEffects $storage */ - reg::packed(441, MAY_BE_CALLABLE), /* applyCallScopeEffects $nodeCallback */ - reg::packed(454, 0, 361), /* applyCallScopeEffects return */ - reg::packed(180, 0, 198), /* invalidateObjectArgs $nodeScopeResolver */ - reg::packed(476, 0, 491), /* invalidateObjectArgs $normalizedExpr */ - reg::packed(316, 0, 327), /* invalidateObjectArgs $argsResult */ - reg::packed(355, 0, 361), /* invalidateObjectArgs $scope */ - reg::packed(392, 0, 400), /* invalidateObjectArgs $storage */ - reg::packed(441, MAY_BE_CALLABLE), /* invalidateObjectArgs $nodeCallback */ - reg::packed(454, 0, 361), /* invalidateObjectArgs return */ - reg::packed(520, 0, 539), /* getArrayFunctionAppendingType $functionReflection */ - reg::packed(355, 0, 693), /* getArrayFunctionAppendingType $scope */ - reg::packed(716, 0, 491), /* getArrayFunctionAppendingType $expr */ - reg::packed(316, 0, 327), /* getArrayFunctionAppendingType $argsResult */ - reg::packed(454, 0, 721), /* getArrayFunctionAppendingType return */ + reg::packed(74, 0, 88), /* __construct $assignHandler */ + reg::packed(143, 0, 161), /* applyArrayWalkResult $nodeScopeResolver */ + reg::packed(196, 0, 201), /* applyArrayWalkResult $stmt */ + reg::packed(221, 0, 239), /* applyArrayWalkResult $arrayWalkArrayArg */ + reg::packed(259, MAY_BE_ARRAY), /* applyArrayWalkResult $arrayWalkValueTypes */ + reg::packed(279, 0, 290), /* applyArrayWalkResult $argsResult */ + reg::packed(318, 0, 324), /* applyArrayWalkResult $scope */ + reg::packed(355, 0, 363), /* applyArrayWalkResult $storage */ + reg::packed(404, MAY_BE_CALLABLE), /* applyArrayWalkResult $nodeCallback */ + reg::packed(417, 0, 324), /* applyArrayWalkResult return */ + reg::packed(143, 0, 161), /* applyCallScopeEffects $nodeScopeResolver */ + reg::packed(196, 0, 201), /* applyCallScopeEffects $stmt */ + reg::packed(439, 0, 454), /* applyCallScopeEffects $normalizedExpr */ + reg::packed(483, MAY_BE_NULL, 502), /* applyCallScopeEffects $functionReflection */ + reg::packed(540, MAY_BE_NULL, 559), /* applyCallScopeEffects $parametersAcceptor */ + reg::packed(279, 0, 290), /* applyCallScopeEffects $argsResult */ + reg::packed(318, 0, 324), /* applyCallScopeEffects $scope */ + reg::packed(597, 0, 324), /* applyCallScopeEffects $scopeBeforeArgs */ + reg::packed(355, 0, 363), /* applyCallScopeEffects $storage */ + reg::packed(404, MAY_BE_CALLABLE), /* applyCallScopeEffects $nodeCallback */ + reg::packed(417, 0, 324), /* applyCallScopeEffects return */ + reg::packed(143, 0, 161), /* invalidateObjectArgs $nodeScopeResolver */ + reg::packed(439, 0, 454), /* invalidateObjectArgs $normalizedExpr */ + reg::packed(279, 0, 290), /* invalidateObjectArgs $argsResult */ + reg::packed(318, 0, 324), /* invalidateObjectArgs $scope */ + reg::packed(355, 0, 363), /* invalidateObjectArgs $storage */ + reg::packed(404, MAY_BE_CALLABLE), /* invalidateObjectArgs $nodeCallback */ + reg::packed(417, 0, 324), /* invalidateObjectArgs return */ + reg::packed(483, 0, 502), /* getArrayFunctionAppendingType $functionReflection */ + reg::packed(318, 0, 656), /* getArrayFunctionAppendingType $scope */ + reg::packed(679, 0, 454), /* getArrayFunctionAppendingType $expr */ + reg::packed(279, 0, 290), /* getArrayFunctionAppendingType $argsResult */ + reg::packed(417, 0, 684), /* getArrayFunctionAppendingType return */ }; using Sig = reg::Sig; } // namespace sigtab /* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ namespace sig { -inline constexpr sigtab::Sig __construct = { { 168 /* __construct */, 3, 0, 3, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applyArrayWalkResult = { { 455 /* applyArrayWalkResult */, 8, 3, 8, 11, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applyCallScopeEffects = { { 650 /* applyCallScopeEffects */, 10, 12, 10, 22, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateObjectArgs = { { 672 /* invalidateObjectArgs */, 6, 23, 6, 29, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getArrayFunctionAppendingType = { { 739 /* getArrayFunctionAppendingType */, 4, 30, 4, 34, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig __construct = { { 131 /* __construct */, 2, 0, 2, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applyArrayWalkResult = { { 418 /* applyArrayWalkResult */, 8, 2, 8, 10, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applyCallScopeEffects = { { 613 /* applyCallScopeEffects */, 10, 11, 10, 21, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateObjectArgs = { { 635 /* invalidateObjectArgs */, 6, 22, 6, 28, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getArrayFunctionAppendingType = { { 702 /* getArrayFunctionAppendingType */, 4, 29, 4, 33, ZEND_ACC_PRIVATE } }; } // namespace sig } // namespace ptdecl::FuncCallScopeEffectsHelper diff --git a/turbo-ext/src/generated/MutatingScope.h b/turbo-ext/src/generated/MutatingScope.h index 2edb0591af6..a3c34796646 100644 --- a/turbo-ext/src/generated/MutatingScope.h +++ b/turbo-ext/src/generated/MutatingScope.h @@ -147,352 +147,351 @@ inline constexpr char strings[] = "getVariableType\0" /* 1442 */ "getDefinedVariables\0" /* 1458 */ "getMaybeDefinedVariables\0" /* 1478 */ - "PhpParser\\Node\\Expr\0" /* 1503 */ - "findPossiblyImpureCallDescriptions\0" /* 1523 */ - "isGlobalVariable\0" /* 1558 */ - "name\0" /* 1575 */ - "PhpParser\\Node\\Name\0" /* 1580 */ - "hasConstant\0" /* 1600 */ - "fileHasCompilerHaltStatementCalls\0" /* 1612 */ - "isInAnonymousFunction\0" /* 1646 */ - "getAnonymousFunctionReflection\0" /* 1668 */ - "getAnonymousFunctionReturnType\0" /* 1699 */ - "withAnonymousFunctionReflection\0" /* 1730 */ - "node\0" /* 1762 */ - "getType\0" /* 1767 */ - "getScopeType\0" /* 1775 */ - "getScopeNativeType\0" /* 1788 */ - "getNodeKey\0" /* 1807 */ - "PHPStan\\Node\\Printer\\ExprPrinter\0" /* 1818 */ - "getExprPrinter\0" /* 1851 */ - "duplicateWith\0" /* 1866 */ - "relevantRoots\0" /* 1880 */ - "getClosureScopeCacheKey\0" /* 1894 */ - "exprString\0" /* 1918 */ - "roots\0" /* 1929 */ - "exprStringIsRootedIn\0" /* 1935 */ - "resolveType\0" /* 1956 */ - "resolveTypeOfNewWorldHandlerNode\0" /* 1968 */ - "getCurrentTypesOfSpecifiedExpr\0" /* 2001 */ - "PHPStan\\Analyser\\TypeSpecifierContext\0" /* 2032 */ - "PHPStan\\Analyser\\SpecifiedTypes\0" /* 2070 */ - "specifyTypesOfNewWorldHandlerNode\0" /* 2102 */ - "PHPStan\\Analyser\\ExpressionResult\0" /* 2136 */ - "obtainResultForNode\0" /* 2170 */ - "storage\0" /* 2190 */ - "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 2198 */ - "pushExpressionResultStorage\0" /* 2239 */ - "popExpressionResultStorage\0" /* 2267 */ - "findSettledStoredResult\0" /* 2294 */ - "getCurrentExpressionResultStorage\0" /* 2318 */ - "frame\0" /* 2352 */ - "withTemplateArgumentFrame\0" /* 2358 */ - "getCurrentTemplateArgumentFrame\0" /* 2384 */ - "getTemplateArgumentConstraints\0" /* 2416 */ - "constraints\0" /* 2447 */ - "withTemplateArgumentConstraints\0" /* 2459 */ - "addTemplateArgumentConstraints\0" /* 2491 */ - "withoutMemoizedTypes\0" /* 2522 */ - "other\0" /* 2543 */ - "getDifferingVariableRoots\0" /* 2549 */ - "key\0" /* 2575 */ - "getVariablesOfExpressionKey\0" /* 2579 */ - "recordedEntry\0" /* 2607 */ - "recordedExit\0" /* 2621 */ - "withRecordedStatementDelta\0" /* 2634 */ - "current\0" /* 2661 */ - "applyRecordedHolderDelta\0" /* 2669 */ - "getNativeType\0" /* 2694 */ - "getKeepVoidType\0" /* 2708 */ - "doNotTreatPhpDocTypesAsCertain\0" /* 2724 */ - "promoteNativeTypes\0" /* 2755 */ - "resolveName\0" /* 2774 */ - "PHPStan\\Type\\TypeWithClassName\0" /* 2786 */ - "resolveTypeByName\0" /* 2817 */ - "value\0" /* 2835 */ - "getTypeFromValue\0" /* 2841 */ - "hasExpressionType\0" /* 2858 */ - "getTrackedExpressionType\0" /* 2876 */ - "reflection\0" /* 2901 */ - "parameter\0" /* 2912 */ - "PHPStan\\Reflection\\ParameterReflection\0" /* 2922 */ - "rememberTypes\0" /* 2961 */ - "pushInFunctionCall\0" /* 2975 */ - "popInFunctionCall\0" /* 2994 */ - "className\0" /* 3012 */ - "isInClassExists\0" /* 3022 */ - "getFunctionCallStack\0" /* 3038 */ - "getFunctionCallStackWithParameters\0" /* 3059 */ - "functionName\0" /* 3094 */ - "isInFunctionExists\0" /* 3107 */ - "classReflection\0" /* 3126 */ - "enterClass\0" /* 3142 */ - "traitReflection\0" /* 3153 */ - "enterTrait\0" /* 3169 */ - "classMethod\0" /* 3180 */ - "PhpParser\\Node\\Stmt\\ClassMethod\0" /* 3192 */ - "templateTypeMap\0" /* 3224 */ - "PHPStan\\Type\\Generic\\TemplateTypeMap\0" /* 3240 */ - "phpDocParameterTypes\0" /* 3277 */ - "phpDocReturnType\0" /* 3298 */ - "throwType\0" /* 3315 */ - "deprecatedDescription\0" /* 3325 */ - "isDeprecated\0" /* 3347 */ - "isInternal\0" /* 3360 */ - "isFinal\0" /* 3371 */ - "isPure\0" /* 3379 */ - "acceptsNamedArguments\0" /* 3386 */ - "asserts\0" /* 3408 */ - "PHPStan\\Reflection\\Assertions\0" /* 3416 */ - "selfOutType\0" /* 3446 */ - "phpDocComment\0" /* 3458 */ - "parameterOutTypes\0" /* 3472 */ - "immediatelyInvokedCallableParameters\0" /* 3490 */ - "phpDocClosureThisTypeParameters\0" /* 3527 */ - "isConstructor\0" /* 3559 */ - "resolvedPhpDocBlock\0" /* 3573 */ - "PHPStan\\PhpDoc\\ResolvedPhpDocBlock\0" /* 3593 */ - "phpDocPureUnlessCallableIsImpureParameters\0" /* 3628 */ - "phpDocPureUnlessParameterPassedParameters\0" /* 3671 */ - "enterClassMethod\0" /* 3713 */ - "hook\0" /* 3730 */ - "PhpParser\\Node\\PropertyHook\0" /* 3735 */ - "propertyName\0" /* 3763 */ - "nativePropertyTypeNode\0" /* 3776 */ - "PhpParser\\Node\\Identifier|PhpParser\\Node\\Name|PhpParser\\Node\\ComplexType\0" /* 3799 */ - "phpDocPropertyType\0" /* 3872 */ - "enterPropertyHook\0" /* 3891 */ - "type\0" /* 3909 */ - "transformStaticType\0" /* 3914 */ - "functionLike\0" /* 3934 */ - "PhpParser\\Node\\FunctionLike\0" /* 3947 */ - "getRealParameterTypes\0" /* 3975 */ - "getRealParameterDefaultValues\0" /* 3997 */ - "PhpParser\\Node\\Stmt\\ClassMethod|PhpParser\\Node\\Stmt\\Function_|PhpParser\\Node\\PropertyHook\0" /* 4027 */ - "getParameterAttributes\0" /* 4117 */ - "PhpParser\\Node\\Stmt\\Function_\0" /* 4140 */ - "pureUnlessCallableIsImpureParameters\0" /* 4170 */ - "pureUnlessParameterPassedParameters\0" /* 4207 */ - "enterFunction\0" /* 4243 */ - "functionReflection\0" /* 4257 */ - "preserveConstructorScope\0" /* 4276 */ - "enterFunctionLike\0" /* 4301 */ - "namespaceName\0" /* 4319 */ - "enterNamespace\0" /* 4333 */ - "thisType\0" /* 4348 */ - "nativeThisType\0" /* 4357 */ - "scopeClasses\0" /* 4372 */ - "enterClosureBind\0" /* 4385 */ - "originalScope\0" /* 4402 */ - "restoreOriginalScopeAfterClosureBind\0" /* 4416 */ - "restoreThisScope\0" /* 4453 */ - "restoreThis\0" /* 4470 */ - "enterClosureCall\0" /* 4482 */ - "isInClosureBind\0" /* 4499 */ - "withClosureBindScopeClasses\0" /* 4515 */ - "closure\0" /* 4543 */ - "PhpParser\\Node\\Expr\\Closure\0" /* 4551 */ - "callableParameters\0" /* 4579 */ - "nativeCallableParameters\0" /* 4598 */ - "enterAnonymousFunction\0" /* 4623 */ - "enterAnonymousFunctionWithoutReflection\0" /* 4646 */ - "typeHolder\0" /* 4686 */ - "PHPStan\\Analyser\\ExpressionTypeHolder\0" /* 4697 */ - "expressionTypeIsUnchangeable\0" /* 4735 */ - "invalidateStaticExpressions\0" /* 4764 */ - "arrowFunction\0" /* 4792 */ - "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 4806 */ - "enterArrowFunction\0" /* 4840 */ - "enterArrowFunctionWithoutReflection\0" /* 4859 */ - "PhpParser\\Node\\Param\0" /* 4895 */ - "isParameterValueNullable\0" /* 4916 */ - "isNullable\0" /* 4941 */ - "isVariadic\0" /* 4952 */ - "getFunctionType\0" /* 4963 */ - "index\0" /* 4979 */ - "getCallableParameterType\0" /* 4985 */ - "startIndex\0" /* 5010 */ - "buildVariadicArrayTypeFromCallableParameters\0" /* 5021 */ - "nativeType\0" /* 5066 */ - "inferredType\0" /* 5077 */ - "intersectButNotNever\0" /* 5090 */ - "PhpParser\\Node\\Expr\\Match_\0" /* 5111 */ - "condType\0" /* 5138 */ - "condNativeType\0" /* 5147 */ - "enterMatch\0" /* 5162 */ - "iteratee\0" /* 5173 */ - "iterateeType\0" /* 5182 */ - "nativeIterateeType\0" /* 5195 */ - "valueName\0" /* 5214 */ - "keyName\0" /* 5224 */ - "valueByRef\0" /* 5232 */ - "enterForeach\0" /* 5243 */ - "enterForeachKey\0" /* 5256 */ - "catchType\0" /* 5272 */ - "enterCatchType\0" /* 5282 */ - "isPlainWrite\0" /* 5297 */ - "enterExpressionAssign\0" /* 5310 */ - "exitExpressionAssign\0" /* 5332 */ - "isInExpressionAssign\0" /* 5353 */ - "isInWriteExpressionAssign\0" /* 5374 */ - "setAllowedUndefinedExpression\0" /* 5400 */ - "unsetAllowedUndefinedExpression\0" /* 5430 */ - "isUndefinedExpressionAllowed\0" /* 5462 */ - "certainty\0" /* 5491 */ - "intertwinedPropagatedFrom\0" /* 5501 */ - "assignVariable\0" /* 5527 */ - "overwriteExpression\0" /* 5542 */ - "scope\0" /* 5562 */ - "rootType\0" /* 5568 */ - "assignedExpr\0" /* 5577 */ - "rootVariableName\0" /* 5590 */ - "native\0" /* 5607 */ - "resolveIntertwinedAssignedType\0" /* 5614 */ - "dimFetch\0" /* 5645 */ - "PhpParser\\Node\\Expr\\ArrayDimFetch\0" /* 5654 */ - "isDimFetchPathReachable\0" /* 5688 */ - "unsetExpression\0" /* 5712 */ - "getStateType\0" /* 5728 */ - "getScopeStateType\0" /* 5741 */ - "getScopeStateNativeType\0" /* 5759 */ - "resolveScopeStateType\0" /* 5783 */ - "specifyExpressionType\0" /* 5805 */ - "openSpecificationScope\0" /* 5827 */ - "isSpecifyExpressionTypeNoop\0" /* 5850 */ - "specifyExpressionTypeInPlace\0" /* 5878 */ - "assignExpression\0" /* 5907 */ - "fetchedOnType\0" /* 5924 */ - "assignInitializedProperty\0" /* 5938 */ - "expressionToInvalidate\0" /* 5964 */ - "requireMoreCharacters\0" /* 5987 */ - "invalidatingClass\0" /* 6009 */ - "keepPropertyFetches\0" /* 6027 */ - "invalidateExpression\0" /* 6047 */ - "isPrivatePropertyOfDifferentClass\0" /* 6068 */ - "invalidateMethodsOnExpression\0" /* 6102 */ - "setExpressionCertaintyKeepingType\0" /* 6132 */ - "isComplexUnionType\0" /* 6166 */ - "addTypeToExpression\0" /* 6185 */ - "typeToRemove\0" /* 6205 */ - "removeTypeFromExpression\0" /* 6218 */ - "filterByTruthyValue\0" /* 6243 */ - "filterByFalseyValue\0" /* 6263 */ - "specifiedTypes\0" /* 6283 */ - "applySpecifiedTypes\0" /* 6298 */ - "specifiedExpressions\0" /* 6318 */ - "processConditionalExpressionsAfterSpecifying\0" /* 6339 */ - "getConditionalExpressions\0" /* 6384 */ - "conditionalExpressionHolders\0" /* 6410 */ - "addConditionalExpressions\0" /* 6439 */ - "exitFirstLevelStatements\0" /* 6465 */ - "isInFirstLevelStatement\0" /* 6490 */ - "otherScope\0" /* 6514 */ - "preserveVacuousConditionals\0" /* 6525 */ - "mergeWith\0" /* 6553 */ - "ours\0" /* 6563 */ - "theirs\0" /* 6568 */ - "collectAbsorbedClosures\0" /* 6575 */ - "mergeWithVariableState\0" /* 6599 */ - "differingExpressionKeys\0" /* 6622 */ - "ourExpressionTypes\0" /* 6646 */ - "theirExpressionTypes\0" /* 6665 */ - "withoutPreciseClassConstantFetches\0" /* 6686 */ - "currentConditionalExpressions\0" /* 6721 */ - "sourceConditionalExpressions\0" /* 6751 */ - "otherExpressionTypes\0" /* 6780 */ - "preserveVacuousConditionalExpressions\0" /* 6801 */ - "ourConditionalExpressions\0" /* 6839 */ - "theirConditionalExpressions\0" /* 6865 */ - "mergeSameGuardConditionalExpressions\0" /* 6893 */ - "newConditionalExpressions\0" /* 6930 */ - "existingConditionalExpressions\0" /* 6956 */ - "mergeConditionalExpressions\0" /* 6987 */ - "calledMethodScope\0" /* 7015 */ - "mergeInitializedProperties\0" /* 7033 */ - "finallyScope\0" /* 7060 */ - "originalFinallyScope\0" /* 7073 */ - "processFinallyScope\0" /* 7094 */ - "ourVariableTypeHolders\0" /* 7114 */ - "finallyVariableTypeHolders\0" /* 7137 */ - "originalVariableTypeHolders\0" /* 7164 */ - "processFinallyScopeVariableTypeHolders\0" /* 7192 */ - "closureScope\0" /* 7231 */ - "prevScope\0" /* 7244 */ - "byRefUses\0" /* 7254 */ - "processClosureScope\0" /* 7264 */ - "finalScope\0" /* 7284 */ - "processAlwaysIterableForeachScopeWithoutPollute\0" /* 7295 */ - "writableVariableNames\0" /* 7343 */ - "generalizeWith\0" /* 7365 */ - "generalizeWithVariableState\0" /* 7380 */ - "variableTypeHolders\0" /* 7408 */ - "otherVariableTypeHolders\0" /* 7428 */ - "generalizeVariableTypeHolders\0" /* 7453 */ - "flattenUnionForGeneralization\0" /* 7483 */ - "a\0" /* 7513 */ - "b\0" /* 7515 */ - "depth\0" /* 7517 */ - "generalizeType\0" /* 7523 */ - "getArrayDepth\0" /* 7538 */ - "equals\0" /* 7552 */ - "otherConditionalExpressions\0" /* 7559 */ - "compareConditionalExpressions\0" /* 7587 */ - "compareVariableTypeHolders\0" /* 7617 */ - "propertyReflection\0" /* 7644 */ - "PHPStan\\Reflection\\PropertyReflection\0" /* 7663 */ - "canAccessProperty\0" /* 7701 */ - "PHPStan\\Reflection\\ExtendedPropertyReflection\0" /* 7719 */ - "canReadProperty\0" /* 7765 */ - "canWriteProperty\0" /* 7781 */ - "methodReflection\0" /* 7798 */ - "PHPStan\\Reflection\\MethodReflection\0" /* 7815 */ - "canCallMethod\0" /* 7851 */ - "constantReflection\0" /* 7865 */ - "PHPStan\\Reflection\\ClassConstantReflection\0" /* 7884 */ - "canAccessConstant\0" /* 7927 */ - "classMemberReflection\0" /* 7945 */ - "PHPStan\\Reflection\\ClassMemberReflection\0" /* 7967 */ - "canAccessClassMember\0" /* 8008 */ - "debug\0" /* 8029 */ - "typeWithMethod\0" /* 8035 */ - "methodName\0" /* 8050 */ - "filterTypeWithMethod\0" /* 8061 */ - "PHPStan\\Reflection\\ExtendedMethodReflection\0" /* 8082 */ - "getMethodReflection\0" /* 8126 */ - "getNakedMethod\0" /* 8146 */ - "typeWithProperty\0" /* 8161 */ - "getPropertyReflection\0" /* 8178 */ - "getInstancePropertyReflection\0" /* 8200 */ - "getStaticPropertyReflection\0" /* 8230 */ - "typeWithConstant\0" /* 8258 */ - "constantName\0" /* 8275 */ - "getConstantReflection\0" /* 8288 */ - "constantType\0" /* 8310 */ - "getConstantExplicitTypeFromConfig\0" /* 8323 */ - "getConstantTypes\0" /* 8357 */ - "getGlobalConstantType\0" /* 8374 */ - "nameString\0" /* 8396 */ - "createGlobalConstantFetches\0" /* 8407 */ - "getNativeConstantTypes\0" /* 8435 */ - "getIterableKeyType\0" /* 8458 */ - "getIterableValueType\0" /* 8477 */ - "PHPStan\\Php\\PhpVersions\0" /* 8498 */ - "getPhpVersion\0" /* 8522 */ - "isOverallPhpVersionRange\0" /* 8536 */ - "PhpParser\\Node\0" /* 8561 */ - "invokeNodeCallback\0" /* 8576 */ - "collectorType\0" /* 8595 */ - "data\0" /* 8609 */ - "emitCollectedData\0" /* 8614 */ - "extensionClass\0" /* 8632 */ - "trackValueDependency\0" /* 8647 */ - "file\0" /* 8668 */ - "trackFileDependency\0" /* 8673 */ - "directory\0" /* 8693 */ - "pattern\0" /* 8703 */ - "'*'\0" /* 8711 */ - "trackDirectoryDependency\0" /* 8715 */ - "trackClassDependency"; /* 8740 */ + "isGlobalVariable\0" /* 1503 */ + "name\0" /* 1520 */ + "PhpParser\\Node\\Name\0" /* 1525 */ + "hasConstant\0" /* 1545 */ + "fileHasCompilerHaltStatementCalls\0" /* 1557 */ + "isInAnonymousFunction\0" /* 1591 */ + "getAnonymousFunctionReflection\0" /* 1613 */ + "getAnonymousFunctionReturnType\0" /* 1644 */ + "withAnonymousFunctionReflection\0" /* 1675 */ + "node\0" /* 1707 */ + "PhpParser\\Node\\Expr\0" /* 1712 */ + "getType\0" /* 1732 */ + "getScopeType\0" /* 1740 */ + "getScopeNativeType\0" /* 1753 */ + "getNodeKey\0" /* 1772 */ + "PHPStan\\Node\\Printer\\ExprPrinter\0" /* 1783 */ + "getExprPrinter\0" /* 1816 */ + "duplicateWith\0" /* 1831 */ + "relevantRoots\0" /* 1845 */ + "getClosureScopeCacheKey\0" /* 1859 */ + "exprString\0" /* 1883 */ + "roots\0" /* 1894 */ + "exprStringIsRootedIn\0" /* 1900 */ + "resolveType\0" /* 1921 */ + "resolveTypeOfNewWorldHandlerNode\0" /* 1933 */ + "getCurrentTypesOfSpecifiedExpr\0" /* 1966 */ + "PHPStan\\Analyser\\TypeSpecifierContext\0" /* 1997 */ + "PHPStan\\Analyser\\SpecifiedTypes\0" /* 2035 */ + "specifyTypesOfNewWorldHandlerNode\0" /* 2067 */ + "PHPStan\\Analyser\\ExpressionResult\0" /* 2101 */ + "obtainResultForNode\0" /* 2135 */ + "storage\0" /* 2155 */ + "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 2163 */ + "pushExpressionResultStorage\0" /* 2204 */ + "popExpressionResultStorage\0" /* 2232 */ + "findSettledStoredResult\0" /* 2259 */ + "getCurrentExpressionResultStorage\0" /* 2283 */ + "frame\0" /* 2317 */ + "withTemplateArgumentFrame\0" /* 2323 */ + "getCurrentTemplateArgumentFrame\0" /* 2349 */ + "getTemplateArgumentConstraints\0" /* 2381 */ + "constraints\0" /* 2412 */ + "withTemplateArgumentConstraints\0" /* 2424 */ + "addTemplateArgumentConstraints\0" /* 2456 */ + "withoutMemoizedTypes\0" /* 2487 */ + "other\0" /* 2508 */ + "getDifferingVariableRoots\0" /* 2514 */ + "key\0" /* 2540 */ + "getVariablesOfExpressionKey\0" /* 2544 */ + "recordedEntry\0" /* 2572 */ + "recordedExit\0" /* 2586 */ + "withRecordedStatementDelta\0" /* 2599 */ + "current\0" /* 2626 */ + "applyRecordedHolderDelta\0" /* 2634 */ + "getNativeType\0" /* 2659 */ + "getKeepVoidType\0" /* 2673 */ + "doNotTreatPhpDocTypesAsCertain\0" /* 2689 */ + "promoteNativeTypes\0" /* 2720 */ + "resolveName\0" /* 2739 */ + "PHPStan\\Type\\TypeWithClassName\0" /* 2751 */ + "resolveTypeByName\0" /* 2782 */ + "value\0" /* 2800 */ + "getTypeFromValue\0" /* 2806 */ + "hasExpressionType\0" /* 2823 */ + "getTrackedExpressionType\0" /* 2841 */ + "reflection\0" /* 2866 */ + "parameter\0" /* 2877 */ + "PHPStan\\Reflection\\ParameterReflection\0" /* 2887 */ + "rememberTypes\0" /* 2926 */ + "pushInFunctionCall\0" /* 2940 */ + "popInFunctionCall\0" /* 2959 */ + "className\0" /* 2977 */ + "isInClassExists\0" /* 2987 */ + "getFunctionCallStack\0" /* 3003 */ + "getFunctionCallStackWithParameters\0" /* 3024 */ + "functionName\0" /* 3059 */ + "isInFunctionExists\0" /* 3072 */ + "classReflection\0" /* 3091 */ + "enterClass\0" /* 3107 */ + "traitReflection\0" /* 3118 */ + "enterTrait\0" /* 3134 */ + "classMethod\0" /* 3145 */ + "PhpParser\\Node\\Stmt\\ClassMethod\0" /* 3157 */ + "templateTypeMap\0" /* 3189 */ + "PHPStan\\Type\\Generic\\TemplateTypeMap\0" /* 3205 */ + "phpDocParameterTypes\0" /* 3242 */ + "phpDocReturnType\0" /* 3263 */ + "throwType\0" /* 3280 */ + "deprecatedDescription\0" /* 3290 */ + "isDeprecated\0" /* 3312 */ + "isInternal\0" /* 3325 */ + "isFinal\0" /* 3336 */ + "isPure\0" /* 3344 */ + "acceptsNamedArguments\0" /* 3351 */ + "asserts\0" /* 3373 */ + "PHPStan\\Reflection\\Assertions\0" /* 3381 */ + "selfOutType\0" /* 3411 */ + "phpDocComment\0" /* 3423 */ + "parameterOutTypes\0" /* 3437 */ + "immediatelyInvokedCallableParameters\0" /* 3455 */ + "phpDocClosureThisTypeParameters\0" /* 3492 */ + "isConstructor\0" /* 3524 */ + "resolvedPhpDocBlock\0" /* 3538 */ + "PHPStan\\PhpDoc\\ResolvedPhpDocBlock\0" /* 3558 */ + "phpDocPureUnlessCallableIsImpureParameters\0" /* 3593 */ + "phpDocPureUnlessParameterPassedParameters\0" /* 3636 */ + "enterClassMethod\0" /* 3678 */ + "hook\0" /* 3695 */ + "PhpParser\\Node\\PropertyHook\0" /* 3700 */ + "propertyName\0" /* 3728 */ + "nativePropertyTypeNode\0" /* 3741 */ + "PhpParser\\Node\\Identifier|PhpParser\\Node\\Name|PhpParser\\Node\\ComplexType\0" /* 3764 */ + "phpDocPropertyType\0" /* 3837 */ + "enterPropertyHook\0" /* 3856 */ + "type\0" /* 3874 */ + "transformStaticType\0" /* 3879 */ + "functionLike\0" /* 3899 */ + "PhpParser\\Node\\FunctionLike\0" /* 3912 */ + "getRealParameterTypes\0" /* 3940 */ + "getRealParameterDefaultValues\0" /* 3962 */ + "PhpParser\\Node\\Stmt\\ClassMethod|PhpParser\\Node\\Stmt\\Function_|PhpParser\\Node\\PropertyHook\0" /* 3992 */ + "getParameterAttributes\0" /* 4082 */ + "PhpParser\\Node\\Stmt\\Function_\0" /* 4105 */ + "pureUnlessCallableIsImpureParameters\0" /* 4135 */ + "pureUnlessParameterPassedParameters\0" /* 4172 */ + "enterFunction\0" /* 4208 */ + "functionReflection\0" /* 4222 */ + "preserveConstructorScope\0" /* 4241 */ + "enterFunctionLike\0" /* 4266 */ + "namespaceName\0" /* 4284 */ + "enterNamespace\0" /* 4298 */ + "thisType\0" /* 4313 */ + "nativeThisType\0" /* 4322 */ + "scopeClasses\0" /* 4337 */ + "enterClosureBind\0" /* 4350 */ + "originalScope\0" /* 4367 */ + "restoreOriginalScopeAfterClosureBind\0" /* 4381 */ + "restoreThisScope\0" /* 4418 */ + "restoreThis\0" /* 4435 */ + "enterClosureCall\0" /* 4447 */ + "isInClosureBind\0" /* 4464 */ + "withClosureBindScopeClasses\0" /* 4480 */ + "closure\0" /* 4508 */ + "PhpParser\\Node\\Expr\\Closure\0" /* 4516 */ + "callableParameters\0" /* 4544 */ + "nativeCallableParameters\0" /* 4563 */ + "enterAnonymousFunction\0" /* 4588 */ + "enterAnonymousFunctionWithoutReflection\0" /* 4611 */ + "typeHolder\0" /* 4651 */ + "PHPStan\\Analyser\\ExpressionTypeHolder\0" /* 4662 */ + "expressionTypeIsUnchangeable\0" /* 4700 */ + "invalidateStaticExpressions\0" /* 4729 */ + "arrowFunction\0" /* 4757 */ + "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 4771 */ + "enterArrowFunction\0" /* 4805 */ + "enterArrowFunctionWithoutReflection\0" /* 4824 */ + "PhpParser\\Node\\Param\0" /* 4860 */ + "isParameterValueNullable\0" /* 4881 */ + "isNullable\0" /* 4906 */ + "isVariadic\0" /* 4917 */ + "getFunctionType\0" /* 4928 */ + "index\0" /* 4944 */ + "getCallableParameterType\0" /* 4950 */ + "startIndex\0" /* 4975 */ + "buildVariadicArrayTypeFromCallableParameters\0" /* 4986 */ + "nativeType\0" /* 5031 */ + "inferredType\0" /* 5042 */ + "intersectButNotNever\0" /* 5055 */ + "PhpParser\\Node\\Expr\\Match_\0" /* 5076 */ + "condType\0" /* 5103 */ + "condNativeType\0" /* 5112 */ + "enterMatch\0" /* 5127 */ + "iteratee\0" /* 5138 */ + "iterateeType\0" /* 5147 */ + "nativeIterateeType\0" /* 5160 */ + "valueName\0" /* 5179 */ + "keyName\0" /* 5189 */ + "valueByRef\0" /* 5197 */ + "enterForeach\0" /* 5208 */ + "enterForeachKey\0" /* 5221 */ + "catchType\0" /* 5237 */ + "enterCatchType\0" /* 5247 */ + "isPlainWrite\0" /* 5262 */ + "enterExpressionAssign\0" /* 5275 */ + "exitExpressionAssign\0" /* 5297 */ + "isInExpressionAssign\0" /* 5318 */ + "isInWriteExpressionAssign\0" /* 5339 */ + "setAllowedUndefinedExpression\0" /* 5365 */ + "unsetAllowedUndefinedExpression\0" /* 5395 */ + "isUndefinedExpressionAllowed\0" /* 5427 */ + "certainty\0" /* 5456 */ + "intertwinedPropagatedFrom\0" /* 5466 */ + "assignVariable\0" /* 5492 */ + "overwriteExpression\0" /* 5507 */ + "scope\0" /* 5527 */ + "rootType\0" /* 5533 */ + "assignedExpr\0" /* 5542 */ + "rootVariableName\0" /* 5555 */ + "native\0" /* 5572 */ + "resolveIntertwinedAssignedType\0" /* 5579 */ + "dimFetch\0" /* 5610 */ + "PhpParser\\Node\\Expr\\ArrayDimFetch\0" /* 5619 */ + "isDimFetchPathReachable\0" /* 5653 */ + "unsetExpression\0" /* 5677 */ + "getStateType\0" /* 5693 */ + "getScopeStateType\0" /* 5706 */ + "getScopeStateNativeType\0" /* 5724 */ + "resolveScopeStateType\0" /* 5748 */ + "specifyExpressionType\0" /* 5770 */ + "openSpecificationScope\0" /* 5792 */ + "isSpecifyExpressionTypeNoop\0" /* 5815 */ + "specifyExpressionTypeInPlace\0" /* 5843 */ + "assignExpression\0" /* 5872 */ + "fetchedOnType\0" /* 5889 */ + "assignInitializedProperty\0" /* 5903 */ + "expressionToInvalidate\0" /* 5929 */ + "requireMoreCharacters\0" /* 5952 */ + "invalidatingClass\0" /* 5974 */ + "keepPropertyFetches\0" /* 5992 */ + "invalidateExpression\0" /* 6012 */ + "isPrivatePropertyOfDifferentClass\0" /* 6033 */ + "invalidateMethodsOnExpression\0" /* 6067 */ + "setExpressionCertaintyKeepingType\0" /* 6097 */ + "isComplexUnionType\0" /* 6131 */ + "addTypeToExpression\0" /* 6150 */ + "typeToRemove\0" /* 6170 */ + "removeTypeFromExpression\0" /* 6183 */ + "filterByTruthyValue\0" /* 6208 */ + "filterByFalseyValue\0" /* 6228 */ + "specifiedTypes\0" /* 6248 */ + "applySpecifiedTypes\0" /* 6263 */ + "specifiedExpressions\0" /* 6283 */ + "processConditionalExpressionsAfterSpecifying\0" /* 6304 */ + "getConditionalExpressions\0" /* 6349 */ + "conditionalExpressionHolders\0" /* 6375 */ + "addConditionalExpressions\0" /* 6404 */ + "exitFirstLevelStatements\0" /* 6430 */ + "isInFirstLevelStatement\0" /* 6455 */ + "otherScope\0" /* 6479 */ + "preserveVacuousConditionals\0" /* 6490 */ + "mergeWith\0" /* 6518 */ + "ours\0" /* 6528 */ + "theirs\0" /* 6533 */ + "collectAbsorbedClosures\0" /* 6540 */ + "mergeWithVariableState\0" /* 6564 */ + "differingExpressionKeys\0" /* 6587 */ + "ourExpressionTypes\0" /* 6611 */ + "theirExpressionTypes\0" /* 6630 */ + "withoutPreciseClassConstantFetches\0" /* 6651 */ + "currentConditionalExpressions\0" /* 6686 */ + "sourceConditionalExpressions\0" /* 6716 */ + "otherExpressionTypes\0" /* 6745 */ + "preserveVacuousConditionalExpressions\0" /* 6766 */ + "ourConditionalExpressions\0" /* 6804 */ + "theirConditionalExpressions\0" /* 6830 */ + "mergeSameGuardConditionalExpressions\0" /* 6858 */ + "newConditionalExpressions\0" /* 6895 */ + "existingConditionalExpressions\0" /* 6921 */ + "mergeConditionalExpressions\0" /* 6952 */ + "calledMethodScope\0" /* 6980 */ + "mergeInitializedProperties\0" /* 6998 */ + "finallyScope\0" /* 7025 */ + "originalFinallyScope\0" /* 7038 */ + "processFinallyScope\0" /* 7059 */ + "ourVariableTypeHolders\0" /* 7079 */ + "finallyVariableTypeHolders\0" /* 7102 */ + "originalVariableTypeHolders\0" /* 7129 */ + "processFinallyScopeVariableTypeHolders\0" /* 7157 */ + "closureScope\0" /* 7196 */ + "prevScope\0" /* 7209 */ + "byRefUses\0" /* 7219 */ + "processClosureScope\0" /* 7229 */ + "finalScope\0" /* 7249 */ + "processAlwaysIterableForeachScopeWithoutPollute\0" /* 7260 */ + "writableVariableNames\0" /* 7308 */ + "generalizeWith\0" /* 7330 */ + "generalizeWithVariableState\0" /* 7345 */ + "variableTypeHolders\0" /* 7373 */ + "otherVariableTypeHolders\0" /* 7393 */ + "generalizeVariableTypeHolders\0" /* 7418 */ + "flattenUnionForGeneralization\0" /* 7448 */ + "a\0" /* 7478 */ + "b\0" /* 7480 */ + "depth\0" /* 7482 */ + "generalizeType\0" /* 7488 */ + "getArrayDepth\0" /* 7503 */ + "equals\0" /* 7517 */ + "otherConditionalExpressions\0" /* 7524 */ + "compareConditionalExpressions\0" /* 7552 */ + "compareVariableTypeHolders\0" /* 7582 */ + "propertyReflection\0" /* 7609 */ + "PHPStan\\Reflection\\PropertyReflection\0" /* 7628 */ + "canAccessProperty\0" /* 7666 */ + "PHPStan\\Reflection\\ExtendedPropertyReflection\0" /* 7684 */ + "canReadProperty\0" /* 7730 */ + "canWriteProperty\0" /* 7746 */ + "methodReflection\0" /* 7763 */ + "PHPStan\\Reflection\\MethodReflection\0" /* 7780 */ + "canCallMethod\0" /* 7816 */ + "constantReflection\0" /* 7830 */ + "PHPStan\\Reflection\\ClassConstantReflection\0" /* 7849 */ + "canAccessConstant\0" /* 7892 */ + "classMemberReflection\0" /* 7910 */ + "PHPStan\\Reflection\\ClassMemberReflection\0" /* 7932 */ + "canAccessClassMember\0" /* 7973 */ + "debug\0" /* 7994 */ + "typeWithMethod\0" /* 8000 */ + "methodName\0" /* 8015 */ + "filterTypeWithMethod\0" /* 8026 */ + "PHPStan\\Reflection\\ExtendedMethodReflection\0" /* 8047 */ + "getMethodReflection\0" /* 8091 */ + "getNakedMethod\0" /* 8111 */ + "typeWithProperty\0" /* 8126 */ + "getPropertyReflection\0" /* 8143 */ + "getInstancePropertyReflection\0" /* 8165 */ + "getStaticPropertyReflection\0" /* 8195 */ + "typeWithConstant\0" /* 8223 */ + "constantName\0" /* 8240 */ + "getConstantReflection\0" /* 8253 */ + "constantType\0" /* 8275 */ + "getConstantExplicitTypeFromConfig\0" /* 8288 */ + "getConstantTypes\0" /* 8322 */ + "getGlobalConstantType\0" /* 8339 */ + "nameString\0" /* 8361 */ + "createGlobalConstantFetches\0" /* 8372 */ + "getNativeConstantTypes\0" /* 8400 */ + "getIterableKeyType\0" /* 8423 */ + "getIterableValueType\0" /* 8442 */ + "PHPStan\\Php\\PhpVersions\0" /* 8463 */ + "getPhpVersion\0" /* 8487 */ + "isOverallPhpVersionRange\0" /* 8501 */ + "PhpParser\\Node\0" /* 8526 */ + "invokeNodeCallback\0" /* 8541 */ + "collectorType\0" /* 8560 */ + "data\0" /* 8574 */ + "emitCollectedData\0" /* 8579 */ + "extensionClass\0" /* 8597 */ + "trackValueDependency\0" /* 8612 */ + "file\0" /* 8633 */ + "trackFileDependency\0" /* 8638 */ + "directory\0" /* 8658 */ + "pattern\0" /* 8668 */ + "'*'\0" /* 8676 */ + "trackDirectoryDependency\0" /* 8680 */ + "trackClassDependency"; /* 8705 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, 0, 9), /* __construct $services */ reg::packed(40, 0, 53), /* __construct $scopeFactory */ @@ -551,11 +550,9 @@ inline constexpr reg::PackedArg args[] = { reg::packed(738, 0, 1424), /* getVariableType return */ reg::packed(738, MAY_BE_ARRAY), /* getDefinedVariables return */ reg::packed(738, MAY_BE_ARRAY), /* getMaybeDefinedVariables return */ - reg::packed(966, 0, 1503), /* findPossiblyImpureCallDescriptions $expr */ - reg::packed(738, MAY_BE_ARRAY), /* findPossiblyImpureCallDescriptions return */ reg::packed(1374, MAY_BE_STRING), /* isGlobalVariable $variableName */ reg::packed(738, MAY_BE_BOOL), /* isGlobalVariable return */ - reg::packed(1575, 0, 1580), /* hasConstant $name */ + reg::packed(1520, 0, 1525), /* hasConstant $name */ reg::packed(738, MAY_BE_BOOL), /* hasConstant return */ reg::packed(738, MAY_BE_BOOL), /* fileHasCompilerHaltStatementCalls return */ reg::packed(738, MAY_BE_BOOL), /* isInAnonymousFunction return */ @@ -563,15 +560,15 @@ inline constexpr reg::PackedArg args[] = { reg::packed(738, MAY_BE_NULL, 1424), /* getAnonymousFunctionReturnType return */ reg::packed(327, 0, 355), /* withAnonymousFunctionReflection $anonymousFunctionReflection */ reg::packed(738, 0, 523), /* withAnonymousFunctionReflection return */ - reg::packed(1762, 0, 1503), /* getType $node */ + reg::packed(1707, 0, 1712), /* getType $node */ reg::packed(738, 0, 1424), /* getType return */ - reg::packed(966, 0, 1503), /* getScopeType $expr */ + reg::packed(966, 0, 1712), /* getScopeType $expr */ reg::packed(738, 0, 1424), /* getScopeType return */ - reg::packed(966, 0, 1503), /* getScopeNativeType $expr */ + reg::packed(966, 0, 1712), /* getScopeNativeType $expr */ reg::packed(738, 0, 1424), /* getScopeNativeType return */ - reg::packed(1762, 0, 1503), /* getNodeKey $node */ + reg::packed(1707, 0, 1712), /* getNodeKey $node */ reg::packed(738, MAY_BE_STRING), /* getNodeKey return */ - reg::packed(738, 0, 1818), /* getExprPrinter return */ + reg::packed(738, 0, 1783), /* getExprPrinter return */ reg::packed(237, MAY_BE_ARRAY), /* duplicateWith $expressionTypes */ reg::packed(256, MAY_BE_ARRAY), /* duplicateWith $nativeExpressionTypes */ reg::packed(278, MAY_BE_ARRAY), /* duplicateWith $conditionalExpressions */ @@ -581,448 +578,448 @@ inline constexpr reg::PackedArg args[] = { reg::packed(380, MAY_BE_BOOL), /* duplicateWith $inFirstLevelStatement */ reg::packed(494, MAY_BE_BOOL), /* duplicateWith $afterExtractCall */ reg::packed(738, 0, 523), /* duplicateWith return */ - reg::packed(1880, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* getClosureScopeCacheKey $relevantRoots */ + reg::packed(1845, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* getClosureScopeCacheKey $relevantRoots */ reg::packed(738, MAY_BE_STRING), /* getClosureScopeCacheKey return */ - reg::packed(1918, MAY_BE_STRING), /* exprStringIsRootedIn $exprString */ - reg::packed(1929, MAY_BE_ARRAY), /* exprStringIsRootedIn $roots */ + reg::packed(1883, MAY_BE_STRING), /* exprStringIsRootedIn $exprString */ + reg::packed(1894, MAY_BE_ARRAY), /* exprStringIsRootedIn $roots */ reg::packed(738, MAY_BE_BOOL), /* exprStringIsRootedIn return */ - reg::packed(1918, MAY_BE_STRING), /* resolveType $exprString */ - reg::packed(1762, 0, 1503), /* resolveType $node */ + reg::packed(1883, MAY_BE_STRING), /* resolveType $exprString */ + reg::packed(1707, 0, 1712), /* resolveType $node */ reg::packed(738, 0, 1424), /* resolveType return */ - reg::packed(1762, 0, 1503), /* resolveTypeOfNewWorldHandlerNode $node */ + reg::packed(1707, 0, 1712), /* resolveTypeOfNewWorldHandlerNode $node */ reg::packed(738, 0, 1424), /* resolveTypeOfNewWorldHandlerNode return */ - reg::packed(966, 0, 1503), /* getCurrentTypesOfSpecifiedExpr $expr */ + reg::packed(966, 0, 1712), /* getCurrentTypesOfSpecifiedExpr $expr */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* getCurrentTypesOfSpecifiedExpr return */ - reg::packed(1762, 0, 1503), /* specifyTypesOfNewWorldHandlerNode $node */ - reg::packed(91, 0, 2032), /* specifyTypesOfNewWorldHandlerNode $context */ - reg::packed(738, 0, 2070), /* specifyTypesOfNewWorldHandlerNode return */ - reg::packed(1762, 0, 1503), /* obtainResultForNode $node */ - reg::packed(738, 0, 2136), /* obtainResultForNode return */ - reg::packed(2190, 0, 2198), /* pushExpressionResultStorage $storage */ + reg::packed(1707, 0, 1712), /* specifyTypesOfNewWorldHandlerNode $node */ + reg::packed(91, 0, 1997), /* specifyTypesOfNewWorldHandlerNode $context */ + reg::packed(738, 0, 2035), /* specifyTypesOfNewWorldHandlerNode return */ + reg::packed(1707, 0, 1712), /* obtainResultForNode $node */ + reg::packed(738, 0, 2101), /* obtainResultForNode return */ + reg::packed(2155, 0, 2163), /* pushExpressionResultStorage $storage */ reg::packed(738, MAY_BE_VOID), /* pushExpressionResultStorage return */ reg::packed(738, MAY_BE_VOID), /* popExpressionResultStorage return */ - reg::packed(1762, 0, 1503), /* findSettledStoredResult $node */ - reg::packed(738, MAY_BE_NULL, 2136), /* findSettledStoredResult return */ - reg::packed(738, MAY_BE_NULL, 2198), /* getCurrentExpressionResultStorage return */ - reg::packed(2352, MAY_BE_NULL, 596), /* withTemplateArgumentFrame $frame */ + reg::packed(1707, 0, 1712), /* findSettledStoredResult $node */ + reg::packed(738, MAY_BE_NULL, 2101), /* findSettledStoredResult return */ + reg::packed(738, MAY_BE_NULL, 2163), /* getCurrentExpressionResultStorage return */ + reg::packed(2317, MAY_BE_NULL, 596), /* withTemplateArgumentFrame $frame */ reg::packed(738, 0, 523), /* withTemplateArgumentFrame return */ reg::packed(738, MAY_BE_NULL, 596), /* getCurrentTemplateArgumentFrame return */ reg::packed(738, MAY_BE_NULL, 672), /* getTemplateArgumentConstraints return */ - reg::packed(2447, MAY_BE_NULL, 672), /* withTemplateArgumentConstraints $constraints */ + reg::packed(2412, MAY_BE_NULL, 672), /* withTemplateArgumentConstraints $constraints */ reg::packed(738, 0, 523), /* withTemplateArgumentConstraints return */ - reg::packed(2447, MAY_BE_NULL, 672), /* addTemplateArgumentConstraints $constraints */ + reg::packed(2412, MAY_BE_NULL, 672), /* addTemplateArgumentConstraints $constraints */ reg::packed(738, 0, 523), /* addTemplateArgumentConstraints return */ reg::packed(738, 0, 523), /* withoutMemoizedTypes return */ - reg::packed(2543, 0, 523), /* getDifferingVariableRoots $other */ + reg::packed(2508, 0, 523), /* getDifferingVariableRoots $other */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* getDifferingVariableRoots return */ - reg::packed(2575, MAY_BE_STRING), /* getVariablesOfExpressionKey $key */ + reg::packed(2540, MAY_BE_STRING), /* getVariablesOfExpressionKey $key */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* getVariablesOfExpressionKey return */ - reg::packed(2607, 0, 523), /* withRecordedStatementDelta $recordedEntry */ - reg::packed(2621, 0, 523), /* withRecordedStatementDelta $recordedExit */ + reg::packed(2572, 0, 523), /* withRecordedStatementDelta $recordedEntry */ + reg::packed(2586, 0, 523), /* withRecordedStatementDelta $recordedExit */ reg::packed(738, 0, 523), /* withRecordedStatementDelta return */ - reg::packed(2661, MAY_BE_ARRAY), /* applyRecordedHolderDelta $current */ - reg::packed(2607, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedEntry */ - reg::packed(2621, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedExit */ + reg::packed(2626, MAY_BE_ARRAY), /* applyRecordedHolderDelta $current */ + reg::packed(2572, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedEntry */ + reg::packed(2586, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedExit */ reg::packed(738, MAY_BE_ARRAY), /* applyRecordedHolderDelta return */ - reg::packed(966, 0, 1503), /* getNativeType $expr */ + reg::packed(966, 0, 1712), /* getNativeType $expr */ reg::packed(738, 0, 1424), /* getNativeType return */ - reg::packed(1762, 0, 1503), /* getKeepVoidType $node */ + reg::packed(1707, 0, 1712), /* getKeepVoidType $node */ reg::packed(738, 0, 1424), /* getKeepVoidType return */ reg::packed(738, 0, 523), /* doNotTreatPhpDocTypesAsCertain return */ reg::packed(738, 0, 523), /* promoteNativeTypes return */ - reg::packed(1575, 0, 1580), /* resolveName $name */ + reg::packed(1520, 0, 1525), /* resolveName $name */ reg::packed(738, MAY_BE_STRING), /* resolveName return */ - reg::packed(1575, 0, 1580), /* resolveTypeByName $name */ - reg::packed(738, 0, 2786), /* resolveTypeByName return */ - reg::packed(2835, 0), /* getTypeFromValue $value */ + reg::packed(1520, 0, 1525), /* resolveTypeByName $name */ + reg::packed(738, 0, 2751), /* resolveTypeByName return */ + reg::packed(2800, 0), /* getTypeFromValue $value */ reg::packed(738, 0, 1424), /* getTypeFromValue return */ - reg::packed(1762, 0, 1503), /* hasExpressionType $node */ + reg::packed(1707, 0, 1712), /* hasExpressionType $node */ reg::packed(738, 0, 1387), /* hasExpressionType return */ - reg::packed(1762, 0, 1503), /* getTrackedExpressionType $node */ + reg::packed(1707, 0, 1712), /* getTrackedExpressionType $node */ reg::packed(738, 0, 1424), /* getTrackedExpressionType return */ - reg::packed(2901, 0), /* pushInFunctionCall $reflection */ - reg::packed(2912, MAY_BE_NULL, 2922), /* pushInFunctionCall $parameter */ - reg::packed(2961, MAY_BE_BOOL), /* pushInFunctionCall $rememberTypes */ + reg::packed(2866, 0), /* pushInFunctionCall $reflection */ + reg::packed(2877, MAY_BE_NULL, 2887), /* pushInFunctionCall $parameter */ + reg::packed(2926, MAY_BE_BOOL), /* pushInFunctionCall $rememberTypes */ reg::packed(738, 0, 523), /* pushInFunctionCall return */ reg::packed(738, 0, 523), /* popInFunctionCall return */ - reg::packed(3012, MAY_BE_STRING), /* isInClassExists $className */ + reg::packed(2977, MAY_BE_STRING), /* isInClassExists $className */ reg::packed(738, MAY_BE_BOOL), /* isInClassExists return */ reg::packed(738, MAY_BE_ARRAY), /* getFunctionCallStack return */ reg::packed(738, MAY_BE_ARRAY), /* getFunctionCallStackWithParameters return */ - reg::packed(3094, MAY_BE_STRING), /* isInFunctionExists $functionName */ + reg::packed(3059, MAY_BE_STRING), /* isInFunctionExists $functionName */ reg::packed(738, MAY_BE_BOOL), /* isInFunctionExists return */ - reg::packed(3126, 0, 1065), /* enterClass $classReflection */ + reg::packed(3091, 0, 1065), /* enterClass $classReflection */ reg::packed(738, 0, 523), /* enterClass return */ - reg::packed(3153, 0, 1065), /* enterTrait $traitReflection */ + reg::packed(3118, 0, 1065), /* enterTrait $traitReflection */ reg::packed(738, 0, 523), /* enterTrait return */ - reg::packed(3180, 0, 3192), /* enterClassMethod $classMethod */ - reg::packed(3224, 0, 3240), /* enterClassMethod $templateTypeMap */ - reg::packed(3277, MAY_BE_ARRAY), /* enterClassMethod $phpDocParameterTypes */ - reg::packed(3298, MAY_BE_NULL, 1424), /* enterClassMethod $phpDocReturnType */ - reg::packed(3315, MAY_BE_NULL, 1424), /* enterClassMethod $throwType */ - reg::packed(3325, MAY_BE_NULL | MAY_BE_STRING), /* enterClassMethod $deprecatedDescription */ - reg::packed(3347, MAY_BE_BOOL), /* enterClassMethod $isDeprecated */ - reg::packed(3360, MAY_BE_BOOL), /* enterClassMethod $isInternal */ - reg::packed(3371, MAY_BE_BOOL), /* enterClassMethod $isFinal */ - reg::packed(3379, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterClassMethod $isPure */ - reg::packed(3386, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterClassMethod $acceptsNamedArguments */ - reg::packed(3408, MAY_BE_NULL, 3416, false, false, 222), /* enterClassMethod $asserts */ - reg::packed(3446, MAY_BE_NULL, 1424, false, false, 222), /* enterClassMethod $selfOutType */ - reg::packed(3458, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterClassMethod $phpDocComment */ - reg::packed(3472, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $parameterOutTypes */ - reg::packed(3490, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $immediatelyInvokedCallableParameters */ - reg::packed(3527, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocClosureThisTypeParameters */ - reg::packed(3559, MAY_BE_BOOL, reg::NoString, false, false, 148), /* enterClassMethod $isConstructor */ - reg::packed(3573, MAY_BE_NULL, 3593, false, false, 222), /* enterClassMethod $resolvedPhpDocBlock */ - reg::packed(3628, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessCallableIsImpureParameters */ - reg::packed(3671, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessParameterPassedParameters */ + reg::packed(3145, 0, 3157), /* enterClassMethod $classMethod */ + reg::packed(3189, 0, 3205), /* enterClassMethod $templateTypeMap */ + reg::packed(3242, MAY_BE_ARRAY), /* enterClassMethod $phpDocParameterTypes */ + reg::packed(3263, MAY_BE_NULL, 1424), /* enterClassMethod $phpDocReturnType */ + reg::packed(3280, MAY_BE_NULL, 1424), /* enterClassMethod $throwType */ + reg::packed(3290, MAY_BE_NULL | MAY_BE_STRING), /* enterClassMethod $deprecatedDescription */ + reg::packed(3312, MAY_BE_BOOL), /* enterClassMethod $isDeprecated */ + reg::packed(3325, MAY_BE_BOOL), /* enterClassMethod $isInternal */ + reg::packed(3336, MAY_BE_BOOL), /* enterClassMethod $isFinal */ + reg::packed(3344, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterClassMethod $isPure */ + reg::packed(3351, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterClassMethod $acceptsNamedArguments */ + reg::packed(3373, MAY_BE_NULL, 3381, false, false, 222), /* enterClassMethod $asserts */ + reg::packed(3411, MAY_BE_NULL, 1424, false, false, 222), /* enterClassMethod $selfOutType */ + reg::packed(3423, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterClassMethod $phpDocComment */ + reg::packed(3437, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $parameterOutTypes */ + reg::packed(3455, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $immediatelyInvokedCallableParameters */ + reg::packed(3492, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocClosureThisTypeParameters */ + reg::packed(3524, MAY_BE_BOOL, reg::NoString, false, false, 148), /* enterClassMethod $isConstructor */ + reg::packed(3538, MAY_BE_NULL, 3558, false, false, 222), /* enterClassMethod $resolvedPhpDocBlock */ + reg::packed(3593, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessCallableIsImpureParameters */ + reg::packed(3636, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessParameterPassedParameters */ reg::packed(738, 0, 523), /* enterClassMethod return */ - reg::packed(3730, 0, 3735), /* enterPropertyHook $hook */ - reg::packed(3763, MAY_BE_STRING), /* enterPropertyHook $propertyName */ - reg::packed(3776, MAY_BE_NULL, 3799), /* enterPropertyHook $nativePropertyTypeNode */ - reg::packed(3872, MAY_BE_NULL, 1424), /* enterPropertyHook $phpDocPropertyType */ - reg::packed(3277, MAY_BE_ARRAY), /* enterPropertyHook $phpDocParameterTypes */ - reg::packed(3315, MAY_BE_NULL, 1424), /* enterPropertyHook $throwType */ - reg::packed(3325, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $deprecatedDescription */ - reg::packed(3347, MAY_BE_BOOL), /* enterPropertyHook $isDeprecated */ - reg::packed(3379, MAY_BE_NULL | MAY_BE_BOOL), /* enterPropertyHook $isPure */ - reg::packed(3458, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $phpDocComment */ - reg::packed(3573, MAY_BE_NULL, 3593, false, false, 222), /* enterPropertyHook $resolvedPhpDocBlock */ + reg::packed(3695, 0, 3700), /* enterPropertyHook $hook */ + reg::packed(3728, MAY_BE_STRING), /* enterPropertyHook $propertyName */ + reg::packed(3741, MAY_BE_NULL, 3764), /* enterPropertyHook $nativePropertyTypeNode */ + reg::packed(3837, MAY_BE_NULL, 1424), /* enterPropertyHook $phpDocPropertyType */ + reg::packed(3242, MAY_BE_ARRAY), /* enterPropertyHook $phpDocParameterTypes */ + reg::packed(3280, MAY_BE_NULL, 1424), /* enterPropertyHook $throwType */ + reg::packed(3290, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $deprecatedDescription */ + reg::packed(3312, MAY_BE_BOOL), /* enterPropertyHook $isDeprecated */ + reg::packed(3344, MAY_BE_NULL | MAY_BE_BOOL), /* enterPropertyHook $isPure */ + reg::packed(3423, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $phpDocComment */ + reg::packed(3538, MAY_BE_NULL, 3558, false, false, 222), /* enterPropertyHook $resolvedPhpDocBlock */ reg::packed(738, 0, 523), /* enterPropertyHook return */ - reg::packed(3909, 0, 1424), /* transformStaticType $type */ + reg::packed(3874, 0, 1424), /* transformStaticType $type */ reg::packed(738, 0, 1424), /* transformStaticType return */ - reg::packed(3934, 0, 3947), /* getRealParameterTypes $functionLike */ + reg::packed(3899, 0, 3912), /* getRealParameterTypes $functionLike */ reg::packed(738, MAY_BE_ARRAY), /* getRealParameterTypes return */ - reg::packed(3934, 0, 3947), /* getRealParameterDefaultValues $functionLike */ + reg::packed(3899, 0, 3912), /* getRealParameterDefaultValues $functionLike */ reg::packed(738, MAY_BE_ARRAY), /* getRealParameterDefaultValues return */ - reg::packed(3934, 0, 4027), /* getParameterAttributes $functionLike */ + reg::packed(3899, 0, 3992), /* getParameterAttributes $functionLike */ reg::packed(738, MAY_BE_ARRAY), /* getParameterAttributes return */ - reg::packed(154, 0, 4140), /* enterFunction $function */ - reg::packed(3224, 0, 3240), /* enterFunction $templateTypeMap */ - reg::packed(3277, MAY_BE_ARRAY), /* enterFunction $phpDocParameterTypes */ - reg::packed(3298, MAY_BE_NULL, 1424), /* enterFunction $phpDocReturnType */ - reg::packed(3315, MAY_BE_NULL, 1424), /* enterFunction $throwType */ - reg::packed(3325, MAY_BE_NULL | MAY_BE_STRING), /* enterFunction $deprecatedDescription */ - reg::packed(3347, MAY_BE_BOOL), /* enterFunction $isDeprecated */ - reg::packed(3360, MAY_BE_BOOL), /* enterFunction $isInternal */ - reg::packed(3379, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterFunction $isPure */ - reg::packed(3386, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterFunction $acceptsNamedArguments */ - reg::packed(3408, MAY_BE_NULL, 3416, false, false, 222), /* enterFunction $asserts */ - reg::packed(3458, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterFunction $phpDocComment */ - reg::packed(3472, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $parameterOutTypes */ - reg::packed(3490, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $immediatelyInvokedCallableParameters */ - reg::packed(3527, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $phpDocClosureThisTypeParameters */ - reg::packed(4170, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessCallableIsImpureParameters */ - reg::packed(4207, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessParameterPassedParameters */ + reg::packed(154, 0, 4105), /* enterFunction $function */ + reg::packed(3189, 0, 3205), /* enterFunction $templateTypeMap */ + reg::packed(3242, MAY_BE_ARRAY), /* enterFunction $phpDocParameterTypes */ + reg::packed(3263, MAY_BE_NULL, 1424), /* enterFunction $phpDocReturnType */ + reg::packed(3280, MAY_BE_NULL, 1424), /* enterFunction $throwType */ + reg::packed(3290, MAY_BE_NULL | MAY_BE_STRING), /* enterFunction $deprecatedDescription */ + reg::packed(3312, MAY_BE_BOOL), /* enterFunction $isDeprecated */ + reg::packed(3325, MAY_BE_BOOL), /* enterFunction $isInternal */ + reg::packed(3344, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterFunction $isPure */ + reg::packed(3351, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterFunction $acceptsNamedArguments */ + reg::packed(3373, MAY_BE_NULL, 3381, false, false, 222), /* enterFunction $asserts */ + reg::packed(3423, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterFunction $phpDocComment */ + reg::packed(3437, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $parameterOutTypes */ + reg::packed(3455, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $immediatelyInvokedCallableParameters */ + reg::packed(3492, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $phpDocClosureThisTypeParameters */ + reg::packed(4135, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessCallableIsImpureParameters */ + reg::packed(4172, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessParameterPassedParameters */ reg::packed(738, 0, 523), /* enterFunction return */ - reg::packed(4257, 0, 163), /* enterFunctionLike $functionReflection */ - reg::packed(4276, MAY_BE_BOOL), /* enterFunctionLike $preserveConstructorScope */ + reg::packed(4222, 0, 163), /* enterFunctionLike $functionReflection */ + reg::packed(4241, MAY_BE_BOOL), /* enterFunctionLike $preserveConstructorScope */ reg::packed(738, 0, 523), /* enterFunctionLike return */ - reg::packed(4319, MAY_BE_STRING), /* enterNamespace $namespaceName */ + reg::packed(4284, MAY_BE_STRING), /* enterNamespace $namespaceName */ reg::packed(738, 0, 523), /* enterNamespace return */ - reg::packed(4348, MAY_BE_NULL, 1424), /* enterClosureBind $thisType */ - reg::packed(4357, MAY_BE_NULL, 1424), /* enterClosureBind $nativeThisType */ - reg::packed(4372, MAY_BE_ARRAY), /* enterClosureBind $scopeClasses */ + reg::packed(4313, MAY_BE_NULL, 1424), /* enterClosureBind $thisType */ + reg::packed(4322, MAY_BE_NULL, 1424), /* enterClosureBind $nativeThisType */ + reg::packed(4337, MAY_BE_ARRAY), /* enterClosureBind $scopeClasses */ reg::packed(738, 0, 523), /* enterClosureBind return */ - reg::packed(4402, 0, 523), /* restoreOriginalScopeAfterClosureBind $originalScope */ + reg::packed(4367, 0, 523), /* restoreOriginalScopeAfterClosureBind $originalScope */ reg::packed(738, 0, 523), /* restoreOriginalScopeAfterClosureBind return */ - reg::packed(4453, 0, 523), /* restoreThis $restoreThisScope */ + reg::packed(4418, 0, 523), /* restoreThis $restoreThisScope */ reg::packed(738, 0, 523), /* restoreThis return */ - reg::packed(4348, 0, 1424), /* enterClosureCall $thisType */ - reg::packed(4357, 0, 1424), /* enterClosureCall $nativeThisType */ + reg::packed(4313, 0, 1424), /* enterClosureCall $thisType */ + reg::packed(4322, 0, 1424), /* enterClosureCall $nativeThisType */ reg::packed(738, 0, 523), /* enterClosureCall return */ reg::packed(738, MAY_BE_BOOL), /* isInClosureBind return */ - reg::packed(4372, MAY_BE_ARRAY), /* withClosureBindScopeClasses $scopeClasses */ + reg::packed(4337, MAY_BE_ARRAY), /* withClosureBindScopeClasses $scopeClasses */ reg::packed(738, 0, 523), /* withClosureBindScopeClasses return */ - reg::packed(4543, 0, 4551), /* enterAnonymousFunction $closure */ - reg::packed(4579, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunction $callableParameters */ - reg::packed(4598, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterAnonymousFunction $nativeCallableParameters */ + reg::packed(4508, 0, 4516), /* enterAnonymousFunction $closure */ + reg::packed(4544, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunction $callableParameters */ + reg::packed(4563, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterAnonymousFunction $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterAnonymousFunction return */ - reg::packed(4543, 0, 4551), /* enterAnonymousFunctionWithoutReflection $closure */ - reg::packed(4579, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $callableParameters */ - reg::packed(4598, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $nativeCallableParameters */ + reg::packed(4508, 0, 4516), /* enterAnonymousFunctionWithoutReflection $closure */ + reg::packed(4544, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $callableParameters */ + reg::packed(4563, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterAnonymousFunctionWithoutReflection return */ - reg::packed(4686, 0, 4697), /* expressionTypeIsUnchangeable $typeHolder */ + reg::packed(4651, 0, 4662), /* expressionTypeIsUnchangeable $typeHolder */ reg::packed(738, MAY_BE_BOOL), /* expressionTypeIsUnchangeable return */ reg::packed(237, MAY_BE_ARRAY), /* invalidateStaticExpressions $expressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* invalidateStaticExpressions return */ - reg::packed(4792, 0, 4806), /* enterArrowFunction $arrowFunction */ - reg::packed(4579, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunction $callableParameters */ - reg::packed(4598, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterArrowFunction $nativeCallableParameters */ + reg::packed(4757, 0, 4771), /* enterArrowFunction $arrowFunction */ + reg::packed(4544, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunction $callableParameters */ + reg::packed(4563, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterArrowFunction $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterArrowFunction return */ - reg::packed(4792, 0, 4806), /* enterArrowFunctionWithoutReflection $arrowFunction */ - reg::packed(4579, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $callableParameters */ - reg::packed(4598, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $nativeCallableParameters */ + reg::packed(4757, 0, 4771), /* enterArrowFunctionWithoutReflection $arrowFunction */ + reg::packed(4544, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $callableParameters */ + reg::packed(4563, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterArrowFunctionWithoutReflection return */ - reg::packed(2912, 0, 4895), /* isParameterValueNullable $parameter */ + reg::packed(2877, 0, 4860), /* isParameterValueNullable $parameter */ reg::packed(738, MAY_BE_BOOL), /* isParameterValueNullable return */ - reg::packed(3909, 0), /* getFunctionType $type */ - reg::packed(4941, MAY_BE_BOOL), /* getFunctionType $isNullable */ - reg::packed(4952, MAY_BE_BOOL), /* getFunctionType $isVariadic */ + reg::packed(3874, 0), /* getFunctionType $type */ + reg::packed(4906, MAY_BE_BOOL), /* getFunctionType $isNullable */ + reg::packed(4917, MAY_BE_BOOL), /* getFunctionType $isVariadic */ reg::packed(738, 0, 1424), /* getFunctionType return */ - reg::packed(2912, 0, 4895), /* getCallableParameterType $parameter */ - reg::packed(4579, MAY_BE_ARRAY), /* getCallableParameterType $callableParameters */ - reg::packed(4979, MAY_BE_LONG), /* getCallableParameterType $index */ + reg::packed(2877, 0, 4860), /* getCallableParameterType $parameter */ + reg::packed(4544, MAY_BE_ARRAY), /* getCallableParameterType $callableParameters */ + reg::packed(4944, MAY_BE_LONG), /* getCallableParameterType $index */ reg::packed(738, 0, 1424), /* getCallableParameterType return */ - reg::packed(4579, MAY_BE_ARRAY), /* buildVariadicArrayTypeFromCallableParameters $callableParameters */ - reg::packed(5010, MAY_BE_LONG), /* buildVariadicArrayTypeFromCallableParameters $startIndex */ + reg::packed(4544, MAY_BE_ARRAY), /* buildVariadicArrayTypeFromCallableParameters $callableParameters */ + reg::packed(4975, MAY_BE_LONG), /* buildVariadicArrayTypeFromCallableParameters $startIndex */ reg::packed(738, 0, 1424), /* buildVariadicArrayTypeFromCallableParameters return */ - reg::packed(5066, 0, 1424), /* intersectButNotNever $nativeType */ - reg::packed(5077, 0, 1424), /* intersectButNotNever $inferredType */ + reg::packed(5031, 0, 1424), /* intersectButNotNever $nativeType */ + reg::packed(5042, 0, 1424), /* intersectButNotNever $inferredType */ reg::packed(738, 0, 1424), /* intersectButNotNever return */ - reg::packed(966, 0, 5111), /* enterMatch $expr */ - reg::packed(5138, 0, 1424), /* enterMatch $condType */ - reg::packed(5147, 0, 1424), /* enterMatch $condNativeType */ + reg::packed(966, 0, 5076), /* enterMatch $expr */ + reg::packed(5103, 0, 1424), /* enterMatch $condType */ + reg::packed(5112, 0, 1424), /* enterMatch $condNativeType */ reg::packed(738, 0, 523), /* enterMatch return */ - reg::packed(4402, 0, 523), /* enterForeach $originalScope */ - reg::packed(5173, 0, 1503), /* enterForeach $iteratee */ - reg::packed(5182, 0, 1424), /* enterForeach $iterateeType */ - reg::packed(5195, 0, 1424), /* enterForeach $nativeIterateeType */ - reg::packed(5214, MAY_BE_STRING), /* enterForeach $valueName */ - reg::packed(5224, MAY_BE_NULL | MAY_BE_STRING), /* enterForeach $keyName */ - reg::packed(5232, MAY_BE_BOOL), /* enterForeach $valueByRef */ + reg::packed(4367, 0, 523), /* enterForeach $originalScope */ + reg::packed(5138, 0, 1712), /* enterForeach $iteratee */ + reg::packed(5147, 0, 1424), /* enterForeach $iterateeType */ + reg::packed(5160, 0, 1424), /* enterForeach $nativeIterateeType */ + reg::packed(5179, MAY_BE_STRING), /* enterForeach $valueName */ + reg::packed(5189, MAY_BE_NULL | MAY_BE_STRING), /* enterForeach $keyName */ + reg::packed(5197, MAY_BE_BOOL), /* enterForeach $valueByRef */ reg::packed(738, 0, 523), /* enterForeach return */ - reg::packed(4402, 0, 523), /* enterForeachKey $originalScope */ - reg::packed(5173, 0, 1503), /* enterForeachKey $iteratee */ - reg::packed(5182, 0, 1424), /* enterForeachKey $iterateeType */ - reg::packed(5195, 0, 1424), /* enterForeachKey $nativeIterateeType */ - reg::packed(5224, MAY_BE_STRING), /* enterForeachKey $keyName */ + reg::packed(4367, 0, 523), /* enterForeachKey $originalScope */ + reg::packed(5138, 0, 1712), /* enterForeachKey $iteratee */ + reg::packed(5147, 0, 1424), /* enterForeachKey $iterateeType */ + reg::packed(5160, 0, 1424), /* enterForeachKey $nativeIterateeType */ + reg::packed(5189, MAY_BE_STRING), /* enterForeachKey $keyName */ reg::packed(738, 0, 523), /* enterForeachKey return */ - reg::packed(5272, 0, 1424), /* enterCatchType $catchType */ + reg::packed(5237, 0, 1424), /* enterCatchType $catchType */ reg::packed(1374, MAY_BE_NULL | MAY_BE_STRING), /* enterCatchType $variableName */ reg::packed(738, 0, 523), /* enterCatchType return */ - reg::packed(966, 0, 1503), /* enterExpressionAssign $expr */ - reg::packed(5297, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterExpressionAssign $isPlainWrite */ + reg::packed(966, 0, 1712), /* enterExpressionAssign $expr */ + reg::packed(5262, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterExpressionAssign $isPlainWrite */ reg::packed(738, 0, 523), /* enterExpressionAssign return */ - reg::packed(966, 0, 1503), /* exitExpressionAssign $expr */ + reg::packed(966, 0, 1712), /* exitExpressionAssign $expr */ reg::packed(738, 0, 523), /* exitExpressionAssign return */ - reg::packed(966, 0, 1503), /* isInExpressionAssign $expr */ + reg::packed(966, 0, 1712), /* isInExpressionAssign $expr */ reg::packed(738, MAY_BE_BOOL), /* isInExpressionAssign return */ - reg::packed(966, 0, 1503), /* isInWriteExpressionAssign $expr */ + reg::packed(966, 0, 1712), /* isInWriteExpressionAssign $expr */ reg::packed(738, MAY_BE_BOOL), /* isInWriteExpressionAssign return */ - reg::packed(966, 0, 1503), /* setAllowedUndefinedExpression $expr */ + reg::packed(966, 0, 1712), /* setAllowedUndefinedExpression $expr */ reg::packed(738, 0, 523), /* setAllowedUndefinedExpression return */ - reg::packed(966, 0, 1503), /* unsetAllowedUndefinedExpression $expr */ + reg::packed(966, 0, 1712), /* unsetAllowedUndefinedExpression $expr */ reg::packed(738, 0, 523), /* unsetAllowedUndefinedExpression return */ - reg::packed(966, 0, 1503), /* isUndefinedExpressionAllowed $expr */ + reg::packed(966, 0, 1712), /* isUndefinedExpressionAllowed $expr */ reg::packed(738, MAY_BE_BOOL), /* isUndefinedExpressionAllowed return */ reg::packed(1374, MAY_BE_STRING), /* assignVariable $variableName */ - reg::packed(3909, 0, 1424), /* assignVariable $type */ - reg::packed(5066, 0, 1424), /* assignVariable $nativeType */ - reg::packed(5491, 0, 1387), /* assignVariable $certainty */ - reg::packed(5501, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* assignVariable $intertwinedPropagatedFrom */ + reg::packed(3874, 0, 1424), /* assignVariable $type */ + reg::packed(5031, 0, 1424), /* assignVariable $nativeType */ + reg::packed(5456, 0, 1387), /* assignVariable $certainty */ + reg::packed(5466, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* assignVariable $intertwinedPropagatedFrom */ reg::packed(738, 0, 523), /* assignVariable return */ - reg::packed(966, 0, 1503), /* overwriteExpression $expr */ - reg::packed(3909, 0, 1424), /* overwriteExpression $type */ - reg::packed(5066, 0, 1424), /* overwriteExpression $nativeType */ + reg::packed(966, 0, 1712), /* overwriteExpression $expr */ + reg::packed(3874, 0, 1424), /* overwriteExpression $type */ + reg::packed(5031, 0, 1424), /* overwriteExpression $nativeType */ reg::packed(738, 0, 523), /* overwriteExpression return */ - reg::packed(5562, 0, 523), /* resolveIntertwinedAssignedType $scope */ - reg::packed(5568, 0, 1424), /* resolveIntertwinedAssignedType $rootType */ - reg::packed(5577, 0, 1503), /* resolveIntertwinedAssignedType $assignedExpr */ - reg::packed(5590, MAY_BE_STRING), /* resolveIntertwinedAssignedType $rootVariableName */ - reg::packed(5607, MAY_BE_BOOL), /* resolveIntertwinedAssignedType $native */ + reg::packed(5527, 0, 523), /* resolveIntertwinedAssignedType $scope */ + reg::packed(5533, 0, 1424), /* resolveIntertwinedAssignedType $rootType */ + reg::packed(5542, 0, 1712), /* resolveIntertwinedAssignedType $assignedExpr */ + reg::packed(5555, MAY_BE_STRING), /* resolveIntertwinedAssignedType $rootVariableName */ + reg::packed(5572, MAY_BE_BOOL), /* resolveIntertwinedAssignedType $native */ reg::packed(738, 0, 1424), /* resolveIntertwinedAssignedType return */ - reg::packed(5562, 0, 523), /* isDimFetchPathReachable $scope */ - reg::packed(5645, 0, 5654), /* isDimFetchPathReachable $dimFetch */ + reg::packed(5527, 0, 523), /* isDimFetchPathReachable $scope */ + reg::packed(5610, 0, 5619), /* isDimFetchPathReachable $dimFetch */ reg::packed(738, MAY_BE_BOOL), /* isDimFetchPathReachable return */ - reg::packed(966, 0, 1503), /* unsetExpression $expr */ + reg::packed(966, 0, 1712), /* unsetExpression $expr */ reg::packed(738, 0, 523), /* unsetExpression return */ - reg::packed(966, 0, 1503), /* getStateType $expr */ + reg::packed(966, 0, 1712), /* getStateType $expr */ reg::packed(738, 0, 1424), /* getStateType return */ - reg::packed(966, 0, 1503), /* getScopeStateType $expr */ + reg::packed(966, 0, 1712), /* getScopeStateType $expr */ reg::packed(738, 0, 1424), /* getScopeStateType return */ - reg::packed(966, 0, 1503), /* getScopeStateNativeType $expr */ + reg::packed(966, 0, 1712), /* getScopeStateNativeType $expr */ reg::packed(738, 0, 1424), /* getScopeStateNativeType return */ - reg::packed(966, 0, 1503), /* resolveScopeStateType $expr */ - reg::packed(5607, MAY_BE_BOOL), /* resolveScopeStateType $native */ + reg::packed(966, 0, 1712), /* resolveScopeStateType $expr */ + reg::packed(5572, MAY_BE_BOOL), /* resolveScopeStateType $native */ reg::packed(738, 0, 1424), /* resolveScopeStateType return */ - reg::packed(966, 0, 1503), /* specifyExpressionType $expr */ - reg::packed(3909, 0, 1424), /* specifyExpressionType $type */ - reg::packed(5066, 0, 1424), /* specifyExpressionType $nativeType */ - reg::packed(5491, 0, 1387), /* specifyExpressionType $certainty */ + reg::packed(966, 0, 1712), /* specifyExpressionType $expr */ + reg::packed(3874, 0, 1424), /* specifyExpressionType $type */ + reg::packed(5031, 0, 1424), /* specifyExpressionType $nativeType */ + reg::packed(5456, 0, 1387), /* specifyExpressionType $certainty */ reg::packed(738, 0, 523), /* specifyExpressionType return */ reg::packed(738, 0, 523), /* openSpecificationScope return */ - reg::packed(966, 0, 1503), /* isSpecifyExpressionTypeNoop $expr */ - reg::packed(3909, 0, 1424), /* isSpecifyExpressionTypeNoop $type */ + reg::packed(966, 0, 1712), /* isSpecifyExpressionTypeNoop $expr */ + reg::packed(3874, 0, 1424), /* isSpecifyExpressionTypeNoop $type */ reg::packed(738, MAY_BE_BOOL), /* isSpecifyExpressionTypeNoop return */ - reg::packed(966, 0, 1503), /* specifyExpressionTypeInPlace $expr */ - reg::packed(3909, 0, 1424), /* specifyExpressionTypeInPlace $type */ - reg::packed(5066, 0, 1424), /* specifyExpressionTypeInPlace $nativeType */ - reg::packed(5491, 0, 1387), /* specifyExpressionTypeInPlace $certainty */ + reg::packed(966, 0, 1712), /* specifyExpressionTypeInPlace $expr */ + reg::packed(3874, 0, 1424), /* specifyExpressionTypeInPlace $type */ + reg::packed(5031, 0, 1424), /* specifyExpressionTypeInPlace $nativeType */ + reg::packed(5456, 0, 1387), /* specifyExpressionTypeInPlace $certainty */ reg::packed(738, MAY_BE_VOID), /* specifyExpressionTypeInPlace return */ - reg::packed(966, 0, 1503), /* assignExpression $expr */ - reg::packed(3909, 0, 1424), /* assignExpression $type */ - reg::packed(5066, 0, 1424), /* assignExpression $nativeType */ + reg::packed(966, 0, 1712), /* assignExpression $expr */ + reg::packed(3874, 0, 1424), /* assignExpression $type */ + reg::packed(5031, 0, 1424), /* assignExpression $nativeType */ reg::packed(738, 0, 523), /* assignExpression return */ - reg::packed(5924, 0, 1424), /* assignInitializedProperty $fetchedOnType */ - reg::packed(3763, MAY_BE_STRING), /* assignInitializedProperty $propertyName */ + reg::packed(5889, 0, 1424), /* assignInitializedProperty $fetchedOnType */ + reg::packed(3728, MAY_BE_STRING), /* assignInitializedProperty $propertyName */ reg::packed(738, 0, 523), /* assignInitializedProperty return */ - reg::packed(5964, 0, 1503), /* invalidateExpression $expressionToInvalidate */ - reg::packed(5987, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $requireMoreCharacters */ - reg::packed(6009, MAY_BE_NULL, 1065, false, false, 222), /* invalidateExpression $invalidatingClass */ - reg::packed(6027, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $keepPropertyFetches */ + reg::packed(5929, 0, 1712), /* invalidateExpression $expressionToInvalidate */ + reg::packed(5952, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $requireMoreCharacters */ + reg::packed(5974, MAY_BE_NULL, 1065, false, false, 222), /* invalidateExpression $invalidatingClass */ + reg::packed(5992, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $keepPropertyFetches */ reg::packed(738, 0, 523), /* invalidateExpression return */ - reg::packed(966, 0, 1503), /* isPrivatePropertyOfDifferentClass $expr */ - reg::packed(6009, 0, 1065), /* isPrivatePropertyOfDifferentClass $invalidatingClass */ + reg::packed(966, 0, 1712), /* isPrivatePropertyOfDifferentClass $expr */ + reg::packed(5974, 0, 1065), /* isPrivatePropertyOfDifferentClass $invalidatingClass */ reg::packed(738, MAY_BE_BOOL), /* isPrivatePropertyOfDifferentClass return */ - reg::packed(5964, 0, 1503), /* invalidateMethodsOnExpression $expressionToInvalidate */ + reg::packed(5929, 0, 1712), /* invalidateMethodsOnExpression $expressionToInvalidate */ reg::packed(738, 0, 523), /* invalidateMethodsOnExpression return */ - reg::packed(966, 0, 1503), /* setExpressionCertaintyKeepingType $expr */ - reg::packed(5491, 0, 1387), /* setExpressionCertaintyKeepingType $certainty */ + reg::packed(966, 0, 1712), /* setExpressionCertaintyKeepingType $expr */ + reg::packed(5456, 0, 1387), /* setExpressionCertaintyKeepingType $certainty */ reg::packed(738, 0, 523), /* setExpressionCertaintyKeepingType return */ - reg::packed(3909, 0, 1424), /* isComplexUnionType $type */ + reg::packed(3874, 0, 1424), /* isComplexUnionType $type */ reg::packed(738, MAY_BE_BOOL), /* isComplexUnionType return */ - reg::packed(966, 0, 1503), /* addTypeToExpression $expr */ - reg::packed(3909, 0, 1424), /* addTypeToExpression $type */ + reg::packed(966, 0, 1712), /* addTypeToExpression $expr */ + reg::packed(3874, 0, 1424), /* addTypeToExpression $type */ reg::packed(738, 0, 523), /* addTypeToExpression return */ - reg::packed(966, 0, 1503), /* removeTypeFromExpression $expr */ - reg::packed(6205, 0, 1424), /* removeTypeFromExpression $typeToRemove */ + reg::packed(966, 0, 1712), /* removeTypeFromExpression $expr */ + reg::packed(6170, 0, 1424), /* removeTypeFromExpression $typeToRemove */ reg::packed(738, 0, 523), /* removeTypeFromExpression return */ - reg::packed(966, 0, 1503), /* filterByTruthyValue $expr */ + reg::packed(966, 0, 1712), /* filterByTruthyValue $expr */ reg::packed(738, 0, 523), /* filterByTruthyValue return */ - reg::packed(966, 0, 1503), /* filterByFalseyValue $expr */ + reg::packed(966, 0, 1712), /* filterByFalseyValue $expr */ reg::packed(738, 0, 523), /* filterByFalseyValue return */ - reg::packed(6283, 0, 2070), /* applySpecifiedTypes $specifiedTypes */ + reg::packed(6248, 0, 2035), /* applySpecifiedTypes $specifiedTypes */ reg::packed(738, 0, 523), /* applySpecifiedTypes return */ - reg::packed(6318, MAY_BE_ARRAY), /* processConditionalExpressionsAfterSpecifying $specifiedExpressions */ + reg::packed(6283, MAY_BE_ARRAY), /* processConditionalExpressionsAfterSpecifying $specifiedExpressions */ reg::packed(738, 0, 523), /* processConditionalExpressionsAfterSpecifying return */ reg::packed(738, MAY_BE_ARRAY), /* getConditionalExpressions return */ - reg::packed(1918, MAY_BE_STRING), /* addConditionalExpressions $exprString */ - reg::packed(6410, MAY_BE_ARRAY), /* addConditionalExpressions $conditionalExpressionHolders */ + reg::packed(1883, MAY_BE_STRING), /* addConditionalExpressions $exprString */ + reg::packed(6375, MAY_BE_ARRAY), /* addConditionalExpressions $conditionalExpressionHolders */ reg::packed(738, 0, 523), /* addConditionalExpressions return */ reg::packed(738, 0, 523), /* exitFirstLevelStatements return */ reg::packed(738, MAY_BE_BOOL), /* isInFirstLevelStatement return */ - reg::packed(6514, MAY_BE_NULL, 523), /* mergeWith $otherScope */ - reg::packed(6525, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $preserveVacuousConditionals */ + reg::packed(6479, MAY_BE_NULL, 523), /* mergeWith $otherScope */ + reg::packed(6490, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $preserveVacuousConditionals */ reg::packed(738, 0, 523), /* mergeWith return */ - reg::packed(6563, 0, 523), /* collectAbsorbedClosures $ours */ - reg::packed(6568, 0, 523), /* collectAbsorbedClosures $theirs */ + reg::packed(6528, 0, 523), /* collectAbsorbedClosures $ours */ + reg::packed(6533, 0, 523), /* collectAbsorbedClosures $theirs */ reg::packed(738, MAY_BE_NULL, 672), /* collectAbsorbedClosures return */ - reg::packed(6514, MAY_BE_NULL, 523), /* mergeWithVariableState $otherScope */ - reg::packed(6525, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWithVariableState $preserveVacuousConditionals */ + reg::packed(6479, MAY_BE_NULL, 523), /* mergeWithVariableState $otherScope */ + reg::packed(6490, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWithVariableState $preserveVacuousConditionals */ reg::packed(738, 0, 523), /* mergeWithVariableState return */ - reg::packed(6622, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $differingExpressionKeys */ - reg::packed(6646, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $ourExpressionTypes */ - reg::packed(6665, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $theirExpressionTypes */ + reg::packed(6587, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $differingExpressionKeys */ + reg::packed(6611, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $ourExpressionTypes */ + reg::packed(6630, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $theirExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches return */ - reg::packed(6721, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $currentConditionalExpressions */ - reg::packed(6751, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $sourceConditionalExpressions */ - reg::packed(6780, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $otherExpressionTypes */ + reg::packed(6686, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $currentConditionalExpressions */ + reg::packed(6716, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $sourceConditionalExpressions */ + reg::packed(6745, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $otherExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions return */ - reg::packed(6721, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $currentConditionalExpressions */ - reg::packed(6839, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $ourConditionalExpressions */ - reg::packed(6865, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $theirConditionalExpressions */ + reg::packed(6686, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $currentConditionalExpressions */ + reg::packed(6804, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $ourConditionalExpressions */ + reg::packed(6830, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $theirConditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions return */ - reg::packed(6930, MAY_BE_ARRAY), /* mergeConditionalExpressions $newConditionalExpressions */ - reg::packed(6956, MAY_BE_ARRAY), /* mergeConditionalExpressions $existingConditionalExpressions */ + reg::packed(6895, MAY_BE_ARRAY), /* mergeConditionalExpressions $newConditionalExpressions */ + reg::packed(6921, MAY_BE_ARRAY), /* mergeConditionalExpressions $existingConditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* mergeConditionalExpressions return */ - reg::packed(7015, 0, 523), /* mergeInitializedProperties $calledMethodScope */ + reg::packed(6980, 0, 523), /* mergeInitializedProperties $calledMethodScope */ reg::packed(738, 0, 523), /* mergeInitializedProperties return */ - reg::packed(7060, 0, 523), /* processFinallyScope $finallyScope */ - reg::packed(7073, 0, 523), /* processFinallyScope $originalFinallyScope */ + reg::packed(7025, 0, 523), /* processFinallyScope $finallyScope */ + reg::packed(7038, 0, 523), /* processFinallyScope $originalFinallyScope */ reg::packed(738, 0, 523), /* processFinallyScope return */ - reg::packed(7114, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $ourVariableTypeHolders */ - reg::packed(7137, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $finallyVariableTypeHolders */ - reg::packed(7164, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $originalVariableTypeHolders */ + reg::packed(7079, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $ourVariableTypeHolders */ + reg::packed(7102, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $finallyVariableTypeHolders */ + reg::packed(7129, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $originalVariableTypeHolders */ reg::packed(738, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders return */ - reg::packed(7231, 0, 523), /* processClosureScope $closureScope */ - reg::packed(7244, MAY_BE_NULL, 523), /* processClosureScope $prevScope */ - reg::packed(7254, MAY_BE_ARRAY), /* processClosureScope $byRefUses */ + reg::packed(7196, 0, 523), /* processClosureScope $closureScope */ + reg::packed(7209, MAY_BE_NULL, 523), /* processClosureScope $prevScope */ + reg::packed(7219, MAY_BE_ARRAY), /* processClosureScope $byRefUses */ reg::packed(738, 0, 523), /* processClosureScope return */ - reg::packed(7284, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute $finalScope */ + reg::packed(7249, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute $finalScope */ reg::packed(738, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute return */ - reg::packed(6514, 0, 523), /* generalizeWith $otherScope */ - reg::packed(7343, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* generalizeWith $writableVariableNames */ + reg::packed(6479, 0, 523), /* generalizeWith $otherScope */ + reg::packed(7308, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* generalizeWith $writableVariableNames */ reg::packed(738, 0, 523), /* generalizeWith return */ - reg::packed(6514, 0, 523), /* generalizeWithVariableState $otherScope */ - reg::packed(7343, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeWithVariableState $writableVariableNames */ + reg::packed(6479, 0, 523), /* generalizeWithVariableState $otherScope */ + reg::packed(7308, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeWithVariableState $writableVariableNames */ reg::packed(738, 0, 523), /* generalizeWithVariableState return */ - reg::packed(7408, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $variableTypeHolders */ - reg::packed(7428, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $otherVariableTypeHolders */ - reg::packed(7343, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeVariableTypeHolders $writableVariableNames */ + reg::packed(7373, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $variableTypeHolders */ + reg::packed(7393, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $otherVariableTypeHolders */ + reg::packed(7308, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeVariableTypeHolders $writableVariableNames */ reg::packed(738, MAY_BE_ARRAY), /* generalizeVariableTypeHolders return */ - reg::packed(3909, 0, 1424), /* flattenUnionForGeneralization $type */ + reg::packed(3874, 0, 1424), /* flattenUnionForGeneralization $type */ reg::packed(738, MAY_BE_ARRAY), /* flattenUnionForGeneralization return */ - reg::packed(7513, 0, 1424), /* generalizeType $a */ - reg::packed(7515, 0, 1424), /* generalizeType $b */ - reg::packed(7517, MAY_BE_LONG), /* generalizeType $depth */ + reg::packed(7478, 0, 1424), /* generalizeType $a */ + reg::packed(7480, 0, 1424), /* generalizeType $b */ + reg::packed(7482, MAY_BE_LONG), /* generalizeType $depth */ reg::packed(738, 0, 1424), /* generalizeType return */ - reg::packed(3909, 0, 1424), /* getArrayDepth $type */ + reg::packed(3874, 0, 1424), /* getArrayDepth $type */ reg::packed(738, MAY_BE_LONG), /* getArrayDepth return */ - reg::packed(6514, 0, 523), /* equals $otherScope */ + reg::packed(6479, 0, 523), /* equals $otherScope */ reg::packed(738, MAY_BE_BOOL), /* equals return */ reg::packed(278, MAY_BE_ARRAY), /* compareConditionalExpressions $conditionalExpressions */ - reg::packed(7559, MAY_BE_ARRAY), /* compareConditionalExpressions $otherConditionalExpressions */ + reg::packed(7524, MAY_BE_ARRAY), /* compareConditionalExpressions $otherConditionalExpressions */ reg::packed(738, MAY_BE_BOOL), /* compareConditionalExpressions return */ - reg::packed(7408, MAY_BE_ARRAY), /* compareVariableTypeHolders $variableTypeHolders */ - reg::packed(7428, MAY_BE_ARRAY), /* compareVariableTypeHolders $otherVariableTypeHolders */ + reg::packed(7373, MAY_BE_ARRAY), /* compareVariableTypeHolders $variableTypeHolders */ + reg::packed(7393, MAY_BE_ARRAY), /* compareVariableTypeHolders $otherVariableTypeHolders */ reg::packed(738, MAY_BE_BOOL), /* compareVariableTypeHolders return */ - reg::packed(7644, 0, 7663), /* canAccessProperty $propertyReflection */ + reg::packed(7609, 0, 7628), /* canAccessProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessProperty return */ - reg::packed(7644, 0, 7719), /* canReadProperty $propertyReflection */ + reg::packed(7609, 0, 7684), /* canReadProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canReadProperty return */ - reg::packed(7644, 0, 7719), /* canWriteProperty $propertyReflection */ + reg::packed(7609, 0, 7684), /* canWriteProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canWriteProperty return */ - reg::packed(7798, 0, 7815), /* canCallMethod $methodReflection */ + reg::packed(7763, 0, 7780), /* canCallMethod $methodReflection */ reg::packed(738, MAY_BE_BOOL), /* canCallMethod return */ - reg::packed(7865, 0, 7884), /* canAccessConstant $constantReflection */ + reg::packed(7830, 0, 7849), /* canAccessConstant $constantReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessConstant return */ - reg::packed(7945, 0, 7967), /* canAccessClassMember $classMemberReflection */ + reg::packed(7910, 0, 7932), /* canAccessClassMember $classMemberReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessClassMember return */ reg::packed(738, MAY_BE_ARRAY), /* debug return */ - reg::packed(8035, 0, 1424), /* filterTypeWithMethod $typeWithMethod */ - reg::packed(8050, MAY_BE_STRING), /* filterTypeWithMethod $methodName */ + reg::packed(8000, 0, 1424), /* filterTypeWithMethod $typeWithMethod */ + reg::packed(8015, MAY_BE_STRING), /* filterTypeWithMethod $methodName */ reg::packed(738, MAY_BE_NULL, 1424), /* filterTypeWithMethod return */ - reg::packed(8035, 0, 1424), /* getMethodReflection $typeWithMethod */ - reg::packed(8050, MAY_BE_STRING), /* getMethodReflection $methodName */ - reg::packed(738, MAY_BE_NULL, 8082), /* getMethodReflection return */ - reg::packed(8035, 0, 1424), /* getNakedMethod $typeWithMethod */ - reg::packed(8050, MAY_BE_STRING), /* getNakedMethod $methodName */ - reg::packed(738, MAY_BE_NULL, 8082), /* getNakedMethod return */ - reg::packed(8161, 0, 1424), /* getPropertyReflection $typeWithProperty */ - reg::packed(3763, MAY_BE_STRING), /* getPropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 7719), /* getPropertyReflection return */ - reg::packed(8161, 0, 1424), /* getInstancePropertyReflection $typeWithProperty */ - reg::packed(3763, MAY_BE_STRING), /* getInstancePropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 7719), /* getInstancePropertyReflection return */ - reg::packed(8161, 0, 1424), /* getStaticPropertyReflection $typeWithProperty */ - reg::packed(3763, MAY_BE_STRING), /* getStaticPropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 7719), /* getStaticPropertyReflection return */ - reg::packed(8258, 0, 1424), /* getConstantReflection $typeWithConstant */ - reg::packed(8275, MAY_BE_STRING), /* getConstantReflection $constantName */ - reg::packed(738, MAY_BE_NULL, 7884), /* getConstantReflection return */ - reg::packed(8275, MAY_BE_STRING), /* getConstantExplicitTypeFromConfig $constantName */ - reg::packed(8310, 0, 1424), /* getConstantExplicitTypeFromConfig $constantType */ + reg::packed(8000, 0, 1424), /* getMethodReflection $typeWithMethod */ + reg::packed(8015, MAY_BE_STRING), /* getMethodReflection $methodName */ + reg::packed(738, MAY_BE_NULL, 8047), /* getMethodReflection return */ + reg::packed(8000, 0, 1424), /* getNakedMethod $typeWithMethod */ + reg::packed(8015, MAY_BE_STRING), /* getNakedMethod $methodName */ + reg::packed(738, MAY_BE_NULL, 8047), /* getNakedMethod return */ + reg::packed(8126, 0, 1424), /* getPropertyReflection $typeWithProperty */ + reg::packed(3728, MAY_BE_STRING), /* getPropertyReflection $propertyName */ + reg::packed(738, MAY_BE_NULL, 7684), /* getPropertyReflection return */ + reg::packed(8126, 0, 1424), /* getInstancePropertyReflection $typeWithProperty */ + reg::packed(3728, MAY_BE_STRING), /* getInstancePropertyReflection $propertyName */ + reg::packed(738, MAY_BE_NULL, 7684), /* getInstancePropertyReflection return */ + reg::packed(8126, 0, 1424), /* getStaticPropertyReflection $typeWithProperty */ + reg::packed(3728, MAY_BE_STRING), /* getStaticPropertyReflection $propertyName */ + reg::packed(738, MAY_BE_NULL, 7684), /* getStaticPropertyReflection return */ + reg::packed(8223, 0, 1424), /* getConstantReflection $typeWithConstant */ + reg::packed(8240, MAY_BE_STRING), /* getConstantReflection $constantName */ + reg::packed(738, MAY_BE_NULL, 7849), /* getConstantReflection return */ + reg::packed(8240, MAY_BE_STRING), /* getConstantExplicitTypeFromConfig $constantName */ + reg::packed(8275, 0, 1424), /* getConstantExplicitTypeFromConfig $constantType */ reg::packed(738, 0, 1424), /* getConstantExplicitTypeFromConfig return */ reg::packed(738, MAY_BE_ARRAY), /* getConstantTypes return */ - reg::packed(1575, 0, 1580), /* getGlobalConstantType $name */ + reg::packed(1520, 0, 1525), /* getGlobalConstantType $name */ reg::packed(738, MAY_BE_NULL, 1424), /* getGlobalConstantType return */ - reg::packed(1575, 0, 1580), /* createGlobalConstantFetches $name */ - reg::packed(8396, MAY_BE_STRING), /* createGlobalConstantFetches $nameString */ + reg::packed(1520, 0, 1525), /* createGlobalConstantFetches $name */ + reg::packed(8361, MAY_BE_STRING), /* createGlobalConstantFetches $nameString */ reg::packed(227, MAY_BE_NULL | MAY_BE_STRING), /* createGlobalConstantFetches $namespace */ reg::packed(738, MAY_BE_ARRAY), /* createGlobalConstantFetches return */ reg::packed(738, MAY_BE_ARRAY), /* getNativeConstantTypes return */ - reg::packed(5173, 0, 1424), /* getIterableKeyType $iteratee */ + reg::packed(5138, 0, 1424), /* getIterableKeyType $iteratee */ reg::packed(738, 0, 1424), /* getIterableKeyType return */ - reg::packed(5173, 0, 1424), /* getIterableValueType $iteratee */ + reg::packed(5138, 0, 1424), /* getIterableValueType $iteratee */ reg::packed(738, 0, 1424), /* getIterableValueType return */ - reg::packed(738, 0, 8498), /* getPhpVersion return */ - reg::packed(3909, 0, 1424), /* isOverallPhpVersionRange $type */ + reg::packed(738, 0, 8463), /* getPhpVersion return */ + reg::packed(3874, 0, 1424), /* isOverallPhpVersionRange $type */ reg::packed(738, MAY_BE_BOOL), /* isOverallPhpVersionRange return */ - reg::packed(1762, 0, 8561), /* invokeNodeCallback $node */ + reg::packed(1707, 0, 8526), /* invokeNodeCallback $node */ reg::packed(738, MAY_BE_VOID), /* invokeNodeCallback return */ - reg::packed(8595, MAY_BE_STRING), /* emitCollectedData $collectorType */ - reg::packed(8609, MAY_BE_ANY), /* emitCollectedData $data */ + reg::packed(8560, MAY_BE_STRING), /* emitCollectedData $collectorType */ + reg::packed(8574, MAY_BE_ANY), /* emitCollectedData $data */ reg::packed(738, MAY_BE_VOID), /* emitCollectedData return */ - reg::packed(8632, MAY_BE_STRING), /* trackValueDependency $extensionClass */ - reg::packed(2575, MAY_BE_STRING), /* trackValueDependency $key */ + reg::packed(8597, MAY_BE_STRING), /* trackValueDependency $extensionClass */ + reg::packed(2540, MAY_BE_STRING), /* trackValueDependency $key */ reg::packed(738, MAY_BE_VOID), /* trackValueDependency return */ - reg::packed(8668, MAY_BE_STRING), /* trackFileDependency $file */ + reg::packed(8633, MAY_BE_STRING), /* trackFileDependency $file */ reg::packed(738, MAY_BE_VOID), /* trackFileDependency return */ - reg::packed(8693, MAY_BE_STRING), /* trackDirectoryDependency $directory */ - reg::packed(8703, MAY_BE_STRING, reg::NoString, false, false, 8711), /* trackDirectoryDependency $pattern */ + reg::packed(8658, MAY_BE_STRING), /* trackDirectoryDependency $directory */ + reg::packed(8668, MAY_BE_STRING, reg::NoString, false, false, 8676), /* trackDirectoryDependency $pattern */ reg::packed(738, MAY_BE_VOID), /* trackDirectoryDependency return */ - reg::packed(3012, MAY_BE_STRING), /* trackClassDependency $className */ + reg::packed(2977, MAY_BE_STRING), /* trackClassDependency $className */ reg::packed(738, MAY_BE_VOID), /* trackClassDependency return */ }; using Sig = reg::Sig; @@ -1060,175 +1057,174 @@ inline constexpr sigtab::Sig hasVariableType = { { 1408 /* hasVariableType */, 1 inline constexpr sigtab::Sig getVariableType = { { 1442 /* getVariableType */, 1, 53, 1, 54, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig getDefinedVariables = { { 1458 /* getDefinedVariables */, 0, 55, 0, 55, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig getMaybeDefinedVariables = { { 1478 /* getMaybeDefinedVariables */, 0, 56, 0, 56, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig findPossiblyImpureCallDescriptions = { { 1523 /* findPossiblyImpureCallDescriptions */, 1, 57, 1, 58, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isGlobalVariable = { { 1558 /* isGlobalVariable */, 1, 59, 1, 60, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig hasConstant = { { 1600 /* hasConstant */, 1, 61, 1, 62, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig fileHasCompilerHaltStatementCalls = { { 1612 /* fileHasCompilerHaltStatementCalls */, 0, 63, 0, 63, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isInAnonymousFunction = { { 1646 /* isInAnonymousFunction */, 0, 64, 0, 64, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getAnonymousFunctionReflection = { { 1668 /* getAnonymousFunctionReflection */, 0, 65, 0, 65, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getAnonymousFunctionReturnType = { { 1699 /* getAnonymousFunctionReturnType */, 0, 66, 0, 66, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withAnonymousFunctionReflection = { { 1730 /* withAnonymousFunctionReflection */, 1, 67, 1, 68, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getType = { { 1767 /* getType */, 1, 69, 1, 70, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getScopeType = { { 1775 /* getScopeType */, 1, 71, 1, 72, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getScopeNativeType = { { 1788 /* getScopeNativeType */, 1, 73, 1, 74, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getNodeKey = { { 1807 /* getNodeKey */, 1, 75, 1, 76, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getExprPrinter = { { 1851 /* getExprPrinter */, 0, 77, 0, 77, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig duplicateWith = { { 1866 /* duplicateWith */, 8, 78, 8, 86, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getClosureScopeCacheKey = { { 1894 /* getClosureScopeCacheKey */, 0, 87, 1, 88, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exprStringIsRootedIn = { { 1935 /* exprStringIsRootedIn */, 2, 89, 2, 91, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig resolveType = { { 1956 /* resolveType */, 2, 92, 2, 94, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveTypeOfNewWorldHandlerNode = { { 1968 /* resolveTypeOfNewWorldHandlerNode */, 1, 95, 1, 96, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getCurrentTypesOfSpecifiedExpr = { { 2001 /* getCurrentTypesOfSpecifiedExpr */, 1, 97, 1, 98, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyTypesOfNewWorldHandlerNode = { { 2102 /* specifyTypesOfNewWorldHandlerNode */, 2, 99, 2, 101, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig obtainResultForNode = { { 2170 /* obtainResultForNode */, 1, 102, 1, 103, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig pushExpressionResultStorage = { { 2239 /* pushExpressionResultStorage */, 1, 104, 1, 105, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig popExpressionResultStorage = { { 2267 /* popExpressionResultStorage */, 0, 106, 0, 106, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig findSettledStoredResult = { { 2294 /* findSettledStoredResult */, 1, 107, 1, 108, ZEND_ACC_PROTECTED } }; -inline constexpr sigtab::Sig getCurrentExpressionResultStorage = { { 2318 /* getCurrentExpressionResultStorage */, 0, 109, 0, 109, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withTemplateArgumentFrame = { { 2358 /* withTemplateArgumentFrame */, 1, 110, 1, 111, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getCurrentTemplateArgumentFrame = { { 2384 /* getCurrentTemplateArgumentFrame */, 0, 112, 0, 112, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getTemplateArgumentConstraints = { { 2416 /* getTemplateArgumentConstraints */, 0, 113, 0, 113, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withTemplateArgumentConstraints = { { 2459 /* withTemplateArgumentConstraints */, 1, 114, 1, 115, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig addTemplateArgumentConstraints = { { 2491 /* addTemplateArgumentConstraints */, 1, 116, 1, 117, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withoutMemoizedTypes = { { 2522 /* withoutMemoizedTypes */, 0, 118, 0, 118, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getDifferingVariableRoots = { { 2549 /* getDifferingVariableRoots */, 1, 119, 1, 120, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getVariablesOfExpressionKey = { { 2579 /* getVariablesOfExpressionKey */, 1, 121, 1, 122, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig withRecordedStatementDelta = { { 2634 /* withRecordedStatementDelta */, 2, 123, 2, 125, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applyRecordedHolderDelta = { { 2669 /* applyRecordedHolderDelta */, 3, 126, 3, 129, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getNativeType = { { 2694 /* getNativeType */, 1, 130, 1, 131, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getKeepVoidType = { { 2708 /* getKeepVoidType */, 1, 132, 1, 133, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig doNotTreatPhpDocTypesAsCertain = { { 2724 /* doNotTreatPhpDocTypesAsCertain */, 0, 134, 0, 134, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig promoteNativeTypes = { { 2755 /* promoteNativeTypes */, 0, 135, 0, 135, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveName = { { 2774 /* resolveName */, 1, 136, 1, 137, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolveTypeByName = { { 2817 /* resolveTypeByName */, 1, 138, 1, 139, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getTypeFromValue = { { 2841 /* getTypeFromValue */, 1, 140, 1, 141, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig hasExpressionType = { { 2858 /* hasExpressionType */, 1, 142, 1, 143, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getTrackedExpressionType = { { 2876 /* getTrackedExpressionType */, 1, 144, 1, 145, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig pushInFunctionCall = { { 2975 /* pushInFunctionCall */, 3, 146, 3, 149, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig popInFunctionCall = { { 2994 /* popInFunctionCall */, 0, 150, 0, 150, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInClassExists = { { 3022 /* isInClassExists */, 1, 151, 1, 152, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionCallStack = { { 3038 /* getFunctionCallStack */, 0, 153, 0, 153, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionCallStackWithParameters = { { 3059 /* getFunctionCallStackWithParameters */, 0, 154, 0, 154, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInFunctionExists = { { 3107 /* isInFunctionExists */, 1, 155, 1, 156, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClass = { { 3142 /* enterClass */, 1, 157, 1, 158, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterTrait = { { 3169 /* enterTrait */, 1, 159, 1, 160, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClassMethod = { { 3713 /* enterClassMethod */, 9, 161, 21, 182, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterPropertyHook = { { 3891 /* enterPropertyHook */, 10, 183, 11, 194, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig transformStaticType = { { 3914 /* transformStaticType */, 1, 195, 1, 196, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getRealParameterTypes = { { 3975 /* getRealParameterTypes */, 1, 197, 1, 198, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getRealParameterDefaultValues = { { 3997 /* getRealParameterDefaultValues */, 1, 199, 1, 200, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getParameterAttributes = { { 4117 /* getParameterAttributes */, 1, 201, 1, 202, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterFunction = { { 4243 /* enterFunction */, 8, 203, 17, 220, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterFunctionLike = { { 4301 /* enterFunctionLike */, 2, 221, 2, 223, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterNamespace = { { 4333 /* enterNamespace */, 1, 224, 1, 225, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClosureBind = { { 4385 /* enterClosureBind */, 3, 226, 3, 229, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig restoreOriginalScopeAfterClosureBind = { { 4416 /* restoreOriginalScopeAfterClosureBind */, 1, 230, 1, 231, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig restoreThis = { { 4470 /* restoreThis */, 1, 232, 1, 233, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClosureCall = { { 4482 /* enterClosureCall */, 2, 234, 2, 236, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInClosureBind = { { 4499 /* isInClosureBind */, 0, 237, 0, 237, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withClosureBindScopeClasses = { { 4515 /* withClosureBindScopeClasses */, 1, 238, 1, 239, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterAnonymousFunction = { { 4623 /* enterAnonymousFunction */, 2, 240, 3, 243, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterAnonymousFunctionWithoutReflection = { { 4646 /* enterAnonymousFunctionWithoutReflection */, 3, 244, 3, 247, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig expressionTypeIsUnchangeable = { { 4735 /* expressionTypeIsUnchangeable */, 1, 248, 1, 249, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateStaticExpressions = { { 4764 /* invalidateStaticExpressions */, 1, 250, 1, 251, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterArrowFunction = { { 4840 /* enterArrowFunction */, 2, 252, 3, 255, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterArrowFunctionWithoutReflection = { { 4859 /* enterArrowFunctionWithoutReflection */, 3, 256, 3, 259, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isParameterValueNullable = { { 4916 /* isParameterValueNullable */, 1, 260, 1, 261, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionType = { { 4963 /* getFunctionType */, 3, 262, 3, 265, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getCallableParameterType = { { 4985 /* getCallableParameterType */, 3, 266, 3, 269, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig buildVariadicArrayTypeFromCallableParameters = { { 5021 /* buildVariadicArrayTypeFromCallableParameters */, 2, 270, 2, 272, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig intersectButNotNever = { { 5090 /* intersectButNotNever */, 2, 273, 2, 275, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig enterMatch = { { 5162 /* enterMatch */, 3, 276, 3, 279, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterForeach = { { 5243 /* enterForeach */, 7, 280, 7, 287, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterForeachKey = { { 5256 /* enterForeachKey */, 5, 288, 5, 293, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterCatchType = { { 5282 /* enterCatchType */, 2, 294, 2, 296, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterExpressionAssign = { { 5310 /* enterExpressionAssign */, 1, 297, 2, 299, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exitExpressionAssign = { { 5332 /* exitExpressionAssign */, 1, 300, 1, 301, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInExpressionAssign = { { 5353 /* isInExpressionAssign */, 1, 302, 1, 303, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInWriteExpressionAssign = { { 5374 /* isInWriteExpressionAssign */, 1, 304, 1, 305, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig setAllowedUndefinedExpression = { { 5400 /* setAllowedUndefinedExpression */, 1, 306, 1, 307, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig unsetAllowedUndefinedExpression = { { 5430 /* unsetAllowedUndefinedExpression */, 1, 308, 1, 309, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isUndefinedExpressionAllowed = { { 5462 /* isUndefinedExpressionAllowed */, 1, 310, 1, 311, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignVariable = { { 5527 /* assignVariable */, 4, 312, 5, 317, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig overwriteExpression = { { 5542 /* overwriteExpression */, 3, 318, 3, 321, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveIntertwinedAssignedType = { { 5614 /* resolveIntertwinedAssignedType */, 5, 322, 5, 327, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isDimFetchPathReachable = { { 5688 /* isDimFetchPathReachable */, 2, 328, 2, 330, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig unsetExpression = { { 5712 /* unsetExpression */, 1, 331, 1, 332, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getStateType = { { 5728 /* getStateType */, 1, 333, 1, 334, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getScopeStateType = { { 5741 /* getScopeStateType */, 1, 335, 1, 336, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getScopeStateNativeType = { { 5759 /* getScopeStateNativeType */, 1, 337, 1, 338, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveScopeStateType = { { 5783 /* resolveScopeStateType */, 2, 339, 2, 341, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyExpressionType = { { 5805 /* specifyExpressionType */, 4, 342, 4, 346, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig openSpecificationScope = { { 5827 /* openSpecificationScope */, 0, 347, 0, 347, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isSpecifyExpressionTypeNoop = { { 5850 /* isSpecifyExpressionTypeNoop */, 2, 348, 2, 350, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyExpressionTypeInPlace = { { 5878 /* specifyExpressionTypeInPlace */, 4, 351, 4, 355, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig assignExpression = { { 5907 /* assignExpression */, 3, 356, 3, 359, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignInitializedProperty = { { 5938 /* assignInitializedProperty */, 2, 360, 2, 362, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateExpression = { { 6047 /* invalidateExpression */, 1, 363, 4, 367, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isPrivatePropertyOfDifferentClass = { { 6068 /* isPrivatePropertyOfDifferentClass */, 2, 368, 2, 370, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateMethodsOnExpression = { { 6102 /* invalidateMethodsOnExpression */, 1, 371, 1, 372, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig setExpressionCertaintyKeepingType = { { 6132 /* setExpressionCertaintyKeepingType */, 2, 373, 2, 375, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isComplexUnionType = { { 6166 /* isComplexUnionType */, 1, 376, 1, 377, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig addTypeToExpression = { { 6185 /* addTypeToExpression */, 2, 378, 2, 380, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig removeTypeFromExpression = { { 6218 /* removeTypeFromExpression */, 2, 381, 2, 383, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterByTruthyValue = { { 6243 /* filterByTruthyValue */, 1, 384, 1, 385, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterByFalseyValue = { { 6263 /* filterByFalseyValue */, 1, 386, 1, 387, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applySpecifiedTypes = { { 6298 /* applySpecifiedTypes */, 1, 388, 1, 389, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processConditionalExpressionsAfterSpecifying = { { 6339 /* processConditionalExpressionsAfterSpecifying */, 1, 390, 1, 391, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getConditionalExpressions = { { 6384 /* getConditionalExpressions */, 0, 392, 0, 392, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig addConditionalExpressions = { { 6439 /* addConditionalExpressions */, 2, 393, 2, 395, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exitFirstLevelStatements = { { 6465 /* exitFirstLevelStatements */, 0, 396, 0, 396, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInFirstLevelStatement = { { 6490 /* isInFirstLevelStatement */, 0, 397, 0, 397, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig mergeWith = { { 6553 /* mergeWith */, 1, 398, 2, 400, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig collectAbsorbedClosures = { { 6575 /* collectAbsorbedClosures */, 2, 401, 2, 403, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeWithVariableState = { { 6599 /* mergeWithVariableState */, 1, 404, 2, 406, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig withoutPreciseClassConstantFetches = { { 6686 /* withoutPreciseClassConstantFetches */, 3, 407, 3, 410, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig preserveVacuousConditionalExpressions = { { 6801 /* preserveVacuousConditionalExpressions */, 3, 411, 3, 414, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeSameGuardConditionalExpressions = { { 6893 /* mergeSameGuardConditionalExpressions */, 3, 415, 3, 418, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeConditionalExpressions = { { 6987 /* mergeConditionalExpressions */, 2, 419, 2, 421, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeInitializedProperties = { { 7033 /* mergeInitializedProperties */, 1, 422, 1, 423, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processFinallyScope = { { 7094 /* processFinallyScope */, 2, 424, 2, 426, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processFinallyScopeVariableTypeHolders = { { 7192 /* processFinallyScopeVariableTypeHolders */, 3, 427, 3, 430, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processClosureScope = { { 7264 /* processClosureScope */, 3, 431, 3, 434, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processAlwaysIterableForeachScopeWithoutPollute = { { 7295 /* processAlwaysIterableForeachScopeWithoutPollute */, 1, 435, 1, 436, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig generalizeWith = { { 7365 /* generalizeWith */, 1, 437, 2, 439, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig generalizeWithVariableState = { { 7380 /* generalizeWithVariableState */, 2, 440, 2, 442, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeVariableTypeHolders = { { 7453 /* generalizeVariableTypeHolders */, 3, 443, 3, 446, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig flattenUnionForGeneralization = { { 7483 /* flattenUnionForGeneralization */, 1, 447, 1, 448, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeType = { { 7523 /* generalizeType */, 3, 449, 3, 452, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getArrayDepth = { { 7538 /* getArrayDepth */, 1, 453, 1, 454, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig equals = { { 7552 /* equals */, 1, 455, 1, 456, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig compareConditionalExpressions = { { 7587 /* compareConditionalExpressions */, 2, 457, 2, 459, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig compareVariableTypeHolders = { { 7617 /* compareVariableTypeHolders */, 2, 460, 2, 462, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig canAccessProperty = { { 7701 /* canAccessProperty */, 1, 463, 1, 464, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canReadProperty = { { 7765 /* canReadProperty */, 1, 465, 1, 466, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canWriteProperty = { { 7781 /* canWriteProperty */, 1, 467, 1, 468, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canCallMethod = { { 7851 /* canCallMethod */, 1, 469, 1, 470, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canAccessConstant = { { 7927 /* canAccessConstant */, 1, 471, 1, 472, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canAccessClassMember = { { 8008 /* canAccessClassMember */, 1, 473, 1, 474, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig debug = { { 8029 /* debug */, 0, 475, 0, 475, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterTypeWithMethod = { { 8061 /* filterTypeWithMethod */, 2, 476, 2, 478, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getMethodReflection = { { 8126 /* getMethodReflection */, 2, 479, 2, 481, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getNakedMethod = { { 8146 /* getNakedMethod */, 2, 482, 2, 484, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getPropertyReflection = { { 8178 /* getPropertyReflection */, 2, 485, 2, 487, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getInstancePropertyReflection = { { 8200 /* getInstancePropertyReflection */, 2, 488, 2, 490, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getStaticPropertyReflection = { { 8230 /* getStaticPropertyReflection */, 2, 491, 2, 493, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantReflection = { { 8288 /* getConstantReflection */, 2, 494, 2, 496, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantExplicitTypeFromConfig = { { 8323 /* getConstantExplicitTypeFromConfig */, 2, 497, 2, 499, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantTypes = { { 8357 /* getConstantTypes */, 0, 500, 0, 500, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getGlobalConstantType = { { 8374 /* getGlobalConstantType */, 1, 501, 1, 502, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig createGlobalConstantFetches = { { 8407 /* createGlobalConstantFetches */, 3, 503, 3, 506, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getNativeConstantTypes = { { 8435 /* getNativeConstantTypes */, 0, 507, 0, 507, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getIterableKeyType = { { 8458 /* getIterableKeyType */, 1, 508, 1, 509, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getIterableValueType = { { 8477 /* getIterableValueType */, 1, 510, 1, 511, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getPhpVersion = { { 8522 /* getPhpVersion */, 0, 512, 0, 512, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isOverallPhpVersionRange = { { 8536 /* isOverallPhpVersionRange */, 1, 513, 1, 514, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invokeNodeCallback = { { 8576 /* invokeNodeCallback */, 1, 515, 1, 516, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig emitCollectedData = { { 8614 /* emitCollectedData */, 2, 517, 2, 519, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackValueDependency = { { 8647 /* trackValueDependency */, 2, 520, 2, 522, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackFileDependency = { { 8673 /* trackFileDependency */, 1, 523, 1, 524, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackDirectoryDependency = { { 8715 /* trackDirectoryDependency */, 1, 525, 2, 527, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackClassDependency = { { 8740 /* trackClassDependency */, 1, 528, 1, 529, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isGlobalVariable = { { 1503 /* isGlobalVariable */, 1, 57, 1, 58, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig hasConstant = { { 1545 /* hasConstant */, 1, 59, 1, 60, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig fileHasCompilerHaltStatementCalls = { { 1557 /* fileHasCompilerHaltStatementCalls */, 0, 61, 0, 61, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isInAnonymousFunction = { { 1591 /* isInAnonymousFunction */, 0, 62, 0, 62, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getAnonymousFunctionReflection = { { 1613 /* getAnonymousFunctionReflection */, 0, 63, 0, 63, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getAnonymousFunctionReturnType = { { 1644 /* getAnonymousFunctionReturnType */, 0, 64, 0, 64, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withAnonymousFunctionReflection = { { 1675 /* withAnonymousFunctionReflection */, 1, 65, 1, 66, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getType = { { 1732 /* getType */, 1, 67, 1, 68, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getScopeType = { { 1740 /* getScopeType */, 1, 69, 1, 70, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getScopeNativeType = { { 1753 /* getScopeNativeType */, 1, 71, 1, 72, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getNodeKey = { { 1772 /* getNodeKey */, 1, 73, 1, 74, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getExprPrinter = { { 1816 /* getExprPrinter */, 0, 75, 0, 75, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig duplicateWith = { { 1831 /* duplicateWith */, 8, 76, 8, 84, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getClosureScopeCacheKey = { { 1859 /* getClosureScopeCacheKey */, 0, 85, 1, 86, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exprStringIsRootedIn = { { 1900 /* exprStringIsRootedIn */, 2, 87, 2, 89, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig resolveType = { { 1921 /* resolveType */, 2, 90, 2, 92, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveTypeOfNewWorldHandlerNode = { { 1933 /* resolveTypeOfNewWorldHandlerNode */, 1, 93, 1, 94, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getCurrentTypesOfSpecifiedExpr = { { 1966 /* getCurrentTypesOfSpecifiedExpr */, 1, 95, 1, 96, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyTypesOfNewWorldHandlerNode = { { 2067 /* specifyTypesOfNewWorldHandlerNode */, 2, 97, 2, 99, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig obtainResultForNode = { { 2135 /* obtainResultForNode */, 1, 100, 1, 101, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig pushExpressionResultStorage = { { 2204 /* pushExpressionResultStorage */, 1, 102, 1, 103, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig popExpressionResultStorage = { { 2232 /* popExpressionResultStorage */, 0, 104, 0, 104, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig findSettledStoredResult = { { 2259 /* findSettledStoredResult */, 1, 105, 1, 106, ZEND_ACC_PROTECTED } }; +inline constexpr sigtab::Sig getCurrentExpressionResultStorage = { { 2283 /* getCurrentExpressionResultStorage */, 0, 107, 0, 107, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withTemplateArgumentFrame = { { 2323 /* withTemplateArgumentFrame */, 1, 108, 1, 109, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getCurrentTemplateArgumentFrame = { { 2349 /* getCurrentTemplateArgumentFrame */, 0, 110, 0, 110, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getTemplateArgumentConstraints = { { 2381 /* getTemplateArgumentConstraints */, 0, 111, 0, 111, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withTemplateArgumentConstraints = { { 2424 /* withTemplateArgumentConstraints */, 1, 112, 1, 113, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig addTemplateArgumentConstraints = { { 2456 /* addTemplateArgumentConstraints */, 1, 114, 1, 115, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withoutMemoizedTypes = { { 2487 /* withoutMemoizedTypes */, 0, 116, 0, 116, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getDifferingVariableRoots = { { 2514 /* getDifferingVariableRoots */, 1, 117, 1, 118, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getVariablesOfExpressionKey = { { 2544 /* getVariablesOfExpressionKey */, 1, 119, 1, 120, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig withRecordedStatementDelta = { { 2599 /* withRecordedStatementDelta */, 2, 121, 2, 123, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applyRecordedHolderDelta = { { 2634 /* applyRecordedHolderDelta */, 3, 124, 3, 127, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getNativeType = { { 2659 /* getNativeType */, 1, 128, 1, 129, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getKeepVoidType = { { 2673 /* getKeepVoidType */, 1, 130, 1, 131, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig doNotTreatPhpDocTypesAsCertain = { { 2689 /* doNotTreatPhpDocTypesAsCertain */, 0, 132, 0, 132, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig promoteNativeTypes = { { 2720 /* promoteNativeTypes */, 0, 133, 0, 133, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveName = { { 2739 /* resolveName */, 1, 134, 1, 135, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolveTypeByName = { { 2782 /* resolveTypeByName */, 1, 136, 1, 137, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getTypeFromValue = { { 2806 /* getTypeFromValue */, 1, 138, 1, 139, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig hasExpressionType = { { 2823 /* hasExpressionType */, 1, 140, 1, 141, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getTrackedExpressionType = { { 2841 /* getTrackedExpressionType */, 1, 142, 1, 143, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig pushInFunctionCall = { { 2940 /* pushInFunctionCall */, 3, 144, 3, 147, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig popInFunctionCall = { { 2959 /* popInFunctionCall */, 0, 148, 0, 148, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInClassExists = { { 2987 /* isInClassExists */, 1, 149, 1, 150, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionCallStack = { { 3003 /* getFunctionCallStack */, 0, 151, 0, 151, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionCallStackWithParameters = { { 3024 /* getFunctionCallStackWithParameters */, 0, 152, 0, 152, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInFunctionExists = { { 3072 /* isInFunctionExists */, 1, 153, 1, 154, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClass = { { 3107 /* enterClass */, 1, 155, 1, 156, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterTrait = { { 3134 /* enterTrait */, 1, 157, 1, 158, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClassMethod = { { 3678 /* enterClassMethod */, 9, 159, 21, 180, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterPropertyHook = { { 3856 /* enterPropertyHook */, 10, 181, 11, 192, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig transformStaticType = { { 3879 /* transformStaticType */, 1, 193, 1, 194, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getRealParameterTypes = { { 3940 /* getRealParameterTypes */, 1, 195, 1, 196, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getRealParameterDefaultValues = { { 3962 /* getRealParameterDefaultValues */, 1, 197, 1, 198, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getParameterAttributes = { { 4082 /* getParameterAttributes */, 1, 199, 1, 200, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterFunction = { { 4208 /* enterFunction */, 8, 201, 17, 218, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterFunctionLike = { { 4266 /* enterFunctionLike */, 2, 219, 2, 221, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterNamespace = { { 4298 /* enterNamespace */, 1, 222, 1, 223, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClosureBind = { { 4350 /* enterClosureBind */, 3, 224, 3, 227, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig restoreOriginalScopeAfterClosureBind = { { 4381 /* restoreOriginalScopeAfterClosureBind */, 1, 228, 1, 229, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig restoreThis = { { 4435 /* restoreThis */, 1, 230, 1, 231, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClosureCall = { { 4447 /* enterClosureCall */, 2, 232, 2, 234, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInClosureBind = { { 4464 /* isInClosureBind */, 0, 235, 0, 235, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withClosureBindScopeClasses = { { 4480 /* withClosureBindScopeClasses */, 1, 236, 1, 237, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterAnonymousFunction = { { 4588 /* enterAnonymousFunction */, 2, 238, 3, 241, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterAnonymousFunctionWithoutReflection = { { 4611 /* enterAnonymousFunctionWithoutReflection */, 3, 242, 3, 245, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig expressionTypeIsUnchangeable = { { 4700 /* expressionTypeIsUnchangeable */, 1, 246, 1, 247, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateStaticExpressions = { { 4729 /* invalidateStaticExpressions */, 1, 248, 1, 249, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterArrowFunction = { { 4805 /* enterArrowFunction */, 2, 250, 3, 253, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterArrowFunctionWithoutReflection = { { 4824 /* enterArrowFunctionWithoutReflection */, 3, 254, 3, 257, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isParameterValueNullable = { { 4881 /* isParameterValueNullable */, 1, 258, 1, 259, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionType = { { 4928 /* getFunctionType */, 3, 260, 3, 263, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getCallableParameterType = { { 4950 /* getCallableParameterType */, 3, 264, 3, 267, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig buildVariadicArrayTypeFromCallableParameters = { { 4986 /* buildVariadicArrayTypeFromCallableParameters */, 2, 268, 2, 270, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig intersectButNotNever = { { 5055 /* intersectButNotNever */, 2, 271, 2, 273, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig enterMatch = { { 5127 /* enterMatch */, 3, 274, 3, 277, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterForeach = { { 5208 /* enterForeach */, 7, 278, 7, 285, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterForeachKey = { { 5221 /* enterForeachKey */, 5, 286, 5, 291, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterCatchType = { { 5247 /* enterCatchType */, 2, 292, 2, 294, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterExpressionAssign = { { 5275 /* enterExpressionAssign */, 1, 295, 2, 297, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exitExpressionAssign = { { 5297 /* exitExpressionAssign */, 1, 298, 1, 299, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInExpressionAssign = { { 5318 /* isInExpressionAssign */, 1, 300, 1, 301, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInWriteExpressionAssign = { { 5339 /* isInWriteExpressionAssign */, 1, 302, 1, 303, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig setAllowedUndefinedExpression = { { 5365 /* setAllowedUndefinedExpression */, 1, 304, 1, 305, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig unsetAllowedUndefinedExpression = { { 5395 /* unsetAllowedUndefinedExpression */, 1, 306, 1, 307, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isUndefinedExpressionAllowed = { { 5427 /* isUndefinedExpressionAllowed */, 1, 308, 1, 309, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignVariable = { { 5492 /* assignVariable */, 4, 310, 5, 315, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig overwriteExpression = { { 5507 /* overwriteExpression */, 3, 316, 3, 319, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveIntertwinedAssignedType = { { 5579 /* resolveIntertwinedAssignedType */, 5, 320, 5, 325, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isDimFetchPathReachable = { { 5653 /* isDimFetchPathReachable */, 2, 326, 2, 328, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig unsetExpression = { { 5677 /* unsetExpression */, 1, 329, 1, 330, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getStateType = { { 5693 /* getStateType */, 1, 331, 1, 332, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getScopeStateType = { { 5706 /* getScopeStateType */, 1, 333, 1, 334, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getScopeStateNativeType = { { 5724 /* getScopeStateNativeType */, 1, 335, 1, 336, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveScopeStateType = { { 5748 /* resolveScopeStateType */, 2, 337, 2, 339, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyExpressionType = { { 5770 /* specifyExpressionType */, 4, 340, 4, 344, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig openSpecificationScope = { { 5792 /* openSpecificationScope */, 0, 345, 0, 345, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isSpecifyExpressionTypeNoop = { { 5815 /* isSpecifyExpressionTypeNoop */, 2, 346, 2, 348, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyExpressionTypeInPlace = { { 5843 /* specifyExpressionTypeInPlace */, 4, 349, 4, 353, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig assignExpression = { { 5872 /* assignExpression */, 3, 354, 3, 357, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignInitializedProperty = { { 5903 /* assignInitializedProperty */, 2, 358, 2, 360, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateExpression = { { 6012 /* invalidateExpression */, 1, 361, 4, 365, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isPrivatePropertyOfDifferentClass = { { 6033 /* isPrivatePropertyOfDifferentClass */, 2, 366, 2, 368, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateMethodsOnExpression = { { 6067 /* invalidateMethodsOnExpression */, 1, 369, 1, 370, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig setExpressionCertaintyKeepingType = { { 6097 /* setExpressionCertaintyKeepingType */, 2, 371, 2, 373, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isComplexUnionType = { { 6131 /* isComplexUnionType */, 1, 374, 1, 375, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig addTypeToExpression = { { 6150 /* addTypeToExpression */, 2, 376, 2, 378, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig removeTypeFromExpression = { { 6183 /* removeTypeFromExpression */, 2, 379, 2, 381, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterByTruthyValue = { { 6208 /* filterByTruthyValue */, 1, 382, 1, 383, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterByFalseyValue = { { 6228 /* filterByFalseyValue */, 1, 384, 1, 385, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applySpecifiedTypes = { { 6263 /* applySpecifiedTypes */, 1, 386, 1, 387, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processConditionalExpressionsAfterSpecifying = { { 6304 /* processConditionalExpressionsAfterSpecifying */, 1, 388, 1, 389, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getConditionalExpressions = { { 6349 /* getConditionalExpressions */, 0, 390, 0, 390, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig addConditionalExpressions = { { 6404 /* addConditionalExpressions */, 2, 391, 2, 393, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exitFirstLevelStatements = { { 6430 /* exitFirstLevelStatements */, 0, 394, 0, 394, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInFirstLevelStatement = { { 6455 /* isInFirstLevelStatement */, 0, 395, 0, 395, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig mergeWith = { { 6518 /* mergeWith */, 1, 396, 2, 398, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig collectAbsorbedClosures = { { 6540 /* collectAbsorbedClosures */, 2, 399, 2, 401, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeWithVariableState = { { 6564 /* mergeWithVariableState */, 1, 402, 2, 404, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig withoutPreciseClassConstantFetches = { { 6651 /* withoutPreciseClassConstantFetches */, 3, 405, 3, 408, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig preserveVacuousConditionalExpressions = { { 6766 /* preserveVacuousConditionalExpressions */, 3, 409, 3, 412, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeSameGuardConditionalExpressions = { { 6858 /* mergeSameGuardConditionalExpressions */, 3, 413, 3, 416, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeConditionalExpressions = { { 6952 /* mergeConditionalExpressions */, 2, 417, 2, 419, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeInitializedProperties = { { 6998 /* mergeInitializedProperties */, 1, 420, 1, 421, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processFinallyScope = { { 7059 /* processFinallyScope */, 2, 422, 2, 424, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processFinallyScopeVariableTypeHolders = { { 7157 /* processFinallyScopeVariableTypeHolders */, 3, 425, 3, 428, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processClosureScope = { { 7229 /* processClosureScope */, 3, 429, 3, 432, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processAlwaysIterableForeachScopeWithoutPollute = { { 7260 /* processAlwaysIterableForeachScopeWithoutPollute */, 1, 433, 1, 434, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig generalizeWith = { { 7330 /* generalizeWith */, 1, 435, 2, 437, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig generalizeWithVariableState = { { 7345 /* generalizeWithVariableState */, 2, 438, 2, 440, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeVariableTypeHolders = { { 7418 /* generalizeVariableTypeHolders */, 3, 441, 3, 444, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig flattenUnionForGeneralization = { { 7448 /* flattenUnionForGeneralization */, 1, 445, 1, 446, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeType = { { 7488 /* generalizeType */, 3, 447, 3, 450, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getArrayDepth = { { 7503 /* getArrayDepth */, 1, 451, 1, 452, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig equals = { { 7517 /* equals */, 1, 453, 1, 454, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig compareConditionalExpressions = { { 7552 /* compareConditionalExpressions */, 2, 455, 2, 457, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig compareVariableTypeHolders = { { 7582 /* compareVariableTypeHolders */, 2, 458, 2, 460, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig canAccessProperty = { { 7666 /* canAccessProperty */, 1, 461, 1, 462, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canReadProperty = { { 7730 /* canReadProperty */, 1, 463, 1, 464, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canWriteProperty = { { 7746 /* canWriteProperty */, 1, 465, 1, 466, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canCallMethod = { { 7816 /* canCallMethod */, 1, 467, 1, 468, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canAccessConstant = { { 7892 /* canAccessConstant */, 1, 469, 1, 470, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canAccessClassMember = { { 7973 /* canAccessClassMember */, 1, 471, 1, 472, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig debug = { { 7994 /* debug */, 0, 473, 0, 473, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterTypeWithMethod = { { 8026 /* filterTypeWithMethod */, 2, 474, 2, 476, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getMethodReflection = { { 8091 /* getMethodReflection */, 2, 477, 2, 479, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getNakedMethod = { { 8111 /* getNakedMethod */, 2, 480, 2, 482, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getPropertyReflection = { { 8143 /* getPropertyReflection */, 2, 483, 2, 485, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getInstancePropertyReflection = { { 8165 /* getInstancePropertyReflection */, 2, 486, 2, 488, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getStaticPropertyReflection = { { 8195 /* getStaticPropertyReflection */, 2, 489, 2, 491, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantReflection = { { 8253 /* getConstantReflection */, 2, 492, 2, 494, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantExplicitTypeFromConfig = { { 8288 /* getConstantExplicitTypeFromConfig */, 2, 495, 2, 497, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantTypes = { { 8322 /* getConstantTypes */, 0, 498, 0, 498, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getGlobalConstantType = { { 8339 /* getGlobalConstantType */, 1, 499, 1, 500, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig createGlobalConstantFetches = { { 8372 /* createGlobalConstantFetches */, 3, 501, 3, 504, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getNativeConstantTypes = { { 8400 /* getNativeConstantTypes */, 0, 505, 0, 505, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getIterableKeyType = { { 8423 /* getIterableKeyType */, 1, 506, 1, 507, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getIterableValueType = { { 8442 /* getIterableValueType */, 1, 508, 1, 509, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getPhpVersion = { { 8487 /* getPhpVersion */, 0, 510, 0, 510, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isOverallPhpVersionRange = { { 8501 /* isOverallPhpVersionRange */, 1, 511, 1, 512, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invokeNodeCallback = { { 8541 /* invokeNodeCallback */, 1, 513, 1, 514, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig emitCollectedData = { { 8579 /* emitCollectedData */, 2, 515, 2, 517, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackValueDependency = { { 8612 /* trackValueDependency */, 2, 518, 2, 520, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackFileDependency = { { 8638 /* trackFileDependency */, 1, 521, 1, 522, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackDirectoryDependency = { { 8680 /* trackDirectoryDependency */, 1, 523, 2, 525, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackClassDependency = { { 8705 /* trackClassDependency */, 1, 526, 1, 527, ZEND_ACC_PUBLIC } }; } // namespace sig } // namespace ptdecl::MutatingScope diff --git a/turbo-ext/src/generated/PossiblyImpureCallExprHandler.h b/turbo-ext/src/generated/PossiblyImpureCallExprHandler.h deleted file mode 100644 index 897351286e2..00000000000 --- a/turbo-ext/src/generated/PossiblyImpureCallExprHandler.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Generated by turbo-ext/bin/generate-declarations.php from - * src/Analyser/ExprHandler/Virtual/PossiblyImpureCallExprHandler.php — do not edit. */ - -#ifndef PHPSTANTURBO_GENERATED_POSSIBLY_IMPURE_CALL_EXPR_HANDLER_H -#define PHPSTANTURBO_GENERATED_POSSIBLY_IMPURE_CALL_EXPR_HANDLER_H - -#include "../reg.h" - -namespace ptdecl::PossiblyImpureCallExprHandler { - -/* the OBJ_PROP_NUM slots of the instance properties the class declares (the inherited ones come first) */ -namespace slot { -inline constexpr uint32_t expressionResultFactory = 0; -inline constexpr uint32_t defaultNarrowingHelper = 1; -} // namespace slot - -inline void declareClass(reg::Class &cls) -{ - cls.final(); - cls.implements({ "PHPStan\\Analyser\\ExprHandler" }); -} - -/* the properties the class declares itself, in declaration order (a used trait's come from its registrar) */ -inline void declareProperties(reg::Class &cls) -{ - cls.property("expressionResultFactory", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExpressionResultFactory"); - cls.property("defaultNarrowingHelper", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\DefaultNarrowingHelper"); -} - -/* the string and parameter tables the signatures below index into (see reg::Sig) */ -namespace sigtab { -inline constexpr char strings[] = - "expressionResultFactory\0" /* 0 */ - "PHPStan\\Analyser\\ExpressionResultFactory\0" /* 24 */ - "defaultNarrowingHelper\0" /* 65 */ - "PHPStan\\Analyser\\ExprHandler\\Helper\\DefaultNarrowingHelper\0" /* 88 */ - "__construct\0" /* 147 */ - "expr\0" /* 159 */ - "PhpParser\\Node\\Expr\0" /* 164 */ - "\0" /* 184 */ - "supports\0" /* 185 */ - "nodeScopeResolver\0" /* 194 */ - "PHPStan\\Analyser\\NodeScopeResolver\0" /* 212 */ - "stmt\0" /* 247 */ - "PhpParser\\Node\\Stmt\0" /* 252 */ - "scope\0" /* 272 */ - "PHPStan\\Analyser\\MutatingScope\0" /* 278 */ - "storage\0" /* 309 */ - "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 317 */ - "nodeCallback\0" /* 358 */ - "context\0" /* 371 */ - "PHPStan\\Analyser\\ExpressionContext\0" /* 379 */ - "PHPStan\\Analyser\\ExpressionResult\0" /* 414 */ - "processExpr"; /* 448 */ -inline constexpr reg::PackedArg args[] = { - reg::packed(0, 0, 24), /* __construct $expressionResultFactory */ - reg::packed(65, 0, 88), /* __construct $defaultNarrowingHelper */ - reg::packed(159, 0, 164), /* supports $expr */ - reg::packed(184, MAY_BE_BOOL), /* supports return */ - reg::packed(194, 0, 212), /* processExpr $nodeScopeResolver */ - reg::packed(247, 0, 252), /* processExpr $stmt */ - reg::packed(159, 0, 164), /* processExpr $expr */ - reg::packed(272, 0, 278), /* processExpr $scope */ - reg::packed(309, 0, 317), /* processExpr $storage */ - reg::packed(358, MAY_BE_CALLABLE), /* processExpr $nodeCallback */ - reg::packed(371, 0, 379), /* processExpr $context */ - reg::packed(184, 0, 414), /* processExpr return */ -}; -using Sig = reg::Sig; -} // namespace sigtab - -/* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ -namespace sig { -inline constexpr sigtab::Sig __construct = { { 147 /* __construct */, 2, 0, 2, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig supports = { { 185 /* supports */, 1, 2, 1, 3, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processExpr = { { 448 /* processExpr */, 7, 4, 7, 11, ZEND_ACC_PUBLIC } }; -} // namespace sig - -} // namespace ptdecl::PossiblyImpureCallExprHandler - -#endif diff --git a/turbo-ext/src/support.cpp b/turbo-ext/src/support.cpp index 987f10efc90..4a23023cf17 100644 --- a/turbo-ext/src/support.cpp +++ b/turbo-ext/src/support.cpp @@ -130,7 +130,6 @@ static const pt_class_template pt_class_templates[PT_CLASS_COUNT] = { /* PT_CLASS_UNRESOLVABLE_TYPE_RESULT */ {"unresolvableTypeResult", "PHPStan\\Rules\\PhpDoc\\UnresolvableTypeResult"}, /* PT_CLASS_UNDEFINED_VARIABLE_EXCEPTION */ {"undefinedVariableException", "PHPStan\\Analyser\\UndefinedVariableException"}, /* PT_CLASS_PROPERTY_INITIALIZATION_EXPR */ {"propertyInitializationExpr", "PHPStan\\Node\\Expr\\PropertyInitializationExpr"}, - /* PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR */ {"possiblyImpureCallExpr", "PHPStan\\Node\\Expr\\PossiblyImpureCallExpr"}, /* PT_CLASS_CONST_FETCH */ {"constFetch", "PhpParser\\Node\\Expr\\ConstFetch"}, /* PT_CLASS_HALT_COMPILER */ {"haltCompiler", "PhpParser\\Node\\Stmt\\HaltCompiler"}, /* PT_CLASS_EXTENDED_PARAMETERS_ACCEPTOR */ {"extendedParametersAcceptor", "PHPStan\\Reflection\\ExtendedParametersAcceptor"}, diff --git a/turbo-ext/src/support.h b/turbo-ext/src/support.h index c6cd41dd68d..7e9eb176089 100644 --- a/turbo-ext/src/support.h +++ b/turbo-ext/src/support.h @@ -177,7 +177,6 @@ enum { PT_CLASS_UNRESOLVABLE_TYPE_RESULT, PT_CLASS_UNDEFINED_VARIABLE_EXCEPTION, PT_CLASS_PROPERTY_INITIALIZATION_EXPR, - PT_CLASS_POSSIBLY_IMPURE_CALL_EXPR, PT_CLASS_CONST_FETCH, PT_CLASS_HALT_COMPILER, PT_CLASS_EXTENDED_PARAMETERS_ACCEPTOR, @@ -3668,7 +3667,6 @@ extern zend_class_entry *pt_ce_unset_offset_expr_handler; extern zend_class_entry *pt_ce_always_remembered_expr_handler; extern zend_class_entry *pt_ce_existing_array_dim_fetch_handler; extern zend_class_entry *pt_ce_isset_expr_handler; -extern zend_class_entry *pt_ce_possibly_impure_call_expr_handler; extern zend_class_entry *pt_ce_set_existing_offset_value_type_expr_handler; extern zend_class_entry *pt_ce_set_offset_value_type_expr_handler; diff --git a/turbo-ext/tests/scope-family.php b/turbo-ext/tests/scope-family.php index 7fa71a1e8a4..faa70435cee 100644 --- a/turbo-ext/tests/scope-family.php +++ b/turbo-ext/tests/scope-family.php @@ -1370,7 +1370,6 @@ public function exprRef(Node\Expr $expr): mixed if ($scope->hasExpressionType($expr)->yes()) { $observe("getTrackedExpressionType#$i $key", static fn () => $scope->getTrackedExpressionType($expr)); } - $observe("findPossiblyImpureCallDescriptions#$i $key", static fn () => $scope->findPossiblyImpureCallDescriptions($expr)); if ($expr instanceof \PhpParser\Node\Expr\PropertyFetch) { $observe("isReadonlyPropertyFetch(this)#$i $key", static fn () => $scope->isReadonlyPropertyFetch($expr, true)); $observe("isReadonlyPropertyFetch(any)#$i $key", static fn () => $scope->isReadonlyPropertyFetch($expr, false)); diff --git a/turbo-ext/tests/smoke.php b/turbo-ext/tests/smoke.php index aa666f9f629..c2ff0aecf4b 100644 --- a/turbo-ext/tests/smoke.php +++ b/turbo-ext/tests/smoke.php @@ -489,7 +489,6 @@ function check(bool $cond, string $msg): void $exprs['SetOffsetValueTypeExpr'] = new \PHPStan\Node\Expr\SetOffsetValueTypeExpr($var, null, $dim); $exprs['SetExistingOffsetValueTypeExpr'] = new \PHPStan\Node\Expr\SetExistingOffsetValueTypeExpr($var, $dim, $var); $exprs['AlwaysRememberedExpr'] = new \PHPStan\Node\Expr\AlwaysRememberedExpr($var, new \PHPStan\Type\IntegerType(), new \PHPStan\Type\IntegerType()); - $exprs['PossiblyImpureCallExpr'] = new \PHPStan\Node\Expr\PossiblyImpureCallExpr($var, $dim, 'call'); $exprs['PropertyInitializationExpr'] = new \PHPStan\Node\Expr\PropertyInitializationExpr('prop'); $exprs['CloneReinitializationExpr'] = new \PHPStan\Node\Expr\CloneReinitializationExpr('prop'); $exprs['ForeachValueByRefExpr'] = new \PHPStan\Node\Expr\ForeachValueByRefExpr($var); @@ -4778,7 +4777,6 @@ public function getComments(): array \PHPStan\Analyser\ExprHandler\Virtual\AlwaysRememberedExprHandler::class => 'walk-trace.php', \PHPStan\Analyser\ExprHandler\Virtual\ExistingArrayDimFetchHandler::class => 'walk-trace.php', \PHPStan\Analyser\ExprHandler\Virtual\IssetExprHandler::class => 'walk-trace.php', - \PHPStan\Analyser\ExprHandler\Virtual\PossiblyImpureCallExprHandler::class => 'walk-trace.php', \PHPStan\Analyser\ExprHandler\Virtual\SetExistingOffsetValueTypeExprHandler::class => 'walk-trace.php', \PHPStan\Analyser\ExprHandler\Virtual\SetOffsetValueTypeExprHandler::class => 'walk-trace.php', \PHPStan\Analyser\ExprHandler\Virtual\FunctionCallableNodeHandler::class => 'walk-trace.php', From 9d9673cffac6332761657ffefd4650a8da16e034 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 21 Oct 2026 09:24:05 +0200 Subject: [PATCH 2/2] Bump expected turbo version --- src/Turbo/TurboExtensionEnabler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Turbo/TurboExtensionEnabler.php b/src/Turbo/TurboExtensionEnabler.php index df5f6d4e5c1..c9740cb393d 100644 --- a/src/Turbo/TurboExtensionEnabler.php +++ b/src/Turbo/TurboExtensionEnabler.php @@ -34,7 +34,7 @@ final class TurboExtensionEnabler { - public const EXPECTED_EXTENSION_VERSION = 'af6410d'; + public const EXPECTED_EXTENSION_VERSION = '04247a5'; private static bool $active = false;