From 73d7212e050f4be6576884ef351794e426f19eab Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 27 Sep 2021 15:43:15 +0000 Subject: [PATCH] Updated Rector to commit 17cfa9f376b5b4a00a34e3b09ac48e7bd812be3f https://github.com/rectorphp/rector-src/commit/17cfa9f376b5b4a00a34e3b09ac48e7bd812be3f Update to nikic/php-parser 4.13.0 (#904) --- bin/rector.php | 15 +- .../PregMatchTypeCorrector.php | 14 +- preload.php | 479 +++++----- .../ArgumentDefaultValueReplacer.php | 7 +- .../FuncCall/SwapFuncCallArgumentsRector.php | 4 + .../ChangeDiffForHumansArgsRector.php | 4 + rules/CodeQuality/CompactConverter.php | 8 + .../ThrowWithPreviousExceptionRector.php | 1 + .../Rector/For_/ForToForeachRector.php | 5 +- ...ayKeysAndInArrayToArrayKeyExistsRector.php | 21 +- ...rayMergeOfNonArraysToSimpleArrayRector.php | 5 + ...serFuncWithArrowFunctionToInlineRector.php | 10 +- .../ChangeArrayPushToArrayAssignRector.php | 8 +- .../FuncCall/CompactToVariablesRector.php | 9 +- ...rrayAndArrayKeysToArrayKeyExistsRector.php | 24 +- .../FuncCall/IntvalToTypeCastRector.php | 9 +- .../IsAWithStringWithThirdArgumentRector.php | 3 + .../FuncCall/RemoveSoleValueSprintfRector.php | 21 +- .../Rector/FuncCall/SetTypeToCastRector.php | 23 +- .../SimplifyFuncGetArgsCountRector.php | 4 + .../FuncCall/SimplifyInArrayValuesRector.php | 13 + .../FuncCall/SimplifyStrposLowerRector.php | 4 + .../FuncCall/SingleInArrayToCompareRector.php | 13 + .../UnwrapSprintfOneArgumentRector.php | 19 +- .../Identical/GetClassToInstanceOfRector.php | 7 + ...StrlenZeroToIdenticalEmptyStringRector.php | 63 +- .../SimplifyIfIssetToNullCoalescingRector.php | 20 +- ...istsTernaryThenValueToCoalescingRector.php | 13 +- .../NodeAnalyzer/ImplodeAnalyzer.php | 18 +- .../NodeFactory/JsonArrayFactory.php | 11 +- .../ClassMethod/UnSpreadOperatorRector.php | 3 + .../AddArrayDefaultToArrayPropertyRector.php | 15 +- .../CallUserFuncArrayToVariadicRector.php | 19 +- .../CallUserFuncToMethodCallRector.php | 7 + .../FuncCall/ConsistentImplodeRector.php | 30 +- .../ConsistentPregDelimiterRector.php | 6 + ...CountArrayToEmptyArrayComparisonRector.php | 13 + ...VersionCompareFuncCallToConstantRector.php | 22 +- ...VariableForSprintfInSymfonyStyleRector.php | 7 + .../CurrentAndParentClassMethodComparator.php | 6 +- rules/DeadCode/ConditionResolver.php | 9 +- .../NodeManipulator/CountManipulator.php | 7 + .../RemoveUnusedVariableAssignRector.php | 4 + ...FutureCompatibleIfFunctionExistsRector.php | 7 + .../NewFluentChainMethodCallNodeAnalyzer.php | 7 + .../NodeRemover/ClassMethodNodeRemover.php | 4 + .../DowngradeDefineArrayConstantRector.php | 19 +- ...owngradeSessionStartArrayOptionsRector.php | 9 + ...ymmetricArrayDestructuringToListRector.php | 2 + .../FuncCall/DowngradeIsIterableRector.php | 7 + .../DowngradeClosureFromCallableRector.php | 6 + ...radeNegativeStringOffsetToStrlenRector.php | 11 +- .../FunctionExistsFunCallAnalyzer.php | 7 + ...gradePregUnmatchedAsNullConstantRector.php | 8 +- .../DowngradeArrayKeyFirstLastRector.php | 17 +- .../FuncCall/DowngradeIsCountableRector.php | 7 + ...SetCookieOptionsArrayToArgumentsRector.php | 24 +- .../DowngradeCovariantReturnTypeRector.php | 3 +- .../DowngradeStripTagsCallWithArrayRector.php | 10 +- ...owngradeTrailingCommasInParamUseRector.php | 5 +- .../FuncCall/DowngradeStrContainsRector.php | 21 +- .../FuncCall/DowngradeStrEndsWithRector.php | 4 +- .../DowngradeNamedArgumentRector.php | 2 +- .../DispatchStringToObjectRector.php | 10 +- .../Collector/MockVariableCollector.php | 7 + .../Assign/MysqlAssignToMysqliRector.php | 3 +- .../FuncCall/MysqlFuncCallToMysqliRector.php | 22 +- .../MysqlPConnectToMysqliConnectRector.php | 7 + .../MysqlQueryMysqlErrorWithLinkRector.php | 5 +- rules/Naming/Naming/VariableNaming.php | 6 + ...DirNameFileConstantToDirConstantRector.php | 7 + .../RemoveReferenceFromCallRector.php | 4 + .../FuncCall/PregReplaceEModifierRector.php | 24 +- .../Php56/Rector/FuncCall/PowToExpRector.php | 21 +- .../Rector/FuncCall/CallUserMethodRector.php | 2 +- .../Rector/FuncCall/EregToPregMatchRector.php | 53 +- .../Rector/FuncCall/MultiDirnameRector.php | 11 +- ...VariableToVariableOnFunctionCallRector.php | 18 +- rules/Php71/IsArrayAndDualCheckToAble.php | 6 + .../Rector/FuncCall/CountOnNullRector.php | 7 +- .../NodeFactory/AnonymousFunctionFactory.php | 3 +- ...laceEachAssignmentWithKeyCurrentRector.php | 6 + ...reateFunctionToAnonymousFunctionRector.php | 19 +- .../Rector/FuncCall/GetClassOnNullRector.php | 19 + .../IsObjectOnIncompleteClassRector.php | 7 + .../Rector/FuncCall/StringifyDefineRector.php | 7 + .../FuncCall/StringsAssertNakedRector.php | 3 + .../While_/WhileEachToForeachRector.php | 7 + .../Php73/Rector/FuncCall/SetCookieRector.php | 6 +- .../FuncCall/StringifyStrNeedlesRector.php | 7 + .../ArrayKeyExistsOnPropertyRector.php | 7 + .../ArraySpreadInsteadOfArrayMergeRector.php | 16 +- .../FuncCall/FilterVarToAddSlashesRector.php | 4 + ...bStrrposEncodingArgumentPositionRector.php | 3 + .../ExportToReflectionFunctionRector.php | 23 +- .../StrncmpMatchAndRefactor.php | 36 +- .../StrposMatchAndRefactor.php | 70 +- .../SubstrMatchAndRefactor.php | 60 +- .../NodeManipulator/TokenManipulator.php | 22 +- .../OptionalParametersAfterRequiredRector.php | 8 +- .../Rector/FuncCall/ClassOnObjectRector.php | 4 + .../Rector/Identical/StrEndsWithRector.php | 42 +- .../Rector/Ternary/GetDebugTypeRector.php | 16 + .../StrStartsWithFactory.php | 23 +- .../BeConstructedWithAssignFactory.php | 9 + .../NodeFactory/DuringMethodCallFactory.php | 5 +- .../PhpSpecClassToPHPUnitClassRector.php | 7 + .../PhpSpecMocksToPHPUnitMocksRector.php | 8 +- .../PhpSpecPromisesToPHPUnitAssertRector.php | 3 +- .../ClassMethod/ArgumentRemoverRector.php | 7 +- .../Rector/FuncCall/RemoveFuncCallRector.php | 4 + ...keTypedPropertyNullableIfCheckedRector.php | 4 + .../ArgumentFuncCallToMethodCallRector.php | 4 + .../CallableInMethodCallToVariableRector.php | 9 +- .../Rector/New_/NewArgToMethodCallRector.php | 4 + .../NodeAnalyzer/CallTypesResolver.php | 3 + .../NodeAnalyzer/CallerParamMatcher.php | 7 +- .../TypeDeclaration/PhpParserTypeAnalyzer.php | 3 +- .../ParamTypeByMethodCallTypeRector.php | 3 +- ...merNullableArgumentToScalarTypedRector.php | 3 + .../ReturnTypeAlreadyAddedChecker.php | 5 +- src/Application/VersionResolver.php | 4 +- src/Bootstrap/ExtensionConfigResolver.php | 2 +- src/NodeAnalyzer/ArgsAnalyzer.php | 37 + src/NodeAnalyzer/CompactFuncCallAnalyzer.php | 16 +- .../ClassMethodAssignManipulator.php | 6 + src/NodeManipulator/FuncCallManipulator.php | 4 + .../Regex/RegexPatternArgumentManipulator.php | 7 + src/PhpParser/NodeTransformer.php | 4 + vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 6 + vendor/composer/autoload_real.php | 14 +- vendor/composer/autoload_static.php | 14 +- vendor/composer/installed.json | 14 +- vendor/composer/installed.php | 2 +- vendor/nikic/php-parser/grammar/php7.y | 35 +- .../lib/PhpParser/Builder/FunctionLike.php | 3 +- .../lib/PhpParser/Builder/Param.php | 4 +- .../lib/PhpParser/Builder/Property.php | 4 +- .../lib/PhpParser/BuilderHelpers.php | 54 +- .../lib/PhpParser/Lexer/Emulative.php | 3 +- .../TokenEmulator/ExplicitOctalEmulator.php | 51 ++ .../php-parser/lib/PhpParser/Node/Arg.php | 1 + .../lib/PhpParser/Node/ComplexType.php | 14 + .../lib/PhpParser/Node/Expr/ArrowFunction.php | 2 +- .../lib/PhpParser/Node/Expr/CallLike.php | 40 + .../lib/PhpParser/Node/Expr/Closure.php | 2 +- .../lib/PhpParser/Node/Expr/FuncCall.php | 14 +- .../lib/PhpParser/Node/Expr/MethodCall.php | 17 +- .../lib/PhpParser/Node/Expr/New_.php | 12 +- .../lib/PhpParser/Node/Expr/StaticCall.php | 18 +- .../lib/PhpParser/Node/FunctionLike.php | 2 +- .../lib/PhpParser/Node/IntersectionType.php | 30 + .../lib/PhpParser/Node/NullableType.php | 3 +- .../php-parser/lib/PhpParser/Node/Param.php | 18 +- .../lib/PhpParser/Node/Scalar/LNumber.php | 4 + .../lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- .../lib/PhpParser/Node/Stmt/Function_.php | 2 +- .../lib/PhpParser/Node/Stmt/Property.php | 15 +- .../lib/PhpParser/Node/UnionType.php | 3 +- .../PhpParser/Node/VariadicPlaceholder.php | 29 + .../PhpParser/NodeVisitor/NameResolver.php | 2 +- .../php-parser/lib/PhpParser/Parser/Php7.php | 823 +++++++++--------- .../lib/PhpParser/PrettyPrinter/Standard.php | 8 + .../lib/PhpParser/PrettyPrinterAbstract.php | 9 +- vendor/scoper-autoload.php | 15 +- 166 files changed, 2291 insertions(+), 982 deletions(-) create mode 100644 src/NodeAnalyzer/ArgsAnalyzer.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php diff --git a/bin/rector.php b/bin/rector.php index 125930b91c9..4182947e673 100755 --- a/bin/rector.php +++ b/bin/rector.php @@ -28,7 +28,8 @@ $autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists(); $extractedPhpstanAutoload = __DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/autoload.php'; if (\file_exists($extractedPhpstanAutoload)) { require_once $extractedPhpstanAutoload; -} elseif (\RectorPrefix20210927\should_include_preload()) { +} +if (\file_exists(__DIR__ . '/../preload.php')) { require_once __DIR__ . '/../preload.php'; } require_once __DIR__ . '/../src/constants.php'; @@ -111,15 +112,3 @@ final class AutoloadIncluder } } \class_alias('RectorPrefix20210927\\AutoloadIncluder', 'AutoloadIncluder', \false); -// load local php-parser only in prefixed version or development repository -function should_include_preload() : bool -{ - if (\file_exists(__DIR__ . '/../vendor/scoper-autoload.php')) { - return \true; - } - if (!\file_exists(\getcwd() . '/composer.json')) { - return \false; - } - $composerJsonFileContent = \file_get_contents(\getcwd() . '/composer.json'); - return \strpos($composerJsonFileContent, '"name": "rector/rector"') !== \false; -} diff --git a/packages/NodeTypeResolver/NodeTypeCorrector/PregMatchTypeCorrector.php b/packages/NodeTypeResolver/NodeTypeCorrector/PregMatchTypeCorrector.php index 31f9f14ed87..416dc17c8a6 100644 --- a/packages/NodeTypeResolver/NodeTypeCorrector/PregMatchTypeCorrector.php +++ b/packages/NodeTypeResolver/NodeTypeCorrector/PregMatchTypeCorrector.php @@ -10,6 +10,7 @@ use PhpParser\Node\Expr\Variable; use PHPStan\Type\ArrayType; use PHPStan\Type\MixedType; use PHPStan\Type\Type; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\NodeNameResolver\NodeNameResolver; @@ -33,12 +34,17 @@ final class PregMatchTypeCorrector * @var \Rector\Core\PhpParser\Comparing\NodeComparator */ private $nodeComparator; - public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\NodeNestingScope\ParentScopeFinder $parentScopeFinder, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\NodeNestingScope\ParentScopeFinder $parentScopeFinder, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->betterNodeFinder = $betterNodeFinder; $this->nodeNameResolver = $nodeNameResolver; $this->parentScopeFinder = $parentScopeFinder; $this->nodeComparator = $nodeComparator; + $this->argsAnalyzer = $argsAnalyzer; } /** * Special case for "preg_match(), preg_match_all()" - with 3rd argument @@ -65,11 +71,13 @@ final class PregMatchTypeCorrector if (!$this->nodeNameResolver->isNames($funcCallNode, ['preg_match', 'preg_match_all'])) { continue; } - if (!isset($funcCallNode->args[2])) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($funcCallNode->args, 2)) { continue; } + /** @var Arg $thirdArg */ + $thirdArg = $funcCallNode->args[2]; // are the same variables - if (!$this->nodeComparator->areNodesEqual($funcCallNode->args[2]->value, $node)) { + if (!$this->nodeComparator->areNodesEqual($thirdArg->value, $node)) { continue; } return new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType()); diff --git a/preload.php b/preload.php index fe66d87c298..ae2250ff69b 100644 --- a/preload.php +++ b/preload.php @@ -2,249 +2,254 @@ declare(strict_types=1); -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Error.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NameContext.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php'; -require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php'; -require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php'; -require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/Exception/ValueObjectException.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Error.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php'; +require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php'; require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/ValueObjectInliner.php'; +require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/Exception/ValueObjectException.php'; +require_once __DIR__ . '/vendor/symplify/symfony-php-config/src/Reflection/ArgumentAndParameterFactory.php'; require_once __DIR__ . '/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php'; diff --git a/rules/Arguments/ArgumentDefaultValueReplacer.php b/rules/Arguments/ArgumentDefaultValueReplacer.php index 1ed50d3bc39..e165a91b9fc 100644 --- a/rules/Arguments/ArgumentDefaultValueReplacer.php +++ b/rules/Arguments/ArgumentDefaultValueReplacer.php @@ -77,14 +77,17 @@ final class ArgumentDefaultValueReplacer /** * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\FuncCall $expr */ - private function processArgs($expr, \Rector\Arguments\Contract\ReplaceArgumentDefaultValueInterface $replaceArgumentDefaultValue) : \PhpParser\Node\Expr + private function processArgs($expr, \Rector\Arguments\Contract\ReplaceArgumentDefaultValueInterface $replaceArgumentDefaultValue) : ?\PhpParser\Node\Expr { $position = $replaceArgumentDefaultValue->getPosition(); + if (!$expr->args[$position] instanceof \PhpParser\Node\Arg) { + return null; + } $argValue = $this->valueResolver->getValue($expr->args[$position]->value); if (\is_scalar($replaceArgumentDefaultValue->getValueBefore()) && $argValue === $replaceArgumentDefaultValue->getValueBefore()) { $expr->args[$position] = $this->normalizeValueToArgument($replaceArgumentDefaultValue->getValueAfter()); } elseif (\is_array($replaceArgumentDefaultValue->getValueBefore())) { - $newArgs = $this->processArrayReplacement($expr->args, $replaceArgumentDefaultValue); + $newArgs = $this->processArrayReplacement($expr->getArgs(), $replaceArgumentDefaultValue); if ($newArgs) { $expr->args = $newArgs; } diff --git a/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php b/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php index 4b8721a37e9..5296f7b5036 100644 --- a/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php +++ b/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Arguments\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Arguments\ValueObject\SwapFuncCallArguments; use Rector\Core\Contract\Rector\ConfigurableRectorInterface; @@ -104,6 +105,9 @@ CODE_SAMPLE if (!isset($funcCall->args[$newPosition])) { continue; } + if (!$funcCall->args[$oldPosition] instanceof \PhpParser\Node\Arg) { + continue; + } $newArguments[$newPosition] = $funcCall->args[$oldPosition]; } return $newArguments; diff --git a/rules/Carbon/Rector/MethodCall/ChangeDiffForHumansArgsRector.php b/rules/Carbon/Rector/MethodCall/ChangeDiffForHumansArgsRector.php index 8617d42e428..48d3557f519 100644 --- a/rules/Carbon/Rector/MethodCall/ChangeDiffForHumansArgsRector.php +++ b/rules/Carbon/Rector/MethodCall/ChangeDiffForHumansArgsRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Carbon\Rector\MethodCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\MethodCall; use PHPStan\Type\ObjectType; use Rector\Core\Rector\AbstractRector; @@ -67,6 +68,9 @@ CODE_SAMPLE if (!isset($node->args[1])) { return null; } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } $secondArgValue = $node->args[1]->value; if ($this->valueResolver->isTrue($secondArgValue)) { $node->args[1]->value = $this->nodeFactory->createClassConstFetch('Carbon\\CarbonInterface', 'DIFF_ABSOLUTE'); diff --git a/rules/CodeQuality/CompactConverter.php b/rules/CodeQuality/CompactConverter.php index cbdb54523ff..81ee8d5b44d 100644 --- a/rules/CodeQuality/CompactConverter.php +++ b/rules/CodeQuality/CompactConverter.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace Rector\CodeQuality; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\FuncCall; @@ -23,6 +24,10 @@ final class CompactConverter public function hasAllArgumentsNamed(\PhpParser\Node\Expr\FuncCall $funcCall) : bool { foreach ($funcCall->args as $arg) { + // VariadicPlaceholder doesn't has name, so it return false directly + if (!$arg instanceof \PhpParser\Node\Arg) { + return \false; + } /** @var string|null $variableName */ $variableName = $this->valueResolver->getValue($arg->value); if (!\is_string($variableName)) { @@ -35,6 +40,9 @@ final class CompactConverter { $array = new \PhpParser\Node\Expr\Array_(); foreach ($funcCall->args as $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + throw new \Rector\Core\Exception\ShouldNotHappenException(); + } /** @var string|null $variableName */ $variableName = $this->valueResolver->getValue($arg->value); if (!\is_string($variableName)) { diff --git a/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php b/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php index c03b4fd4820..a8c7e2035c1 100644 --- a/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php +++ b/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php @@ -119,6 +119,7 @@ CODE_SAMPLE // get previous code $new->args[1] = new \PhpParser\Node\Arg(new \PhpParser\Node\Expr\MethodCall($catchedThrowableVariable, 'getCode')); } + /** @var Arg $arg1 */ $arg1 = $new->args[1]; if ($arg1->name instanceof \PhpParser\Node\Identifier && $arg1->name->toString() === 'previous') { $new->args[1] = new \PhpParser\Node\Arg(new \PhpParser\Node\Expr\MethodCall($catchedThrowableVariable, 'getCode')); diff --git a/rules/CodeQuality/Rector/For_/ForToForeachRector.php b/rules/CodeQuality/Rector/For_/ForToForeachRector.php index c3bef922d73..7cb5156007b 100644 --- a/rules/CodeQuality/Rector/For_/ForToForeachRector.php +++ b/rules/CodeQuality/Rector/For_/ForToForeachRector.php @@ -5,6 +5,7 @@ namespace Rector\CodeQuality\Rector\For_; use RectorPrefix20210927\Doctrine\Inflector\Inflector; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\BinaryOp; @@ -192,7 +193,7 @@ CODE_SAMPLE continue; } $funcCall = $initExpr->expr; - if ($this->nodeNameResolver->isName($funcCall, self::COUNT)) { + if ($this->nodeNameResolver->isName($funcCall, self::COUNT) && $funcCall->args[0] instanceof \PhpParser\Node\Arg) { $this->countValueVariableExpr = $initExpr->var; $this->countValueName = $this->getName($initExpr->var); $this->iteratedExpr = $funcCall->args[0]->value; @@ -219,7 +220,7 @@ CODE_SAMPLE if (!$funcCall instanceof \PhpParser\Node\Expr\FuncCall) { return \false; } - if ($this->nodeNameResolver->isName($funcCall, self::COUNT)) { + if ($this->nodeNameResolver->isName($funcCall, self::COUNT) && $funcCall->args[0] instanceof \PhpParser\Node\Arg) { $this->iteratedExpr = $funcCall->args[0]->value; return \true; } diff --git a/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php b/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php index 6aed5b61407..dcad2c154c4 100644 --- a/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php +++ b/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\FunctionLike; @@ -54,6 +55,12 @@ CODE_SAMPLE if (!$this->nodeNameResolver->isName($node, 'in_array')) { return null; } + if (!isset($node->args[1])) { + return null; + } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } $arrayVariable = $node->args[1]->value; /** @var Assign|Node|null $previousAssignArraysKeysFuncCall */ $previousAssignArraysKeysFuncCall = $this->betterNodeFinder->findFirstPreviousOfNode($node, function (\PhpParser\Node $node) use($arrayVariable) : bool { @@ -82,8 +89,20 @@ CODE_SAMPLE $this->removeNode($previousAssignArraysKeysFuncCall); return $this->createArrayKeyExists($node, $arrayKeysFuncCall); } - private function createArrayKeyExists(\PhpParser\Node\Expr\FuncCall $inArrayFuncCall, \PhpParser\Node\Expr\FuncCall $arrayKeysFuncCall) : \PhpParser\Node\Expr\FuncCall + private function createArrayKeyExists(\PhpParser\Node\Expr\FuncCall $inArrayFuncCall, \PhpParser\Node\Expr\FuncCall $arrayKeysFuncCall) : ?\PhpParser\Node\Expr\FuncCall { + if (!isset($inArrayFuncCall->args[0])) { + return null; + } + if (!$inArrayFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } + if (!isset($arrayKeysFuncCall->args[0])) { + return null; + } + if (!$arrayKeysFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $arguments = [$inArrayFuncCall->args[0], $arrayKeysFuncCall->args[0]]; return new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Name('array_key_exists'), $arguments); } diff --git a/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php b/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php index 927c939e1bd..7aa860986c8 100644 --- a/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php +++ b/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\FuncCall; @@ -64,6 +65,10 @@ CODE_SAMPLE } $array = new \PhpParser\Node\Expr\Array_(); foreach ($node->args as $arg) { + // found non Arg? return early + if (!$arg instanceof \PhpParser\Node\Arg) { + return null; + } $nestedArrayItem = $arg->value; if (!$nestedArrayItem instanceof \PhpParser\Node\Expr\Array_) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php b/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php index bdb230de7e7..caacb041693 100644 --- a/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php +++ b/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\ArrowFunction; use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\FuncCall; @@ -67,7 +68,14 @@ CODE_SAMPLE return null; } // change the node - $firstArgValue = $node->args[0]->value; + if (!isset($node->args[0])) { + return null; + } + $firstArg = $node->args[0]; + if (!$firstArg instanceof \PhpParser\Node\Arg) { + return null; + } + $firstArgValue = $firstArg->value; if ($firstArgValue instanceof \PhpParser\Node\Expr\ArrowFunction) { return $firstArgValue->expr; } diff --git a/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php b/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php index efb4efc5ef9..e80ad3a4062 100644 --- a/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php +++ b/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php @@ -66,9 +66,15 @@ CODE_SAMPLE if (!$parent instanceof \PhpParser\Node\Stmt\Expression) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $arrayDimFetch = new \PhpParser\Node\Expr\ArrayDimFetch($node->args[0]->value); $position = 1; - while (isset($node->args[$position])) { + while (isset($node->args[$position]) && $node->args[$position] instanceof \PhpParser\Node\Arg) { $assign = new \PhpParser\Node\Expr\Assign($arrayDimFetch, $node->args[$position]->value); $assignExpression = new \PhpParser\Node\Stmt\Expression($assign); // keep comments of first line diff --git a/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php b/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php index 2e544932ccf..b00d6405f77 100644 --- a/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php +++ b/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Assign; @@ -89,7 +90,9 @@ CODE_SAMPLE if ($this->compactConverter->hasAllArgumentsNamed($node)) { return $this->compactConverter->convertToArray($node); } - $firstValue = $node->args[0]->value; + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $firstValue = $firstArg->value; $firstValueStaticType = $this->getStaticType($firstValue); if (!$firstValueStaticType instanceof \PHPStan\Type\Constant\ConstantArrayType) { return null; @@ -123,7 +126,9 @@ CODE_SAMPLE } $this->removeNode($assign); $this->arrayCompacter->compactStringToVariableArray($array); - $assignVariable = $funcCall->args[0]->value; + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + $assignVariable = $firstArg->value; $preAssign = new \PhpParser\Node\Expr\Assign($assignVariable, $array); $currentStatement = $funcCall->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT); $this->nodesToAddCollector->addNodeBeforeNode($preAssign, $currentStatement); diff --git a/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php b/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php index 350460e6ecb..4070858022b 100644 --- a/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php +++ b/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php @@ -4,8 +4,10 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -14,6 +16,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class InArrayAndArrayKeysToArrayKeyExistsRector extends \Rector\Core\Rector\AbstractRector { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Simplify `in_array` and `array_keys` functions combination into `array_key_exists` when `array_keys` has one argument only', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample('in_array("key", array_keys($array), true);', 'array_key_exists("key", $array);')]); @@ -33,17 +43,23 @@ final class InArrayAndArrayKeysToArrayKeyExistsRector extends \Rector\Core\Recto if (!$this->isName($node, 'in_array')) { return null; } - $secondArgument = $node->args[1]->value; - if (!$secondArgument instanceof \PhpParser\Node\Expr\FuncCall) { + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1])) { return null; } - if (!$this->isName($secondArgument, 'array_keys')) { + /** @var Arg $secondArgument */ + $secondArgument = $node->args[1]; + if (!$secondArgument->value instanceof \PhpParser\Node\Expr\FuncCall) { return null; } - if (\count($secondArgument->args) > 1) { + if (!$this->isName($secondArgument->value, 'array_keys')) { return null; } + if (\count($secondArgument->value->args) > 1) { + return null; + } + /** @var Arg $keyArg */ $keyArg = $node->args[0]; + /** @var Arg $arrayArg */ $arrayArg = $node->args[1]; /** @var FuncCall $innerFuncCallNode */ $innerFuncCallNode = $arrayArg->value; diff --git a/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php b/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php index 5c951dae62a..269f9802b54 100644 --- a/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php +++ b/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Cast\Int_; use PhpParser\Node\Expr\FuncCall; use Rector\Core\Rector\AbstractRector; @@ -53,13 +54,19 @@ CODE_SAMPLE if (!$this->isName($node, 'intval')) { return null; } - if (isset($node->args[1])) { + if (isset($node->args[1]) && $node->args[1] instanceof \PhpParser\Node\Arg) { $secondArgumentValue = $this->valueResolver->getValue($node->args[1]->value); // default value if ($secondArgumentValue !== 10) { return null; } } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } return new \PhpParser\Node\Expr\Cast\Int_($node->args[0]->value); } } diff --git a/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php b/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php index 3907ece982b..2263de91225 100644 --- a/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php +++ b/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php @@ -55,6 +55,9 @@ CODE_SAMPLE if (isset($node->args[2])) { return null; } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgumentStaticType = $this->getStaticType($node->args[0]->value); if (!$firstArgumentStaticType instanceof \PHPStan\Type\StringType) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php b/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php index edfd7d36dcd..ddd3bc06c6b 100644 --- a/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php +++ b/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php @@ -4,9 +4,11 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; use PHPStan\Type\StringType; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -15,6 +17,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class RemoveSoleValueSprintfRector extends \Rector\Core\Rector\AbstractRector { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Remove sprintf() wrapper if not needed', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -61,14 +71,21 @@ CODE_SAMPLE if (\count($node->args) !== 2) { return null; } - $maskArgument = $node->args[0]->value; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $maskArgument = $firstArg->value; if (!$maskArgument instanceof \PhpParser\Node\Scalar\String_) { return null; } if ($maskArgument->value !== '%s') { return null; } - $valueArgument = $node->args[1]->value; + /** @var Arg $secondArg */ + $secondArg = $node->args[1]; + $valueArgument = $secondArg->value; if (!$this->nodeTypeResolver->isStaticType($valueArgument, \PHPStan\Type\StringType::class)) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php b/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php index 90b096a4162..84a0f066512 100644 --- a/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php @@ -16,6 +16,7 @@ use PhpParser\Node\Expr\Cast\Object_; use PhpParser\Node\Expr\Cast\String_; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Stmt\Expression; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\NodeTypeResolver\Node\AttributeKey; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -31,6 +32,14 @@ final class SetTypeToCastRector extends \Rector\Core\Rector\AbstractRector * @var array> */ private const TYPE_TO_CAST = ['array' => \PhpParser\Node\Expr\Cast\Array_::class, 'bool' => \PhpParser\Node\Expr\Cast\Bool_::class, 'boolean' => \PhpParser\Node\Expr\Cast\Bool_::class, 'double' => \PhpParser\Node\Expr\Cast\Double::class, 'float' => \PhpParser\Node\Expr\Cast\Double::class, 'int' => \PhpParser\Node\Expr\Cast\Int_::class, 'integer' => \PhpParser\Node\Expr\Cast\Int_::class, 'object' => \PhpParser\Node\Expr\Cast\Object_::class, 'string' => \PhpParser\Node\Expr\Cast\String_::class]; + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Changes settype() to (type) where possible', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -72,12 +81,22 @@ CODE_SAMPLE if (!$this->isName($node, 'settype')) { return null; } - $typeNode = $this->valueResolver->getValue($node->args[1]->value); + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 1)) { + return null; + } + /** @var Arg $secondArg */ + $secondArg = $node->args[1]; + $typeNode = $this->valueResolver->getValue($secondArg->value); if ($typeNode === null) { return null; } $typeNode = \strtolower($typeNode); - $varNode = $node->args[0]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $varNode = $firstArg->value; $parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); // result of function or probably used if ($parentNode instanceof \PhpParser\Node\Expr || $parentNode instanceof \PhpParser\Node\Arg) { diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php index dbc4548f55e..e6ec4f7422b 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -32,6 +33,9 @@ final class SimplifyFuncGetArgsCountRector extends \Rector\Core\Rector\AbstractR if (!$this->isName($node, 'count')) { return null; } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$node->args[0]->value instanceof \PhpParser\Node\Expr\FuncCall) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php index 9729a746dd6..a3c42e308af 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -32,6 +33,12 @@ final class SimplifyInArrayValuesRector extends \Rector\Core\Rector\AbstractRect if (!$this->isName($node, 'in_array')) { return null; } + if (!isset($node->args[1])) { + return null; + } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$node->args[1]->value instanceof \PhpParser\Node\Expr\FuncCall) { return null; } @@ -40,6 +47,12 @@ final class SimplifyInArrayValuesRector extends \Rector\Core\Rector\AbstractRect if (!$this->isName($innerFunCall, 'array_values')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $node->args[1] = $innerFunCall->args[0]; return $node; } diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php index 7a920f6a05e..6201d730742 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use Rector\Core\Rector\AbstractRector; @@ -36,6 +37,9 @@ final class SimplifyStrposLowerRector extends \Rector\Core\Rector\AbstractRector if (!isset($node->args[0])) { return null; } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$node->args[0]->value instanceof \PhpParser\Node\Expr\FuncCall) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php b/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php index 4f62e0de277..7d67f79ccff 100644 --- a/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\BinaryOp\Equal; @@ -58,6 +59,12 @@ CODE_SAMPLE if (!$this->isName($node, 'in_array')) { return null; } + if (!isset($node->args[1])) { + return null; + } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$node->args[1]->value instanceof \PhpParser\Node\Expr\Array_) { return null; } @@ -70,6 +77,12 @@ CODE_SAMPLE if (!$firstArrayItem instanceof \PhpParser\Node\Expr\ArrayItem) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArrayItemValue = $firstArrayItem->value; // strict if (isset($node->args[2])) { diff --git a/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php b/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php index 7b365b7bebc..21d4a6e2245 100644 --- a/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php +++ b/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php @@ -4,7 +4,9 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -14,6 +16,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class UnwrapSprintfOneArgumentRector extends \Rector\Core\Rector\AbstractRector { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('unwrap sprintf() with one argument', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -42,9 +52,14 @@ CODE_SAMPLE if (\count($node->args) > 1) { return null; } - if ($node->args[0]->unpack) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { return null; } - return $node->args[0]->value; + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + if ($firstArg->unpack) { + return null; + } + return $firstArg->value; } } diff --git a/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php b/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php index 22057d68d58..05b6e33d6d9 100644 --- a/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php +++ b/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\Identical; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\BooleanNot; @@ -63,6 +64,12 @@ final class GetClassToInstanceOfRector extends \Rector\Core\Rector\AbstractRecto $firstExpr = $twoNodeMatch->getFirstExpr(); /** @var FuncCall $funcCall */ $funcCall = $twoNodeMatch->getSecondExpr(); + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $varNode = $funcCall->args[0]->value; if ($firstExpr instanceof \PhpParser\Node\Scalar\String_) { $className = $this->valueResolver->getValue($firstExpr); diff --git a/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php b/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php index cc9b65228da..8a86a4c9320 100644 --- a/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php +++ b/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php @@ -4,10 +4,12 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\Identical; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -16,6 +18,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class StrlenZeroToIdenticalEmptyStringRector extends \Rector\Core\Rector\AbstractRector { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Changes strlen comparison to 0 to direct empty string compare', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -50,27 +60,46 @@ CODE_SAMPLE */ public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node { - $variable = null; if ($node->left instanceof \PhpParser\Node\Expr\FuncCall) { - if (!$this->isName($node->left, 'strlen')) { - return null; - } - if (!$this->valueResolver->isValue($node->right, 0)) { - return null; - } - $variable = $node->left->args[0]->value; - } elseif ($node->right instanceof \PhpParser\Node\Expr\FuncCall) { - if (!$this->isName($node->right, 'strlen')) { - return null; - } - if (!$this->valueResolver->isValue($node->left, 0)) { - return null; - } - $variable = $node->right->args[0]->value; - } else { + return $this->processLeftIdentical($node, $node->left); + } + if ($node->right instanceof \PhpParser\Node\Expr\FuncCall) { + return $this->processRightIdentical($node, $node->right); + } + return null; + } + private function processLeftIdentical(\PhpParser\Node\Expr\BinaryOp\Identical $identical, \PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\BinaryOp\Identical + { + if (!$this->isName($funcCall, 'strlen')) { return null; } + if (!$this->valueResolver->isValue($identical->right, 0)) { + return null; + } + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($funcCall->args, 0)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; /** @var Expr $variable */ + $variable = $firstArg->value; + return new \PhpParser\Node\Expr\BinaryOp\Identical($variable, new \PhpParser\Node\Scalar\String_('')); + } + private function processRightIdentical(\PhpParser\Node\Expr\BinaryOp\Identical $identical, \PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\BinaryOp\Identical + { + if (!$this->isName($funcCall, 'strlen')) { + return null; + } + if (!$this->valueResolver->isValue($identical->left, 0)) { + return null; + } + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($funcCall->args, 0)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + /** @var Expr $variable */ + $variable = $firstArg->value; return new \PhpParser\Node\Expr\BinaryOp\Identical($variable, new \PhpParser\Node\Scalar\String_('')); } } diff --git a/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php b/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php index e1229dfbae0..ff30811fba5 100644 --- a/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php +++ b/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php @@ -14,6 +14,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt\Else_; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -22,6 +23,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class SimplifyIfIssetToNullCoalescingRector extends \Rector\Core\Rector\AbstractRector { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Simplify binary if to null coalesce', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -90,10 +99,17 @@ CODE_SAMPLE if (!$this->isName($firstAssign->expr, 'array_merge')) { return null; } - if (!$this->nodeComparator->areNodesEqual($firstAssign->expr->args[0]->value, $valueNode)) { + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($firstAssign->expr->args, [0, 1])) { return null; } - if (!$this->nodeComparator->areNodesEqual($secondAssign->expr, $firstAssign->expr->args[1]->value)) { + /** @var Arg $firstArg */ + $firstArg = $firstAssign->expr->args[0]; + if (!$this->nodeComparator->areNodesEqual($firstArg->value, $valueNode)) { + return null; + } + /** @var Arg $secondArg */ + $secondArg = $firstAssign->expr->args[1]; + if (!$this->nodeComparator->areNodesEqual($secondAssign->expr, $secondArg->value)) { return null; } $args = [new \PhpParser\Node\Arg(new \PhpParser\Node\Expr\BinaryOp\Coalesce($valueNode, new \PhpParser\Node\Expr\Array_([]))), new \PhpParser\Node\Arg($secondAssign->expr)]; diff --git a/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php b/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php index efd2f45240b..5929c5e9f1f 100644 --- a/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php +++ b/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodeQuality\Rector\Ternary; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\BinaryOp\Coalesce; use PhpParser\Node\Expr\FuncCall; @@ -78,8 +79,16 @@ CODE_SAMPLE */ private function areArrayKeysExistsArgsMatchingDimFetch(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\ArrayDimFetch $arrayDimFetch) : bool { - $keyExpr = $funcCall->args[0]->value; - $valuesExpr = $funcCall->args[1]->value; + $firstArg = $funcCall->args[0]; + if (!$firstArg instanceof \PhpParser\Node\Arg) { + return \false; + } + $keyExpr = $firstArg->value; + $secondArg = $funcCall->args[1]; + if (!$secondArg instanceof \PhpParser\Node\Arg) { + return \false; + } + $valuesExpr = $secondArg->value; if (!$this->nodeComparator->areNodesEqual($arrayDimFetch->var, $valuesExpr)) { return \false; } diff --git a/rules/CodingStyle/NodeAnalyzer/ImplodeAnalyzer.php b/rules/CodingStyle/NodeAnalyzer/ImplodeAnalyzer.php index dc3a979fb2e..07b818ead35 100644 --- a/rules/CodingStyle/NodeAnalyzer/ImplodeAnalyzer.php +++ b/rules/CodingStyle/NodeAnalyzer/ImplodeAnalyzer.php @@ -3,9 +3,11 @@ declare (strict_types=1); namespace Rector\CodingStyle\NodeAnalyzer; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\NodeNameResolver\NodeNameResolver; final class ImplodeAnalyzer { @@ -13,9 +15,14 @@ final class ImplodeAnalyzer * @var \Rector\NodeNameResolver\NodeNameResolver */ private $nodeNameResolver; - public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->nodeNameResolver = $nodeNameResolver; + $this->argsAnalyzer = $argsAnalyzer; } /** * Matches: "implode('","', $items)" @@ -28,10 +35,15 @@ final class ImplodeAnalyzer if (!$this->nodeNameResolver->isName($expr, 'implode')) { return \false; } - if (!isset($expr->args[1])) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($expr->args, 1)) { return \false; } - $firstArgumentValue = $expr->args[0]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($expr->args, 0)) { + return \false; + } + /** @var Arg $firstArg */ + $firstArg = $expr->args[0]; + $firstArgumentValue = $firstArg->value; if (!$firstArgumentValue instanceof \PhpParser\Node\Scalar\String_) { return \true; } diff --git a/rules/CodingStyle/NodeFactory/JsonArrayFactory.php b/rules/CodingStyle/NodeFactory/JsonArrayFactory.php index 1f1e6de44f0..2fe3a42e82b 100644 --- a/rules/CodingStyle/NodeFactory/JsonArrayFactory.php +++ b/rules/CodingStyle/NodeFactory/JsonArrayFactory.php @@ -5,6 +5,7 @@ namespace Rector\CodingStyle\NodeFactory; use RectorPrefix20210927\Nette\Utils\Json; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; @@ -62,8 +63,14 @@ final class JsonArrayFactory } $placeholderNode = $this->matchPlaceholderNode($onlyItem->value, $placeholderNodes); if ($placeholderNode && $this->implodeAnalyzer->isImplodeToJson($placeholderNode)) { - /** @var FuncCall $placeholderNode */ - return $placeholderNode->args[1]->value; + /** + * @var FuncCall $placeholderNode + * @var Arg $firstArg + * + * Arg check already on $this->implodeAnalyzer->isImplodeToJson() above + */ + $firstArg = $placeholderNode->args[1]; + return $firstArg->value; } } return $this->matchPlaceholderNode($node, $placeholderNodes); diff --git a/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php b/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php index 5953939a3a0..3c06f243ce5 100644 --- a/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php @@ -146,6 +146,9 @@ CODE_SAMPLE if ($position < $firstSpreadParamPosition) { continue; } + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } $variadicArgs[] = $arg; } return $variadicArgs; diff --git a/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php b/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php index 6d98dc7bf29..adf582e958e 100644 --- a/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php +++ b/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodingStyle\Rector\Class_; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\BinaryOp; @@ -16,6 +17,7 @@ use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\PropertyProperty; use PHPStan\Type\Type; use Rector\CodingStyle\TypeAnalyzer\IterableTypeAnalyzer; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\NodeAnalyzer\PropertyFetchAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\NodeTypeResolver\Node\AttributeKey; @@ -35,10 +37,15 @@ final class AddArrayDefaultToArrayPropertyRector extends \Rector\Core\Rector\Abs * @var \Rector\CodingStyle\TypeAnalyzer\IterableTypeAnalyzer */ private $iterableTypeAnalyzer; - public function __construct(\Rector\Core\NodeAnalyzer\PropertyFetchAnalyzer $propertyFetchAnalyzer, \Rector\CodingStyle\TypeAnalyzer\IterableTypeAnalyzer $iterableTypeAnalyzer) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\PropertyFetchAnalyzer $propertyFetchAnalyzer, \Rector\CodingStyle\TypeAnalyzer\IterableTypeAnalyzer $iterableTypeAnalyzer, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->propertyFetchAnalyzer = $propertyFetchAnalyzer; $this->iterableTypeAnalyzer = $iterableTypeAnalyzer; + $this->argsAnalyzer = $argsAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -152,10 +159,12 @@ CODE_SAMPLE if (!$this->isName($node, 'count')) { return null; } - if (!isset($node->args[0])) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { return null; } - $countedArgument = $node->args[0]->value; + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $countedArgument = $firstArg->value; if (!$countedArgument instanceof \PhpParser\Node\Expr\PropertyFetch) { return null; } diff --git a/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php b/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php index fff7b6ee1a0..ddbc1eed313 100644 --- a/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php @@ -11,6 +11,7 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Scalar\String_; use Rector\CodingStyle\NodeFactory\ArrayCallableToMethodCallFactory; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; @@ -28,9 +29,14 @@ final class CallUserFuncArrayToVariadicRector extends \Rector\Core\Rector\Abstra * @var \Rector\CodingStyle\NodeFactory\ArrayCallableToMethodCallFactory */ private $arrayCallableToMethodCallFactory; - public function __construct(\Rector\CodingStyle\NodeFactory\ArrayCallableToMethodCallFactory $arrayCallableToMethodCallFactory) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\CodingStyle\NodeFactory\ArrayCallableToMethodCallFactory $arrayCallableToMethodCallFactory, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->arrayCallableToMethodCallFactory = $arrayCallableToMethodCallFactory; + $this->argsAnalyzer = $argsAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -69,8 +75,15 @@ CODE_SAMPLE if (!$this->isName($node, 'call_user_func_array')) { return null; } - $firstArgValue = $node->args[0]->value; - $secondArgValue = $node->args[1]->value; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $firstArgValue = $firstArg->value; + /** @var Arg $secondArg */ + $secondArg = $node->args[1]; + $secondArgValue = $secondArg->value; if ($firstArgValue instanceof \PhpParser\Node\Scalar\String_) { $functionName = $this->valueResolver->getValue($firstArgValue); return $this->createFuncCall($secondArgValue, $functionName); diff --git a/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php b/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php index b131ea6dc5f..63702574c0e 100644 --- a/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodingStyle\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; @@ -63,6 +64,12 @@ CODE_SAMPLE if (!$this->isName($node, 'call_user_func')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgValue = $node->args[0]->value; if (!$firstArgValue instanceof \PhpParser\Node\Expr\Array_) { return null; diff --git a/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php b/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php index 1ef74dc4aa5..3d0c46775d8 100644 --- a/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php +++ b/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php @@ -7,6 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\NodeTypeResolver\TypeAnalyzer\StringTypeAnalyzer; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -22,9 +23,14 @@ final class ConsistentImplodeRector extends \Rector\Core\Rector\AbstractRector * @var \Rector\NodeTypeResolver\TypeAnalyzer\StringTypeAnalyzer */ private $stringTypeAnalyzer; - public function __construct(\Rector\NodeTypeResolver\TypeAnalyzer\StringTypeAnalyzer $stringTypeAnalyzer) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\NodeTypeResolver\TypeAnalyzer\StringTypeAnalyzer $stringTypeAnalyzer, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->stringTypeAnalyzer = $stringTypeAnalyzer; + $this->argsAnalyzer = $argsAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -75,13 +81,27 @@ CODE_SAMPLE $node->args[0] = new \PhpParser\Node\Arg(new \PhpParser\Node\Scalar\String_('')); return $node; } - $firstArgumentValue = $node->args[0]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { + return null; + } + /** @var Arg $arg0 */ + $arg0 = $node->args[0]; + $firstArgumentValue = $arg0->value; if ($firstArgumentValue instanceof \PhpParser\Node\Scalar\String_) { return null; } - if (\count($node->args) === 2 && $this->stringTypeAnalyzer->isStringOrUnionStringOnlyType($node->args[1]->value)) { - $node->args = \array_reverse($node->args); + if (\count($node->args) !== 2) { + return null; } - return $node; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 1)) { + return null; + } + /** @var Arg $arg1 */ + $arg1 = $node->args[1]; + if ($this->stringTypeAnalyzer->isStringOrUnionStringOnlyType($arg1->value)) { + $node->args = \array_reverse($node->args); + return $node; + } + return null; } } diff --git a/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php b/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php index 0e1e530981e..40df65d1ed8 100644 --- a/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php +++ b/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php @@ -92,6 +92,9 @@ CODE_SAMPLE if (!$this->isName($node->name, $method)) { continue; } + if (!$node->args[$position] instanceof \PhpParser\Node\Arg) { + continue; + } $this->refactorArgument($node->args[$position]); return $node; } @@ -108,6 +111,9 @@ CODE_SAMPLE if (!$this->isName($funcCall, $function)) { continue; } + if (!$funcCall->args[$position] instanceof \PhpParser\Node\Arg) { + continue; + } $this->refactorArgument($funcCall->args[$position]); return $funcCall; } diff --git a/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php b/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php index b66b015f970..bd141059c01 100644 --- a/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodingStyle\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\BinaryOp\Greater; @@ -58,6 +59,12 @@ CODE_SAMPLE if (!$this->isName($node, 'count')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } /** @var Expr $expr */ $expr = $node->args[0]->value; // not pass array type, skip @@ -90,6 +97,12 @@ CODE_SAMPLE if (!$this->isName($booleanNot->expr, 'count')) { return null; } + if (!isset($booleanNot->expr->args[0])) { + return null; + } + if (!$booleanNot->expr->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } /** @var Expr $expr */ $expr = $booleanNot->expr->args[0]->value; // not pass array type, skip diff --git a/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php b/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php index 2028b0c857a..46ed3b400f7 100644 --- a/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php +++ b/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodingStyle\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp\Greater; @@ -17,6 +18,7 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\Util\PhpVersionFactory; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -34,9 +36,14 @@ final class VersionCompareFuncCallToConstantRector extends \Rector\Core\Rector\A * @var \Rector\Core\Util\PhpVersionFactory */ private $phpVersionFactory; - public function __construct(\Rector\Core\Util\PhpVersionFactory $phpVersionFactory) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\Util\PhpVersionFactory $phpVersionFactory, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->phpVersionFactory = $phpVersionFactory; + $this->argsAnalyzer = $argsAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -78,11 +85,16 @@ CODE_SAMPLE if (\count($node->args) !== 3) { return null; } - if (!$this->isPhpVersionConstant($node->args[0]->value) && !$this->isPhpVersionConstant($node->args[1]->value)) { + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1, 2])) { return null; } - $left = $this->getNewNodeForArg($node->args[0]->value); - $right = $this->getNewNodeForArg($node->args[1]->value); + /** @var Arg[] $args */ + $args = $node->args; + if (!$this->isPhpVersionConstant($args[0]->value) && !$this->isPhpVersionConstant($args[1]->value)) { + return null; + } + $left = $this->getNewNodeForArg($args[0]->value); + $right = $this->getNewNodeForArg($args[1]->value); if ($left === null) { return null; } @@ -90,7 +102,7 @@ CODE_SAMPLE return null; } /** @var String_ $operator */ - $operator = $node->args[2]->value; + $operator = $args[2]->value; $comparisonClass = self::OPERATOR_TO_COMPARISON[$operator->value]; return new $comparisonClass($left, $right); } diff --git a/rules/CodingStyle/Rector/MethodCall/UseMessageVariableForSprintfInSymfonyStyleRector.php b/rules/CodingStyle/Rector/MethodCall/UseMessageVariableForSprintfInSymfonyStyleRector.php index 7399db83d81..d921213c9ac 100644 --- a/rules/CodingStyle/Rector/MethodCall/UseMessageVariableForSprintfInSymfonyStyleRector.php +++ b/rules/CodingStyle/Rector/MethodCall/UseMessageVariableForSprintfInSymfonyStyleRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\CodingStyle\Rector\MethodCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; @@ -62,6 +63,9 @@ CODE_SAMPLE if (!isset($node->args[0])) { return null; } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $argValue = $node->args[0]->value; if (!$argValue instanceof \PhpParser\Node\Expr\FuncCall) { return null; @@ -72,6 +76,9 @@ CODE_SAMPLE $messageVariable = new \PhpParser\Node\Expr\Variable('message'); $assign = new \PhpParser\Node\Expr\Assign($messageVariable, $argValue); $this->nodesToAddCollector->addNodeBeforeNode($assign, $node); + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $node->args[0]->value = $messageVariable; return $node; } diff --git a/rules/DeadCode/Comparator/CurrentAndParentClassMethodComparator.php b/rules/DeadCode/Comparator/CurrentAndParentClassMethodComparator.php index 58e086bfab8..ebdd840bd2d 100644 --- a/rules/DeadCode/Comparator/CurrentAndParentClassMethodComparator.php +++ b/rules/DeadCode/Comparator/CurrentAndParentClassMethodComparator.php @@ -7,6 +7,7 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Param; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\VariadicPlaceholder; use PHPStan\Analyser\Scope; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\MethodReflection; @@ -63,7 +64,7 @@ final class CurrentAndParentClassMethodComparator return $this->nodeNameResolver->isName($staticCall->class, 'parent'); } /** - * @param Arg[] $parentStaticCallArgs + * @param Arg[]|VariadicPlaceholder[] $parentStaticCallArgs * @param Param[] $currentClassMethodParams */ private function areArgsAndParamsEqual(array $parentStaticCallArgs, array $currentClassMethodParams) : bool @@ -78,6 +79,9 @@ final class CurrentAndParentClassMethodComparator if (!isset($currentClassMethodParams[$key])) { return \false; } + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } // this only compares variable name, but those can be differnt, so its kinda useless $param = $currentClassMethodParams[$key]; if (!$this->nodeComparator->areNodesEqual($param->var, $arg->value)) { diff --git a/rules/DeadCode/ConditionResolver.php b/rules/DeadCode/ConditionResolver.php index d87e154d599..7ffcb707456 100644 --- a/rules/DeadCode/ConditionResolver.php +++ b/rules/DeadCode/ConditionResolver.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DeadCode; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp\Equal; use PhpParser\Node\Expr\BinaryOp\Identical; @@ -88,7 +89,7 @@ final class ConditionResolver } // includes compare sign as 3rd argument $versionCompareSign = null; - if (isset($funcCall->args[2])) { + if (isset($funcCall->args[2]) && $funcCall->args[2] instanceof \PhpParser\Node\Arg) { $versionCompareSign = $this->valueResolver->getValue($funcCall->args[2]->value); } return new \Rector\DeadCode\ValueObject\VersionCompareCondition($firstVersion, $secondVersion, $versionCompareSign); @@ -104,6 +105,12 @@ final class ConditionResolver } private function resolveArgumentValue(\PhpParser\Node\Expr\FuncCall $funcCall, int $argumentPosition) : ?int { + if (!isset($funcCall->args[$argumentPosition])) { + return null; + } + if (!$funcCall->args[$argumentPosition] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgValue = $funcCall->args[$argumentPosition]->value; /** @var mixed|null $version */ $version = $this->valueResolver->getValue($firstArgValue); diff --git a/rules/DeadCode/NodeManipulator/CountManipulator.php b/rules/DeadCode/NodeManipulator/CountManipulator.php index 0efee9d6c1f..0d932a3364e 100644 --- a/rules/DeadCode/NodeManipulator/CountManipulator.php +++ b/rules/DeadCode/NodeManipulator/CountManipulator.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DeadCode\NodeManipulator; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp\Greater; use PhpParser\Node\Expr\BinaryOp\GreaterOrEqual; @@ -91,6 +92,12 @@ final class CountManipulator if (!$this->nodeNameResolver->isName($node, 'count')) { return \false; } + if (!isset($node->args[0])) { + return \false; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } $countedExpr = $node->args[0]->value; return $this->nodeComparator->areNodesEqual($countedExpr, $expr); } diff --git a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php index 26c5bb785c2..6a7fd1e4d6b 100644 --- a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DeadCode\Rector\Assign; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; @@ -153,6 +154,9 @@ CODE_SAMPLE private function isUsedInAssignExpr($expr, \PhpParser\Node\Expr\Assign $assign) : bool { foreach ($expr->args as $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } $variable = $arg->value; if (!$variable instanceof \PhpParser\Node\Expr\Variable) { continue; diff --git a/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php b/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php index 5d047415317..28d873b627a 100644 --- a/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php +++ b/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DeadCode\Rector\If_; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\ClassLike; @@ -83,6 +84,12 @@ CODE_SAMPLE } /** @var FuncCall $funcCall */ $funcCall = $node->cond; + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $functionToExistName = $this->valueResolver->getValue($funcCall->args[0]->value); if (!\is_string($functionToExistName)) { return null; diff --git a/rules/Defluent/NodeAnalyzer/NewFluentChainMethodCallNodeAnalyzer.php b/rules/Defluent/NodeAnalyzer/NewFluentChainMethodCallNodeAnalyzer.php index dd0edeed6cb..7b4646ec4cb 100644 --- a/rules/Defluent/NodeAnalyzer/NewFluentChainMethodCallNodeAnalyzer.php +++ b/rules/Defluent/NodeAnalyzer/NewFluentChainMethodCallNodeAnalyzer.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace Rector\Defluent\NodeAnalyzer; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; use PHPStan\Type\MixedType; @@ -34,6 +35,12 @@ final class NewFluentChainMethodCallNodeAnalyzer if (\count($methodCall->args) !== 1) { return null; } + if (!isset($methodCall->args[0])) { + return null; + } + if (!$methodCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $onlyArgValue = $methodCall->args[0]->value; if (!$onlyArgValue instanceof \PhpParser\Node\Expr\New_) { return null; diff --git a/rules/DependencyInjection/NodeRemover/ClassMethodNodeRemover.php b/rules/DependencyInjection/NodeRemover/ClassMethodNodeRemover.php index dc36cdcf120..79583efc559 100644 --- a/rules/DependencyInjection/NodeRemover/ClassMethodNodeRemover.php +++ b/rules/DependencyInjection/NodeRemover/ClassMethodNodeRemover.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DependencyInjection\NodeRemover; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Variable; @@ -81,6 +82,9 @@ final class ClassMethodNodeRemover private function removeParamFromArgs(\PhpParser\Node\Expr\StaticCall $staticCall, string $paramName) : void { foreach ($staticCall->args as $key => $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } if (!$this->nodeNameResolver->isName($arg->value, $paramName)) { continue; } diff --git a/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php b/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php index 7803ec4c940..10220575965 100644 --- a/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php +++ b/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp70\Rector\Expression; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Const_; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; @@ -11,6 +12,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Function_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\NodeNestingScope\ParentFinder; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -24,9 +26,14 @@ final class DowngradeDefineArrayConstantRector extends \Rector\Core\Rector\Abstr * @var \Rector\NodeNestingScope\ParentFinder */ private $parentFinder; - public function __construct(\Rector\NodeNestingScope\ParentFinder $parentFinder) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\NodeNestingScope\ParentFinder $parentFinder, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->parentFinder = $parentFinder; + $this->argsAnalyzer = $argsAnalyzer; } /** * @return array> @@ -65,11 +72,13 @@ CODE_SAMPLE if ($this->shouldSkip($funcCall)) { return null; } + /** @var Arg[] $args */ + $args = $funcCall->args; /** @var String_ $arg0 */ - $arg0 = $funcCall->args[0]->value; + $arg0 = $args[0]->value; $arg0Value = $arg0->value; /** @var Array_ $arg1Value */ - $arg1Value = $funcCall->args[1]->value; + $arg1Value = $args[1]->value; return new \PhpParser\Node\Stmt\Const_([new \PhpParser\Node\Const_($arg0Value, $arg1Value)]); } private function shouldSkip(\PhpParser\Node\Expr\FuncCall $funcCall) : bool @@ -78,6 +87,10 @@ CODE_SAMPLE return \true; } $args = $funcCall->args; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($args, [0, 1])) { + return \true; + } + /** @var Arg[] $args */ if (!$args[0]->value instanceof \PhpParser\Node\Scalar\String_) { return \true; } diff --git a/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php b/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php index f17fb1b18b0..14b3b6f84a8 100644 --- a/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php +++ b/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php @@ -49,6 +49,12 @@ CODE_SAMPLE return null; } $currentStatement = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT); + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } /** @var Array_ $options */ $options = $node->args[0]->value; foreach ($options->items as $option) { @@ -77,6 +83,9 @@ CODE_SAMPLE if (!isset($funcCall->args[0])) { return \true; } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return \true; + } return !$funcCall->args[0]->value instanceof \PhpParser\Node\Expr\Array_; } } diff --git a/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php b/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php index 43e90fe5ec8..3d194e42dc7 100644 --- a/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php +++ b/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php @@ -11,6 +11,7 @@ use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Foreach_; +use PhpParser\Node\VariadicPlaceholder; use Rector\Core\Rector\AbstractRector; use Rector\NodeTypeResolver\Node\AttributeKey; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -60,6 +61,7 @@ CODE_SAMPLE foreach ($array->items as $arrayItem) { $args[] = $arrayItem instanceof \PhpParser\Node\Expr\ArrayItem ? new \PhpParser\Node\Arg($arrayItem->value) : null; } + /** @var Arg[]|VariadicPlaceholder[] $args */ return new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Name('list'), $args); } } diff --git a/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php b/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php index b8ed320ad23..3e470f8fa49 100644 --- a/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php +++ b/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp71\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\BooleanOr; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Instanceof_; @@ -55,6 +56,12 @@ CODE_SAMPLE if (!$this->isName($node, 'is_iterable')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } /** @var mixed $arg */ $arg = $node->args[0]->value; $funcCall = $this->nodeFactory->createFuncCall('is_array', [$arg]); diff --git a/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php b/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php index b86c75935f6..4ddca528380 100644 --- a/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php +++ b/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php @@ -61,6 +61,12 @@ CODE_SAMPLE if ($this->shouldSkip($node)) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $tempVariableName = $this->variableNaming->createCountedValueName('callable', $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE)); $tempVariable = new \PhpParser\Node\Expr\Variable($tempVariableName); $expression = new \PhpParser\Node\Stmt\Expression(new \PhpParser\Node\Expr\Assign($tempVariable, $node->args[0]->value)); diff --git a/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php b/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php index 31c2edf3904..7ab20ec7879 100644 --- a/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php +++ b/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp71\Rector\String_; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\BinaryOp\Minus; @@ -85,11 +86,17 @@ CODE_SAMPLE if (!isset($args[2])) { return null; } - if (!$args[2]->value instanceof \PhpParser\Node\Expr\UnaryMinus) { + if ($args[2] instanceof \PhpParser\Node\Arg && !$args[2]->value instanceof \PhpParser\Node\Expr\UnaryMinus) { + return null; + } + if (!$args[0] instanceof \PhpParser\Node\Arg) { + return null; + } + if (!$funcCall->args[2] instanceof \PhpParser\Node\Arg) { return null; } $strlenFuncCall = $this->nodeFactory->createFuncCall('strlen', [$args[0]]); - $funcCall->args[2]->value = new \PhpParser\Node\Expr\BinaryOp\Minus($strlenFuncCall, $args[2]->value->expr); + $funcCall->args[2]->value = new \PhpParser\Node\Expr\BinaryOp\Minus($strlenFuncCall, $funcCall->args[2]->value->expr); return $funcCall; } } diff --git a/rules/DowngradePhp72/NodeAnalyzer/FunctionExistsFunCallAnalyzer.php b/rules/DowngradePhp72/NodeAnalyzer/FunctionExistsFunCallAnalyzer.php index 8239a1f6175..fe9d21c4430 100644 --- a/rules/DowngradePhp72/NodeAnalyzer/FunctionExistsFunCallAnalyzer.php +++ b/rules/DowngradePhp72/NodeAnalyzer/FunctionExistsFunCallAnalyzer.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp72\NodeAnalyzer; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Stmt\If_; @@ -44,6 +45,12 @@ final class FunctionExistsFunCallAnalyzer } /** @var FuncCall $functionExists */ $functionExists = $firstParentIf->cond; + if (!isset($functionExists->args[0])) { + return \false; + } + if (!$functionExists->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } return $this->valueResolver->isValue($functionExists->args[0]->value, $functionName); } } diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php index a34583c589f..135e2f283ac 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php @@ -5,6 +5,7 @@ namespace Rector\DowngradePhp72\Rector\FuncCall; use RectorPrefix20210927\Nette\NotImplementedException; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\BinaryOp\BitwiseOr; @@ -66,7 +67,7 @@ final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rect if (!$this->isRegexFunctionNames($node)) { return null; } - $args = $node->args; + $args = $node->getArgs(); if (!isset($args[3])) { return null; } @@ -75,7 +76,7 @@ final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rect $variable = $args[2]->value; if ($flags instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) { $this->cleanBitWiseOrFlags($node, $flags); - if (!$this->nodeComparator->areNodesEqual($flags, $node->args[3]->value)) { + if (!$this->nodeComparator->areNodesEqual($flags, $args[3]->value)) { return $this->handleEmptyStringToNullMatch($node, $variable); } return null; @@ -193,6 +194,9 @@ CODE_SAMPLE if ($bitwiseOr instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr && $bitwiseOr->left instanceof \PhpParser\Node\Expr\ConstFetch && $this->isName($bitwiseOr->left, self::FLAG)) { $bitwiseOr = $bitwiseOr->right; } + if (!$funcCall->args[3] instanceof \PhpParser\Node\Arg) { + return; + } $funcCall->args[3]->value = $bitwiseOr; } private function handleEmptyStringToNullMatch(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\Variable $variable) : \PhpParser\Node\Expr\FuncCall diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php index a96b2743b65..d3cbb3643c7 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp73\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use Rector\Core\Rector\AbstractRector; @@ -59,16 +60,28 @@ CODE_SAMPLE } return null; } - private function refactorArrayKeyFirst(\PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\FuncCall + private function refactorArrayKeyFirst(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\FuncCall { + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $array = $funcCall->args[0]->value; $resetFuncCall = $this->nodeFactory->createFuncCall('reset', [$array]); $this->nodesToAddCollector->addNodeBeforeNode($resetFuncCall, $funcCall); $funcCall->name = new \PhpParser\Node\Name('key'); return $funcCall; } - private function refactorArrayKeyLast(\PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\FuncCall + private function refactorArrayKeyLast(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\FuncCall { + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $array = $funcCall->args[0]->value; $resetFuncCall = $this->nodeFactory->createFuncCall('end', [$array]); $this->nodesToAddCollector->addNodeBeforeNode($resetFuncCall, $funcCall); diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php index 498a4772219..d39f4e9bd48 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp73\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\BooleanOr; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Instanceof_; @@ -45,6 +46,12 @@ CODE_SAMPLE if (!$this->isName($node, 'is_countable')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $isArrayFuncCall = $this->nodeFactory->createFuncCall('is_array', $node->args); $instanceof = new \PhpParser\Node\Expr\Instanceof_($node->args[0]->value, new \PhpParser\Node\Name\FullyQualified('Countable')); return new \PhpParser\Node\Expr\BinaryOp\BooleanOr($isArrayFuncCall, $instanceof); diff --git a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php index 2a3ab016c76..4645b08503f 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php @@ -11,6 +11,7 @@ use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; use Rector\Core\Exception\ShouldNotHappenException; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -33,6 +34,10 @@ final class SetCookieOptionsArrayToArgumentsRector extends \Rector\Core\Rector\A * @var int */ private $highestIndex = 1; + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Convert setcookie option array to arguments', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -43,6 +48,10 @@ setcookie('name', $value, 360); CODE_SAMPLE )]); } + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } /** * @return array> */ @@ -73,7 +82,7 @@ CODE_SAMPLE if (!isset($funcCall->args[2])) { return \true; } - return !$funcCall->args[2]->value instanceof \PhpParser\Node\Expr\Array_; + return !($funcCall->args[2] instanceof \PhpParser\Node\Arg && $funcCall->args[2]->value instanceof \PhpParser\Node\Expr\Array_); } /** * @return Arg[] @@ -81,9 +90,18 @@ CODE_SAMPLE private function composeNewArgs(\PhpParser\Node\Expr\FuncCall $funcCall) : array { $this->highestIndex = 1; - $newArgs = [$funcCall->args[0], $funcCall->args[1]]; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($funcCall->args, [0, 1, 2])) { + return []; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + /** @var Arg $secondArg */ + $secondArg = $funcCall->args[1]; + $newArgs = [$firstArg, $secondArg]; + /** @var Arg $thirdArg */ + $thirdArg = $funcCall->args[2]; /** @var Array_ $optionsArray */ - $optionsArray = $funcCall->args[2]->value; + $optionsArray = $thirdArg->value; /** @var ArrayItem|null $arrayItem */ foreach ($optionsArray->items as $arrayItem) { if ($arrayItem === null) { diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php index aefdc6f71b9..4f809abc569 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\DowngradePhp74\Rector\ClassMethod; use PhpParser\Node; +use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\NullableType; @@ -143,7 +144,7 @@ CODE_SAMPLE return $node; } /** - * @param \PhpParser\Node\UnionType|\PhpParser\Node\NullableType|\PhpParser\Node\Name|\PhpParser\Node\Identifier $returnTypeNode + * @param \PhpParser\Node\UnionType|\PhpParser\Node\NullableType|\PhpParser\Node\Name|\PhpParser\Node\Identifier|\PhpParser\Node\ComplexType $returnTypeNode */ private function resolveDifferentAncestorReturnType(\PhpParser\Node\Stmt\ClassMethod $classMethod, $returnTypeNode) : \PHPStan\Type\Type { diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php index bd804726808..234f7be8f99 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php @@ -90,7 +90,9 @@ CODE_SAMPLE if ($this->shouldSkipFuncCall($node)) { return null; } - $allowableTagsParam = $node->args[1]->value; + /** @var Arg $secondArg */ + $secondArg = $node->args[1]; + $allowableTagsParam = $secondArg->value; if ($allowableTagsParam instanceof \PhpParser\Node\Expr\Array_) { // If it is an array, convert it to string $newExpr = $this->createArrayFromString($allowableTagsParam); @@ -121,6 +123,12 @@ CODE_SAMPLE if (\count($funcCall->args) < 2) { return \true; } + if (!isset($funcCall->args[1])) { + return \true; + } + if (!$funcCall->args[1] instanceof \PhpParser\Node\Arg) { + return \true; + } // Process anything other than String and null (eg: variables, function calls) $allowableTagsParam = $funcCall->args[1]->value; // Skip for string diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index 6e5a99086a7..bab15b11a8d 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -97,10 +97,11 @@ CODE_SAMPLE */ private function processArgs($node) : ?\PhpParser\Node { - if ($node->args === []) { + $args = $node->getArgs(); + if ($args === []) { return null; } - return $this->cleanTrailingComma($node, $node->args); + return $this->cleanTrailingComma($node, $args); } private function processUses(\PhpParser\Node\Expr\Closure $node) : void { diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php index c0209610b27..9ec771502d1 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php @@ -4,10 +4,12 @@ declare (strict_types=1); namespace Rector\DowngradePhp80\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -18,6 +20,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class DowngradeStrContainsRector extends \Rector\Core\Rector\AbstractRector { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Replace str_contains() with strpos() !== false', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' @@ -57,8 +67,15 @@ CODE_SAMPLE if (!$funcCall instanceof \PhpParser\Node\Expr\FuncCall) { return null; } - $haystack = $funcCall->args[0]->value; - $needle = $funcCall->args[1]->value; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($funcCall->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + $haystack = $firstArg->value; + /** @var Arg $secondArg */ + $secondArg = $funcCall->args[1]; + $needle = $secondArg->value; $funcCall = $this->nodeFactory->createFuncCall('strpos', [$haystack, $needle]); if ($node instanceof \PhpParser\Node\Expr\BooleanNot) { return new \PhpParser\Node\Expr\BinaryOp\Identical($funcCall, $this->nodeFactory->createFalse()); diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php index 972765942ff..d783aebf814 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php @@ -52,8 +52,8 @@ final class DowngradeStrEndsWithRector extends \Rector\Core\Rector\AbstractRecto } private function createSubstrCompareFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\FuncCall { - $args = $funcCall->args; - $strlenFuncCall = $this->createStrlenFuncCall($funcCall->args[1]->value); + $args = $funcCall->getArgs(); + $strlenFuncCall = $this->createStrlenFuncCall($args[1]->value); $args[] = new \PhpParser\Node\Arg(new \PhpParser\Node\Expr\UnaryMinus($strlenFuncCall)); return new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Name('substr_compare'), $args); } diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php index 40d10a3de0b..5b78a0f0d33 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php @@ -77,7 +77,7 @@ CODE_SAMPLE */ public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node { - $args = $node->args; + $args = $node->getArgs(); if ($this->shouldSkip($args)) { return null; } diff --git a/rules/LeagueEvent/Rector/MethodCall/DispatchStringToObjectRector.php b/rules/LeagueEvent/Rector/MethodCall/DispatchStringToObjectRector.php index 522a07e4475..eee1d922979 100644 --- a/rules/LeagueEvent/Rector/MethodCall/DispatchStringToObjectRector.php +++ b/rules/LeagueEvent/Rector/MethodCall/DispatchStringToObjectRector.php @@ -98,11 +98,19 @@ CODE_SAMPLE if (!$this->nodeTypeResolver->isObjectTypes($methodCall->var, [new \PHPStan\Type\ObjectType('League\\Event\\EventDispatcher'), new \PHPStan\Type\ObjectType('League\\Event\\Emitter')])) { return \true; } + if (!isset($methodCall->args[0])) { + return \true; + } + if (!$methodCall->args[0] instanceof \PhpParser\Node\Arg) { + return \true; + } return !$this->getStaticType($methodCall->args[0]->value) instanceof \PHPStan\Type\StringType; } private function updateNode(\PhpParser\Node\Expr\MethodCall $methodCall) : \PhpParser\Node\Expr\MethodCall { - $methodCall->args[0] = new \PhpParser\Node\Arg($this->createNewAnonymousEventClass($methodCall->args[0]->value)); + /** @var Arg $firstArg */ + $firstArg = $methodCall->args[0]; + $methodCall->args[0] = new \PhpParser\Node\Arg($this->createNewAnonymousEventClass($firstArg->value)); return $methodCall; } private function createNewAnonymousEventClass(\PhpParser\Node\Expr $expr) : \PhpParser\Node\Expr\New_ diff --git a/rules/MockeryToProphecy/Collector/MockVariableCollector.php b/rules/MockeryToProphecy/Collector/MockVariableCollector.php index 9930c3c3030..e3e70576b63 100644 --- a/rules/MockeryToProphecy/Collector/MockVariableCollector.php +++ b/rules/MockeryToProphecy/Collector/MockVariableCollector.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace Rector\MockeryToProphecy\Collector; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\StaticCall; @@ -43,6 +44,12 @@ final class MockVariableCollector $variable = $parentNode->var; /** @var string $variableName */ $variableName = $this->nodeNameResolver->getName($variable); + if (!isset($node->args[0])) { + return []; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return []; + } $type = $node->args[0]->value; $mockedType = $this->valueResolver->getValue($type); $mockVariableTypesByNames[$variableName] = $mockedType; diff --git a/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php b/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php index a729f115e97..457ccffe766 100644 --- a/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php +++ b/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\MysqlToMysqli\Rector\Assign; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; @@ -111,7 +112,7 @@ CODE_SAMPLE private function processMysqlResult(\PhpParser\Node\Expr\Assign $assign, \PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\FuncCall { $fetchField = null; - if (isset($funcCall->args[2])) { + if (isset($funcCall->args[2]) && $funcCall->args[2] instanceof \PhpParser\Node\Arg) { $fetchField = $funcCall->args[2]->value; unset($funcCall->args[2]); } diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php index 269c0eabb05..57905b26cc9 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php @@ -44,7 +44,7 @@ CODE_SAMPLE /** * @param FuncCall $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\FuncCall { if ($this->isName($node, 'mysql_create_db')) { return $this->processMysqlCreateDb($node); @@ -56,25 +56,37 @@ CODE_SAMPLE $node->name = new \PhpParser\Node\Name(self::MYSQLI_QUERY); $node->args[0] = new \PhpParser\Node\Arg(new \PhpParser\Node\Scalar\String_('SHOW DATABASES')); } - if ($this->isName($node, 'mysql_list_fields')) { + if ($this->isName($node, 'mysql_list_fields') && $node->args[0] instanceof \PhpParser\Node\Arg && $node->args[1] instanceof \PhpParser\Node\Arg) { $node->name = new \PhpParser\Node\Name(self::MYSQLI_QUERY); $node->args[0]->value = $this->joinStringWithNode('SHOW COLUMNS FROM', $node->args[1]->value); unset($node->args[1]); } - if ($this->isName($node, 'mysql_list_tables')) { + if ($this->isName($node, 'mysql_list_tables') && $node->args[0] instanceof \PhpParser\Node\Arg) { $node->name = new \PhpParser\Node\Name(self::MYSQLI_QUERY); $node->args[0]->value = $this->joinStringWithNode('SHOW TABLES FROM', $node->args[0]->value); } return $node; } - private function processMysqlCreateDb(\PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\FuncCall + private function processMysqlCreateDb(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\FuncCall { + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $funcCall->name = new \PhpParser\Node\Name(self::MYSQLI_QUERY); $funcCall->args[0]->value = $this->joinStringWithNode('CREATE DATABASE', $funcCall->args[0]->value); return $funcCall; } - private function processMysqlDropDb(\PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\FuncCall + private function processMysqlDropDb(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\FuncCall { + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $funcCall->name = new \PhpParser\Node\Name(self::MYSQLI_QUERY); $funcCall->args[0]->value = $this->joinStringWithNode('DROP DATABASE', $funcCall->args[0]->value); return $funcCall; diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php index f35da3d45c7..e15ef052c32 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\MysqlToMysqli\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp\Concat; use PhpParser\Node\Expr\FuncCall; @@ -55,6 +56,12 @@ CODE_SAMPLE if (!$this->isName($node, 'mysql_pconnect')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $node->name = new \PhpParser\Node\Name('mysqli_connect'); $node->args[0]->value = $this->joinStringWithNode('p:', $node->args[0]->value); return $node; diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php index 7654556184e..12e2fd31e45 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php @@ -80,13 +80,14 @@ CODE_SAMPLE if (!$this->isName($node, $oldFunction)) { continue; } - if ($node->args === [] || !$this->isProbablyMysql($node->args[0]->value)) { + $args = $node->getArgs(); + if ($args === [] || !$this->isProbablyMysql($args[0]->value)) { $connectionVariable = $this->findConnectionVariable($node); $this->removeExistingConnectionParameter($node); if (!$connectionVariable instanceof \PhpParser\Node\Expr) { return null; } - $node->args = \array_merge([new \PhpParser\Node\Arg($connectionVariable)], $node->args); + $node->args = \array_merge([new \PhpParser\Node\Arg($connectionVariable)], $node->getArgs()); } $node->name = new \PhpParser\Node\Name($newFunction); return $node; diff --git a/rules/Naming/Naming/VariableNaming.php b/rules/Naming/Naming/VariableNaming.php index a7276ca79e2..6b7482e4ed7 100644 --- a/rules/Naming/Naming/VariableNaming.php +++ b/rules/Naming/Naming/VariableNaming.php @@ -197,6 +197,12 @@ final class VariableNaming } private function resolveBareFuncCallArgumentName(\PhpParser\Node\Expr\FuncCall $funcCall, string $fallbackName, string $suffix) : string { + if (!isset($funcCall->args[0])) { + return ''; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return ''; + } $argumentValue = $funcCall->args[0]->value; if ($argumentValue instanceof \PhpParser\Node\Expr\MethodCall || $argumentValue instanceof \PhpParser\Node\Expr\StaticCall) { $name = $this->nodeNameResolver->getName($argumentValue->name); diff --git a/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php b/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php index e5dc2adabeb..433696419b4 100644 --- a/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php +++ b/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php53\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\MagicConst\Dir; use PhpParser\Node\Scalar\MagicConst\File; @@ -57,6 +58,12 @@ CODE_SAMPLE if (\count($node->args) !== 1) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgValue = $node->args[0]->value; if (!$firstArgValue instanceof \PhpParser\Node\Scalar\MagicConst\File) { return null; diff --git a/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php b/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php index e031447c899..862c634076a 100644 --- a/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php +++ b/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php54\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; @@ -54,6 +55,9 @@ CODE_SAMPLE public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall { foreach ($node->args as $nodeArg) { + if (!$nodeArg instanceof \PhpParser\Node\Arg) { + continue; + } if ($nodeArg->byRef) { $nodeArg->byRef = \false; } diff --git a/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php b/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php index ff1f9a7a897..5fff032ebdf 100644 --- a/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php +++ b/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php @@ -4,10 +4,12 @@ declare (strict_types=1); namespace Rector\Php55\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; use Rector\Php55\RegexMatcher; @@ -30,10 +32,15 @@ final class PregReplaceEModifierRector extends \Rector\Core\Rector\AbstractRecto * @var \Rector\Php55\RegexMatcher */ private $regexMatcher; - public function __construct(\Rector\Php72\NodeFactory\AnonymousFunctionFactory $anonymousFunctionFactory, \Rector\Php55\RegexMatcher $regexMatcher) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Php72\NodeFactory\AnonymousFunctionFactory $anonymousFunctionFactory, \Rector\Php55\RegexMatcher $regexMatcher, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->anonymousFunctionFactory = $anonymousFunctionFactory; $this->regexMatcher = $regexMatcher; + $this->argsAnalyzer = $argsAnalyzer; } public function provideMinPhpVersion() : int { @@ -78,19 +85,26 @@ CODE_SAMPLE if (!$this->isName($node, 'preg_replace')) { return null; } - $firstArgumentValue = $node->args[0]->value; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1])) { + return null; + } + /** @var Arg $firstArgument */ + $firstArgument = $node->args[0]; + $firstArgumentValue = $firstArgument->value; $patternWithoutE = $this->regexMatcher->resolvePatternExpressionWithoutEIfFound($firstArgumentValue); if (!$patternWithoutE instanceof \PhpParser\Node\Expr) { return null; } - $secondArgumentValue = $node->args[1]->value; + /** @var Arg $secondArgument */ + $secondArgument = $node->args[1]; + $secondArgumentValue = $secondArgument->value; $anonymousFunction = $this->anonymousFunctionFactory->createAnonymousFunctionFromString($secondArgumentValue); if (!$anonymousFunction instanceof \PhpParser\Node\Expr\Closure) { return null; } $node->name = new \PhpParser\Node\Name('preg_replace_callback'); - $node->args[0]->value = $patternWithoutE; - $node->args[1]->value = $anonymousFunction; + $firstArgument->value = $patternWithoutE; + $secondArgument->value = $anonymousFunction; return $node; } } diff --git a/rules/Php56/Rector/FuncCall/PowToExpRector.php b/rules/Php56/Rector/FuncCall/PowToExpRector.php index 23bbe0fb1b5..789b34bb49b 100644 --- a/rules/Php56/Rector/FuncCall/PowToExpRector.php +++ b/rules/Php56/Rector/FuncCall/PowToExpRector.php @@ -4,8 +4,10 @@ declare (strict_types=1); namespace Rector\Php56\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\Pow; use PhpParser\Node\Expr\FuncCall; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; @@ -16,6 +18,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class PowToExpRector extends \Rector\Core\Rector\AbstractRector implements \Rector\VersionBonding\Contract\MinPhpVersionInterface { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Changes pow(val, val2) to ** (exp) parameter', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample('pow(1, 2);', '1**2;')]); @@ -38,9 +48,14 @@ final class PowToExpRector extends \Rector\Core\Rector\AbstractRector implements if (\count($node->args) !== 2) { return null; } - $firstArgument = $node->args[0]->value; - $secondArgument = $node->args[1]->value; - return new \PhpParser\Node\Expr\BinaryOp\Pow($firstArgument, $secondArgument); + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1])) { + return null; + } + /** @var Arg $firstArgument */ + $firstArgument = $node->args[0]; + /** @var Arg $secondArgument */ + $secondArgument = $node->args[1]; + return new \PhpParser\Node\Expr\BinaryOp\Pow($firstArgument->value, $secondArgument->value); } public function provideMinPhpVersion() : int { diff --git a/rules/Php70/Rector/FuncCall/CallUserMethodRector.php b/rules/Php70/Rector/FuncCall/CallUserMethodRector.php index 3c45ea21a5b..636ce7340c1 100644 --- a/rules/Php70/Rector/FuncCall/CallUserMethodRector.php +++ b/rules/Php70/Rector/FuncCall/CallUserMethodRector.php @@ -46,7 +46,7 @@ final class CallUserMethodRector extends \Rector\Core\Rector\AbstractRector impl } $newName = self::OLD_TO_NEW_FUNCTIONS[$this->getName($node)]; $node->name = new \PhpParser\Node\Name($newName); - $oldArgs = $node->args; + $oldArgs = $node->getArgs(); unset($node->args[1]); $newArgs = [$this->nodeFactory->createArg([$oldArgs[1]->value, $oldArgs[0]->value])]; unset($oldArgs[0]); diff --git a/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php b/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php index b9a9283ae32..74da992f8c4 100644 --- a/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php +++ b/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php @@ -14,6 +14,7 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; use Rector\NodeTypeResolver\Node\AttributeKey; @@ -36,9 +37,14 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp * @var \Rector\Php70\EregToPcreTransformer */ private $eregToPcreTransformer; - public function __construct(\Rector\Php70\EregToPcreTransformer $eregToPcreTransformer) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Php70\EregToPcreTransformer $eregToPcreTransformer, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->eregToPcreTransformer = $eregToPcreTransformer; + $this->argsAnalyzer = $argsAnalyzer; } public function provideMinPhpVersion() : int { @@ -55,19 +61,30 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp { return [\PhpParser\Node\Expr\FuncCall::class]; } + private function shouldSkip(\PhpParser\Node\Expr\FuncCall $funcCall) : bool + { + $functionName = $this->getName($funcCall); + if ($functionName === null) { + return \true; + } + if (!isset(self::OLD_NAMES_TO_NEW_ONES[$functionName])) { + return \true; + } + return !$this->argsAnalyzer->isArgInstanceInArgsPosition($funcCall->args, 0); + } /** * @param FuncCall $node */ public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node { + if ($this->shouldSkip($node)) { + return null; + } + /** @var string $functionName */ $functionName = $this->getName($node); - if ($functionName === null) { - return null; - } - if (!isset(self::OLD_NAMES_TO_NEW_ONES[$functionName])) { - return null; - } - $patternNode = $node->args[0]->value; + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $patternNode = $firstArg->value; if ($patternNode instanceof \PhpParser\Node\Scalar\String_) { $this->processStringPattern($node, $patternNode, $functionName); } elseif ($patternNode instanceof \PhpParser\Node\Expr\Variable) { @@ -76,7 +93,7 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp $this->processSplitLimitArgument($node, $functionName); $node->name = new \PhpParser\Node\Name(self::OLD_NAMES_TO_NEW_ONES[$functionName]); // ereg|eregi 3rd argument return value fix - if (\in_array($functionName, ['ereg', 'eregi'], \true) && isset($node->args[2])) { + if (\in_array($functionName, ['ereg', 'eregi'], \true) && isset($node->args[2]) && $node->args[2] instanceof \PhpParser\Node\Arg) { $parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if ($parentNode instanceof \PhpParser\Node\Expr\Assign) { return $this->createTernaryWithStrlenOfFirstMatch($node); @@ -88,7 +105,9 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp { $pattern = $string->value; $pattern = $this->eregToPcreTransformer->transform($pattern, $this->isCaseInsensitiveFunction($functionName)); - $funcCall->args[0]->value = new \PhpParser\Node\Scalar\String_($pattern); + /** @var Arg $arg */ + $arg = $funcCall->args[0]; + $arg->value = new \PhpParser\Node\Scalar\String_($pattern); } private function processVariablePattern(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr\Variable $variable, string $functionName) : void { @@ -96,7 +115,9 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp $startConcat = new \PhpParser\Node\Expr\BinaryOp\Concat(new \PhpParser\Node\Scalar\String_('#'), $pregQuotePatternNode); $endDelimiter = $this->isCaseInsensitiveFunction($functionName) ? '#mi' : '#m'; $concat = new \PhpParser\Node\Expr\BinaryOp\Concat($startConcat, new \PhpParser\Node\Scalar\String_($endDelimiter)); - $funcCall->args[0]->value = $concat; + /** @var Arg $arg */ + $arg = $funcCall->args[0]; + $arg->value = $concat; } /** * Equivalent of: @@ -106,6 +127,12 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp */ private function processSplitLimitArgument(\PhpParser\Node\Expr\FuncCall $funcCall, string $functionName) : void { + if (!isset($funcCall->args[2])) { + return; + } + if (!$funcCall->args[2] instanceof \PhpParser\Node\Arg) { + return; + } if (\strncmp($functionName, 'split', \strlen('split')) !== 0) { return; } @@ -125,7 +152,9 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp } private function createTernaryWithStrlenOfFirstMatch(\PhpParser\Node\Expr\FuncCall $funcCall) : \PhpParser\Node\Expr\Ternary { - $arrayDimFetch = new \PhpParser\Node\Expr\ArrayDimFetch($funcCall->args[2]->value, new \PhpParser\Node\Scalar\LNumber(0)); + /** @var Arg $thirdArg */ + $thirdArg = $funcCall->args[2]; + $arrayDimFetch = new \PhpParser\Node\Expr\ArrayDimFetch($thirdArg->value, new \PhpParser\Node\Scalar\LNumber(0)); $strlenFuncCall = $this->nodeFactory->createFuncCall('strlen', [$arrayDimFetch]); return new \PhpParser\Node\Expr\Ternary($funcCall, $strlenFuncCall, $this->nodeFactory->createFalse()); } diff --git a/rules/Php70/Rector/FuncCall/MultiDirnameRector.php b/rules/Php70/Rector/FuncCall/MultiDirnameRector.php index 2233bb5215b..3e142a1c9dc 100644 --- a/rules/Php70/Rector/FuncCall/MultiDirnameRector.php +++ b/rules/Php70/Rector/FuncCall/MultiDirnameRector.php @@ -67,21 +67,22 @@ final class MultiDirnameRector extends \Rector\Core\Rector\AbstractRector implem if (!$this->isName($funcCall, self::DIRNAME)) { return null; } - if (\count($funcCall->args) >= 3) { + $args = $funcCall->getArgs(); + if (\count($args) >= 3) { return null; } // dirname($path, ); - if (\count($funcCall->args) === 2) { - if (!$funcCall->args[1]->value instanceof \PhpParser\Node\Scalar\LNumber) { + if (\count($args) === 2) { + if (!$args[1]->value instanceof \PhpParser\Node\Scalar\LNumber) { return null; } /** @var LNumber $levelNumber */ - $levelNumber = $funcCall->args[1]->value; + $levelNumber = $args[1]->value; $this->nestingLevel += $levelNumber->value; } else { ++$this->nestingLevel; } - $nestedFuncCallNode = $funcCall->args[0]->value; + $nestedFuncCallNode = $args[0]->value; if (!$nestedFuncCallNode instanceof \PhpParser\Node\Expr\FuncCall) { return null; } diff --git a/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php b/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php index e85475bc7e9..879d22af9a3 100644 --- a/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php +++ b/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php70\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\Assign; @@ -20,6 +21,7 @@ use PHPStan\Analyser\MutatingScope; use PHPStan\Analyser\Scope; use PHPStan\Reflection\ParameterReflection; use PHPStan\Type\MixedType; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\Reflection\ReflectionResolver; use Rector\Core\ValueObject\PhpVersionFeature; @@ -49,11 +51,16 @@ final class NonVariableToVariableOnFunctionCallRector extends \Rector\Core\Recto * @var \Rector\Core\Reflection\ReflectionResolver */ private $reflectionResolver; - public function __construct(\Rector\Naming\Naming\VariableNaming $variableNaming, \Rector\NodeNestingScope\ParentScopeFinder $parentScopeFinder, \Rector\Core\Reflection\ReflectionResolver $reflectionResolver) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Naming\Naming\VariableNaming $variableNaming, \Rector\NodeNestingScope\ParentScopeFinder $parentScopeFinder, \Rector\Core\Reflection\ReflectionResolver $reflectionResolver, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->variableNaming = $variableNaming; $this->parentScopeFinder = $parentScopeFinder; $this->reflectionResolver = $reflectionResolver; + $this->argsAnalyzer = $argsAnalyzer; } public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition { @@ -88,6 +95,9 @@ final class NonVariableToVariableOnFunctionCallRector extends \Rector\Core\Recto return null; } foreach ($arguments as $key => $argument) { + if (!$node->args[$key] instanceof \PhpParser\Node\Arg) { + continue; + } $replacements = $this->getReplacementsFor($argument, $currentScope, $scopeNode); $current = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT); $currentStatement = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT); @@ -114,13 +124,15 @@ final class NonVariableToVariableOnFunctionCallRector extends \Rector\Core\Recto /** @var ParameterReflection $parameterReflection */ foreach ($parametersAcceptor->getParameters() as $key => $parameterReflection) { // omitted optional parameter - if (!isset($call->args[$key])) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($call->args, $key)) { continue; } if ($parameterReflection->passedByReference()->no()) { continue; } - $argument = $call->args[$key]->value; + /** @var Arg $arg */ + $arg = $call->args[$key]; + $argument = $arg->value; if ($this->isVariableLikeNode($argument)) { continue; } diff --git a/rules/Php71/IsArrayAndDualCheckToAble.php b/rules/Php71/IsArrayAndDualCheckToAble.php index e1783827985..824e4a42716 100644 --- a/rules/Php71/IsArrayAndDualCheckToAble.php +++ b/rules/Php71/IsArrayAndDualCheckToAble.php @@ -48,6 +48,12 @@ final class IsArrayAndDualCheckToAble if (!$this->nodeNameResolver->isName($funcCall, 'is_array')) { return null; } + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } // both use same var if (!$funcCall->args[0]->value instanceof \PhpParser\Node\Expr\Variable) { return null; diff --git a/rules/Php71/Rector/FuncCall/CountOnNullRector.php b/rules/Php71/Rector/FuncCall/CountOnNullRector.php index 69ecb0ecf4c..ca82f29910d 100644 --- a/rules/Php71/Rector/FuncCall/CountOnNullRector.php +++ b/rules/Php71/Rector/FuncCall/CountOnNullRector.php @@ -82,7 +82,9 @@ CODE_SAMPLE if ($this->shouldSkip($node)) { return null; } - $countedNode = $node->args[0]->value; + /** @var Arg $arg0 */ + $arg0 = $node->args[0]; + $countedNode = $arg0->value; if ($this->countableTypeAnalyzer->isCountableType($countedNode)) { return null; } @@ -122,6 +124,9 @@ CODE_SAMPLE if (!isset($funcCall->args[0])) { return \true; } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return \true; + } if ($funcCall->args[0]->value instanceof \PhpParser\Node\Expr\ClassConstFetch) { return \true; } diff --git a/rules/Php72/NodeFactory/AnonymousFunctionFactory.php b/rules/Php72/NodeFactory/AnonymousFunctionFactory.php index f2dd386c05f..54d78adfd5e 100644 --- a/rules/Php72/NodeFactory/AnonymousFunctionFactory.php +++ b/rules/Php72/NodeFactory/AnonymousFunctionFactory.php @@ -5,6 +5,7 @@ namespace Rector\Php72\NodeFactory; use RectorPrefix20210927\Nette\Utils\Strings; use PhpParser\Node; +use PhpParser\Node\ComplexType; use PhpParser\Node\Expr; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\Assign; @@ -84,7 +85,7 @@ final class AnonymousFunctionFactory /** * @param Param[] $params * @param Stmt[] $stmts - * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|null $returnTypeNode + * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\ComplexType|null $returnTypeNode */ public function create(array $params, array $stmts, $returnTypeNode) : \PhpParser\Node\Expr\Closure { diff --git a/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php b/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php index a8679760b55..d8444a13f97 100644 --- a/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php +++ b/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php @@ -64,6 +64,12 @@ CODE_SAMPLE } /** @var FuncCall $eachFuncCall */ $eachFuncCall = $node->expr; + if (!isset($eachFuncCall->args[0])) { + return null; + } + if (!$eachFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $eachedVariable = $eachFuncCall->args[0]->value; $assignVariable = $node->var; $newNodes = $this->createNewNodes($assignVariable, $eachedVariable); diff --git a/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php b/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php index a45e1e93f05..cffe2117828 100644 --- a/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php +++ b/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php @@ -17,6 +17,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Expression; use Rector\Core\Exception\ShouldNotHappenException; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Php\ReservedKeywordAnalyzer; use Rector\Core\PhpParser\Parser\InlineCodeParser; use Rector\Core\Rector\AbstractRector; @@ -44,11 +45,16 @@ final class CreateFunctionToAnonymousFunctionRector extends \Rector\Core\Rector\ * @var \Rector\Core\Php\ReservedKeywordAnalyzer */ private $reservedKeywordAnalyzer; - public function __construct(\Rector\Core\PhpParser\Parser\InlineCodeParser $inlineCodeParser, \Rector\Php72\NodeFactory\AnonymousFunctionFactory $anonymousFunctionFactory, \Rector\Core\Php\ReservedKeywordAnalyzer $reservedKeywordAnalyzer) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\PhpParser\Parser\InlineCodeParser $inlineCodeParser, \Rector\Php72\NodeFactory\AnonymousFunctionFactory $anonymousFunctionFactory, \Rector\Core\Php\ReservedKeywordAnalyzer $reservedKeywordAnalyzer, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->inlineCodeParser = $inlineCodeParser; $this->anonymousFunctionFactory = $anonymousFunctionFactory; $this->reservedKeywordAnalyzer = $reservedKeywordAnalyzer; + $this->argsAnalyzer = $argsAnalyzer; } public function provideMinPhpVersion() : int { @@ -94,8 +100,15 @@ CODE_SAMPLE if (!$this->isName($node, 'create_function')) { return null; } - $params = $this->createParamsFromString($node->args[0]->value); - $stmts = $this->parseStringToBody($node->args[1]->value); + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($node->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + /** @var Arg $secondArg */ + $secondArg = $node->args[1]; + $params = $this->createParamsFromString($firstArg->value); + $stmts = $this->parseStringToBody($secondArg->value); $refactored = $this->anonymousFunctionFactory->create($params, $stmts, null); foreach ($refactored->uses as $key => $use) { $variableName = $this->getName($use->var); diff --git a/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php b/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php index 0bec173a37a..de6f39e1be9 100644 --- a/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php +++ b/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php72\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\FuncCall; @@ -67,6 +68,12 @@ CODE_SAMPLE if (!$this->isName($node, 'get_class')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgValue = $node->args[0]->value; // only relevant inside the class $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); @@ -121,6 +128,12 @@ CODE_SAMPLE if (!$ternary->cond instanceof \PhpParser\Node\Expr\BinaryOp\Identical) { return \false; } + if (!isset($funcCall->args[0])) { + return \false; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } if ($this->nodeComparator->areNodesEqual($ternary->cond->left, $funcCall->args[0]->value) && !$this->valueResolver->isNull($ternary->cond->right)) { return \true; } @@ -137,6 +150,12 @@ CODE_SAMPLE if (!$ternary->cond instanceof \PhpParser\Node\Expr\BinaryOp\NotIdentical) { return \false; } + if (!isset($funcCall->args[0])) { + return \false; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } if ($this->nodeComparator->areNodesEqual($ternary->cond->left, $funcCall->args[0]->value) && $this->valueResolver->isNull($ternary->cond->right)) { return \true; } diff --git a/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php b/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php index 4c3ad14b161..c1ce40d791b 100644 --- a/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php +++ b/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php72\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; use PHPStan\Type\ObjectType; @@ -52,6 +53,12 @@ CODE_SAMPLE return null; } $incompleteClassObjectType = new \PHPStan\Type\ObjectType('__PHP_Incomplete_Class'); + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$this->isObjectType($node->args[0]->value, $incompleteClassObjectType)) { return null; } diff --git a/rules/Php72/Rector/FuncCall/StringifyDefineRector.php b/rules/Php72/Rector/FuncCall/StringifyDefineRector.php index f3299069c56..22293bbd285 100644 --- a/rules/Php72/Rector/FuncCall/StringifyDefineRector.php +++ b/rules/Php72/Rector/FuncCall/StringifyDefineRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php72\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; @@ -70,6 +71,12 @@ CODE_SAMPLE if (!$this->isName($node, 'define')) { return null; } + if (!isset($node->args[0])) { + return null; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } if ($this->stringTypeAnalyzer->isStringOrUnionStringOnlyType($node->args[0]->value)) { return null; } diff --git a/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php b/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php index 5c10d4e029c..04eb6e0e4c9 100644 --- a/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php +++ b/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php @@ -66,6 +66,9 @@ CODE_SAMPLE if (!$this->isName($node, 'assert')) { return null; } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$node->args[0]->value instanceof \PhpParser\Node\Scalar\String_) { return null; } diff --git a/rules/Php72/Rector/While_/WhileEachToForeachRector.php b/rules/Php72/Rector/While_/WhileEachToForeachRector.php index a1c34e476e7..4db0a219b03 100644 --- a/rules/Php72/Rector/While_/WhileEachToForeachRector.php +++ b/rules/Php72/Rector/While_/WhileEachToForeachRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php72\Rector\While_; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; @@ -83,6 +84,12 @@ CODE_SAMPLE $eachFuncCall = $assignNode->expr; /** @var List_ $listNode */ $listNode = $assignNode->var; + if (!isset($eachFuncCall->args[0])) { + return null; + } + if (!$eachFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $foreachedExpr = \count($listNode->items) === 1 ? $this->nodeFactory->createFuncCall('array_keys', [$eachFuncCall->args[0]]) : $eachFuncCall->args[0]->value; /** @var ArrayItem $arrayItem */ $arrayItem = \array_pop($listNode->items); diff --git a/rules/Php73/Rector/FuncCall/SetCookieRector.php b/rules/Php73/Rector/FuncCall/SetCookieRector.php index c8e5dc92a2c..c294c21e1e7 100644 --- a/rules/Php73/Rector/FuncCall/SetCookieRector.php +++ b/rules/Php73/Rector/FuncCall/SetCookieRector.php @@ -77,11 +77,11 @@ CODE_SAMPLE if ($argsCount <= 2) { return \true; } - if ($funcCall->args[2]->value instanceof \PhpParser\Node\Expr\Array_) { + if ($funcCall->args[2] instanceof \PhpParser\Node\Arg && $funcCall->args[2]->value instanceof \PhpParser\Node\Expr\Array_) { return \true; } if ($argsCount === 3) { - return $funcCall->args[2]->value instanceof \PhpParser\Node\Expr\Variable; + return $funcCall->args[2] instanceof \PhpParser\Node\Arg && $funcCall->args[2]->value instanceof \PhpParser\Node\Expr\Variable; } return \false; } @@ -91,7 +91,7 @@ CODE_SAMPLE private function composeNewArgs(\PhpParser\Node\Expr\FuncCall $funcCall) : array { $items = []; - $args = $funcCall->args; + $args = $funcCall->getArgs(); $newArgs = []; $newArgs[] = $args[0]; $newArgs[] = $args[1]; diff --git a/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php b/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php index 2ef00896952..ad39f1ed711 100644 --- a/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php +++ b/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php73\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Cast\String_; use PhpParser\Node\Expr\FuncCall; use Rector\Core\Rector\AbstractRector; @@ -61,6 +62,12 @@ CODE_SAMPLE if (!$this->isNames($node, self::NEEDLE_STRING_SENSITIVE_FUNCTIONS)) { return null; } + if (!isset($node->args[1])) { + return null; + } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } // is argument string? $needleArgNode = $node->args[1]->value; if ($this->nodeTypeAnalyzer->isStringTypeExpr($needleArgNode)) { diff --git a/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php b/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php index 22b0ead554b..4a2f4bbcc57 100644 --- a/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php +++ b/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php74\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use PHPStan\Type\ObjectType; @@ -60,6 +61,12 @@ CODE_SAMPLE if (!$this->isName($node, 'array_key_exists')) { return null; } + if (!isset($node->args[1])) { + return null; + } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgStaticType = $this->getStaticType($node->args[1]->value); if (!$firstArgStaticType instanceof \PHPStan\Type\ObjectType) { return null; diff --git a/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php b/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php index e6cda1d07ff..8a966d1c48f 100644 --- a/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php +++ b/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php74\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; @@ -92,6 +93,9 @@ CODE_SAMPLE { $array = new \PhpParser\Node\Expr\Array_(); foreach ($funcCall->args as $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } // cannot handle unpacked arguments if ($arg->unpack) { return null; @@ -124,8 +128,10 @@ CODE_SAMPLE private function resolveValue(\PhpParser\Node\Expr $expr) : \PhpParser\Node\Expr { if ($expr instanceof \PhpParser\Node\Expr\FuncCall && $this->isIteratorToArrayFuncCall($expr)) { + /** @var Arg $arg */ + $arg = $expr->args[0]; /** @var FuncCall $expr */ - $expr = $expr->args[0]->value; + $expr = $arg->value; } if (!$expr instanceof \PhpParser\Node\Expr\Ternary) { return $expr; @@ -163,6 +169,12 @@ CODE_SAMPLE if (!$expr instanceof \PhpParser\Node\Expr\FuncCall) { return \false; } - return $this->nodeNameResolver->isName($expr, 'iterator_to_array'); + if (!$this->nodeNameResolver->isName($expr, 'iterator_to_array')) { + return \false; + } + if (!isset($expr->args[0])) { + return \false; + } + return $expr->args[0] instanceof \PhpParser\Node\Arg; } } diff --git a/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php b/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php index 4e409c729f2..58651107161 100644 --- a/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php +++ b/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php74\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use Rector\Core\Rector\AbstractRector; @@ -52,6 +53,9 @@ CODE_SAMPLE if (!isset($node->args[1])) { return null; } + if (!$node->args[1] instanceof \PhpParser\Node\Arg) { + return null; + } if (!$this->isName($node->args[1]->value, 'FILTER_SANITIZE_MAGIC_QUOTES')) { return null; } diff --git a/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php b/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php index 4f1078d03b8..ac9c4b5bc9b 100644 --- a/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php +++ b/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php @@ -49,6 +49,9 @@ final class MbStrrposEncodingArgumentPositionRector extends \Rector\Core\Rector\ if (isset($node->args[3])) { return null; } + if (!$node->args[2] instanceof \PhpParser\Node\Arg) { + return null; + } $secondArgType = $this->getStaticType($node->args[2]->value); if ($secondArgType instanceof \PHPStan\Type\IntegerType) { return null; diff --git a/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php b/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php index de706ae0ef8..7fa5e80b025 100644 --- a/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php +++ b/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php @@ -10,6 +10,7 @@ use PhpParser\Node\Expr\New_; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Name; use PHPStan\Type\ObjectType; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; @@ -22,6 +23,14 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class ExportToReflectionFunctionRector extends \Rector\Core\Rector\AbstractRector implements \Rector\VersionBonding\Contract\MinPhpVersionInterface { + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) + { + $this->argsAnalyzer = $argsAnalyzer; + } public function provideMinPhpVersion() : int { return \Rector\Core\ValueObject\PhpVersionFeature::EXPORT_TO_REFLECTION_FUNCTION; @@ -60,8 +69,18 @@ CODE_SAMPLE if (!$this->isName($node->name, 'export')) { return null; } - $new = new \PhpParser\Node\Expr\New_($node->class, [new \PhpParser\Node\Arg($node->args[0]->value)]); - if (isset($node->args[1]) && $this->valueResolver->isTrue($node->args[1]->value)) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $new = new \PhpParser\Node\Expr\New_($node->class, [new \PhpParser\Node\Arg($firstArg->value)]); + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 1)) { + return $new; + } + /** @var Arg $secondArg */ + $secondArg = $node->args[1]; + if ($this->valueResolver->isTrue($secondArg->value)) { return new \PhpParser\Node\Expr\Cast\String_($new); } return $new; diff --git a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php index 6b1e957eca9..b94d9ef82d7 100644 --- a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php +++ b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php @@ -4,12 +4,14 @@ declare (strict_types=1); namespace Rector\Php80\MatchAndRefactor\StrStartsWithMatchAndRefactor; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\NodeNameResolver\NodeNameResolver; use Rector\Php80\Contract\StrStartWithMatchAndRefactorInterface; @@ -38,12 +40,17 @@ final class StrncmpMatchAndRefactor implements \Rector\Php80\Contract\StrStartWi * @var \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory */ private $strStartsWithFuncCallFactory; - public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Php80\ValueObjectFactory\StrStartsWithFactory $strStartsWithFactory, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory $strStartsWithFuncCallFactory) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Php80\ValueObjectFactory\StrStartsWithFactory $strStartsWithFactory, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory $strStartsWithFuncCallFactory, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->nodeNameResolver = $nodeNameResolver; $this->strStartsWithFactory = $strStartsWithFactory; $this->nodeComparator = $nodeComparator; $this->strStartsWithFuncCallFactory = $strStartsWithFuncCallFactory; + $this->argsAnalyzer = $argsAnalyzer; } /** * @param Identical|NotIdentical $binaryOp @@ -79,7 +86,12 @@ final class StrncmpMatchAndRefactor implements \Rector\Php80\Contract\StrStartWi { $strncmpFuncCall = $strStartsWith->getFuncCall(); $needleExpr = $strStartsWith->getNeedleExpr(); - $secondArgumentValue = $strncmpFuncCall->args[2]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($strncmpFuncCall->args, 2)) { + return \false; + } + /** @var Arg $thirdArg */ + $thirdArg = $strncmpFuncCall->args[2]; + $secondArgumentValue = $thirdArg->value; if (!$secondArgumentValue instanceof \PhpParser\Node\Expr\FuncCall) { return \false; } @@ -87,18 +99,30 @@ final class StrncmpMatchAndRefactor implements \Rector\Php80\Contract\StrStartWi return \false; } /** @var FuncCall $strlenFuncCall */ - $strlenFuncCall = $strncmpFuncCall->args[2]->value; - $strlenArgumentValue = $strlenFuncCall->args[0]->value; + $strlenFuncCall = $thirdArg->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($strlenFuncCall->args, 0)) { + return \false; + } + /** @var Arg $firstArg */ + $firstArg = $strlenFuncCall->args[0]; + $strlenArgumentValue = $firstArg->value; return $this->nodeComparator->areNodesEqual($needleExpr, $strlenArgumentValue); } private function isHardcodedStringWithLNumberLength(\Rector\Php80\ValueObject\StrStartsWith $strStartsWith) : bool { $strncmpFuncCall = $strStartsWith->getFuncCall(); - $hardcodedStringNeedle = $strncmpFuncCall->args[1]->value; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($strncmpFuncCall->args, [1, 2])) { + return \false; + } + /** @var Arg $secondArg */ + $secondArg = $strncmpFuncCall->args[1]; + $hardcodedStringNeedle = $secondArg->value; if (!$hardcodedStringNeedle instanceof \PhpParser\Node\Scalar\String_) { return \false; } - $lNumberLength = $strncmpFuncCall->args[2]->value; + /** @var Arg $thirdArg */ + $thirdArg = $strncmpFuncCall->args[2]; + $lNumberLength = $thirdArg->value; if (!$lNumberLength instanceof \PhpParser\Node\Scalar\LNumber) { return \false; } diff --git a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php index d71eb6524ef..b332dd14022 100644 --- a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php +++ b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php @@ -4,12 +4,14 @@ declare (strict_types=1); namespace Rector\Php80\MatchAndRefactor\StrStartsWithMatchAndRefactor; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\PhpParser\Node\Value\ValueResolver; use Rector\NodeNameResolver\NodeNameResolver; use Rector\Php80\Contract\StrStartWithMatchAndRefactorInterface; @@ -29,11 +31,16 @@ final class StrposMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit * @var \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory */ private $strStartsWithFuncCallFactory; - public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver, \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory $strStartsWithFuncCallFactory) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver, \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory $strStartsWithFuncCallFactory, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->nodeNameResolver = $nodeNameResolver; $this->valueResolver = $valueResolver; $this->strStartsWithFuncCallFactory = $strStartsWithFuncCallFactory; + $this->argsAnalyzer = $argsAnalyzer; } /** * @param Identical|NotIdentical $binaryOp @@ -42,26 +49,15 @@ final class StrposMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit { $isPositive = $binaryOp instanceof \PhpParser\Node\Expr\BinaryOp\Identical; if ($binaryOp->left instanceof \PhpParser\Node\Expr\FuncCall && $this->nodeNameResolver->isName($binaryOp->left, 'strpos')) { - if (!$this->valueResolver->isValue($binaryOp->right, 0)) { - return null; - } - /** @var FuncCall $funcCall */ - $funcCall = $binaryOp->left; - $haystack = $funcCall->args[0]->value; - $needle = $funcCall->args[1]->value; - return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $needle, $isPositive); + return $this->processBinaryOpLeft($binaryOp, $isPositive); } - if ($binaryOp->right instanceof \PhpParser\Node\Expr\FuncCall && $this->nodeNameResolver->isName($binaryOp->right, 'strpos')) { - if (!$this->valueResolver->isValue($binaryOp->left, 0)) { - return null; - } - /** @var FuncCall $funcCall */ - $funcCall = $binaryOp->right; - $haystack = $funcCall->args[0]->value; - $needle = $funcCall->args[1]->value; - return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $needle, $isPositive); + if (!$binaryOp->right instanceof \PhpParser\Node\Expr\FuncCall) { + return null; } - return null; + if (!$this->nodeNameResolver->isName($binaryOp->right, 'strpos')) { + return null; + } + return $this->processBinaryOpRight($binaryOp, $isPositive); } /** * @return FuncCall|BooleanNot @@ -73,4 +69,40 @@ final class StrposMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit $strposFuncCall->name = new \PhpParser\Node\Name('str_starts_with'); return $this->strStartsWithFuncCallFactory->createStrStartsWith($strStartsWith); } + private function processBinaryOpLeft(\PhpParser\Node\Expr\BinaryOp $binaryOp, bool $isPositive) : ?\Rector\Php80\ValueObject\StrStartsWith + { + if (!$this->valueResolver->isValue($binaryOp->right, 0)) { + return null; + } + /** @var FuncCall $funcCall */ + $funcCall = $binaryOp->left; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($funcCall->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + $haystack = $firstArg->value; + /** @var Arg $secondArg */ + $secondArg = $funcCall->args[1]; + $needle = $secondArg->value; + return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $needle, $isPositive); + } + private function processBinaryOpRight(\PhpParser\Node\Expr\BinaryOp $binaryOp, bool $isPositive) : ?\Rector\Php80\ValueObject\StrStartsWith + { + if (!$this->valueResolver->isValue($binaryOp->left, 0)) { + return null; + } + /** @var FuncCall $funcCall */ + $funcCall = $binaryOp->right; + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($funcCall->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + $haystack = $firstArg->value; + /** @var Arg $secondArg */ + $secondArg = $funcCall->args[1]; + $needle = $secondArg->value; + return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $needle, $isPositive); + } } diff --git a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php index b72a12f29ab..67dd16b9f14 100644 --- a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php +++ b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php @@ -4,12 +4,14 @@ declare (strict_types=1); namespace Rector\Php80\MatchAndRefactor\StrStartsWithMatchAndRefactor; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\Core\PhpParser\Node\Value\ValueResolver; use Rector\NodeNameResolver\NodeNameResolver; @@ -34,12 +36,17 @@ final class SubstrMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit * @var \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory */ private $strStartsWithFuncCallFactory; - public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory $strStartsWithFuncCallFactory) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Php80\NodeFactory\StrStartsWithFuncCallFactory $strStartsWithFuncCallFactory, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->nodeNameResolver = $nodeNameResolver; $this->valueResolver = $valueResolver; $this->nodeComparator = $nodeComparator; $this->strStartsWithFuncCallFactory = $strStartsWithFuncCallFactory; + $this->argsAnalyzer = $argsAnalyzer; } /** * @param Identical|NotIdentical $binaryOp @@ -50,13 +57,23 @@ final class SubstrMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit if ($binaryOp->left instanceof \PhpParser\Node\Expr\FuncCall && $this->nodeNameResolver->isName($binaryOp->left, 'substr')) { /** @var FuncCall $funcCall */ $funcCall = $binaryOp->left; - $haystack = $funcCall->args[0]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($funcCall->args, 0)) { + return null; + } + /** @var Arg $arg */ + $arg = $funcCall->args[0]; + $haystack = $arg->value; return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $binaryOp->right, $isPositive); } if ($binaryOp->right instanceof \PhpParser\Node\Expr\FuncCall && $this->nodeNameResolver->isName($binaryOp->right, 'substr')) { /** @var FuncCall $funcCall */ $funcCall = $binaryOp->right; - $haystack = $funcCall->args[0]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($funcCall->args, 0)) { + return null; + } + /** @var Arg $arg */ + $arg = $funcCall->args[0]; + $haystack = $arg->value; return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $binaryOp->left, $isPositive); } return null; @@ -77,10 +94,20 @@ final class SubstrMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit private function isStrlenWithNeedleExpr(\Rector\Php80\ValueObject\StrStartsWith $strStartsWith) : bool { $substrFuncCall = $strStartsWith->getFuncCall(); - if (!$this->valueResolver->isValue($substrFuncCall->args[1]->value, 0)) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($substrFuncCall->args, 1)) { return \false; } - $secondFuncCallArgValue = $substrFuncCall->args[2]->value; + /** @var Arg $arg1 */ + $arg1 = $substrFuncCall->args[1]; + if (!$this->valueResolver->isValue($arg1->value, 0)) { + return \false; + } + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($substrFuncCall->args, 2)) { + return \false; + } + /** @var Arg $arg2 */ + $arg2 = $substrFuncCall->args[2]; + $secondFuncCallArgValue = $arg2->value; if (!$secondFuncCallArgValue instanceof \PhpParser\Node\Expr\FuncCall) { return \false; } @@ -88,22 +115,37 @@ final class SubstrMatchAndRefactor implements \Rector\Php80\Contract\StrStartWit return \false; } /** @var FuncCall $strlenFuncCall */ - $strlenFuncCall = $substrFuncCall->args[2]->value; - $needleExpr = $strlenFuncCall->args[0]->value; + $strlenFuncCall = $arg2->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($strlenFuncCall->args, 0)) { + return \false; + } + /** @var Arg $arg0 */ + $arg0 = $strlenFuncCall->args[0]; + $needleExpr = $arg0->value; $comparedNeedleExpr = $strStartsWith->getNeedleExpr(); return $this->nodeComparator->areNodesEqual($needleExpr, $comparedNeedleExpr); } private function isHardcodedStringWithLNumberLength(\Rector\Php80\ValueObject\StrStartsWith $strStartsWith) : bool { $substrFuncCall = $strStartsWith->getFuncCall(); - if (!$this->valueResolver->isValue($substrFuncCall->args[1]->value, 0)) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($substrFuncCall->args, 1)) { + return \false; + } + /** @var Arg $arg1 */ + $arg1 = $substrFuncCall->args[1]; + if (!$this->valueResolver->isValue($arg1->value, 0)) { return \false; } $hardcodedStringNeedle = $strStartsWith->getNeedleExpr(); if (!$hardcodedStringNeedle instanceof \PhpParser\Node\Scalar\String_) { return \false; } - $lNumberLength = $substrFuncCall->args[2]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($substrFuncCall->args, 2)) { + return \false; + } + /** @var Arg $arg2 */ + $arg2 = $substrFuncCall->args[2]; + $lNumberLength = $arg2->value; if (!$lNumberLength instanceof \PhpParser\Node\Scalar\LNumber) { return \false; } diff --git a/rules/Php80/NodeManipulator/TokenManipulator.php b/rules/Php80/NodeManipulator/TokenManipulator.php index 3f6aca3d6c0..b438971c1b8 100644 --- a/rules/Php80/NodeManipulator/TokenManipulator.php +++ b/rules/Php80/NodeManipulator/TokenManipulator.php @@ -18,6 +18,7 @@ use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\If_; use PHPStan\Type\ArrayType; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\Core\PhpParser\Node\Value\ValueResolver; use Rector\NodeNameResolver\NodeNameResolver; @@ -56,7 +57,11 @@ final class TokenManipulator * @var \Rector\Core\PhpParser\Comparing\NodeComparator */ private $nodeComparator; - public function __construct(\RectorPrefix20210927\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\NodeTypeResolver\NodeTypeResolver $nodeTypeResolver, \Rector\PostRector\Collector\NodesToRemoveCollector $nodesToRemoveCollector, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\RectorPrefix20210927\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\NodeTypeResolver\NodeTypeResolver $nodeTypeResolver, \Rector\PostRector\Collector\NodesToRemoveCollector $nodesToRemoveCollector, \Rector\Core\PhpParser\Node\Value\ValueResolver $valueResolver, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser; $this->nodeNameResolver = $nodeNameResolver; @@ -64,6 +69,7 @@ final class TokenManipulator $this->nodesToRemoveCollector = $nodesToRemoveCollector; $this->valueResolver = $valueResolver; $this->nodeComparator = $nodeComparator; + $this->argsAnalyzer = $argsAnalyzer; } /** * @param Node[] $nodes @@ -170,7 +176,12 @@ final class TokenManipulator if (!$this->nodeNameResolver->isName($node, 'is_array')) { return null; } - if (!$this->nodeComparator->areNodesEqual($node->args[0]->value, $singleTokenVariable)) { + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + if (!$this->nodeComparator->areNodesEqual($firstArg->value, $singleTokenVariable)) { return null; } if ($this->shouldSkipNodeRemovalForPartOfIf($node)) { @@ -195,7 +206,12 @@ final class TokenManipulator if (!$this->nodeNameResolver->isName($node, 'token_name')) { return null; } - $possibleTokenArray = $node->args[0]->value; + if (!$this->argsAnalyzer->isArgInstanceInArgsPosition($node->args, 0)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $node->args[0]; + $possibleTokenArray = $firstArg->value; if (!$possibleTokenArray instanceof \PhpParser\Node\Expr\ArrayDimFetch) { return null; } diff --git a/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php b/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php index 4a47a77933d..cf99093048a 100644 --- a/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php +++ b/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php @@ -129,11 +129,11 @@ CODE_SAMPLE if (!$methodReflection instanceof \PHPStan\Reflection\MethodReflection) { return null; } - $expectedArgOrParamOrder = $this->resolveExpectedArgParamOrderIfDifferent($methodReflection, $new->args); + $expectedArgOrParamOrder = $this->resolveExpectedArgParamOrderIfDifferent($methodReflection, $new->getArgs()); if ($expectedArgOrParamOrder === null) { return null; } - $new->args = $this->argumentSorter->sortArgsByExpectedParamOrder($new->args, $expectedArgOrParamOrder); + $new->args = $this->argumentSorter->sortArgsByExpectedParamOrder($new->getArgs(), $expectedArgOrParamOrder); $new->setAttribute(self::ALREADY_SORTED, \true); return $new; } @@ -143,11 +143,11 @@ CODE_SAMPLE if (!$methodReflection instanceof \PHPStan\Reflection\MethodReflection) { return null; } - $expectedArgOrParamOrder = $this->resolveExpectedArgParamOrderIfDifferent($methodReflection, $methodCall->args); + $expectedArgOrParamOrder = $this->resolveExpectedArgParamOrderIfDifferent($methodReflection, $methodCall->getArgs()); if ($expectedArgOrParamOrder === null) { return null; } - $newArgs = $this->argumentSorter->sortArgsByExpectedParamOrder($methodCall->args, $expectedArgOrParamOrder); + $newArgs = $this->argumentSorter->sortArgsByExpectedParamOrder($methodCall->getArgs(), $expectedArgOrParamOrder); if ($methodCall->args === $newArgs) { return null; } diff --git a/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php b/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php index dbeaef6b176..64bcfdeaadc 100644 --- a/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php +++ b/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php80\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; @@ -59,6 +60,9 @@ CODE_SAMPLE if (!isset($node->args[0])) { return new \PhpParser\Node\Expr\ClassConstFetch(new \PhpParser\Node\Name('self'), 'class'); } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $object = $node->args[0]->value; return new \PhpParser\Node\Expr\ClassConstFetch($object, 'class'); } diff --git a/rules/Php80/Rector/Identical/StrEndsWithRector.php b/rules/Php80/Rector/Identical/StrEndsWithRector.php index a22c3e02b6b..2d4bfc37a64 100644 --- a/rules/Php80/Rector/Identical/StrEndsWithRector.php +++ b/rules/Php80/Rector/Identical/StrEndsWithRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php80\Rector\Identical; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp\Identical; @@ -13,6 +14,7 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\UnaryMinus; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\PhpVersionFeature; use Rector\Nette\NodeAnalyzer\BinaryOpAnalyzer; @@ -31,9 +33,14 @@ final class StrEndsWithRector extends \Rector\Core\Rector\AbstractRector impleme * @var \Rector\Nette\NodeAnalyzer\BinaryOpAnalyzer */ private $binaryOpAnalyzer; - public function __construct(\Rector\Nette\NodeAnalyzer\BinaryOpAnalyzer $binaryOpAnalyzer) + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Nette\NodeAnalyzer\BinaryOpAnalyzer $binaryOpAnalyzer, \Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { $this->binaryOpAnalyzer = $binaryOpAnalyzer; + $this->argsAnalyzer = $argsAnalyzer; } public function provideMinPhpVersion() : int { @@ -118,10 +125,17 @@ CODE_SAMPLE } else { return null; } - $haystack = $substrFuncCall->args[0]->value; - if (!$this->isUnaryMinusStrlenFuncCallArgValue($substrFuncCall->args[1]->value, $comparedNeedleExpr) && !$this->isHardCodedLNumberAndString($substrFuncCall->args[1]->value, $comparedNeedleExpr)) { + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($substrFuncCall->args, [0, 1])) { return null; } + /** @var Arg $secondArg */ + $secondArg = $substrFuncCall->args[1]; + if (!$this->isUnaryMinusStrlenFuncCallArgValue($secondArg->value, $comparedNeedleExpr) && !$this->isHardCodedLNumberAndString($secondArg->value, $comparedNeedleExpr)) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $substrFuncCall->args[0]; + $haystack = $firstArg->value; $isPositive = $binaryOp instanceof \PhpParser\Node\Expr\BinaryOp\Identical; return $this->buildReturnNode($haystack, $comparedNeedleExpr, $isPositive); } @@ -139,9 +153,19 @@ CODE_SAMPLE return null; } $substrCompareFuncCall = $funcCallAndExpr->getFuncCall(); - $haystack = $substrCompareFuncCall->args[0]->value; - $needle = $substrCompareFuncCall->args[1]->value; - if (!$this->isUnaryMinusStrlenFuncCallArgValue($substrCompareFuncCall->args[2]->value, $needle) && !$this->isHardCodedLNumberAndString($substrCompareFuncCall->args[2]->value, $needle)) { + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($substrCompareFuncCall->args, [0, 1, 2])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $substrCompareFuncCall->args[0]; + $haystack = $firstArg->value; + /** @var Arg $secondArg */ + $secondArg = $substrCompareFuncCall->args[1]; + $needle = $secondArg->value; + /** @var Arg $thirdArg */ + $thirdArg = $substrCompareFuncCall->args[2]; + $thirdArgValue = $thirdArg->value; + if (!$this->isUnaryMinusStrlenFuncCallArgValue($thirdArgValue, $needle) && !$this->isHardCodedLNumberAndString($thirdArgValue, $needle)) { return null; } $isPositive = $binaryOp instanceof \PhpParser\Node\Expr\BinaryOp\Identical; @@ -159,6 +183,12 @@ CODE_SAMPLE if (!$this->nodeNameResolver->isName($funcCall, 'strlen')) { return \false; } + if (!isset($funcCall->args[0])) { + return \false; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } return $this->nodeComparator->areNodesEqual($funcCall->args[0]->value, $needle); } private function isHardCodedLNumberAndString(\PhpParser\Node $substrOffset, \PhpParser\Node $needle) : bool diff --git a/rules/Php80/Rector/Ternary/GetDebugTypeRector.php b/rules/Php80/Rector/Ternary/GetDebugTypeRector.php index 72d7455d837..a50f84001ac 100644 --- a/rules/Php80/Rector/Ternary/GetDebugTypeRector.php +++ b/rules/Php80/Rector/Ternary/GetDebugTypeRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Php80\Rector\Ternary; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Ternary; use Rector\Core\Rector\AbstractRector; @@ -64,6 +65,12 @@ CODE_SAMPLE } /** @var FuncCall $funcCall */ $funcCall = $node->if; + if (!isset($funcCall->args[0])) { + return null; + } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstExpr = $funcCall->args[0]->value; return $this->nodeFactory->createFuncCall('get_debug_type', [$firstExpr]); } @@ -90,12 +97,21 @@ CODE_SAMPLE { /** @var FuncCall $isObjectFuncCall */ $isObjectFuncCall = $ternary->cond; + if (!$isObjectFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } $firstExpr = $isObjectFuncCall->args[0]->value; /** @var FuncCall $getClassFuncCall */ $getClassFuncCall = $ternary->if; + if (!$getClassFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } $secondExpr = $getClassFuncCall->args[0]->value; /** @var FuncCall $gettypeFuncCall */ $gettypeFuncCall = $ternary->else; + if (!$gettypeFuncCall->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } $thirdExpr = $gettypeFuncCall->args[0]->value; if (!$this->nodeComparator->areNodesEqual($firstExpr, $secondExpr)) { return \false; diff --git a/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php b/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php index 35ad18ebf07..9da5fd9a9a1 100644 --- a/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php +++ b/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php @@ -3,14 +3,31 @@ declare (strict_types=1); namespace Rector\Php80\ValueObjectFactory; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; +use Rector\Core\NodeAnalyzer\ArgsAnalyzer; use Rector\Php80\ValueObject\StrStartsWith; final class StrStartsWithFactory { - public function createFromFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall, bool $isPositive) : \Rector\Php80\ValueObject\StrStartsWith + /** + * @var \Rector\Core\NodeAnalyzer\ArgsAnalyzer + */ + private $argsAnalyzer; + public function __construct(\Rector\Core\NodeAnalyzer\ArgsAnalyzer $argsAnalyzer) { - $haystack = $funcCall->args[0]->value; - $needle = $funcCall->args[1]->value; + $this->argsAnalyzer = $argsAnalyzer; + } + public function createFromFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall, bool $isPositive) : ?\Rector\Php80\ValueObject\StrStartsWith + { + if (!$this->argsAnalyzer->isArgsInstanceInArgsPositions($funcCall->args, [0, 1])) { + return null; + } + /** @var Arg $firstArg */ + $firstArg = $funcCall->args[0]; + $haystack = $firstArg->value; + /** @var Arg $secondArg */ + $secondArg = $funcCall->args[1]; + $needle = $secondArg->value; return new \Rector\Php80\ValueObject\StrStartsWith($funcCall, $haystack, $needle, $isPositive); } } diff --git a/rules/PhpSpecToPHPUnit/NodeFactory/BeConstructedWithAssignFactory.php b/rules/PhpSpecToPHPUnit/NodeFactory/BeConstructedWithAssignFactory.php index b6043ebc20a..5f6348ef011 100644 --- a/rules/PhpSpecToPHPUnit/NodeFactory/BeConstructedWithAssignFactory.php +++ b/rules/PhpSpecToPHPUnit/NodeFactory/BeConstructedWithAssignFactory.php @@ -43,6 +43,12 @@ final class BeConstructedWithAssignFactory return new \PhpParser\Node\Expr\Assign($propertyFetch, $new); } if ($this->nodeNameResolver->isName($methodCall->name, 'beConstructedThrough')) { + if (!isset($methodCall->args[0])) { + return null; + } + if (!$methodCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $methodName = $this->valueResolver->getValue($methodCall->args[0]->value); $staticCall = $this->nodeFactory->createStaticCall($testedClass, $methodName); $this->moveConstructorArguments($methodCall, $staticCall); @@ -55,6 +61,9 @@ final class BeConstructedWithAssignFactory if (!isset($methodCall->args[1])) { return; } + if (!$methodCall->args[1] instanceof \PhpParser\Node\Arg) { + return; + } if (!$methodCall->args[1]->value instanceof \PhpParser\Node\Expr\Array_) { return; } diff --git a/rules/PhpSpecToPHPUnit/NodeFactory/DuringMethodCallFactory.php b/rules/PhpSpecToPHPUnit/NodeFactory/DuringMethodCallFactory.php index 4e23986b317..8f2c752f010 100644 --- a/rules/PhpSpecToPHPUnit/NodeFactory/DuringMethodCallFactory.php +++ b/rules/PhpSpecToPHPUnit/NodeFactory/DuringMethodCallFactory.php @@ -31,9 +31,12 @@ final class DuringMethodCallFactory if (!isset($methodCall->args[0])) { throw new \Rector\Core\Exception\ShouldNotHappenException(); } + if (!$methodCall->args[0] instanceof \PhpParser\Node\Arg) { + throw new \Rector\Core\Exception\ShouldNotHappenException(); + } $name = $this->valueResolver->getValue($methodCall->args[0]->value); $thisObjectPropertyMethodCall = new \PhpParser\Node\Expr\MethodCall($propertyFetch, $name); - if (isset($methodCall->args[1]) && $methodCall->args[1]->value instanceof \PhpParser\Node\Expr\Array_) { + if (isset($methodCall->args[1]) && $methodCall->args[1] instanceof \PhpParser\Node\Arg && $methodCall->args[1]->value instanceof \PhpParser\Node\Expr\Array_) { /** @var Array_ $array */ $array = $methodCall->args[1]->value; if (isset($array->items[0])) { diff --git a/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php b/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php index 30edd211159..c56f834ceda 100644 --- a/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\PhpSpecToPHPUnit\Rector\Class_; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; @@ -121,6 +122,12 @@ final class PhpSpecClassToPHPUnitClassRector extends \Rector\PhpSpecToPHPUnit\Re if (!$this->isName($innerClassMethodStmt->name, 'shouldHaveType')) { continue; } + if (!isset($innerClassMethodStmt->args[0])) { + continue; + } + if (!$innerClassMethodStmt->args[0] instanceof \PhpParser\Node\Arg) { + continue; + } // not the tested type if (!$this->valueResolver->isValue($innerClassMethodStmt->args[0]->value, $testedObjectType->getClassName())) { continue; diff --git a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php index f4fafca2fb8..ef6ef4f18bc 100644 --- a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php @@ -96,7 +96,8 @@ final class PhpSpecMocksToPHPUnitMocksRector extends \Rector\PhpSpecToPHPUnit\Re if ($mockMethodName === null) { throw new \Rector\Core\Exception\ShouldNotHappenException(); } - $expectedArg = $methodCall->var->args[0]->value ?? null; + $arg = $methodCall->var->args[0] ?? null; + $expectedArg = $arg instanceof \PhpParser\Node\Arg ? $arg->value : null; $methodCall->var->name = new \PhpParser\Node\Identifier('expects'); $thisOnceMethodCall = $this->nodeFactory->createLocalMethodCall('atLeastOnce'); $methodCall->var->args = [new \PhpParser\Node\Arg($thisOnceMethodCall)]; @@ -184,9 +185,10 @@ final class PhpSpecMocksToPHPUnitMocksRector extends \Rector\PhpSpecToPHPUnit\Re } private function createIsTypeOrIsInstanceOf(\PhpParser\Node\Expr\StaticCall $staticCall) : \PhpParser\Node\Expr\MethodCall { - $type = $this->valueResolver->getValue($staticCall->args[0]->value); + $args = $staticCall->getArgs(); + $type = $this->valueResolver->getValue($args[0]->value); $name = $this->typeAnalyzer->isPhpReservedType($type) ? 'isType' : 'isInstanceOf'; - return $this->nodeFactory->createLocalMethodCall($name, $staticCall->args); + return $this->nodeFactory->createLocalMethodCall($name, $args); } private function createMockVarDoc(\PhpParser\Node\Param $param, \PhpParser\Node\Name $name) : string { diff --git a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php index 6aa2b84b8ed..3c209df1014 100644 --- a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php @@ -153,11 +153,12 @@ final class PhpSpecPromisesToPHPUnitAssertRector extends \Rector\PhpSpecToPHPUni return $this->beConstructedWithAssignFactory->create($node, $this->getTestedClass(), $this->getTestedObjectPropertyFetch()); } $this->processMatchersKeys($node); + $args = $node->getArgs(); foreach (self::NEW_METHOD_TO_OLD_METHODS as $newMethod => $oldMethods) { if (!$this->isNames($node->name, $oldMethods)) { continue; } - return $this->assertMethodCallFactory->createAssertMethod($newMethod, $node->var, $node->args[0]->value ?? null, $this->getTestedObjectPropertyFetch()); + return $this->assertMethodCallFactory->createAssertMethod($newMethod, $node->var, $args[0]->value ?? null, $this->getTestedObjectPropertyFetch()); } if ($this->shouldSkip($node)) { return null; diff --git a/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php b/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php index 2eb3d980d94..86a2b48c2a8 100644 --- a/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php +++ b/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php @@ -8,6 +8,7 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\VariadicPlaceholder; use Rector\Core\Contract\Rector\ConfigurableRectorInterface; use Rector\Core\Rector\AbstractRector; use Rector\Removing\ValueObject\ArgumentRemover; @@ -119,9 +120,13 @@ CODE_SAMPLE } /** * @param mixed[] $values + * @param \PhpParser\Node\Arg|\PhpParser\Node\VariadicPlaceholder $arg */ - private function isArgumentValueMatch(\PhpParser\Node\Arg $arg, array $values) : bool + private function isArgumentValueMatch($arg, array $values) : bool { + if (!$arg instanceof \PhpParser\Node\Arg) { + return \false; + } $nodeValue = $this->valueResolver->getValue($arg->value); return \in_array($nodeValue, $values, \true); } diff --git a/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php b/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php index b9b83f88396..7265fb65b1f 100644 --- a/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php +++ b/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Removing\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Core\Contract\Rector\ConfigurableRectorInterface; use Rector\Core\Rector\AbstractRector; @@ -98,6 +99,9 @@ CODE_SAMPLE if (!isset($funcCall->args[$argumentPosition])) { return \false; } + if (!$funcCall->args[$argumentPosition] instanceof \PhpParser\Node\Arg) { + return \false; + } return $this->valueResolver->isValues($funcCall->args[$argumentPosition]->value, $values); } } diff --git a/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php b/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php index cf706e948e0..6351400db45 100644 --- a/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php +++ b/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Restoration\Rector\Property; use PhpParser\Node; +use PhpParser\Node\ComplexType; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\BooleanNot; @@ -72,6 +73,9 @@ CODE_SAMPLE if (!$isPropretyNullChecked) { return null; } + if ($node->type instanceof \PhpParser\Node\ComplexType) { + return null; + } $currentPropertyType = $node->type; if ($currentPropertyType === null) { return null; diff --git a/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php b/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php index 4de9d18e84c..1bd230d1f28 100644 --- a/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php +++ b/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Transform\Rector\FuncCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\PropertyFetch; @@ -217,6 +218,9 @@ CODE_SAMPLE if ($funcCall->args === []) { return $propertyFetch; } + if (!$funcCall->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } if ($arrayFuncCallToMethodCall->getArrayMethod() && $this->arrayTypeAnalyzer->isArrayType($funcCall->args[0]->value)) { return new \PhpParser\Node\Expr\MethodCall($propertyFetch, $arrayFuncCallToMethodCall->getArrayMethod(), $funcCall->args); } diff --git a/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php b/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php index 985bc0bf2dd..ebe2be4b298 100644 --- a/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php +++ b/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Transform\Rector\MethodCall; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\Variable; use PHPStan\Type\ClosureType; @@ -80,10 +81,14 @@ CODE_SAMPLE if (!$this->isObjectType($node->var, $singleCallableInMethodCallToVariable->getObjectType())) { continue; } - if (!isset($node->args[$singleCallableInMethodCallToVariable->getArgumentPosition()])) { + $position = $singleCallableInMethodCallToVariable->getArgumentPosition(); + if (!isset($node->args[$position])) { continue; } - $arg = $node->args[$singleCallableInMethodCallToVariable->getArgumentPosition()]; + if (!$node->args[$position] instanceof \PhpParser\Node\Arg) { + continue; + } + $arg = $node->args[$position]; $argValueType = $this->getStaticType($arg->value); if (!$argValueType instanceof \PHPStan\Type\ClosureType) { continue; diff --git a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php index 66845d9ec9c..167ed301284 100644 --- a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php +++ b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Transform\Rector\New_; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; use Rector\Core\Contract\Rector\ConfigurableRectorInterface; @@ -69,6 +70,9 @@ CODE_SAMPLE if (!isset($node->args[0])) { return null; } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return null; + } $firstArgValue = $node->args[0]->value; if (!$this->valueResolver->isValue($firstArgValue, $newArgToMethodCall->getValue())) { continue; diff --git a/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php b/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php index 3c469b176f7..8a018607e38 100644 --- a/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php +++ b/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php @@ -60,6 +60,9 @@ final class CallTypesResolver continue; } foreach ($call->args as $position => $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } $argValueType = $this->resolveArgValueType($typeStrictness, $arg); $staticTypesByArgumentPosition[$position][] = $argValueType; } diff --git a/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php b/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php index 02a0d85c9c1..bb47c18ec16 100644 --- a/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php +++ b/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php @@ -3,6 +3,8 @@ declare (strict_types=1); namespace Rector\TypeDeclaration\NodeAnalyzer; +use PhpParser\Node\Arg; +use PhpParser\Node\ComplexType; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; @@ -34,7 +36,7 @@ final class CallerParamMatcher } /** * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\FuncCall $call - * @return null|\PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType + * @return null|\PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\ComplexType */ public function matchCallParamType($call, \PhpParser\Node\Param $param, \PHPStan\Analyser\Scope $scope) { @@ -80,6 +82,9 @@ final class CallerParamMatcher { $paramName = $this->nodeNameResolver->getName($param); foreach ($call->args as $argPosition => $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } if (!$arg->value instanceof \PhpParser\Node\Expr\Variable) { continue; } diff --git a/rules/TypeDeclaration/PhpParserTypeAnalyzer.php b/rules/TypeDeclaration/PhpParserTypeAnalyzer.php index a941882aa8e..776f9095648 100644 --- a/rules/TypeDeclaration/PhpParserTypeAnalyzer.php +++ b/rules/TypeDeclaration/PhpParserTypeAnalyzer.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\TypeDeclaration; use PhpParser\Node; +use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\NullableType; @@ -21,7 +22,7 @@ final class PhpParserTypeAnalyzer } /** * @param \PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\Identifier $possibleSubtype - * @param \PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\Identifier $possibleParentType + * @param \PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\Identifier|\PhpParser\Node\ComplexType $possibleParentType */ public function isCovariantSubtypeOf($possibleSubtype, $possibleParentType) : bool { diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php index 788f1227eb5..3fbd8d2f281 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\TypeDeclaration\Rector\ClassMethod; use PhpParser\Node; +use PhpParser\Node\ComplexType; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; @@ -149,7 +150,7 @@ CODE_SAMPLE return !$classReflection->isClass(); } /** - * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType $paramType + * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|\PhpParser\Node\UnionType|\PhpParser\Node\ComplexType $paramType */ private function mirrorParamType(\PhpParser\Node\Param $decoratedParam, $paramType) : void { diff --git a/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php b/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php index 8f17663f371..a736e8da6fc 100644 --- a/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php +++ b/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php @@ -82,6 +82,9 @@ CODE_SAMPLE return null; } foreach ($node->args as $key => $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } if (!$this->valueResolver->isNull($arg->value)) { continue; } diff --git a/rules/TypeDeclaration/TypeAlreadyAddedChecker/ReturnTypeAlreadyAddedChecker.php b/rules/TypeDeclaration/TypeAlreadyAddedChecker/ReturnTypeAlreadyAddedChecker.php index b2b65dd6cd7..5ecb7c816da 100644 --- a/rules/TypeDeclaration/TypeAlreadyAddedChecker/ReturnTypeAlreadyAddedChecker.php +++ b/rules/TypeDeclaration/TypeAlreadyAddedChecker/ReturnTypeAlreadyAddedChecker.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\TypeDeclaration\TypeAlreadyAddedChecker; use Iterator; +use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\NullableType; @@ -91,7 +92,7 @@ final class ReturnTypeAlreadyAddedChecker return $nodeContentWithoutPreslash === $className; } /** - * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|PhpParserUnionType $returnTypeNode + * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|PhpParserUnionType|\PhpParser\Node\ComplexType $returnTypeNode */ private function isArrayIterableIteratorCoType($returnTypeNode, \PHPStan\Type\Type $returnType) : bool { @@ -101,7 +102,7 @@ final class ReturnTypeAlreadyAddedChecker return $this->isStaticTypeIterable($returnType); } /** - * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|PhpParserUnionType $returnTypeNode + * @param \PhpParser\Node\Identifier|\PhpParser\Node\Name|\PhpParser\Node\NullableType|PhpParserUnionType|\PhpParser\Node\ComplexType $returnTypeNode */ private function isUnionCoType($returnTypeNode, \PHPStan\Type\Type $type) : bool { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index a788eec74e1..4d08ed4deb4 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = '042daa1929644c007b8e0e5607fe22e0110065d5'; + public const PACKAGE_VERSION = '17cfa9f376b5b4a00a34e3b09ac48e7bd812be3f'; /** * @var string */ - public const RELEASE_DATE = '2021-09-27 15:18:57'; + public const RELEASE_DATE = '2021-09-27 17:29:16'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20210927\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/src/Bootstrap/ExtensionConfigResolver.php b/src/Bootstrap/ExtensionConfigResolver.php index 51c0f2fc78d..f7df0877b52 100644 --- a/src/Bootstrap/ExtensionConfigResolver.php +++ b/src/Bootstrap/ExtensionConfigResolver.php @@ -23,8 +23,8 @@ final class ExtensionConfigResolver } $generatedConfigDirectory = \dirname($generatedConfigReflectionClass->getFileName()); foreach (\Rector\RectorInstaller\GeneratedConfig::EXTENSIONS as $extensionConfig) { - $includedFiles = $extensionConfig['extra']['includes'] ?? []; /** @var string[] $includedFiles */ + $includedFiles = $extensionConfig['extra']['includes'] ?? []; foreach ($includedFiles as $includedFile) { $includedFilePath = $this->resolveIncludeFilePath($extensionConfig, $generatedConfigDirectory, $includedFile); if ($includedFilePath === null) { diff --git a/src/NodeAnalyzer/ArgsAnalyzer.php b/src/NodeAnalyzer/ArgsAnalyzer.php new file mode 100644 index 00000000000..dfe012a3199 --- /dev/null +++ b/src/NodeAnalyzer/ArgsAnalyzer.php @@ -0,0 +1,37 @@ +isInArgOrArrayItemNodes($funcCall->args, $variableName); } /** - * @param array $nodes + * @param array $nodes */ private function isInArgOrArrayItemNodes(array $nodes, string $variableName) : bool { foreach ($nodes as $node) { - if ($node === null) { + if ($this->shouldSkip($node)) { continue; } + /** @var Arg|ArrayItem $node */ if ($node->value instanceof \PhpParser\Node\Expr\Array_) { if ($this->isInArgOrArrayItemNodes($node->value->items, $variableName)) { return \true; @@ -55,4 +57,14 @@ final class CompactFuncCallAnalyzer } return \false; } + /** + * @param \PhpParser\Node\Arg|\PhpParser\Node\VariadicPlaceholder|\PhpParser\Node\Expr\ArrayItem|null $node + */ + private function shouldSkip($node) : bool + { + if ($node === null) { + return \true; + } + return $node instanceof \PhpParser\Node\VariadicPlaceholder; + } } diff --git a/src/NodeManipulator/ClassMethodAssignManipulator.php b/src/NodeManipulator/ClassMethodAssignManipulator.php index 8995506a7b0..2199f723f07 100644 --- a/src/NodeManipulator/ClassMethodAssignManipulator.php +++ b/src/NodeManipulator/ClassMethodAssignManipulator.php @@ -257,6 +257,12 @@ final class ClassMethodAssignManipulator if (!$this->nodeNameResolver->isNames($node, ['array_shift', '*sort'])) { return \false; } + if (!isset($node->args[0])) { + return \false; + } + if (!$node->args[0] instanceof \PhpParser\Node\Arg) { + return \false; + } // is 1t argument return $node->args[0]->value !== $variable; } diff --git a/src/NodeManipulator/FuncCallManipulator.php b/src/NodeManipulator/FuncCallManipulator.php index a86242f7b1f..3b170a2cb18 100644 --- a/src/NodeManipulator/FuncCallManipulator.php +++ b/src/NodeManipulator/FuncCallManipulator.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace Rector\Core\NodeManipulator; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Core\PhpParser\Node\Value\ValueResolver; final class FuncCallManipulator @@ -24,6 +25,9 @@ final class FuncCallManipulator $arguments = []; foreach ($compactFuncCalls as $compactFuncCall) { foreach ($compactFuncCall->args as $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } $value = $this->valueResolver->getValue($arg->value); if ($value === null) { continue; diff --git a/src/Php/Regex/RegexPatternArgumentManipulator.php b/src/Php/Regex/RegexPatternArgumentManipulator.php index cc2f1c4173c..b8c2ffd971d 100644 --- a/src/Php/Regex/RegexPatternArgumentManipulator.php +++ b/src/Php/Regex/RegexPatternArgumentManipulator.php @@ -5,6 +5,7 @@ namespace Rector\Core\Php\Regex; use RectorPrefix20210927\Nette\Utils\Strings; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Const_; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Assign; @@ -84,6 +85,9 @@ final class RegexPatternArgumentManipulator if (!isset($funcCall->args[$argumentPosition])) { return []; } + if (!$funcCall->args[$argumentPosition] instanceof \PhpParser\Node\Arg) { + return []; + } return $this->resolveArgumentValues($funcCall->args[$argumentPosition]->value); } return []; @@ -104,6 +108,9 @@ final class RegexPatternArgumentManipulator if (!isset($staticCall->args[$argumentPosition])) { return []; } + if (!$staticCall->args[$argumentPosition] instanceof \PhpParser\Node\Arg) { + return []; + } return $this->resolveArgumentValues($staticCall->args[$argumentPosition]->value); } } diff --git a/src/PhpParser/NodeTransformer.php b/src/PhpParser/NodeTransformer.php index 2778193d697..838aca48c81 100644 --- a/src/PhpParser/NodeTransformer.php +++ b/src/PhpParser/NodeTransformer.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Core\PhpParser; use RectorPrefix20210927\Nette\Utils\Strings; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayItem; @@ -78,6 +79,9 @@ final class NodeTransformer $stringArgument = null; $arrayItems = []; foreach ($sprintfFuncCall->args as $i => $arg) { + if (!$arg instanceof \PhpParser\Node\Arg) { + continue; + } if ($i === 0) { $stringArgument = $arg->value; } else { diff --git a/vendor/autoload.php b/vendor/autoload.php index 8883e27b6d3..a20bbd2e8a5 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044::getLoader(); +return ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 25766eb201c..53e74eccd97 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -111,6 +111,7 @@ return array( 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', @@ -138,6 +139,7 @@ return array( 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', 'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', 'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', @@ -190,6 +192,7 @@ return array( 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', 'PhpParser\\Node\\Expr\\BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', 'PhpParser\\Node\\Expr\\BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'PhpParser\\Node\\Expr\\CallLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', 'PhpParser\\Node\\Expr\\Cast' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', 'PhpParser\\Node\\Expr\\Cast\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', 'PhpParser\\Node\\Expr\\Cast\\Bool_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', @@ -236,6 +239,7 @@ return array( 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', 'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', 'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', 'PhpParser\\Node\\Name\\FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', @@ -309,6 +313,7 @@ return array( 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', 'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', 'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', + 'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', @@ -1833,6 +1838,7 @@ return array( 'Rector\\Core\\FileSystem\\PhpFilesFinder' => $baseDir . '/src/FileSystem/PhpFilesFinder.php', 'Rector\\Core\\HttpKernel\\RectorKernel' => $baseDir . '/src/HttpKernel/RectorKernel.php', 'Rector\\Core\\Logging\\CurrentRectorProvider' => $baseDir . '/src/Logging/CurrentRectorProvider.php', + 'Rector\\Core\\NodeAnalyzer\\ArgsAnalyzer' => $baseDir . '/src/NodeAnalyzer/ArgsAnalyzer.php', 'Rector\\Core\\NodeAnalyzer\\CallAnalyzer' => $baseDir . '/src/NodeAnalyzer/CallAnalyzer.php', 'Rector\\Core\\NodeAnalyzer\\ChangedNodeAnalyzer' => $baseDir . '/src/NodeAnalyzer/ChangedNodeAnalyzer.php', 'Rector\\Core\\NodeAnalyzer\\ClassAnalyzer' => $baseDir . '/src/NodeAnalyzer/ClassAnalyzer.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index d76e9a4902d..8d2bbc2d450 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044 +class ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitbd1ed7b5302f7464c1582cf2b5f1f628::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ class ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitbd1ed7b5302f7464c1582cf2b5f1f628::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire61e8a34a87911b6fb5b14c5d781d3044($fileIdentifier, $file); + composerRequirebd1ed7b5302f7464c1582cf2b5f1f628($fileIdentifier, $file); } return $loader; } } -function composerRequire61e8a34a87911b6fb5b14c5d781d3044($fileIdentifier, $file) +function composerRequirebd1ed7b5302f7464c1582cf2b5f1f628($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 570033e3ac1..dc825ba8416 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 +class ComposerStaticInitbd1ed7b5302f7464c1582cf2b5f1f628 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -471,6 +471,7 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', @@ -498,6 +499,7 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', 'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', 'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', @@ -550,6 +552,7 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', 'PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', 'PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'PhpParser\\Node\\Expr\\CallLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', 'PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', 'PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', 'PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', @@ -596,6 +599,7 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', 'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', 'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', 'PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', @@ -669,6 +673,7 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', 'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', 'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', + 'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', @@ -2193,6 +2198,7 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 'Rector\\Core\\FileSystem\\PhpFilesFinder' => __DIR__ . '/../..' . '/src/FileSystem/PhpFilesFinder.php', 'Rector\\Core\\HttpKernel\\RectorKernel' => __DIR__ . '/../..' . '/src/HttpKernel/RectorKernel.php', 'Rector\\Core\\Logging\\CurrentRectorProvider' => __DIR__ . '/../..' . '/src/Logging/CurrentRectorProvider.php', + 'Rector\\Core\\NodeAnalyzer\\ArgsAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ArgsAnalyzer.php', 'Rector\\Core\\NodeAnalyzer\\CallAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/CallAnalyzer.php', 'Rector\\Core\\NodeAnalyzer\\ChangedNodeAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ChangedNodeAnalyzer.php', 'Rector\\Core\\NodeAnalyzer\\ClassAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ClassAnalyzer.php', @@ -3858,9 +3864,9 @@ class ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit61e8a34a87911b6fb5b14c5d781d3044::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitbd1ed7b5302f7464c1582cf2b5f1f628::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitbd1ed7b5302f7464c1582cf2b5f1f628::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitbd1ed7b5302f7464c1582cf2b5f1f628::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 584b02c170d..e9e74769de8 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -721,17 +721,17 @@ }, { "name": "nikic\/php-parser", - "version": "v4.12.0", - "version_normalized": "4.12.0.0", + "version": "v4.13.0", + "version_normalized": "4.13.0.0", "source": { "type": "git", "url": "https:\/\/github.com\/nikic\/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/nikic\/PHP-Parser\/zipball\/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https:\/\/api.github.com\/repos\/nikic\/PHP-Parser\/zipball\/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -742,7 +742,7 @@ "ircmaxell\/php-yacc": "^0.0.7", "phpunit\/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, - "time": "2021-07-21T10:44:31+00:00", + "time": "2021-09-20T12:20:58+00:00", "bin": [ "bin\/php-parse" ], @@ -774,7 +774,7 @@ ], "support": { "issues": "https:\/\/github.com\/nikic\/PHP-Parser\/issues", - "source": "https:\/\/github.com\/nikic\/PHP-Parser\/tree\/v4.12.0" + "source": "https:\/\/github.com\/nikic\/PHP-Parser\/tree\/v4.13.0" }, "install-path": "..\/nikic\/php-parser" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index f6fd5767014..067b17dddd6 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix20210927; -return array('root' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'name' => 'rector/rector-src', 'dev' => \false), 'versions' => array('composer/semver' => array('pretty_version' => '3.2.5', 'version' => '3.2.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'reference' => '31f3ea725711245195f62e54ffa402d8ef2fdba9', 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'reference' => '84674dd3a7575ba617f5a76d7e9e29a7d3891339', 'dev_requirement' => \false), 'danielstjules/stringy' => array('pretty_version' => '3.1.0', 'version' => '3.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../danielstjules/stringy', 'aliases' => array(), 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'reference' => '9cf661f4eb38f7c881cac67c75ea9b00bf97b210', 'dev_requirement' => \false), 'ergebnis/json-printer' => array('pretty_version' => '3.1.1', 'version' => '3.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ergebnis/json-printer', 'aliases' => array(), 'reference' => 'e4190dadd9937a77d8afcaf2b6c42a528ab367d6', 'dev_requirement' => \false), 'helmich/typo3-typoscript-parser' => array('pretty_version' => 'v2.3.1', 'version' => '2.3.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../helmich/typo3-typoscript-parser', 'aliases' => array(), 'reference' => '366c38db68a83503ba4148cd77d77e08deae084e', 'dev_requirement' => \false), 'idiosyncratic/editorconfig' => array('pretty_version' => '0.1.3', 'version' => '0.1.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../idiosyncratic/editorconfig', 'aliases' => array(), 'reference' => '3445fa4a1e00f95630d4edc729c2effb116db19b', 'dev_requirement' => \false), 'myclabs/php-enum' => array('pretty_version' => '1.8.3', 'version' => '1.8.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), 'reference' => 'b942d263c641ddb5190929ff840c68f78713e937', 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.2.2', 'version' => '3.2.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'reference' => 'e4ca6f4669121ca6876b1d048c612480e39a28d5', 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.5', 'version' => '3.2.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'reference' => '9cd80396ca58d7969ab44fc7afcf03624dfa526e', 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.12.0', 'version' => '4.12.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'reference' => '6608f01670c3cc5079e18c1dab1104e002579143', 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '0.5.7', 'version' => '0.5.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'reference' => '816e826ce0b7fb32098d8cb6de62511ce6021cea', 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '0.12.99', 'version' => '0.12.99.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'reference' => 'b4d40f1d759942f523be267a1bab6884f46ca3f7', 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '0.12.22', 'version' => '0.12.22.0', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', 'aliases' => array(), 'reference' => '7c01ef93bf128b4ac8bdad38c54b2a4fd6b0b3cc', 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf', 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'dev_requirement' => \false), 'psr/event-dispatcher-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '2.0.0', 'version' => '2.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376', 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'rector/extension-installer' => array('pretty_version' => '0.11.1', 'version' => '0.11.1.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'reference' => '527fcbd19f7aeb79a6fd043e1edfeab7831b59af', 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.11.x-dev', 1 => 'dev-main')), 'rector/rector-cakephp' => array('pretty_version' => '0.11.3', 'version' => '0.11.3.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-cakephp', 'aliases' => array(), 'reference' => '42e57ebb5573f0a65a680eecdfa0db536cca2db1', 'dev_requirement' => \false), 'rector/rector-doctrine' => array('pretty_version' => '0.11.18', 'version' => '0.11.18.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(), 'reference' => '634d07622cd3beb9bba5e8c8f90378fe4b2cb94c', 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => '0.11.5', 'version' => '0.11.5.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(), 'reference' => '6c5f56c2655039052ef3fe4301596241421d7ee9', 'dev_requirement' => \false), 'rector/rector-nette' => array('pretty_version' => '0.11.24', 'version' => '0.11.24.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-nette', 'aliases' => array(), 'reference' => '19ead06d6b4f55e2bfd835ed230e24bbeb19b6b5', 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(), 'reference' => 'b69f880e0b162cff0a95dffe9130f3a3360a1e9e', 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => '0.11.7', 'version' => '0.11.7.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(), 'reference' => '9daf9b37e1373fc449f3cb3854a9487f75994ddf', 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => '0.11.19', 'version' => '0.11.19.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(), 'reference' => '5f5e2b91daaa4cf6646e306733a7c85ffa0ef06d', 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'dev_requirement' => \false), 'ssch/typo3-rector' => array('pretty_version' => 'v0.11.26', 'version' => '0.11.26.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../ssch/typo3-rector', 'aliases' => array(), 'reference' => 'ca4306df78091744951d75d2a82f05a12088af84', 'dev_requirement' => \false), 'symfony/config' => array('pretty_version' => 'v5.3.4', 'version' => '5.3.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'reference' => '4268f3059c904c61636275182707f81645517a37', 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'reference' => '8b1008344647462ae6ec57559da166c2bfa5e16a', 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'reference' => 'a665946279f566d94ed5eb98999cfa65c6fa5a78', 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'reference' => '5f38c8804a9e97d23e0c8d63341088cd8a22d627', 'dev_requirement' => \false), 'symfony/error-handler' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/error-handler', 'aliases' => array(), 'reference' => '3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321', 'dev_requirement' => \false), 'symfony/event-dispatcher' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), 'reference' => 'ce7b20d69c66a20939d8952b617506a44d102130', 'dev_requirement' => \false), 'symfony/event-dispatcher-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', 'aliases' => array(), 'reference' => '69fee1ad2332a7cbab3aca13591953da9cdb7a11', 'dev_requirement' => \false), 'symfony/event-dispatcher-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '2.0')), 'symfony/filesystem' => array('pretty_version' => 'v5.3.4', 'version' => '5.3.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'reference' => '343f4fe324383ca46792cae728a3b6e2f708fb32', 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'reference' => 'a10000ada1e600d109a6c7632e9ac42e8bf2fb93', 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client-contracts', 'aliases' => array(), 'reference' => '7e82f6084d7cae521a75ef2cb5c9457bbda785f4', 'dev_requirement' => \false), 'symfony/http-foundation' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), 'reference' => 'e36c8e5502b4f3f0190c675f1c1f1248a64f04e5', 'dev_requirement' => \false), 'symfony/http-kernel' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-kernel', 'aliases' => array(), 'reference' => 'a3a78e37935a527b50376c22ac1cec35b57fe787', 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', 'dev_requirement' => \false), 'symfony/polyfill-intl-grapheme' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', 'aliases' => array(), 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', 'dev_requirement' => \false), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', 'dev_requirement' => \false), 'symfony/polyfill-php73' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', 'dev_requirement' => \false), 'symfony/polyfill-php81' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'reference' => 'e66119f3de95efc359483f810c4c3e6436279436', 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'reference' => '38f26c7d6ed535217ea393e05634cb0b244a1967', 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'reference' => 'f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb', 'dev_requirement' => \false), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'symfony/string' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'reference' => '8d224396e28d30f81969f083a58763b8b9ceb0a5', 'dev_requirement' => \false), 'symfony/var-dumper' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), 'reference' => '3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f', 'dev_requirement' => \false), 'symfony/var-exporter' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'reference' => '2ded877ab0574d8b646f4eb3f716f8ed7ee7f392', 'dev_requirement' => \false), 'symfony/yaml' => array('pretty_version' => 'v5.3.6', 'version' => '5.3.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'reference' => '4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7', 'dev_requirement' => \false), 'symplify/astral' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'reference' => 'b0c20ac57211a20ee31aeaa1deca63c3fe863b41', 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'reference' => '00f3ba40645d603297aa6e83eebc703a5368f7d8', 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'reference' => '796e18c014fd69c30bac044aa014dfb2fd62d70d', 'dev_requirement' => \false), 'symplify/console-color-diff' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-color-diff', 'aliases' => array(), 'reference' => '7918e41b0ee4d622927d2b927ad3f8d4a683ceec', 'dev_requirement' => \false), 'symplify/console-package-builder' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-package-builder', 'aliases' => array(), 'reference' => '4c8af94aabed1e0d7a82c4b5bf3c331071728de3', 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'reference' => 'ea042f546ff37e680c9b278f0afd55c1eea5f3a4', 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(), 'reference' => 'bfe01ebbee71422b6e4127e2ec9a5ff36196d5f9', 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'reference' => '39d486856e7940ed9e31c06b41c2be759be3a8ea', 'dev_requirement' => \false), 'symplify/simple-php-doc-parser' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/simple-php-doc-parser', 'aliases' => array(), 'reference' => 'd5c17bc4561ff7918750399056ce41e32fba2bf5', 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'reference' => '25ce481edd59ba80147d5013875a5be316518b83', 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'reference' => 'a32b2ff6d63697d2df3818faa2ed0f7c64c755a4', 'dev_requirement' => \false), 'symplify/symfony-php-config' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symfony-php-config', 'aliases' => array(), 'reference' => '90c6f64626dd0ed78f048ed4a8ac52f0303e23d8', 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'reference' => 'f8596fede12724be135aa49694bfbadda1c419d8', 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.8.7', 'version' => '2.8.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'reference' => '8e708de7c611f626c8792d43f1c78812ea24e6f6', 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.10.0', 'version' => '1.10.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', 'dev_requirement' => \false))); +return array('root' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'name' => 'rector/rector-src', 'dev' => \false), 'versions' => array('composer/semver' => array('pretty_version' => '3.2.5', 'version' => '3.2.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'reference' => '31f3ea725711245195f62e54ffa402d8ef2fdba9', 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'reference' => '84674dd3a7575ba617f5a76d7e9e29a7d3891339', 'dev_requirement' => \false), 'danielstjules/stringy' => array('pretty_version' => '3.1.0', 'version' => '3.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../danielstjules/stringy', 'aliases' => array(), 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'reference' => '9cf661f4eb38f7c881cac67c75ea9b00bf97b210', 'dev_requirement' => \false), 'ergebnis/json-printer' => array('pretty_version' => '3.1.1', 'version' => '3.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ergebnis/json-printer', 'aliases' => array(), 'reference' => 'e4190dadd9937a77d8afcaf2b6c42a528ab367d6', 'dev_requirement' => \false), 'helmich/typo3-typoscript-parser' => array('pretty_version' => 'v2.3.1', 'version' => '2.3.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../helmich/typo3-typoscript-parser', 'aliases' => array(), 'reference' => '366c38db68a83503ba4148cd77d77e08deae084e', 'dev_requirement' => \false), 'idiosyncratic/editorconfig' => array('pretty_version' => '0.1.3', 'version' => '0.1.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../idiosyncratic/editorconfig', 'aliases' => array(), 'reference' => '3445fa4a1e00f95630d4edc729c2effb116db19b', 'dev_requirement' => \false), 'myclabs/php-enum' => array('pretty_version' => '1.8.3', 'version' => '1.8.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), 'reference' => 'b942d263c641ddb5190929ff840c68f78713e937', 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.2.2', 'version' => '3.2.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'reference' => 'e4ca6f4669121ca6876b1d048c612480e39a28d5', 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.5', 'version' => '3.2.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'reference' => '9cd80396ca58d7969ab44fc7afcf03624dfa526e', 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.13.0', 'version' => '4.13.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'reference' => '50953a2691a922aa1769461637869a0a2faa3f53', 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '0.5.7', 'version' => '0.5.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'reference' => '816e826ce0b7fb32098d8cb6de62511ce6021cea', 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '0.12.99', 'version' => '0.12.99.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'reference' => 'b4d40f1d759942f523be267a1bab6884f46ca3f7', 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '0.12.22', 'version' => '0.12.22.0', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', 'aliases' => array(), 'reference' => '7c01ef93bf128b4ac8bdad38c54b2a4fd6b0b3cc', 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf', 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'dev_requirement' => \false), 'psr/event-dispatcher-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '2.0.0', 'version' => '2.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376', 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'rector/extension-installer' => array('pretty_version' => '0.11.1', 'version' => '0.11.1.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'reference' => '527fcbd19f7aeb79a6fd043e1edfeab7831b59af', 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.11.x-dev', 1 => 'dev-main')), 'rector/rector-cakephp' => array('pretty_version' => '0.11.3', 'version' => '0.11.3.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-cakephp', 'aliases' => array(), 'reference' => '42e57ebb5573f0a65a680eecdfa0db536cca2db1', 'dev_requirement' => \false), 'rector/rector-doctrine' => array('pretty_version' => '0.11.18', 'version' => '0.11.18.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(), 'reference' => '634d07622cd3beb9bba5e8c8f90378fe4b2cb94c', 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => '0.11.5', 'version' => '0.11.5.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(), 'reference' => '6c5f56c2655039052ef3fe4301596241421d7ee9', 'dev_requirement' => \false), 'rector/rector-nette' => array('pretty_version' => '0.11.24', 'version' => '0.11.24.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-nette', 'aliases' => array(), 'reference' => '19ead06d6b4f55e2bfd835ed230e24bbeb19b6b5', 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(), 'reference' => 'b69f880e0b162cff0a95dffe9130f3a3360a1e9e', 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => '0.11.7', 'version' => '0.11.7.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(), 'reference' => '9daf9b37e1373fc449f3cb3854a9487f75994ddf', 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.11.x-dev'), 'reference' => \NULL, 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => '0.11.19', 'version' => '0.11.19.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(), 'reference' => '5f5e2b91daaa4cf6646e306733a7c85ffa0ef06d', 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'dev_requirement' => \false), 'ssch/typo3-rector' => array('pretty_version' => 'v0.11.26', 'version' => '0.11.26.0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../ssch/typo3-rector', 'aliases' => array(), 'reference' => 'ca4306df78091744951d75d2a82f05a12088af84', 'dev_requirement' => \false), 'symfony/config' => array('pretty_version' => 'v5.3.4', 'version' => '5.3.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'reference' => '4268f3059c904c61636275182707f81645517a37', 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'reference' => '8b1008344647462ae6ec57559da166c2bfa5e16a', 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'reference' => 'a665946279f566d94ed5eb98999cfa65c6fa5a78', 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'reference' => '5f38c8804a9e97d23e0c8d63341088cd8a22d627', 'dev_requirement' => \false), 'symfony/error-handler' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/error-handler', 'aliases' => array(), 'reference' => '3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321', 'dev_requirement' => \false), 'symfony/event-dispatcher' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), 'reference' => 'ce7b20d69c66a20939d8952b617506a44d102130', 'dev_requirement' => \false), 'symfony/event-dispatcher-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', 'aliases' => array(), 'reference' => '69fee1ad2332a7cbab3aca13591953da9cdb7a11', 'dev_requirement' => \false), 'symfony/event-dispatcher-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '2.0')), 'symfony/filesystem' => array('pretty_version' => 'v5.3.4', 'version' => '5.3.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'reference' => '343f4fe324383ca46792cae728a3b6e2f708fb32', 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'reference' => 'a10000ada1e600d109a6c7632e9ac42e8bf2fb93', 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client-contracts', 'aliases' => array(), 'reference' => '7e82f6084d7cae521a75ef2cb5c9457bbda785f4', 'dev_requirement' => \false), 'symfony/http-foundation' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), 'reference' => 'e36c8e5502b4f3f0190c675f1c1f1248a64f04e5', 'dev_requirement' => \false), 'symfony/http-kernel' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-kernel', 'aliases' => array(), 'reference' => 'a3a78e37935a527b50376c22ac1cec35b57fe787', 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', 'dev_requirement' => \false), 'symfony/polyfill-intl-grapheme' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', 'aliases' => array(), 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', 'dev_requirement' => \false), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', 'dev_requirement' => \false), 'symfony/polyfill-php73' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.23.1', 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', 'dev_requirement' => \false), 'symfony/polyfill-php81' => array('pretty_version' => 'v1.23.0', 'version' => '1.23.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'reference' => 'e66119f3de95efc359483f810c4c3e6436279436', 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'reference' => '38f26c7d6ed535217ea393e05634cb0b244a1967', 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v2.4.0', 'version' => '2.4.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'reference' => 'f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb', 'dev_requirement' => \false), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0')), 'symfony/string' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'reference' => '8d224396e28d30f81969f083a58763b8b9ceb0a5', 'dev_requirement' => \false), 'symfony/var-dumper' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), 'reference' => '3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f', 'dev_requirement' => \false), 'symfony/var-exporter' => array('pretty_version' => 'v5.3.7', 'version' => '5.3.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'reference' => '2ded877ab0574d8b646f4eb3f716f8ed7ee7f392', 'dev_requirement' => \false), 'symfony/yaml' => array('pretty_version' => 'v5.3.6', 'version' => '5.3.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'reference' => '4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7', 'dev_requirement' => \false), 'symplify/astral' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/astral', 'aliases' => array(), 'reference' => 'b0c20ac57211a20ee31aeaa1deca63c3fe863b41', 'dev_requirement' => \false), 'symplify/autowire-array-parameter' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'reference' => '00f3ba40645d603297aa6e83eebc703a5368f7d8', 'dev_requirement' => \false), 'symplify/composer-json-manipulator' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/composer-json-manipulator', 'aliases' => array(), 'reference' => '796e18c014fd69c30bac044aa014dfb2fd62d70d', 'dev_requirement' => \false), 'symplify/console-color-diff' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-color-diff', 'aliases' => array(), 'reference' => '7918e41b0ee4d622927d2b927ad3f8d4a683ceec', 'dev_requirement' => \false), 'symplify/console-package-builder' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/console-package-builder', 'aliases' => array(), 'reference' => '4c8af94aabed1e0d7a82c4b5bf3c331071728de3', 'dev_requirement' => \false), 'symplify/easy-testing' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symplify/easy-testing', 'aliases' => array(), 'reference' => 'ea042f546ff37e680c9b278f0afd55c1eea5f3a4', 'dev_requirement' => \false), 'symplify/package-builder' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/package-builder', 'aliases' => array(), 'reference' => 'bfe01ebbee71422b6e4127e2ec9a5ff36196d5f9', 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'reference' => '39d486856e7940ed9e31c06b41c2be759be3a8ea', 'dev_requirement' => \false), 'symplify/simple-php-doc-parser' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/simple-php-doc-parser', 'aliases' => array(), 'reference' => 'd5c17bc4561ff7918750399056ce41e32fba2bf5', 'dev_requirement' => \false), 'symplify/skipper' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/skipper', 'aliases' => array(), 'reference' => '25ce481edd59ba80147d5013875a5be316518b83', 'dev_requirement' => \false), 'symplify/smart-file-system' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/smart-file-system', 'aliases' => array(), 'reference' => 'a32b2ff6d63697d2df3818faa2ed0f7c64c755a4', 'dev_requirement' => \false), 'symplify/symfony-php-config' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symfony-php-config', 'aliases' => array(), 'reference' => '90c6f64626dd0ed78f048ed4a8ac52f0303e23d8', 'dev_requirement' => \false), 'symplify/symplify-kernel' => array('pretty_version' => '9.4.65', 'version' => '9.4.65.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/symplify-kernel', 'aliases' => array(), 'reference' => 'f8596fede12724be135aa49694bfbadda1c419d8', 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.8.7', 'version' => '2.8.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'reference' => '8e708de7c611f626c8792d43f1c78812ea24e6f6', 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.10.0', 'version' => '1.10.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', 'dev_requirement' => \false))); diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y index d9a450379a8..ef0f271c6f7 100644 --- a/vendor/nikic/php-parser/grammar/php7.y +++ b/vendor/nikic/php-parser/grammar/php7.y @@ -530,24 +530,29 @@ non_empty_parameter_list: | non_empty_parameter_list ',' parameter { push($1, $3); } ; -optional_visibility_modifier: +optional_property_modifiers: /* empty */ { $$ = 0; } - | T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } + | optional_property_modifiers property_modifier + { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } +; + +property_modifier: + T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } ; parameter: - optional_attributes optional_visibility_modifier optional_type_without_static + optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis plain_variable { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1); $this->checkParam($$); } - | optional_attributes optional_visibility_modifier optional_type_without_static + | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis plain_variable '=' expr { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1); $this->checkParam($$); } - | optional_attributes optional_visibility_modifier optional_type_without_static + | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis error { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); } ; @@ -556,6 +561,7 @@ type_expr: type { $$ = $1; } | '?' type { $$ = Node\NullableType[$2]; } | union_type { $$ = Node\UnionType[$1]; } + | intersection_type { $$ = Node\IntersectionType[$1]; } ; type: @@ -579,10 +585,24 @@ union_type_without_static: | union_type_without_static '|' type_without_static { push($1, $3); } ; +intersection_type: + type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } + | intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type + { push($1, $3); } +; + +intersection_type_without_static: + type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static + { init($1, $3); } + | intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static + { push($1, $3); } +; + type_expr_without_static: type_without_static { $$ = $1; } | '?' type_without_static { $$ = Node\NullableType[$2]; } | union_type_without_static { $$ = Node\UnionType[$1]; } + | intersection_type_without_static { $$ = Node\IntersectionType[$1]; } ; optional_type_without_static: @@ -599,6 +619,11 @@ optional_return_type: argument_list: '(' ')' { $$ = array(); } | '(' non_empty_argument_list optional_comma ')' { $$ = $2; } + | '(' variadic_placeholder ')' { init($2); } +; + +variadic_placeholder: + T_ELLIPSIS { $$ = Node\VariadicPlaceholder[]; } ; non_empty_argument_list: diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php index 5675b42e4bb..58ae28279cc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php @@ -54,8 +54,7 @@ abstract class FunctionLike extends \PhpParser\Builder\Declaration /** * Sets the return type for PHP 7. * - * @param string|Node\Name|Node\NullableType $type One of array, callable, string, int, float, - * bool, iterable, or a class/interface name. + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type * * @return $this The builder instance (for fluid interface) */ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php index 2744ad54f8c..a5e463b1758 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -40,7 +40,7 @@ class Param implements \PhpParser\Builder /** * Sets type for the parameter. * - * @param string|Node\Name|Node\NullableType|Node\UnionType $type Parameter type + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) */ @@ -55,7 +55,7 @@ class Param implements \PhpParser\Builder /** * Sets type for the parameter. * - * @param string|Node\Name|Node\NullableType|Node\UnionType $type Parameter type + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) * diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php index e04ac93b76d..419ef8ab8de 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -8,8 +8,8 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\NullableType; use PhpParser\Node\Stmt; +use PhpParser\Node\ComplexType; class Property implements \PhpParser\Builder { protected $name; @@ -106,7 +106,7 @@ class Property implements \PhpParser\Builder /** * Sets the property type for PHP 7.4+. * - * @param string|Name|NullableType|Identifier $type + * @param string|Name|Identifier|ComplexType $type * * @return $this */ diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php index 09cf459b908..3975a7ae982 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php @@ -3,13 +3,13 @@ declare (strict_types=1); namespace PhpParser; +use PhpParser\Node\ComplexType; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; -use PhpParser\Node\UnionType; /** * This class defines helpers used in the implementation of builders. Don't use it directly. * @@ -96,29 +96,6 @@ final class BuilderHelpers * @return Name The normalized name */ public static function normalizeName($name) : \PhpParser\Node\Name - { - return self::normalizeNameCommon($name, \false); - } - /** - * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * - * @return Name|Expr The normalized name or expression - */ - public static function normalizeNameOrExpr($name) - { - return self::normalizeNameCommon($name, \true); - } - /** - * Normalizes a name: Converts string names to Name nodes, optionally allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * @param bool $allowExpr Whether to also allow expressions - * - * @return Name|Expr The normalized name, or expression (if allowed) - */ - private static function normalizeNameCommon($name, bool $allowExpr) { if ($name instanceof \PhpParser\Node\Name) { return $name; @@ -135,13 +112,24 @@ final class BuilderHelpers } return new \PhpParser\Node\Name($name); } - if ($allowExpr) { - if ($name instanceof \PhpParser\Node\Expr) { - return $name; - } + throw new \LogicException('RectorPrefix20210927\\Name must be a string or an instance of Node\\Name'); + } + /** + * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. + * + * @param Expr|Name|string $name The name to normalize + * + * @return Name|Expr The normalized name or expression + */ + public static function normalizeNameOrExpr($name) + { + if ($name instanceof \PhpParser\Node\Expr) { + return $name; + } + if (!\is_string($name) && !$name instanceof \PhpParser\Node\Name) { throw new \LogicException('RectorPrefix20210927\\Name must be a string or an instance of Node\\Name or Node\\Expr'); } - throw new \LogicException('RectorPrefix20210927\\Name must be a string or an instance of Node\\Name'); + return self::normalizeName($name); } /** * Normalizes a type: Converts plain-text type names into proper AST representation. @@ -149,15 +137,15 @@ final class BuilderHelpers * In particular, builtin types become Identifiers, custom types become Names and nullables * are wrapped in NullableType nodes. * - * @param string|Name|Identifier|NullableType|UnionType $type The type to normalize + * @param string|Name|Identifier|ComplexType $type The type to normalize * - * @return Name|Identifier|NullableType|UnionType The normalized type + * @return Name|Identifier|ComplexType The normalized type */ public static function normalizeType($type) { if (!\is_string($type)) { - if (!$type instanceof \PhpParser\Node\Name && !$type instanceof \PhpParser\Node\Identifier && !$type instanceof \PhpParser\Node\NullableType && !$type instanceof \PhpParser\Node\UnionType) { - throw new \LogicException('Type must be a string, or an instance of Name, Identifier, NullableType or UnionType'); + if (!$type instanceof \PhpParser\Node\Name && !$type instanceof \PhpParser\Node\Identifier && !$type instanceof \PhpParser\Node\ComplexType) { + throw new \LogicException('Type must be a string, or an instance of Name, Identifier or ComplexType'); } return $type; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index ba7f933c835..dd2ade36e90 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -9,6 +9,7 @@ use PhpParser\Lexer; use PhpParser\Lexer\TokenEmulator\AttributeEmulator; use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator; use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator; +use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator; use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator; use PhpParser\Lexer\TokenEmulator\FnTokenEmulator; use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; @@ -39,7 +40,7 @@ class Emulative extends \PhpParser\Lexer $this->targetPhpVersion = $options['phpVersion'] ?? \PhpParser\Lexer\Emulative::PHP_8_1; unset($options['phpVersion']); parent::__construct($options); - $emulators = [new \PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator(), new \PhpParser\Lexer\TokenEmulator\FnTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\MatchTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator(), new \PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\AttributeEmulator(), new \PhpParser\Lexer\TokenEmulator\EnumTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator()]; + $emulators = [new \PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator(), new \PhpParser\Lexer\TokenEmulator\FnTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\MatchTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator(), new \PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\AttributeEmulator(), new \PhpParser\Lexer\TokenEmulator\EnumTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator(), new \PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator()]; // Collect emulators that are relevant for the PHP version we're running // and the PHP version we're targeting for emulation. foreach ($emulators as $emulator) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php new file mode 100644 index 00000000000..c60d8dbdbe9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -0,0 +1,51 @@ +resolveIntegerOrFloatToken($tokens[$i + 1][1]); + \array_splice($tokens, $i, 2, [[$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]]]); + $c--; + } + } + return $tokens; + } + private function resolveIntegerOrFloatToken(string $str) : int + { + $str = \substr($str, 1); + $str = \str_replace('_', '', $str); + $num = \octdec($str); + return \is_float($num) ? \T_DNUMBER : \T_LNUMBER; + } + /** + * @param string $code + * @param mixed[] $tokens + */ + public function reverseEmulate($code, $tokens) : array + { + // Explicit octals were not legal code previously, don't bother. + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php index 87b265df310..96554e0fc9f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace PhpParser\Node; +use PhpParser\Node\VariadicPlaceholder; use PhpParser\NodeAbstract; class Arg extends \PhpParser\NodeAbstract { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php new file mode 100644 index 00000000000..5a1d720e77a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php @@ -0,0 +1,14 @@ + + */ + public abstract function getRawArgs() : array; + /** + * Returns whether this call expression is actually a first class callable. + */ + public function isFirstClassCallable() : bool + { + foreach ($this->getRawArgs() as $arg) { + if ($arg instanceof \PhpParser\Node\VariadicPlaceholder) { + return \true; + } + } + return \false; + } + /** + * Assert that this is not a first-class callable and return only ordinary Args. + * + * @return Arg[] + */ + public function getArgs() : array + { + \assert(!$this->isFirstClassCallable()); + return $this->getRawArgs(); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php index eb20be13016..aaf09013822 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -16,7 +16,7 @@ class Closure extends \PhpParser\Node\Expr implements \PhpParser\Node\FunctionLi public $params; /** @var ClosureUse[] use()s */ public $uses; - /** @var null|Node\Identifier|Node\Name|Node\NullableType|Node\UnionType Return type */ + /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ public $returnType; /** @var Node\Stmt[] Statements */ public $stmts; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php index a36ae9d5a51..871bd84f1b6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -5,18 +5,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; use PhpParser\Node\Expr; -class FuncCall extends \PhpParser\Node\Expr +class FuncCall extends \PhpParser\Node\Expr\CallLike { /** @var Node\Name|Expr Function name */ public $name; - /** @var Node\Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a function call node. * - * @param Node\Name|Expr $name Function name - * @param Node\Arg[] $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $name Function name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct($name, array $args = [], array $attributes = []) { @@ -32,4 +32,8 @@ class FuncCall extends \PhpParser\Node\Expr { return 'Expr_FuncCall'; } + public function getRawArgs() : array + { + return $this->args; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php index f109014b92f..b7b4944d74c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -6,21 +6,22 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class MethodCall extends \PhpParser\Node\Expr +use PhpParser\Node\VariadicPlaceholder; +class MethodCall extends \PhpParser\Node\Expr\CallLike { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Method name */ public $name; - /** @var Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param Arg[] $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct(\PhpParser\Node\Expr $var, $name, array $args = [], array $attributes = []) { @@ -37,4 +38,8 @@ class MethodCall extends \PhpParser\Node\Expr { return 'Expr_MethodCall'; } + public function getRawArgs() : array + { + return $this->args; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php index 2eb9dd83e88..ca1f00462c4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -4,18 +4,20 @@ declare (strict_types=1); namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; -class New_ extends \PhpParser\Node\Expr +use PhpParser\Node\VariadicPlaceholder; +class New_ extends \PhpParser\Node\Expr\CallLike { /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ public $class; - /** @var Node\Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a function call node. * * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param Node\Arg[] $args Arguments + * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct($class, array $args = [], array $attributes = []) @@ -32,4 +34,8 @@ class New_ extends \PhpParser\Node\Expr { return 'Expr_New'; } + public function getRawArgs() : array + { + return $this->args; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php index fd36540429d..4f86bc95748 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -4,23 +4,25 @@ declare (strict_types=1); namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class StaticCall extends \PhpParser\Node\Expr +use PhpParser\Node\VariadicPlaceholder; +class StaticCall extends \PhpParser\Node\Expr\CallLike { /** @var Node\Name|Expr Class name */ public $class; /** @var Identifier|Expr Method name */ public $name; - /** @var Node\Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a static method call node. * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param Node\Arg[] $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct($class, $name, array $args = [], array $attributes = []) { @@ -37,4 +39,8 @@ class StaticCall extends \PhpParser\Node\Expr { return 'Expr_StaticCall'; } + public function getRawArgs() : array + { + return $this->args; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php index 309ecde71f2..b7af83bf4b2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php @@ -21,7 +21,7 @@ interface FunctionLike extends \PhpParser\Node /** * Get the declared return type or null * - * @return null|Identifier|Name|NullableType|UnionType + * @return null|Identifier|Name|ComplexType */ public function getReturnType(); /** diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php new file mode 100644 index 00000000000..3912fb79846 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php @@ -0,0 +1,30 @@ +attributes = $attributes; + $this->types = $types; + } + public function getSubNodeNames() : array + { + return ['types']; + } + public function getType() : string + { + return 'IntersectionType'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php index bce28d0fff1..0fa0d59fbe4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php @@ -3,8 +3,7 @@ declare (strict_types=1); namespace PhpParser\Node; -use PhpParser\NodeAbstract; -class NullableType extends \PhpParser\NodeAbstract +class NullableType extends \PhpParser\Node\ComplexType { /** @var Identifier|Name Type */ public $type; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php index ee826a34264..bf5ba231323 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -6,7 +6,7 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; class Param extends \PhpParser\NodeAbstract { - /** @var null|Identifier|Name|NullableType|UnionType Type declaration */ + /** @var null|Identifier|Name|ComplexType Type declaration */ public $type; /** @var bool Whether parameter is passed by reference */ public $byRef; @@ -23,14 +23,14 @@ class Param extends \PhpParser\NodeAbstract /** * Constructs a parameter node. * - * @param Expr\Variable|Expr\Error $var Parameter variable - * @param null|Expr $default Default value - * @param null|string|Identifier|Name|NullableType|UnionType $type Type declaration - * @param bool $byRef Whether is passed by reference - * @param bool $variadic Whether this is a variadic argument - * @param array $attributes Additional attributes - * @param int $flags Optional visibility flags - * @param AttributeGroup[] $attrGroups PHP attribute groups + * @param Expr\Variable|Expr\Error $var Parameter variable + * @param null|Expr $default Default value + * @param null|string|Identifier|Name|ComplexType $type Type declaration + * @param bool $byRef Whether is passed by reference + * @param bool $variadic Whether this is a variadic argument + * @param array $attributes Additional attributes + * @param int $flags Optional visibility flags + * @param AttributeGroup[] $attrGroups PHP attribute groups */ public function __construct($var, \PhpParser\Node\Expr $default = null, $type = null, bool $byRef = \false, bool $variadic = \false, array $attributes = [], int $flags = 0, array $attrGroups = []) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php index e15581020f6..94116ee621f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -56,6 +56,10 @@ class LNumber extends \PhpParser\Node\Scalar if (!$allowInvalidOctal && \strpbrk($str, '89')) { throw new \PhpParser\Error('Invalid numeric literal', $attributes); } + // Strip optional explicit octal prefix. + if ('o' === $str[1] || 'O' === $str[1]) { + $str = \substr($str, 2); + } // use intval instead of octdec to get proper cutting behavior with malformed numbers $attributes['kind'] = \PhpParser\Node\Scalar\LNumber::KIND_OCT; return new \PhpParser\Node\Scalar\LNumber(\intval($str, 8), $attributes); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php index 49d2a134698..1fce55e4b7e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -15,7 +15,7 @@ class ClassMethod extends \PhpParser\Node\Stmt implements \PhpParser\Node\Functi public $name; /** @var Node\Param[] Parameters */ public $params; - /** @var null|Node\Identifier|Node\Name|Node\NullableType|Node\UnionType Return type */ + /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ public $returnType; /** @var Node\Stmt[]|null Statements */ public $stmts; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php index 177e55caf9a..8ff110a3091 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -16,7 +16,7 @@ class Function_ extends \PhpParser\Node\Stmt implements \PhpParser\Node\Function public $name; /** @var Node\Param[] Parameters */ public $params; - /** @var null|Node\Identifier|Node\Name|Node\NullableType|Node\UnionType Return type */ + /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ public $returnType; /** @var Node\Stmt[] Statements */ public $stmts; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php index 1d9077fa0dc..8c29dfe6f14 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @@ -4,28 +4,27 @@ declare (strict_types=1); namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\NullableType; -use PhpParser\Node\UnionType; class Property extends \PhpParser\Node\Stmt { /** @var int Modifiers */ public $flags; /** @var PropertyProperty[] Properties */ public $props; - /** @var null|Identifier|Name|NullableType|UnionType Type declaration */ + /** @var null|Identifier|Name|ComplexType Type declaration */ public $type; /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties - * @param array $attributes Additional attributes - * @param null|string|Identifier|Name|NullableType|UnionType $type Type declaration - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param int $flags Modifiers + * @param PropertyProperty[] $props Properties + * @param array $attributes Additional attributes + * @param null|string|Identifier|Name|ComplexType $type Type declaration + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ public function __construct(int $flags, array $props, array $attributes = [], $type = null, array $attrGroups = []) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php index d7a94136ce4..7802cf9f48c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php @@ -3,8 +3,7 @@ declare (strict_types=1); namespace PhpParser\Node; -use PhpParser\NodeAbstract; -class UnionType extends \PhpParser\NodeAbstract +class UnionType extends \PhpParser\Node\ComplexType { /** @var (Identifier|Name)[] Types */ public $types; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php new file mode 100644 index 00000000000..0dc69279b87 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php @@ -0,0 +1,29 @@ +attributes = $attributes; + } + public function getType() : string + { + return 'VariadicPlaceholder'; + } + public function getSubNodeNames() : array + { + return []; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index 005d16bf5ea..20c437191a3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -173,7 +173,7 @@ class NameResolver extends \PhpParser\NodeVisitorAbstract $node->type = $this->resolveType($node->type); return $node; } - if ($node instanceof \PhpParser\Node\UnionType) { + if ($node instanceof \PhpParser\Node\UnionType || $node instanceof \PhpParser\Node\IntersectionType) { foreach ($node->types as &$type) { $type = $this->resolveType($type); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index c792f42d57d..81b8e9da229 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -17,26 +17,26 @@ use PhpParser\Node\Stmt; class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1187; - protected $gotoTableSize = 579; + protected $actionTableSize = 1196; + protected $gotoTableSize = 585; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 415; - protected $numNonLeafStates = 702; + protected $YY2TBLSTATE = 419; + protected $numNonLeafStates = 710; protected $symbolToName = array("EOF", "error", "T_THROW", "T_INCLUDE", "T_INCLUDE_ONCE", "T_EVAL", "T_REQUIRE", "T_REQUIRE_ONCE", "','", "T_LOGICAL_OR", "T_LOGICAL_XOR", "T_LOGICAL_AND", "T_PRINT", "T_YIELD", "T_DOUBLE_ARROW", "T_YIELD_FROM", "'='", "T_PLUS_EQUAL", "T_MINUS_EQUAL", "T_MUL_EQUAL", "T_DIV_EQUAL", "T_CONCAT_EQUAL", "T_MOD_EQUAL", "T_AND_EQUAL", "T_OR_EQUAL", "T_XOR_EQUAL", "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", "T_BOOLEAN_OR", "T_BOOLEAN_AND", "'|'", "'^'", "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", "T_IS_EQUAL", "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", "T_IS_NOT_IDENTICAL", "T_SPACESHIP", "'<'", "T_IS_SMALLER_OR_EQUAL", "'>'", "T_IS_GREATER_OR_EQUAL", "T_SL", "T_SR", "'+'", "'-'", "'.'", "'*'", "'/'", "'%'", "'!'", "T_INSTANCEOF", "'~'", "T_INC", "T_DEC", "T_INT_CAST", "T_DOUBLE_CAST", "T_STRING_CAST", "T_ARRAY_CAST", "T_OBJECT_CAST", "T_BOOL_CAST", "T_UNSET_CAST", "'@'", "T_POW", "'['", "T_NEW", "T_CLONE", "T_EXIT", "T_IF", "T_ELSEIF", "T_ELSE", "T_ENDIF", "T_LNUMBER", "T_DNUMBER", "T_STRING", "T_STRING_VARNAME", "T_VARIABLE", "T_NUM_STRING", "T_INLINE_HTML", "T_ENCAPSED_AND_WHITESPACE", "T_CONSTANT_ENCAPSED_STRING", "T_ECHO", "T_DO", "T_WHILE", "T_ENDWHILE", "T_FOR", "T_ENDFOR", "T_FOREACH", "T_ENDFOREACH", "T_DECLARE", "T_ENDDECLARE", "T_AS", "T_SWITCH", "T_MATCH", "T_ENDSWITCH", "T_CASE", "T_DEFAULT", "T_BREAK", "T_CONTINUE", "T_GOTO", "T_FUNCTION", "T_FN", "T_CONST", "T_RETURN", "T_TRY", "T_CATCH", "T_FINALLY", "T_USE", "T_INSTEADOF", "T_GLOBAL", "T_STATIC", "T_ABSTRACT", "T_FINAL", "T_PRIVATE", "T_PROTECTED", "T_PUBLIC", "T_READONLY", "T_VAR", "T_UNSET", "T_ISSET", "T_EMPTY", "T_HALT_COMPILER", "T_CLASS", "T_TRAIT", "T_INTERFACE", "T_ENUM", "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", "T_NULLSAFE_OBJECT_OPERATOR", "T_LIST", "T_ARRAY", "T_CALLABLE", "T_CLASS_C", "T_TRAIT_C", "T_METHOD_C", "T_FUNC_C", "T_LINE", "T_FILE", "T_START_HEREDOC", "T_END_HEREDOC", "T_DOLLAR_OPEN_CURLY_BRACES", "T_CURLY_OPEN", "T_PAAMAYIM_NEKUDOTAYIM", "T_NAMESPACE", "T_NS_C", "T_DIR", "T_NS_SEPARATOR", "T_ELLIPSIS", "T_NAME_FULLY_QUALIFIED", "T_NAME_QUALIFIED", "T_NAME_RELATIVE", "T_ATTRIBUTE", "';'", "']'", "'{'", "'}'", "'('", "')'", "'`'", "'\"'", "'\$'"); protected $tokenToSymbol = array(0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 161, 35, 162, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158); - protected $action = array(131, 132, 133, 563, 134, 135, 0, 714, 715, 716, 136, 36, 977, 976, 975, 978, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 100, 101, 102, 103, 104, 1051, 1052, 1053, 1050, 1049, 1048, 1054, 708, 707, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, 539, 540, 903, 2, 717, -32766, -32766, -32766, 988, 989, -88, 914, 440, 441, 442, 365, 366, 462, 265, 137, 391, 721, 722, 723, 724, 409, -32766, 415, -32766, -32766, -32766, -32766, -32766, -305, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 755, 564, 756, 757, 758, 759, 747, 748, 331, 332, 750, 751, 736, 737, 738, 740, 741, 742, 341, 782, 783, 784, 785, 786, 787, 743, 744, 565, 566, 776, 767, 765, 766, 779, 762, 763, 981, 415, 567, 568, 761, 569, 570, 571, 572, 573, 574, -193, -566, 535, 485, 790, 764, 575, 576, -566, 138, -32766, -32766, -32766, 131, 132, 133, 563, 134, 135, 1002, 714, 715, 716, 136, 36, 1043, -32766, -32766, -32766, 799, -86, -32766, 1276, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1051, 1052, 1053, 1050, 1049, 1048, 1054, -32766, 708, 707, -32766, -32766, -32766, 1241, 238, 463, -32766, -32766, -32766, -32766, -32766, -32766, 883, 1213, 125, 1176, 1175, 1177, 717, 801, 689, -32766, 1029, -32766, -32766, -32766, -32766, -32766, -192, -32766, -32766, -32766, 265, 137, 391, 721, 722, 723, 724, 883, 945, 415, 680, 12, 34, 247, -86, -305, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 755, 564, 756, 757, 758, 759, 747, 748, 331, 332, 750, 751, 736, 737, 738, 740, 741, 742, 341, 782, 783, 784, 785, 786, 787, 743, 744, 565, 566, 776, 767, 765, 766, 779, 762, 763, 873, 585, 567, 568, 761, 569, 570, 571, 572, 573, 574, -193, 81, 82, 83, -566, 764, 575, 576, -566, 138, 739, 709, 710, 711, 712, 713, 873, 714, 715, 716, 752, 753, 35, 33, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -264, 267, -32766, -32766, -32766, -32766, 105, 106, 107, 80, 267, 127, 1001, 108, 946, 314, 885, 717, 675, 367, 366, 143, 108, 800, -32766, 1027, -32766, -32766, 148, 409, -192, 718, 719, 720, 721, 722, 723, 724, 237, 1181, 788, 276, -517, 885, 315, 675, 149, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 755, 778, 756, 757, 758, 759, 747, 748, 749, 777, 750, 751, 736, 737, 738, 740, 741, 742, 781, 782, 783, 784, 785, 786, 787, 743, 744, 745, 746, 776, 767, 765, 766, 779, 762, 763, -32766, -32766, 754, 760, 761, 768, 769, 771, 770, 772, 773, 251, -517, -517, 448, 449, 764, 775, 774, 48, 49, 50, 494, 51, 52, 795, 799, -517, 591, 53, 54, -111, 55, 986, 708, 707, -111, 792, -111, -517, 298, -523, 986, 294, 631, 24, -111, -111, -111, -111, -111, -111, -111, -111, 988, 989, 300, 1286, 1261, -343, 1287, -343, 1174, 988, 989, 1260, 312, 56, 57, -32766, -32766, -32766, -111, 58, 1201, 59, 244, 245, 60, 61, 62, 63, 64, 65, 66, 67, -516, 26, 266, 68, 429, 495, -319, 647, 648, 1207, 1208, 496, 1172, 799, 1181, 796, 287, 1205, 40, 23, 497, 73, 498, 328, 499, 314, 500, 794, 329, 501, 502, 826, 677, 827, 42, 43, 430, 362, 361, 883, 44, 503, 147, 394, -16, -557, 353, 327, 355, -557, 1181, 1176, 1175, 1177, -518, 504, 505, 506, 359, -515, 1257, 47, 363, 364, -516, -516, 374, 507, 508, 799, 1195, 1196, 1197, 1198, 1192, 1193, 286, -563, 425, -516, 798, 151, 1199, 1194, -563, 426, 1176, 1175, 1177, 287, 883, -516, 427, -522, 69, 799, 310, 311, 314, 30, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, -153, -153, -153, 368, 369, -518, -518, 681, 428, 873, -515, -515, 290, 291, 883, -153, 805, -153, 799, -153, -518, -153, 708, 707, 152, -515, 790, 358, -111, 1088, 1090, 360, -518, 153, 883, 139, 376, -515, 11, 126, -515, 314, -111, -111, 682, 155, 279, -520, 102, 103, 104, 31, 859, -111, -111, -111, -111, 46, 287, -32766, 873, 623, 624, 73, 684, 1174, 826, 314, 827, 1028, -79, 700, -32766, -32766, -32766, 122, -32766, 123, -32766, 128, -32766, 708, 707, -32766, 885, 883, 675, -153, -32766, -32766, -32766, 708, 707, 129, -32766, -32766, 142, 873, 156, 73, -32766, 406, 157, 314, -515, -515, 158, 140, 159, -32766, -75, -520, -520, 314, 26, 691, -73, 873, -72, -515, -71, 288, 289, -563, -70, -69, 799, -563, -32766, -68, 1205, -515, -32766, -67, 1174, 885, -66, 675, -520, 72, -47, -32766, -32766, -32766, -18, -32766, 146, -32766, 124, -32766, 268, 275, -32766, 988, 989, 690, -51, -32766, -32766, -32766, 693, 882, 145, -32766, -32766, 899, 108, 277, 873, -32766, 406, 278, 931, 280, 675, 281, 321, 144, -32766, 267, 507, 508, 799, 1195, 1196, 1197, 1198, 1192, 1193, 655, 130, 790, 885, 1288, 675, 1199, 1194, 543, 1058, -32766, 650, 13, -32766, 537, 632, 1174, 424, 71, 621, 915, 311, 314, -32766, -32766, -32766, 668, -32766, 637, -32766, -32766, -32766, 293, 1212, -32766, 916, 445, 638, 549, -32766, -32766, -32766, 473, -481, -32766, -32766, -32766, -4, 883, -551, 1174, -32766, 406, 651, 885, 589, 675, -32766, -32766, -32766, -32766, -32766, 295, -32766, 901, -32766, 0, 798, -32766, 0, 0, 0, 0, -32766, -32766, -32766, -32766, 0, 292, -32766, -32766, 0, 1174, 0, 0, -32766, 406, 299, 0, -32766, -32766, -32766, 0, -32766, -32766, -32766, 1214, -32766, 0, 0, -32766, 0, 287, -471, 468, -32766, -32766, -32766, -32766, 7, 15, -32766, -32766, 357, 1174, 555, 38, -32766, 406, 1202, 883, -32766, -32766, -32766, 39, -32766, -32766, -32766, 697, -32766, 698, 873, -32766, 864, 955, 932, 939, -32766, -32766, -32766, 929, 940, 862, -32766, -32766, 927, 1032, 1035, 1036, -32766, 406, 1033, 1034, 360, 1040, 420, 883, 810, -32766, 1227, 285, 1245, 694, 1279, -111, -111, 626, 860, 32, 309, 356, 676, 679, 683, 818, -111, -111, -111, -111, 685, 686, -32766, 687, 688, 692, 678, 1206, 1174, 1283, 1285, 821, 820, 829, 908, -32766, -32766, -32766, 9, -32766, 947, -32766, 828, -32766, 873, 1284, -32766, 885, 907, 675, -4, -32766, -32766, -32766, 909, 906, 1160, -32766, -32766, 892, -242, -242, -242, -32766, 406, 902, 360, 26, 890, 937, 938, 1282, -32766, 1239, 1228, 1246, 1252, -111, -111, 799, 873, 1255, -267, 1205, -549, -523, -522, 859, -111, -111, -111, -111, -521, 1, 27, 28, -241, -241, -241, 37, 41, 45, 360, 70, 74, 75, 76, 77, 78, 79, 141, 0, 150, -111, -111, 154, 243, 316, 342, 885, 343, 675, -242, 859, -111, -111, -111, -111, 344, 345, 346, 347, 348, 349, 508, 350, 1195, 1196, 1197, 1198, 1192, 1193, 351, 352, 354, 421, 0, -265, 1199, 1194, -264, 17, 18, 19, 20, 885, 22, 675, -241, 393, 71, 314, 464, 311, 314, 465, 472, 475, 476, 477, 478, 482, 483, 484, 492, 662, 1185, 1128, 1203, 1003, 1164, -269, -103, 16, 21, 25, 284, 392, 582, 586, 613, 667, 1132, 1180, 1129, 1258, 0, -485, 1145); - protected $actionCheck = array(2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 119, 120, 121, 122, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 117, 118, 1, 8, 57, 9, 10, 11, 137, 138, 31, 128, 129, 130, 131, 106, 107, 31, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, 33, 34, 35, 36, 8, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 1, 80, 136, 137, 138, 139, 140, 141, 142, 143, 144, 8, 1, 85, 101, 80, 150, 151, 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, 6, 7, 164, 9, 10, 11, 12, 13, 123, 9, 10, 11, 82, 31, 30, 85, 32, 33, 34, 35, 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, 30, 37, 38, 9, 10, 11, 1, 14, 161, 9, 10, 11, 9, 10, 11, 1, 146, 14, 155, 156, 157, 57, 1, 161, 30, 162, 32, 33, 34, 35, 30, 8, 32, 33, 34, 71, 72, 73, 74, 75, 76, 77, 1, 31, 80, 31, 8, 147, 148, 97, 164, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 84, 1, 136, 137, 138, 139, 140, 141, 142, 143, 144, 164, 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, 3, 4, 5, 6, 7, 84, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 164, 57, 9, 9, 10, 11, 53, 54, 55, 161, 57, 8, 1, 69, 159, 167, 159, 57, 161, 106, 107, 8, 69, 159, 30, 1, 32, 33, 14, 116, 164, 71, 72, 73, 74, 75, 76, 77, 97, 1, 80, 30, 70, 159, 70, 161, 14, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 9, 10, 136, 137, 138, 139, 140, 141, 142, 143, 144, 8, 134, 135, 134, 135, 150, 151, 152, 2, 3, 4, 5, 6, 7, 80, 82, 149, 51, 12, 13, 101, 15, 116, 37, 38, 106, 80, 108, 161, 8, 163, 116, 113, 75, 76, 116, 117, 118, 119, 120, 121, 122, 123, 137, 138, 8, 80, 1, 106, 83, 108, 80, 137, 138, 8, 8, 50, 51, 9, 10, 11, 128, 56, 1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, 72, 73, 74, 162, 75, 76, 78, 79, 80, 116, 82, 1, 156, 158, 86, 87, 88, 89, 163, 91, 8, 93, 167, 95, 156, 8, 98, 99, 106, 161, 108, 103, 104, 105, 106, 107, 1, 109, 110, 101, 102, 31, 160, 115, 116, 8, 164, 1, 155, 156, 157, 70, 124, 125, 126, 8, 70, 1, 70, 106, 107, 134, 135, 8, 136, 137, 82, 139, 140, 141, 142, 143, 144, 145, 1, 8, 149, 155, 14, 151, 152, 8, 8, 155, 156, 157, 158, 1, 161, 8, 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 75, 76, 77, 106, 107, 134, 135, 31, 8, 84, 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, 149, 96, 37, 38, 14, 149, 80, 149, 128, 59, 60, 106, 161, 14, 1, 161, 106, 161, 108, 161, 70, 167, 117, 118, 31, 14, 30, 70, 50, 51, 52, 14, 127, 128, 129, 130, 131, 70, 158, 74, 84, 111, 112, 163, 31, 80, 106, 167, 108, 159, 31, 161, 87, 88, 89, 16, 91, 16, 93, 16, 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, 105, 37, 38, 16, 109, 110, 16, 84, 16, 163, 115, 116, 16, 167, 134, 135, 16, 161, 16, 124, 31, 134, 135, 167, 70, 31, 31, 84, 31, 149, 31, 134, 135, 160, 31, 31, 82, 164, 74, 31, 86, 161, 116, 31, 80, 159, 31, 161, 161, 154, 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, 31, 31, 98, 137, 138, 31, 31, 103, 104, 105, 31, 31, 31, 109, 110, 38, 69, 35, 84, 115, 116, 35, 159, 35, 161, 35, 35, 70, 124, 57, 136, 137, 82, 139, 140, 141, 142, 143, 144, 77, 31, 80, 159, 83, 161, 151, 152, 89, 82, 74, 94, 97, 85, 85, 90, 80, 128, 163, 113, 128, 166, 167, 87, 88, 89, 92, 91, 96, 93, 116, 95, 133, 146, 98, 128, 97, 100, 153, 103, 104, 105, 97, 149, 74, 109, 110, 0, 1, 163, 80, 115, 116, 100, 159, 153, 161, 87, 88, 89, 124, 91, 114, 93, 154, 95, -1, 155, 98, -1, -1, -1, -1, 103, 104, 105, 74, -1, 132, 109, 110, -1, 80, -1, -1, 115, 116, 132, -1, 87, 88, 89, -1, 91, 124, 93, 146, 95, -1, -1, 98, -1, 158, 149, 102, 103, 104, 105, 74, 149, 149, 109, 110, 149, 80, 81, 159, 115, 116, 160, 1, 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, 84, 98, 159, 159, 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, 159, 159, 106, 159, 108, 1, 160, 124, 160, 113, 160, 162, 160, 117, 118, 160, 162, 161, 161, 161, 161, 161, 161, 127, 128, 129, 130, 131, 161, 161, 74, 161, 161, 161, 161, 166, 80, 162, 162, 162, 162, 162, 162, 87, 88, 89, 150, 91, 162, 93, 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, 164, 86, 163, 163, 163, 127, 128, 129, 130, 131, 163, 163, 163, 163, 100, 101, 102, 163, 163, 163, 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, 163, 163, 163, 163, -1, 164, 151, 152, 164, 164, 164, 164, 164, 159, 164, 161, 162, 164, 163, 167, 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, 165, 165); - protected $actionBase = array(0, -2, 154, 565, 876, 948, 984, 514, 53, 398, 822, 307, 307, 67, 307, 307, 616, 673, 673, 724, 673, 204, 653, 231, 231, 231, 625, 625, 625, 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 211, 202, 288, 677, 1010, 1016, 1012, 1017, 1008, 1007, 1011, 1013, 1018, 897, 899, 771, 900, 901, 902, 907, 1014, 835, 1009, 1015, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 340, 193, 432, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 160, 160, 160, 341, 684, 684, 190, 184, 610, 47, 985, 985, 985, 985, 985, 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, 7, 7, 371, -25, -25, -25, -25, 540, 385, 576, 358, 45, 394, 638, 638, 656, 656, 367, 367, 367, 367, -78, -78, -78, -66, 319, 457, 452, 60, 423, 586, 586, 586, 586, 423, 423, 423, 423, 779, 849, 423, 423, 423, 511, 516, 516, 518, 300, 300, 300, 516, 600, 758, 90, 600, 90, 195, 418, 743, -40, 260, 412, -107, 743, 617, 627, 603, 143, 741, 483, 741, 1006, 757, 749, 719, 824, 853, 1019, 766, 895, 782, 896, 321, 679, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 982, 438, 1006, 386, 982, 982, 982, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 590, 386, 410, 459, 386, 781, 438, 211, 783, 211, 211, 211, 211, 943, 211, 211, 211, 211, 211, 211, 956, 753, 37, 211, 202, 52, 52, 550, 131, 52, 52, 52, 52, 211, 211, 211, 483, 762, 714, 537, 731, 213, 762, 762, 762, 142, 76, 183, 135, 570, 751, 751, 756, 918, 918, 751, 740, 751, 756, 926, 751, 918, 773, 350, 597, 542, 577, 604, 918, 473, 751, 751, 751, 751, 611, 751, 444, 360, 751, 751, 775, 760, 784, 46, 918, 918, 918, 784, 567, 728, 728, 728, 798, 800, 735, 759, 499, 489, 648, 314, 767, 759, 759, 751, 585, 735, 759, 735, 759, 739, 759, 759, 759, 735, 759, 751, 740, 547, 759, 722, 640, 228, 759, 6, 928, 929, 30, 930, 924, 931, 970, 932, 933, 839, 941, 925, 934, 920, 919, 770, 699, 701, 789, 723, 917, 737, 737, 737, 910, 737, 737, 737, 737, 737, 737, 737, 737, 699, 788, 793, 718, 748, 945, 703, 717, 716, 834, 1020, 1021, 721, 736, 943, 1000, 935, 786, 720, 980, 953, 829, 837, 954, 955, 983, 1001, 1002, 855, 747, 856, 857, 826, 957, 840, 737, 928, 933, 925, 934, 920, 919, 745, 742, 734, 738, 733, 729, 725, 727, 755, 909, 715, 828, 956, 911, 699, 830, 975, 836, 986, 989, 838, 768, 750, 832, 858, 958, 960, 967, 841, 1003, 794, 976, 906, 990, 774, 859, 991, 992, 993, 994, 860, 847, 848, 850, 803, 754, 971, 761, 866, 361, 778, 780, 969, 379, 942, 851, 868, 871, 995, 996, 997, 874, 937, 804, 977, 746, 978, 974, 805, 806, 594, 772, 776, 650, 659, 880, 881, 882, 940, 764, 752, 810, 811, 1004, 885, 671, 812, 726, 891, 999, 730, 732, 763, 852, 790, 777, 744, 968, 769, 815, 894, 816, 817, 818, 998, 821, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, 0, 0, 307, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, 291, 773, 300, 300, 300, 300, 423, 423, 423, 423, -88, -88, 300, 300, 423, 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, 0, 386, 90, 0, 740, 740, 740, 740, 0, 0, 0, 0, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 90, 0, 386, 0, 740, 740, 423, 773, 773, 498, 0, 423, 0, 0, 0, 0, 386, 740, 386, 438, 90, 438, 438, 52, 211, 498, 468, 468, 468, 468, 0, 483, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 740, 0, 773, 0, 740, 740, 740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, 918, 0, 0, 0, 0, 751, 0, 0, 0, 0, 0, 0, 751, 926, 0, 0, 0, 0, 0, 0, 740, 0, 0, 0, 0, 0, 0, 0, 0, 737, 768, 0, 768, 0, 737, 737, 737); - protected $actionDefault = array(3, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 569, 569, 569, 569, 32767, 32767, 246, 103, 32767, 32767, 445, 363, 363, 363, 32767, 32767, 513, 513, 513, 513, 513, 513, 32767, 32767, 32767, 32767, 32767, 32767, 445, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 37, 7, 8, 10, 11, 50, 17, 32767, 32767, 32767, 32767, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 562, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 449, 428, 429, 431, 432, 362, 514, 568, 304, 565, 361, 146, 316, 306, 234, 307, 250, 450, 251, 451, 454, 455, 211, 278, 358, 150, 392, 446, 394, 444, 448, 393, 368, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 366, 367, 447, 425, 424, 423, 390, 32767, 32767, 391, 395, 365, 398, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 396, 397, 414, 415, 412, 413, 416, 32767, 417, 418, 419, 420, 32767, 32767, 32767, 32767, 342, 340, 405, 406, 295, 295, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 507, 422, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 101, 509, 387, 389, 477, 400, 401, 399, 369, 32767, 484, 32767, 103, 486, 32767, 32767, 32767, 112, 32767, 32767, 272, 32767, 508, 32767, 515, 515, 32767, 470, 101, 194, 32767, 194, 194, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 576, 470, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 32767, 194, 111, 32767, 32767, 32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 189, 32767, 260, 262, 103, 530, 194, 32767, 489, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 482, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 470, 410, 139, 32767, 139, 515, 402, 403, 404, 472, 515, 515, 515, 32767, 32767, 32767, 32767, 487, 487, 101, 101, 101, 101, 482, 32767, 32767, 112, 100, 100, 100, 100, 100, 104, 102, 32767, 32767, 32767, 32767, 100, 32767, 102, 102, 32767, 32767, 217, 208, 215, 102, 32767, 534, 535, 215, 102, 219, 219, 219, 239, 239, 461, 297, 102, 100, 102, 102, 196, 297, 297, 32767, 102, 461, 297, 461, 297, 198, 297, 297, 297, 461, 297, 32767, 32767, 102, 297, 210, 100, 100, 297, 32767, 32767, 32767, 472, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 502, 32767, 519, 532, 408, 409, 411, 517, 433, 434, 435, 436, 437, 438, 439, 441, 564, 32767, 476, 32767, 32767, 32767, 32767, 315, 574, 32767, 574, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 575, 32767, 515, 32767, 32767, 32767, 32767, 407, 9, 76, 43, 44, 52, 58, 493, 494, 495, 496, 490, 491, 497, 492, 32767, 498, 540, 32767, 32767, 516, 567, 32767, 32767, 32767, 32767, 32767, 32767, 139, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 502, 32767, 137, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 515, 32767, 32767, 32767, 292, 294, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 515, 32767, 32767, 32767, 280, 282, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 277, 32767, 32767, 357, 32767, 32767, 32767, 32767, 336, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 152, 152, 3, 3, 318, 152, 152, 152, 318, 152, 318, 318, 318, 152, 152, 152, 152, 152, 152, 184, 254, 257, 239, 239, 152, 328, 152); - protected $goto = array(192, 192, 663, 417, 636, 911, 983, 990, 991, 411, 302, 303, 324, 557, 308, 416, 325, 418, 615, 1005, 671, 317, 317, 317, 317, 163, 163, 163, 163, 216, 193, 189, 189, 173, 175, 211, 189, 189, 189, 189, 189, 190, 190, 190, 190, 190, 190, 184, 185, 186, 187, 188, 213, 211, 214, 515, 516, 407, 517, 519, 520, 521, 522, 523, 524, 525, 526, 1074, 164, 165, 166, 191, 167, 168, 169, 162, 170, 171, 172, 174, 210, 212, 215, 233, 236, 239, 240, 242, 253, 254, 255, 256, 257, 258, 259, 261, 262, 263, 264, 271, 272, 305, 306, 307, 412, 413, 414, 562, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 176, 232, 177, 194, 195, 196, 234, 184, 185, 186, 187, 188, 213, 1074, 197, 178, 179, 180, 198, 194, 181, 235, 199, 161, 200, 201, 182, 202, 203, 204, 183, 205, 206, 207, 208, 209, 819, 579, 601, 601, 541, 532, 815, 816, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 954, 928, 928, 926, 928, 695, 817, 531, 963, 958, 381, 385, 542, 580, 584, 383, 532, 541, 550, 551, 390, 560, 581, 595, 596, 824, 793, 872, 867, 868, 881, 14, 825, 869, 822, 870, 871, 823, 480, 850, 481, 875, 527, 527, 527, 527, 488, 583, 1222, 1222, 791, 1026, 1022, 1023, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1220, 1220, 812, 812, 599, 633, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 313, 297, 1173, 1173, 1173, 987, 282, 282, 282, 282, 987, 987, 987, 987, 987, 987, 987, 987, 987, 447, 447, 432, 249, 249, 1173, 554, 432, 432, 447, 1173, 1173, 1173, 1173, 1046, 1047, 1173, 1173, 1173, 1254, 1254, 1254, 1254, 337, 797, 1272, 1272, 930, 246, 246, 246, 246, 248, 250, 888, 335, 876, 340, 877, 889, 1249, 1250, 1272, 518, 518, 832, 1262, 340, 340, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 1275, 844, 340, 340, 831, 340, 797, 1289, 797, 630, 1169, 644, 645, 646, 529, 529, 529, 611, 612, 534, 1273, 1273, 340, 812, 951, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 438, 1273, 432, 558, 593, 924, 924, 924, 924, 379, 635, 438, 918, 925, 553, 1123, 1154, 904, 422, 547, 1155, 1158, 905, 1159, 548, 326, 594, 1170, 696, 614, 616, 1233, 634, 410, 807, 590, 653, 657, 965, 661, 669, 961, 456, 1247, 1248, 809, 837, 1244, 1244, 1244, 1171, 1230, 1231, 5, 656, 6, 533, 545, 389, 968, 968, 533, 1166, 545, 834, 973, 382, 922, 397, 670, 1256, 1256, 1256, 1256, 1011, 699, 561, 450, 451, 452, 846, 842, 534, 457, 1280, 1281, 619, 619, 1015, 1057, 395, 396, 995, 992, 993, 642, 1240, 643, 935, 399, 400, 401, 461, 654, 0, 0, 0, 402, 0, 840, 0, 333, 578, 1039, 0, 674, 660, 660, 0, 666, 1037, 489, 588, 602, 605, 606, 607, 608, 627, 628, 629, 673, 0, 0, 0, 1013, 893, 1062, 0, 1242, 1242, 1013, 1168, 598, 252, 252, 0, 0, 970, 269, 845, 833, 1010, 1014, 530, 530, 836, 0, 639, 949, 933, 0, 338, 339, 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1165, 0, 0, 0, 0, 0, 923, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1055, 849); - protected $gotoCheck = array(42, 42, 72, 65, 65, 87, 87, 87, 87, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 115, 9, 23, 23, 23, 23, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, 118, 104, 104, 75, 75, 25, 26, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 25, 25, 25, 25, 25, 25, 27, 25, 25, 25, 58, 58, 58, 58, 58, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 15, 7, 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, 15, 143, 45, 143, 15, 103, 103, 103, 103, 143, 103, 156, 156, 6, 15, 15, 15, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 22, 22, 55, 55, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 155, 155, 72, 72, 72, 72, 24, 24, 24, 24, 72, 72, 72, 72, 72, 72, 72, 72, 72, 137, 137, 23, 5, 5, 72, 158, 23, 23, 137, 72, 72, 72, 72, 132, 132, 72, 72, 72, 9, 9, 9, 9, 93, 12, 168, 168, 49, 5, 5, 5, 5, 5, 5, 72, 165, 64, 14, 64, 72, 164, 164, 168, 159, 159, 35, 167, 14, 14, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 168, 35, 14, 14, 35, 14, 12, 14, 12, 84, 20, 84, 84, 84, 19, 19, 19, 83, 83, 14, 169, 169, 14, 22, 99, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 169, 23, 2, 2, 19, 19, 19, 19, 61, 63, 19, 19, 19, 100, 139, 78, 78, 108, 9, 78, 78, 78, 78, 48, 29, 9, 20, 48, 48, 48, 14, 48, 13, 20, 13, 48, 48, 48, 48, 48, 48, 162, 162, 162, 18, 39, 118, 118, 118, 20, 20, 20, 46, 14, 46, 9, 9, 28, 103, 103, 9, 148, 9, 37, 106, 9, 89, 89, 89, 118, 118, 118, 118, 117, 95, 9, 9, 9, 9, 41, 9, 14, 145, 9, 9, 111, 111, 120, 135, 80, 80, 111, 111, 111, 80, 118, 80, 92, 80, 80, 80, 82, 80, -1, -1, -1, 80, -1, 9, -1, 80, 8, 8, -1, 8, 8, 8, -1, 8, 8, 9, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, -1, -1, -1, 118, 17, 17, -1, 118, 118, 118, 14, 17, 5, 5, -1, -1, 17, 24, 16, 16, 16, 16, 24, 24, 17, -1, 17, 17, 16, -1, 93, 93, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, 16); - protected $gotoBase = array(0, 0, -303, 0, 0, 278, 214, 194, 476, 7, 0, 0, 15, 78, 27, -175, 87, 61, 118, 84, -33, 0, -74, 18, 260, 161, 162, 179, 103, 111, 0, 0, 0, 0, 0, -35, 0, 107, 0, 105, 0, 26, -1, 0, 0, 204, -275, 0, -281, 281, 0, 0, 0, 0, 0, 207, 0, 0, 144, 0, 0, 340, 0, 143, 294, -234, 0, 0, 0, 0, 0, 0, -6, 0, 0, -168, 0, 0, -8, 150, -10, 0, 16, -108, -339, 0, 0, -270, 0, 145, 0, 0, 42, -164, 0, 52, 0, 0, 0, 326, 344, 0, 0, 193, -76, 0, 81, 0, 115, 0, 0, 184, 0, 0, 0, 17, 0, 86, 153, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 32, 0, 244, 0, 119, 0, 0, 0, -260, 0, 30, 0, 0, 79, 0, 0, 0, 0, 0, 0, -53, -12, 4, 255, 82, 0, 0, 124, 0, -41, 283, 0, 293, 5, 59, 0, 0); - protected $gotoDefault = array(-32768, 493, 703, 4, 704, 897, 780, 789, 577, 509, 672, 334, 603, 408, 1238, 874, 1061, 559, 808, 1182, 1190, 439, 811, 318, 320, 856, 857, 858, 386, 371, 377, 384, 625, 604, 474, 843, 435, 835, 466, 838, 434, 847, 160, 405, 491, 851, 3, 853, 536, 884, 372, 861, 373, 649, 863, 544, 865, 866, 380, 387, 388, 1066, 552, 600, 878, 241, 546, 879, 370, 880, 887, 375, 378, 658, 446, 486, 479, 398, 1041, 587, 622, 443, 460, 610, 609, 597, 459, 640, 403, 920, 467, 444, 934, 336, 942, 701, 1073, 617, 469, 950, 618, 957, 960, 510, 511, 458, 972, 273, 470, 1000, 641, 985, 620, 998, 453, 1004, 436, 1012, 1226, 437, 1016, 260, 1019, 274, 404, 419, 1024, 1025, 8, 1031, 664, 665, 10, 270, 490, 1056, 659, 433, 1072, 423, 1142, 1144, 538, 471, 1162, 1161, 652, 487, 1167, 1229, 431, 512, 454, 304, 513, 296, 322, 301, 528, 283, 323, 514, 455, 1235, 1243, 319, 29, 1263, 1274, 330, 556, 592); - protected $ruleToNonTerminal = array(0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, 88, 88, 81, 81, 81, 82, 82, 85, 85, 83, 83, 89, 90, 90, 56, 56, 64, 64, 67, 67, 67, 66, 91, 91, 92, 57, 57, 57, 57, 93, 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, 105, 105, 107, 107, 107, 107, 107, 106, 106, 106, 109, 109, 109, 87, 87, 111, 111, 111, 110, 110, 112, 112, 113, 113, 113, 108, 108, 80, 80, 80, 20, 20, 114, 114, 115, 115, 115, 115, 59, 116, 116, 117, 60, 119, 119, 120, 120, 121, 121, 84, 122, 122, 122, 122, 122, 122, 127, 127, 128, 128, 129, 129, 129, 129, 129, 130, 131, 131, 126, 126, 123, 123, 125, 125, 133, 133, 132, 132, 132, 132, 132, 132, 132, 124, 134, 134, 136, 135, 135, 61, 100, 137, 137, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 144, 138, 138, 143, 143, 146, 147, 147, 148, 149, 149, 149, 19, 19, 72, 72, 72, 72, 139, 139, 139, 139, 151, 151, 140, 140, 142, 142, 142, 145, 145, 156, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 104, 159, 159, 159, 159, 141, 141, 141, 141, 141, 141, 141, 141, 58, 58, 154, 154, 154, 154, 160, 160, 150, 150, 150, 161, 161, 161, 161, 161, 161, 73, 73, 65, 65, 65, 65, 118, 118, 118, 118, 164, 163, 153, 153, 153, 153, 153, 153, 153, 152, 152, 152, 162, 162, 162, 162, 103, 158, 166, 166, 165, 165, 167, 167, 167, 167, 167, 167, 167, 167, 155, 155, 155, 155, 169, 170, 168, 168, 168, 168, 168, 168, 168, 168, 171, 171, 171, 171); - protected $ruleToLength = array(1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, 2, 0, 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 1, 2, 1, 0, 1, 0, 2, 2, 2, 4, 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, 1); + protected $action = array(131, 132, 133, 569, 134, 135, 0, 722, 723, 724, 136, 36, 834, 911, 835, 468, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 100, 101, 102, 103, 104, 1068, 1069, 1070, 1067, 1066, 1065, 1071, 716, 715, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, 545, 546, -32766, -32766, 725, -32766, -32766, -32766, 998, 999, 806, 922, 446, 447, 448, 369, 370, 2, 266, 137, 395, 729, 730, 731, 732, 413, -32766, 419, -32766, -32766, -32766, -32766, -32766, 990, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, 766, 767, 755, 756, 335, 336, 758, 759, 744, 745, 746, 748, 749, 750, 345, 790, 791, 792, 793, 794, 795, 751, 752, 571, 572, 784, 775, 773, 774, 787, 770, 771, 282, 419, 573, 574, 769, 575, 576, 577, 578, 579, 580, 598, -575, 469, 491, 798, 772, 581, 582, -575, 138, -32766, -32766, -32766, 131, 132, 133, 569, 134, 135, 1017, 722, 723, 724, 136, 36, 1060, -32766, -32766, -32766, 1303, 696, -32766, 1304, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071, -32766, 716, 715, 371, 370, 1258, -32766, -32766, -32766, -572, 105, 106, 107, 413, 269, 891, -572, 239, 1193, 1192, 1194, 725, -32766, -32766, -32766, 1046, 108, -32766, -32766, -32766, -32766, 986, 985, 984, 987, 266, 137, 395, 729, 730, 731, 732, 12, -32766, 419, -32766, -32766, -32766, -32766, 998, 999, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, 766, 767, 755, 756, 335, 336, 758, 759, 744, 745, 746, 748, 749, 750, 345, 790, 791, 792, 793, 794, 795, 751, 752, 571, 572, 784, 775, 773, 774, 787, 770, 771, 881, 320, 573, 574, 769, 575, 576, 577, 578, 579, 580, -32766, 81, 82, 83, -575, 772, 581, 582, -575, 147, 747, 717, 718, 719, 720, 721, 1278, 722, 723, 724, 760, 761, 35, 1277, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 996, 269, 149, -32766, -32766, -32766, 454, 455, 80, 33, -264, -572, 1016, 108, 319, -572, 893, 725, 682, 803, 127, 998, 999, 592, -32766, 1044, -32766, -32766, -32766, 809, 150, 726, 727, 728, 729, 730, 731, 732, -88, 1198, 796, 277, -526, 282, -32766, -32766, -32766, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 763, 786, 764, 765, 766, 767, 755, 756, 757, 785, 758, 759, 744, 745, 746, 748, 749, 750, 789, 790, 791, 792, 793, 794, 795, 751, 752, 753, 754, 784, 775, 773, 774, 787, 770, 771, 143, 804, 762, 768, 769, 776, 777, 779, 778, 780, 781, -314, -526, -526, -193, -192, 772, 783, 782, 48, 49, 50, 500, 51, 52, 238, 807, -526, -86, 53, 54, -111, 55, 996, 252, -32766, -111, 800, -111, -526, 541, -532, -352, 299, -352, 303, -111, -111, -111, -111, -111, -111, -111, -111, 998, 999, 998, 999, 152, -32766, -32766, -32766, 1191, 807, 125, 305, 1293, 56, 57, 102, 103, 104, -111, 58, 1218, 59, 245, 246, 60, 61, 62, 63, 64, 65, 66, 67, -525, 26, 267, 68, 435, 501, -328, 808, -86, 1224, 1225, 502, 1189, 807, 1198, 1230, 292, 1222, 40, 23, 503, 73, 504, 953, 505, 319, 506, 802, 153, 507, 508, 278, 684, 279, 42, 43, 436, 366, 365, 891, 44, 509, 34, 248, -16, -566, 357, 331, 317, -566, 1198, 1193, 1192, 1194, -527, 510, 511, 512, 332, -524, 1274, 47, 716, 715, -525, -525, 333, 513, 514, 807, 1212, 1213, 1214, 1215, 1209, 1210, 291, 359, 283, -525, 284, -314, 1216, 1211, -193, -192, 1193, 1192, 1194, 292, 891, -525, 363, -531, 69, 807, 315, 316, 319, 30, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, -153, -153, -153, 638, 24, -527, -527, 687, 378, 881, -524, -524, 295, 296, 891, -153, 431, -153, 807, -153, -527, -153, 716, 715, 432, -524, 798, 362, -111, 1105, 1107, 364, -527, 433, 891, 139, 434, -524, 954, 126, -524, 319, -111, -111, 688, 813, 380, -529, 11, 834, 154, 835, 867, -111, -111, -111, -111, 46, 292, -32766, 881, 654, 655, 73, 689, 1191, 1045, 319, 708, 148, 398, 156, -32766, -32766, -32766, 31, -32766, -79, -32766, 122, -32766, 716, 715, -32766, 893, 891, 682, -153, -32766, -32766, -32766, 716, 715, 891, -32766, -32766, 123, 881, 128, 73, -32766, 410, 129, 319, -524, -524, 142, 140, -75, -32766, 157, -529, -529, 319, 26, 691, 158, 881, 159, -524, 160, 293, 294, 698, 367, 368, 807, -73, -32766, -72, 1222, -524, 372, 373, 1191, 893, -71, 682, -529, 72, -70, -32766, -32766, -32766, -69, -32766, -68, -32766, 124, -32766, 630, 631, -32766, -67, -66, -47, -51, -32766, -32766, -32766, -18, 146, 270, -32766, -32766, 276, 697, 700, 881, -32766, 410, 890, 893, 145, 682, 281, 881, 907, -32766, 280, 513, 514, 285, 1212, 1213, 1214, 1215, 1209, 1210, 325, 130, 144, 939, 286, 682, 1216, 1211, 108, 269, -32766, 798, 807, -32766, 662, 639, 1191, 657, 71, 675, 1075, 316, 319, -32766, -32766, -32766, 1305, -32766, 300, -32766, 628, -32766, 430, 543, -32766, -32766, 923, 555, 924, -32766, -32766, -32766, 1229, 549, -32766, -32766, -32766, -4, 891, -490, 1191, -32766, 410, 644, 893, 298, 682, -32766, -32766, -32766, -32766, -32766, 893, -32766, 682, -32766, 13, 1231, -32766, 451, 479, 645, 909, -32766, -32766, -32766, -32766, 658, -480, -32766, -32766, 0, 1191, 0, 0, -32766, 410, 0, 297, -32766, -32766, -32766, 304, -32766, -32766, -32766, 0, -32766, 0, 806, -32766, 0, 0, 0, 474, -32766, -32766, -32766, -32766, 0, 7, -32766, -32766, 15, 1191, 561, 596, -32766, 410, 1219, 891, -32766, -32766, -32766, 361, -32766, -32766, -32766, 818, -32766, -267, 881, -32766, 38, 292, 0, 0, -32766, -32766, -32766, 39, 705, 706, -32766, -32766, 872, 963, 940, 947, -32766, 410, 937, 948, 364, 870, 426, 891, 935, -32766, 1049, 290, 1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262, 1296, 633, 0, 826, -111, -111, -111, -111, 32, 314, -32766, 360, 683, 686, 690, 692, 1191, 693, 694, 695, 699, 685, 319, -32766, -32766, -32766, 9, -32766, 702, -32766, 868, -32766, 881, 1300, -32766, 893, 1302, 682, -4, -32766, -32766, -32766, 829, 828, 837, -32766, -32766, 916, -242, -242, -242, -32766, 410, 955, 364, 26, 836, 1301, 915, 917, -32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898, 945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111, 1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531, 364, -530, 1, 27, 28, 37, 41, 45, 70, 0, 74, -111, -111, 75, 76, 77, 78, 893, 79, 682, -242, 867, -111, -111, -111, -111, 141, 151, 155, 244, 321, 346, 514, 347, 1212, 1213, 1214, 1215, 1209, 1210, 348, 349, 350, 351, 352, 353, 1216, 1211, 354, 355, 356, 358, 427, 893, -265, 682, -241, -264, 71, 0, 17, 316, 319, 18, 19, 20, 22, 397, 470, 471, 478, 481, 482, 483, 484, 488, 489, 490, 498, 669, 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 16, 21, 25, 289, 396, 589, 593, 620, 674, 1149, 1197, 1146, 1275, 0, -494, 1162, 0, 1223); + protected $actionCheck = array(2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 106, 1, 108, 31, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 117, 118, 9, 10, 57, 9, 10, 11, 137, 138, 155, 128, 129, 130, 131, 106, 107, 8, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, 33, 34, 35, 36, 1, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 30, 80, 136, 137, 138, 139, 140, 141, 142, 143, 144, 51, 1, 161, 101, 80, 150, 151, 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, 6, 7, 164, 9, 10, 11, 12, 13, 123, 9, 10, 11, 80, 161, 30, 83, 32, 33, 34, 35, 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, 30, 37, 38, 106, 107, 1, 9, 10, 11, 1, 53, 54, 55, 116, 57, 1, 8, 14, 155, 156, 157, 57, 9, 10, 11, 162, 69, 30, 116, 32, 33, 119, 120, 121, 122, 71, 72, 73, 74, 75, 76, 77, 8, 30, 80, 32, 33, 34, 35, 137, 138, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 84, 70, 136, 137, 138, 139, 140, 141, 142, 143, 144, 9, 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 116, 57, 14, 9, 10, 11, 134, 135, 161, 8, 164, 160, 1, 69, 167, 164, 159, 57, 161, 80, 8, 137, 138, 1, 30, 1, 32, 33, 34, 1, 14, 71, 72, 73, 74, 75, 76, 77, 31, 1, 80, 30, 70, 30, 9, 10, 11, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 8, 156, 136, 137, 138, 139, 140, 141, 142, 143, 144, 8, 134, 135, 8, 8, 150, 151, 152, 2, 3, 4, 5, 6, 7, 97, 82, 149, 31, 12, 13, 101, 15, 116, 8, 116, 106, 80, 108, 161, 85, 163, 106, 113, 108, 8, 116, 117, 118, 119, 120, 121, 122, 123, 137, 138, 137, 138, 14, 9, 10, 11, 80, 82, 14, 8, 85, 50, 51, 50, 51, 52, 128, 56, 1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, 72, 73, 74, 162, 159, 97, 78, 79, 80, 116, 82, 1, 146, 158, 86, 87, 88, 89, 163, 91, 31, 93, 167, 95, 156, 14, 98, 99, 35, 161, 37, 103, 104, 105, 106, 107, 1, 109, 110, 147, 148, 31, 160, 115, 116, 8, 164, 1, 155, 156, 157, 70, 124, 125, 126, 8, 70, 1, 70, 37, 38, 134, 135, 8, 136, 137, 82, 139, 140, 141, 142, 143, 144, 145, 8, 35, 149, 37, 164, 151, 152, 164, 164, 155, 156, 157, 158, 1, 161, 8, 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 75, 76, 77, 75, 76, 134, 135, 31, 8, 84, 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, 149, 96, 37, 38, 8, 149, 80, 149, 128, 59, 60, 106, 161, 8, 1, 161, 8, 161, 159, 161, 70, 167, 117, 118, 31, 8, 106, 70, 108, 106, 14, 108, 127, 128, 129, 130, 131, 70, 158, 74, 84, 75, 76, 163, 31, 80, 159, 167, 161, 101, 102, 14, 87, 88, 89, 14, 91, 31, 93, 16, 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, 105, 37, 38, 1, 109, 110, 16, 84, 16, 163, 115, 116, 16, 167, 134, 135, 16, 161, 31, 124, 16, 134, 135, 167, 70, 31, 16, 84, 16, 149, 16, 134, 135, 31, 106, 107, 82, 31, 74, 31, 86, 161, 106, 107, 80, 159, 31, 161, 161, 154, 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, 111, 112, 98, 31, 31, 31, 31, 103, 104, 105, 31, 31, 31, 109, 110, 31, 31, 31, 84, 115, 116, 31, 159, 31, 161, 37, 84, 38, 124, 35, 136, 137, 35, 139, 140, 141, 142, 143, 144, 35, 31, 70, 159, 37, 161, 151, 152, 69, 57, 74, 80, 82, 85, 77, 90, 80, 94, 163, 92, 82, 166, 167, 87, 88, 89, 83, 91, 114, 93, 113, 95, 128, 85, 98, 116, 128, 153, 128, 103, 104, 105, 146, 89, 74, 109, 110, 0, 1, 149, 80, 115, 116, 96, 159, 133, 161, 87, 88, 89, 124, 91, 159, 93, 161, 95, 97, 146, 98, 97, 97, 100, 154, 103, 104, 105, 74, 100, 149, 109, 110, -1, 80, -1, -1, 115, 116, -1, 132, 87, 88, 89, 132, 91, 124, 93, -1, 95, -1, 155, 98, -1, -1, -1, 102, 103, 104, 105, 74, -1, 149, 109, 110, 149, 80, 81, 153, 115, 116, 160, 1, 87, 88, 89, 149, 91, 124, 93, 160, 95, 164, 84, 98, 159, 158, -1, -1, 103, 104, 105, 159, 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, 159, 159, 106, 159, 108, 1, 159, 124, 159, 113, 160, 159, 159, 117, 118, 159, 159, 159, 163, 160, 160, 160, -1, 127, 128, 129, 130, 131, 161, 161, 74, 161, 161, 161, 161, 161, 80, 161, 161, 161, 161, 161, 167, 87, 88, 89, 150, 91, 162, 93, 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, 162, 86, 162, 162, 162, 127, 128, 129, 130, 131, 162, 162, 162, 162, 100, 101, 102, 163, 163, 163, 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, 163, 163, 163, 163, 163, 163, 151, 152, 163, 163, 163, 163, 163, 159, 164, 161, 162, 164, 163, -1, 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, 165, 165, -1, 166); + protected $actionBase = array(0, -2, 154, 565, 876, 948, 984, 514, 53, 398, 837, 307, 307, 67, 307, 307, 653, 724, 724, 732, 724, 616, 673, 204, 204, 204, 625, 625, 625, 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, 1015, 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, 920, 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 290, 491, 44, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 160, 160, 160, 187, 684, 684, 341, 203, 610, 47, 985, 985, 985, 985, 985, 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, 7, 7, 371, -25, -25, -25, -25, 540, 385, 102, 576, 358, 45, 377, 460, 460, 360, 231, 231, 231, 231, 231, 231, -78, -78, -78, -78, -78, -66, 319, 457, -94, 396, 423, 586, 586, 586, 586, 423, 423, 423, 423, 750, 1029, 423, 423, 423, 511, 516, 516, 518, 147, 147, 147, 516, 583, 777, 422, 583, 422, 194, 92, 748, -40, 87, 412, 748, 617, 627, 198, 143, 773, 658, 773, 1013, 757, 764, 717, 838, 860, 1026, 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, 1013, 286, 855, 855, 855, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 679, 286, 568, 626, 286, 794, 552, 375, 758, 375, 375, 375, 375, 958, 375, 375, 375, 375, 375, 375, 970, 769, -16, 375, 519, 12, 12, 547, 83, 12, 12, 12, 12, 375, 375, 375, 658, 781, 713, 666, 792, 448, 781, 781, 781, 438, 444, 193, 447, 570, 523, 580, 760, 760, 767, 929, 929, 760, 759, 760, 767, 934, 760, 929, 805, 359, 648, 577, 611, 656, 929, 478, 760, 760, 760, 760, 665, 760, 467, 433, 760, 760, 785, 774, 789, 60, 929, 929, 929, 789, 596, 751, 751, 751, 811, 812, 746, 771, 567, 498, 677, 348, 779, 771, 771, 760, 640, 746, 771, 746, 771, 747, 771, 771, 771, 746, 771, 760, 759, 585, 771, 734, 668, 224, 771, 6, 935, 937, 354, 940, 932, 941, 979, 942, 943, 851, 956, 933, 945, 931, 930, 780, 703, 720, 790, 729, 928, 768, 768, 768, 925, 768, 768, 768, 768, 768, 768, 768, 768, 703, 788, 804, 733, 783, 960, 722, 726, 725, 868, 1027, 1028, 737, 739, 958, 1006, 953, 803, 730, 992, 967, 866, 848, 968, 969, 993, 1007, 1008, 871, 761, 874, 880, 797, 971, 852, 768, 935, 943, 933, 945, 931, 930, 763, 762, 753, 755, 749, 745, 736, 738, 770, 1009, 924, 835, 830, 970, 926, 703, 839, 986, 847, 994, 995, 850, 801, 772, 840, 881, 972, 975, 976, 853, 1010, 810, 989, 795, 996, 802, 882, 997, 998, 999, 1000, 885, 854, 856, 857, 815, 754, 980, 786, 891, 335, 787, 796, 978, 363, 957, 858, 894, 895, 1001, 1002, 1003, 896, 954, 816, 990, 752, 991, 983, 817, 818, 485, 784, 778, 541, 676, 897, 899, 900, 955, 775, 766, 821, 822, 1011, 901, 697, 824, 740, 902, 1005, 742, 744, 756, 859, 793, 743, 798, 977, 776, 827, 907, 829, 832, 833, 1004, 836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, 0, 0, 307, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, 291, 805, 147, 147, 147, 147, 423, 423, 423, 423, 423, -88, -88, 147, 147, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, 0, 286, 422, 0, 759, 759, 759, 759, 0, 0, 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286, 422, 0, 286, 0, 759, 759, 423, 805, 805, 314, 423, 0, 0, 0, 0, 286, 759, 286, 552, 422, 552, 552, 12, 375, 314, 608, 608, 608, 608, 0, 658, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 759, 0, 805, 0, 759, 759, 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, 0, 0, 929, 0, 0, 0, 0, 760, 0, 0, 0, 0, 0, 0, 760, 934, 0, 0, 0, 0, 0, 0, 759, 0, 0, 0, 0, 0, 0, 0, 0, 768, 801, 0, 801, 0, 768, 768, 768); + protected $actionDefault = array(3, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 578, 578, 578, 578, 32767, 32767, 246, 103, 32767, 32767, 454, 372, 372, 372, 32767, 32767, 522, 522, 522, 522, 522, 522, 32767, 32767, 32767, 32767, 32767, 32767, 454, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 101, 32767, 32767, 32767, 37, 7, 8, 10, 11, 50, 17, 310, 32767, 32767, 32767, 32767, 103, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 571, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 458, 437, 438, 440, 441, 371, 523, 577, 313, 574, 370, 146, 325, 315, 234, 316, 250, 459, 251, 460, 463, 464, 211, 279, 367, 150, 401, 455, 403, 453, 457, 402, 377, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 375, 376, 456, 434, 433, 432, 399, 32767, 32767, 400, 404, 374, 407, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 405, 406, 423, 424, 421, 422, 425, 32767, 426, 427, 428, 429, 32767, 32767, 302, 32767, 32767, 351, 349, 414, 415, 302, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 516, 431, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 103, 32767, 101, 518, 396, 398, 486, 409, 410, 408, 378, 32767, 493, 32767, 103, 495, 32767, 32767, 32767, 112, 32767, 32767, 32767, 517, 32767, 524, 524, 32767, 479, 101, 194, 32767, 194, 194, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 585, 479, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 32767, 194, 111, 32767, 32767, 32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 189, 32767, 260, 262, 103, 539, 194, 32767, 498, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 491, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 479, 419, 139, 32767, 139, 524, 411, 412, 413, 481, 524, 524, 524, 298, 281, 32767, 32767, 32767, 32767, 496, 496, 101, 101, 101, 101, 491, 32767, 32767, 112, 100, 100, 100, 100, 100, 104, 102, 32767, 32767, 32767, 32767, 100, 32767, 102, 102, 32767, 32767, 217, 208, 215, 102, 32767, 543, 544, 215, 102, 219, 219, 219, 239, 239, 470, 304, 102, 100, 102, 102, 196, 304, 304, 32767, 102, 470, 304, 470, 304, 198, 304, 304, 304, 470, 304, 32767, 32767, 102, 304, 210, 100, 100, 304, 32767, 32767, 32767, 481, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 511, 32767, 528, 541, 417, 418, 420, 526, 442, 443, 444, 445, 446, 447, 448, 450, 573, 32767, 485, 32767, 32767, 32767, 32767, 324, 583, 32767, 583, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 584, 32767, 524, 32767, 32767, 32767, 32767, 416, 9, 76, 43, 44, 52, 58, 502, 503, 504, 505, 499, 500, 506, 501, 32767, 32767, 507, 549, 32767, 32767, 525, 576, 32767, 32767, 32767, 32767, 32767, 32767, 139, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 511, 32767, 137, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 524, 32767, 32767, 32767, 300, 301, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 524, 32767, 32767, 32767, 283, 284, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 278, 32767, 32767, 366, 32767, 32767, 32767, 32767, 345, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 152, 152, 3, 3, 327, 152, 152, 152, 327, 152, 327, 327, 327, 152, 152, 152, 152, 152, 152, 272, 184, 254, 257, 239, 239, 152, 337, 152); + protected $goto = array(193, 193, 670, 421, 643, 1022, 1290, 1290, 824, 415, 307, 308, 328, 563, 313, 420, 329, 422, 622, 801, 678, 341, 586, 1290, 825, 164, 164, 164, 164, 217, 194, 190, 190, 174, 176, 212, 190, 190, 190, 190, 190, 191, 191, 191, 191, 191, 191, 185, 186, 187, 188, 189, 214, 212, 215, 521, 522, 411, 523, 525, 526, 527, 528, 529, 530, 531, 532, 1091, 165, 166, 167, 192, 168, 169, 170, 163, 171, 172, 173, 175, 211, 213, 216, 234, 237, 240, 241, 243, 254, 255, 256, 257, 258, 259, 260, 262, 263, 264, 265, 273, 274, 310, 311, 312, 416, 417, 418, 568, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 177, 233, 178, 195, 196, 197, 235, 185, 186, 187, 188, 189, 214, 1091, 198, 179, 180, 181, 199, 195, 182, 236, 200, 198, 162, 201, 202, 183, 203, 204, 205, 184, 206, 207, 208, 209, 210, 322, 322, 322, 322, 827, 608, 608, 858, 547, 538, 1186, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1239, 1239, 462, 1264, 1265, 799, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 387, 538, 547, 556, 557, 394, 566, 588, 602, 603, 832, 938, 880, 875, 876, 889, 14, 833, 877, 830, 878, 879, 831, 453, 453, 884, 883, 885, 1187, 250, 250, 560, 453, 1237, 1237, 815, 1043, 1039, 1040, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 1237, 820, 820, 1188, 1247, 1248, 247, 247, 247, 247, 249, 251, 342, 343, 339, 1190, 1190, 997, 1190, 997, 1279, 930, 401, 677, 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, 1261, 1261, 414, 1261, 597, 1190, 287, 287, 287, 287, 1190, 1190, 1190, 1190, 959, 344, 1190, 1190, 1190, 1271, 1271, 1271, 1271, 606, 640, 344, 344, 1273, 1273, 1273, 1273, 1063, 1064, 637, 896, 651, 652, 653, 897, 344, 344, 383, 344, 486, 1306, 487, 535, 535, 5, 535, 6, 494, 559, 1257, 1140, 540, 524, 524, 344, 318, 302, 642, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 444, 1266, 1267, 618, 619, 932, 932, 932, 932, 820, 428, 444, 926, 933, 330, 533, 533, 533, 533, 1030, 590, 817, 554, 1259, 1259, 1030, 704, 621, 623, 845, 641, 1250, 805, 393, 660, 664, 973, 668, 676, 969, 1183, 553, 842, 823, 1289, 1289, 564, 600, 601, 385, 389, 548, 587, 591, 663, 962, 936, 936, 934, 936, 703, 1289, 537, 971, 966, 438, 901, 1079, 981, 1028, 438, 438, 805, 605, 805, 707, 854, 1292, 978, 463, 539, 551, 1074, 467, 540, 539, 844, 551, 646, 957, 386, 1171, 912, 1032, 838, 1172, 1175, 913, 1176, 943, 567, 456, 457, 458, 0, 850, 0, 1182, 1297, 1298, 253, 253, 0, 399, 400, 0, 0, 0, 649, 0, 650, 423, 403, 404, 405, 840, 661, 0, 423, 0, 406, 0, 0, 848, 337, 1009, 1002, 1006, 1003, 1007, 852, 0, 0, 839, 1185, 495, 0, 0, 0, 0, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 0, 0, 438, 595, 609, 612, 613, 614, 615, 634, 635, 636, 680, 853, 841, 1027, 1031, 585, 1056, 0, 681, 667, 667, 941, 673, 1054, 0, 0, 0, 0, 0, 271, 0, 0, 0, 0, 536, 536, 919, 992, 1000, 1004, 1001, 1005, 0, 0, 931, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 976, 976, 0, 1072, 857); + protected $gotoCheck = array(42, 42, 72, 65, 65, 119, 173, 173, 26, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 7, 9, 93, 122, 173, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, 15, 104, 104, 45, 75, 75, 20, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 160, 160, 166, 166, 166, 6, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 15, 49, 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, 15, 141, 141, 64, 15, 64, 20, 5, 5, 162, 141, 161, 161, 20, 15, 15, 15, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 22, 22, 20, 20, 20, 5, 5, 5, 5, 5, 5, 93, 93, 169, 72, 72, 72, 72, 72, 171, 89, 89, 89, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 122, 122, 13, 122, 13, 72, 24, 24, 24, 24, 72, 72, 72, 72, 99, 14, 72, 72, 72, 9, 9, 9, 9, 55, 55, 14, 14, 122, 122, 122, 122, 136, 136, 84, 72, 84, 84, 84, 72, 14, 14, 61, 14, 147, 14, 147, 19, 19, 46, 19, 46, 147, 100, 122, 143, 14, 163, 163, 14, 159, 159, 63, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 19, 168, 168, 83, 83, 19, 19, 19, 19, 22, 109, 19, 19, 19, 29, 103, 103, 103, 103, 122, 103, 18, 48, 122, 122, 122, 48, 48, 48, 39, 48, 14, 12, 28, 48, 48, 48, 48, 48, 48, 152, 9, 37, 25, 172, 172, 2, 2, 9, 58, 58, 58, 58, 58, 14, 25, 25, 25, 25, 25, 25, 172, 25, 25, 25, 23, 17, 17, 106, 121, 23, 23, 12, 17, 12, 95, 41, 172, 17, 149, 9, 9, 139, 82, 14, 9, 17, 9, 17, 17, 9, 78, 78, 124, 17, 78, 78, 78, 78, 92, 9, 9, 9, 9, -1, 9, -1, 17, 9, 9, 5, 5, -1, 80, 80, -1, -1, -1, 80, -1, 80, 113, 80, 80, 80, 35, 80, -1, 113, -1, 80, -1, -1, 9, 80, 113, 113, 113, 113, 113, 35, -1, -1, 35, 14, 9, -1, -1, -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, -1, 23, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 16, 16, 16, 16, 8, 8, -1, 8, 8, 8, 16, 8, 8, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, 24, 24, 87, 87, 87, 87, 87, 87, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 103, 103, -1, 16, 16); + protected $gotoBase = array(0, 0, -285, 0, 0, 225, 173, 10, 524, 7, 0, 0, 95, -47, 5, -174, 87, -33, 71, 61, -212, 0, -76, 157, 284, 392, 4, 20, 56, 77, 0, 0, 0, 0, 0, 118, 0, 63, 0, 65, 0, -2, -1, 0, 0, 155, -378, 0, -308, 186, 0, 0, 0, 0, 0, 266, 0, 0, 359, 0, 0, 282, 0, 103, 204, -235, 0, 0, 0, 0, 0, 0, -6, 0, 0, -167, 0, 0, 45, 170, -11, 0, -27, -110, -376, 0, 0, 276, 0, -32, 0, 0, 19, -448, 0, 30, 0, 0, 0, 262, 292, 0, 0, 342, -73, 0, 62, 0, 0, 88, 0, 0, 0, 206, 0, 0, 0, 0, 0, 3, 0, 59, 15, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 1, 0, 188, 0, 66, 0, 0, 0, -157, 0, 2, 0, 0, 35, 0, 0, 0, 0, 0, 0, 25, -57, -8, 201, 99, 0, 0, -111, 0, -7, 231, 0, 236, 96, -295, 0, 0); + protected $gotoDefault = array(-32768, 499, 711, 4, 712, 905, 788, 797, 583, 515, 679, 338, 610, 412, 1255, 882, 1078, 565, 816, 1199, 1207, 445, 819, 323, 701, 864, 865, 866, 390, 375, 381, 388, 632, 611, 480, 851, 441, 843, 472, 846, 440, 855, 161, 409, 497, 859, 3, 861, 542, 892, 376, 869, 377, 656, 871, 550, 873, 874, 384, 391, 392, 1083, 558, 607, 886, 242, 552, 887, 374, 888, 895, 379, 382, 665, 452, 492, 485, 402, 1058, 594, 629, 449, 466, 617, 616, 604, 465, 424, 407, 928, 473, 450, 942, 340, 950, 709, 1090, 624, 475, 958, 625, 965, 968, 516, 517, 464, 980, 268, 983, 476, 1015, 647, 648, 995, 626, 627, 1013, 459, 584, 1021, 442, 1029, 1243, 443, 1033, 261, 1036, 275, 408, 425, 1041, 1042, 8, 1048, 671, 672, 10, 272, 496, 1073, 666, 439, 1089, 429, 1159, 1161, 544, 477, 1179, 1178, 659, 493, 1184, 1246, 437, 518, 460, 309, 519, 301, 326, 306, 534, 288, 327, 520, 461, 1252, 1260, 324, 29, 1280, 1291, 334, 562, 599); + protected $ruleToNonTerminal = array(0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, 88, 88, 81, 81, 81, 82, 82, 85, 85, 83, 83, 89, 90, 90, 56, 56, 64, 64, 67, 67, 67, 66, 91, 91, 92, 57, 57, 57, 57, 93, 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, 105, 105, 107, 107, 108, 108, 108, 108, 106, 106, 106, 110, 110, 110, 110, 87, 87, 113, 113, 113, 111, 111, 114, 114, 112, 112, 115, 115, 116, 116, 116, 116, 109, 109, 80, 80, 80, 20, 20, 20, 118, 117, 117, 119, 119, 119, 119, 59, 120, 120, 121, 60, 123, 123, 124, 124, 125, 125, 84, 126, 126, 126, 126, 126, 126, 131, 131, 132, 132, 133, 133, 133, 133, 133, 134, 135, 135, 130, 130, 127, 127, 129, 129, 137, 137, 136, 136, 136, 136, 136, 136, 136, 128, 138, 138, 140, 139, 139, 61, 100, 141, 141, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 148, 142, 142, 147, 147, 150, 151, 151, 152, 153, 153, 153, 19, 19, 72, 72, 72, 72, 143, 143, 143, 143, 155, 155, 144, 144, 146, 146, 146, 149, 149, 160, 160, 160, 160, 160, 160, 160, 160, 160, 161, 161, 104, 163, 163, 163, 163, 145, 145, 145, 145, 145, 145, 145, 145, 58, 58, 158, 158, 158, 158, 164, 164, 154, 154, 154, 165, 165, 165, 165, 165, 165, 73, 73, 65, 65, 65, 65, 122, 122, 122, 122, 168, 167, 157, 157, 157, 157, 157, 157, 157, 156, 156, 156, 166, 166, 166, 166, 103, 162, 170, 170, 169, 169, 171, 171, 171, 171, 171, 171, 171, 171, 159, 159, 159, 159, 173, 174, 172, 172, 172, 172, 172, 172, 172, 172, 175, 175, 175, 175); + protected $ruleToLength = array(1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, 2, 0, 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, 1); protected function initReduceCallbacks() { $this->reduceCallbacks = [0 => function ($stackPos) { @@ -681,108 +681,129 @@ class Php7 extends \PhpParser\ParserAbstract }, 272 => function ($stackPos) { $this->semValue = 0; }, 273 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $this->semValue = $this->semStack[$stackPos - (2 - 1)] | $this->semStack[$stackPos - (2 - 2)]; }, 274 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC; }, 275 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED; }, 276 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_READONLY; + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE; }, 277 => function ($stackPos) { + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_READONLY; + }, 278 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Param($this->semStack[$stackPos - (6 - 6)], null, $this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 1)]); $this->checkParam($this->semValue); - }, 278 => function ($stackPos) { + }, 279 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Param($this->semStack[$stackPos - (8 - 6)], $this->semStack[$stackPos - (8 - 8)], $this->semStack[$stackPos - (8 - 3)], $this->semStack[$stackPos - (8 - 4)], $this->semStack[$stackPos - (8 - 5)], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (8 - 2)], $this->semStack[$stackPos - (8 - 1)]); $this->checkParam($this->semValue); - }, 279 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes), null, $this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 1)]); }, 280 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes), null, $this->semStack[$stackPos - (6 - 3)], $this->semStack[$stackPos - (6 - 4)], $this->semStack[$stackPos - (6 - 5)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 1)]); }, 281 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\NullableType($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 282 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\UnionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 283 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 282 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\NullableType($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 283 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\UnionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 284 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Name('static', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\IntersectionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 285 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos - (1 - 1)]); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 286 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Identifier('array', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Name('static', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Identifier('callable', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos - (1 - 1)]); }, 288 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); + $this->semValue = new \PhpParser\Node\Identifier('array', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 289 => function ($stackPos) { - $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; - $this->semValue = $this->semStack[$stackPos - (3 - 1)]; + $this->semValue = new \PhpParser\Node\Identifier('callable', $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 290 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); }, 291 => function ($stackPos) { $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; $this->semValue = $this->semStack[$stackPos - (3 - 1)]; }, 292 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); }, 293 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\NullableType($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; + $this->semValue = $this->semStack[$stackPos - (3 - 1)]; }, 294 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\UnionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); }, 295 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; + $this->semValue = $this->semStack[$stackPos - (3 - 1)]; }, 296 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); }, 297 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; + $this->semValue = $this->semStack[$stackPos - (3 - 1)]; }, 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (2 - 2)]; - }, 299 => function ($stackPos) { - $this->semValue = null; - }, 300 => function ($stackPos) { - $this->semValue = array(); - }, 301 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (4 - 2)]; - }, 302 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); - }, 303 => function ($stackPos) { - $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; - $this->semValue = $this->semStack[$stackPos - (3 - 1)]; - }, 304 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (1 - 1)], \false, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 305 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (2 - 2)], \true, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 306 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (2 - 2)], \false, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 307 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (3 - 3)], \false, \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (3 - 1)]); - }, 308 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 309 => function ($stackPos) { - $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; - $this->semValue = $this->semStack[$stackPos - (3 - 1)]; - }, 310 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); - }, 311 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 299 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\NullableType($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 300 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\UnionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 301 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\IntersectionType($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 302 => function ($stackPos) { + $this->semValue = null; + }, 303 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 304 => function ($stackPos) { + $this->semValue = null; + }, 305 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (2 - 2)]; + }, 306 => function ($stackPos) { + $this->semValue = null; + }, 307 => function ($stackPos) { + $this->semValue = array(); + }, 308 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (4 - 2)]; + }, 309 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos - (3 - 2)]); + }, 310 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\VariadicPlaceholder($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 311 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); }, 312 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 313 => function ($stackPos) { $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; $this->semValue = $this->semStack[$stackPos - (3 - 1)]; + }, 313 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (1 - 1)], \false, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); + $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (2 - 2)], \true, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 315 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\StaticVar($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (2 - 2)], \false, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 316 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\StaticVar($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Arg($this->semStack[$stackPos - (3 - 3)], \false, \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (3 - 1)]); }, 317 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; + }, 318 => function ($stackPos) { + $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; + $this->semValue = $this->semStack[$stackPos - (3 - 1)]; + }, 319 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); + }, 320 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 321 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; + }, 322 => function ($stackPos) { + $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; + $this->semValue = $this->semStack[$stackPos - (3 - 1)]; + }, 323 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); + }, 324 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Stmt\StaticVar($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 325 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Stmt\StaticVar($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 326 => function ($stackPos) { if ($this->semStack[$stackPos - (2 - 2)] !== null) { $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)]; $this->semValue = $this->semStack[$stackPos - (2 - 1)]; } - }, 318 => function ($stackPos) { + }, 327 => function ($stackPos) { $this->semValue = array(); - }, 319 => function ($stackPos) { + }, 328 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new \PhpParser\Node\Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); @@ -793,403 +814,403 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos - (1 - 1)][] = $nop; } $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 320 => function ($stackPos) { + }, 329 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Stmt\Property($this->semStack[$stackPos - (5 - 2)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 1)]); $this->checkProperty($this->semValue, $stackPos - (5 - 2)); - }, 321 => function ($stackPos) { + }, 330 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Stmt\ClassConst($this->semStack[$stackPos - (5 - 4)], $this->semStack[$stackPos - (5 - 2)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes, $this->semStack[$stackPos - (5 - 1)]); $this->checkClassConst($this->semValue, $stackPos - (5 - 2)); - }, 322 => function ($stackPos) { + }, 331 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Stmt\ClassMethod($this->semStack[$stackPos - (10 - 5)], ['type' => $this->semStack[$stackPos - (10 - 2)], 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 7)], 'returnType' => $this->semStack[$stackPos - (10 - 9)], 'stmts' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos - (10 - 2)); - }, 323 => function ($stackPos) { + }, 332 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Stmt\TraitUse($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 324 => function ($stackPos) { + }, 333 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Stmt\EnumCase($this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 4)], $this->semStack[$stackPos - (5 - 1)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes); - }, 325 => function ($stackPos) { + }, 334 => function ($stackPos) { $this->semValue = null; /* will be skipped */ - }, 326 => function ($stackPos) { + }, 335 => function ($stackPos) { $this->semValue = array(); - }, 327 => function ($stackPos) { + }, 336 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (3 - 2)]; - }, 328 => function ($stackPos) { + }, 337 => function ($stackPos) { $this->semValue = array(); - }, 329 => function ($stackPos) { + }, 338 => function ($stackPos) { $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)]; $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 330 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 331 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (5 - 1)][0], $this->semStack[$stackPos - (5 - 1)][1], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes); - }, 332 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], null, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 333 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 334 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 335 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); - }, 336 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 337 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos - (1 - 1)]); - }, 338 => function ($stackPos) { - $this->semValue = null; }, 339 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (5 - 1)][0], $this->semStack[$stackPos - (5 - 1)][1], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 4)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], $this->semStack[$stackPos - (4 - 3)], null, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos - (4 - 1)][0], $this->semStack[$stackPos - (4 - 1)][1], null, $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = array($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)]); }, 345 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 346 => function ($stackPos) { + $this->semValue = array(null, $this->semStack[$stackPos - (1 - 1)]); + }, 347 => function ($stackPos) { + $this->semValue = null; + }, 348 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 349 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 350 => function ($stackPos) { + $this->semValue = 0; + }, 351 => function ($stackPos) { + $this->semValue = 0; + }, 352 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 353 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 354 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); $this->semValue = $this->semStack[$stackPos - (2 - 1)] | $this->semStack[$stackPos - (2 - 2)]; - }, 346 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC; - }, 347 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED; - }, 348 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE; - }, 349 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC; - }, 350 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT; - }, 351 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_FINAL; - }, 352 => function ($stackPos) { - $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_READONLY; - }, 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 354 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); }, 355 => function ($stackPos) { - $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; - $this->semValue = $this->semStack[$stackPos - (3 - 1)]; + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC; }, 356 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\VarLikeIdentifier(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED; }, 357 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\PropertyProperty($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE; }, 358 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Stmt\PropertyProperty($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC; }, 359 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT; }, 360 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_FINAL; }, 361 => function ($stackPos) { + $this->semValue = \PhpParser\Node\Stmt\Class_::MODIFIER_READONLY; + }, 362 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; + }, 363 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); + }, 364 => function ($stackPos) { $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; $this->semValue = $this->semStack[$stackPos - (3 - 1)]; - }, 362 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); - }, 363 => function ($stackPos) { - $this->semValue = array(); - }, 364 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 365 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\VarLikeIdentifier(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Stmt\PropertyProperty($this->semStack[$stackPos - (1 - 1)], null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 367 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Stmt\PropertyProperty($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 368 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; }, 369 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignRef($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; }, 370 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; + $this->semValue = $this->semStack[$stackPos - (3 - 1)]; }, 371 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); }, 372 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Clone_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = array(); }, 373 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 374 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 375 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Assign($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignRef($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 380 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 381 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Clone_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\AssignOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\PostInc($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\PreInc($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\PostDec($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\PreDec($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BooleanOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 391 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\LogicalOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\LogicalXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\AssignOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\PostInc($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\PreInc($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\PostDec($this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\PreDec($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BooleanOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\LogicalOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\LogicalXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\UnaryPlus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Concat($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\UnaryMinus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Plus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BooleanNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Minus($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BitwiseNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Mul($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Identical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Div($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\NotIdentical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Mod($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Equal($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\NotEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\ShiftRight($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Spaceship($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Pow($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Smaller($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\UnaryPlus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\UnaryMinus($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Greater($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BooleanNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BitwiseNot($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Instanceof_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Identical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\NotIdentical($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Ternary($this->semStack[$stackPos - (5 - 1)], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Equal($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Ternary($this->semStack[$stackPos - (4 - 1)], null, $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\NotEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Spaceship($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Isset_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Smaller($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Empty_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Greater($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Eval_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Instanceof_($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; }, 432 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Ternary($this->semStack[$stackPos - (5 - 1)], $this->semStack[$stackPos - (5 - 3)], $this->semStack[$stackPos - (5 - 5)], $this->startAttributeStack[$stackPos - (5 - 1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Cast\Int_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Ternary($this->semStack[$stackPos - (4 - 1)], null, $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 434 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\BinaryOp\Coalesce($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 435 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Isset_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + }, 436 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Empty_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + }, 437 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 438 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 439 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Eval_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + }, 440 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 441 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Include_($this->semStack[$stackPos - (2 - 2)], \PhpParser\Node\Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 442 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Cast\Int_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 443 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos - (2 - 1)]); $this->semValue = new \PhpParser\Node\Expr\Cast\Double($this->semStack[$stackPos - (2 - 2)], $attrs); - }, 435 => function ($stackPos) { + }, 444 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\Cast\String_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 436 => function ($stackPos) { + }, 445 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\Cast\Array_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 437 => function ($stackPos) { + }, 446 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\Cast\Object_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 438 => function ($stackPos) { + }, 447 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\Cast\Bool_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 439 => function ($stackPos) { + }, 448 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\Cast\Unset_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 440 => function ($stackPos) { + }, 449 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes; $attrs['kind'] = \strtolower($this->semStack[$stackPos - (2 - 1)]) === 'exit' ? \PhpParser\Node\Expr\Exit_::KIND_EXIT : \PhpParser\Node\Expr\Exit_::KIND_DIE; $this->semValue = new \PhpParser\Node\Expr\Exit_($this->semStack[$stackPos - (2 - 2)], $attrs); - }, 441 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ErrorSuppress($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 442 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 443 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ShellExec($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 444 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Print_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 445 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Yield_(null, null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 446 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Yield_($this->semStack[$stackPos - (2 - 2)], null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 447 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Yield_($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 448 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\YieldFrom($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 449 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Throw_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 450 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \false, 'byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 4)], 'returnType' => $this->semStack[$stackPos - (8 - 6)], 'expr' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ErrorSuppress($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 451 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \true, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'returnType' => $this->semStack[$stackPos - (9 - 7)], 'expr' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 452 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 4)], 'uses' => $this->semStack[$stackPos - (8 - 6)], 'returnType' => $this->semStack[$stackPos - (8 - 7)], 'stmts' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ShellExec($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 453 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'uses' => $this->semStack[$stackPos - (9 - 7)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Print_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 454 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \false, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'returnType' => $this->semStack[$stackPos - (9 - 7)], 'expr' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Yield_(null, null, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 455 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \true, 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 6)], 'returnType' => $this->semStack[$stackPos - (10 - 8)], 'expr' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Yield_($this->semStack[$stackPos - (2 - 2)], null, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 456 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'uses' => $this->semStack[$stackPos - (9 - 7)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Yield_($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 2)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 457 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 6)], 'uses' => $this->semStack[$stackPos - (10 - 8)], 'returnType' => $this->semStack[$stackPos - (10 - 9)], 'stmts' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\YieldFrom($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 458 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Throw_($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 459 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \false, 'byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 4)], 'returnType' => $this->semStack[$stackPos - (8 - 6)], 'expr' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes); + }, 460 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \true, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'returnType' => $this->semStack[$stackPos - (9 - 7)], 'expr' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + }, 461 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (8 - 2)], 'params' => $this->semStack[$stackPos - (8 - 4)], 'uses' => $this->semStack[$stackPos - (8 - 6)], 'returnType' => $this->semStack[$stackPos - (8 - 7)], 'stmts' => $this->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes); + }, 462 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'uses' => $this->semStack[$stackPos - (9 - 7)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + }, 463 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \false, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'returnType' => $this->semStack[$stackPos - (9 - 7)], 'expr' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + }, 464 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrowFunction(['static' => \true, 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 6)], 'returnType' => $this->semStack[$stackPos - (10 - 8)], 'expr' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes); + }, 465 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \false, 'byRef' => $this->semStack[$stackPos - (9 - 3)], 'params' => $this->semStack[$stackPos - (9 - 5)], 'uses' => $this->semStack[$stackPos - (9 - 7)], 'returnType' => $this->semStack[$stackPos - (9 - 8)], 'stmts' => $this->semStack[$stackPos - (9 - 9)], 'attrGroups' => $this->semStack[$stackPos - (9 - 1)]], $this->startAttributeStack[$stackPos - (9 - 1)] + $this->endAttributes); + }, 466 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Closure(['static' => \true, 'byRef' => $this->semStack[$stackPos - (10 - 4)], 'params' => $this->semStack[$stackPos - (10 - 6)], 'uses' => $this->semStack[$stackPos - (10 - 8)], 'returnType' => $this->semStack[$stackPos - (10 - 9)], 'stmts' => $this->semStack[$stackPos - (10 - 10)], 'attrGroups' => $this->semStack[$stackPos - (10 - 1)]], $this->startAttributeStack[$stackPos - (10 - 1)] + $this->endAttributes); + }, 467 => function ($stackPos) { $this->semValue = array(new \PhpParser\Node\Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos - (8 - 4)], 'implements' => $this->semStack[$stackPos - (8 - 5)], 'stmts' => $this->semStack[$stackPos - (8 - 7)], 'attrGroups' => $this->semStack[$stackPos - (8 - 1)]], $this->startAttributeStack[$stackPos - (8 - 1)] + $this->endAttributes), $this->semStack[$stackPos - (8 - 3)]); $this->checkClass($this->semValue[0], -1); - }, 459 => function ($stackPos) { + }, 468 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\New_($this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 460 => function ($stackPos) { + }, 469 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos - (2 - 2)]; $this->semValue = new \PhpParser\Node\Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 461 => function ($stackPos) { + }, 470 => function ($stackPos) { $this->semValue = array(); - }, 462 => function ($stackPos) { + }, 471 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (4 - 3)]; - }, 463 => function ($stackPos) { + }, 472 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 464 => function ($stackPos) { + }, 473 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); - }, 465 => function ($stackPos) { + }, 474 => function ($stackPos) { $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; $this->semValue = $this->semStack[$stackPos - (3 - 1)]; - }, 466 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ClosureUse($this->semStack[$stackPos - (2 - 2)], $this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 467 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 468 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 469 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\StaticCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 470 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 471 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 472 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 473 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 474 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Name\FullyQualified(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Name\Relative(\substr($this->semStack[$stackPos - (1 - 1)], 10), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ClosureUse($this->semStack[$stackPos - (2 - 2)], $this->semStack[$stackPos - (2 - 1)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Expr\FuncCall($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = new \PhpParser\Node\Expr\StaticCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 479 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - $this->errorState = 2; + $this->semValue = new \PhpParser\Node\Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 480 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 481 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 482 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new \PhpParser\Node\Name($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 483 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = new \PhpParser\Node\Name\FullyQualified(\substr($this->semStack[$stackPos - (1 - 1)], 1), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 484 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new \PhpParser\Node\Name\Relative(\substr($this->semStack[$stackPos - (1 - 1)], 10), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 485 => function ($stackPos) { - $this->semValue = array(new \PhpParser\Node\Scalar\EncapsedStringPart(\PhpParser\Node\Scalar\String_::parseEscapeSequences($this->semStack[$stackPos - (1 - 1)], '`'), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 486 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 487 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + }, 488 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->errorState = 2; + }, 489 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 490 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 491 => function ($stackPos) { + $this->semValue = null; + }, 492 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + }, 493 => function ($stackPos) { + $this->semValue = array(); + }, 494 => function ($stackPos) { + $this->semValue = array(new \PhpParser\Node\Scalar\EncapsedStringPart(\PhpParser\Node\Scalar\String_::parseEscapeSequences($this->semStack[$stackPos - (1 - 1)], '`'), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes)); + }, 495 => function ($stackPos) { foreach ($this->semStack[$stackPos - (1 - 1)] as $s) { if ($s instanceof \PhpParser\Node\Scalar\EncapsedStringPart) { $s->value = \PhpParser\Node\Scalar\String_::parseEscapeSequences($s->value, '`', \true); } } $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 487 => function ($stackPos) { - $this->semValue = array(); - }, 488 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 489 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ConstFetch($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 490 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Line($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 491 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\File($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 492 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 493 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 494 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 495 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Method($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 496 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = array(); }, 497 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 498 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ConstFetch($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 499 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Line($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 500 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\File($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 501 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 502 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 503 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 504 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Method($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 505 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 506 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 507 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 508 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\ClassConstFetch($this->semStack[$stackPos - (3 - 1)], new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)]), $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); $this->errorState = 2; - }, 500 => function ($stackPos) { + }, 509 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes; $attrs['kind'] = \PhpParser\Node\Expr\Array_::KIND_SHORT; $this->semValue = new \PhpParser\Node\Expr\Array_($this->semStack[$stackPos - (3 - 2)], $attrs); - }, 501 => function ($stackPos) { + }, 510 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes; $attrs['kind'] = \PhpParser\Node\Expr\Array_::KIND_LONG; $this->semValue = new \PhpParser\Node\Expr\Array_($this->semStack[$stackPos - (4 - 3)], $attrs); - }, 502 => function ($stackPos) { + }, 511 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 503 => function ($stackPos) { + }, 512 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes; $attrs['kind'] = $this->semStack[$stackPos - (1 - 1)][0] === "'" || $this->semStack[$stackPos - (1 - 1)][1] === "'" && ($this->semStack[$stackPos - (1 - 1)][0] === 'b' || $this->semStack[$stackPos - (1 - 1)][0] === 'B') ? \PhpParser\Node\Scalar\String_::KIND_SINGLE_QUOTED : \PhpParser\Node\Scalar\String_::KIND_DOUBLE_QUOTED; $this->semValue = new \PhpParser\Node\Scalar\String_(\PhpParser\Node\Scalar\String_::parse($this->semStack[$stackPos - (1 - 1)]), $attrs); - }, 504 => function ($stackPos) { + }, 513 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes; $attrs['kind'] = \PhpParser\Node\Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos - (3 - 2)] as $s) { @@ -1198,181 +1219,181 @@ class Php7 extends \PhpParser\ParserAbstract } } $this->semValue = new \PhpParser\Node\Scalar\Encapsed($this->semStack[$stackPos - (3 - 2)], $attrs); - }, 505 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 506 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\DNumber(\PhpParser\Node\Scalar\DNumber::parse($this->semStack[$stackPos - (1 - 1)]), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 508 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 509 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; - }, 510 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true); - }, 511 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos - (2 - 1)], '', $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (2 - 2)] + $this->endAttributeStack[$stackPos - (2 - 2)], \true); - }, 512 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true); - }, 513 => function ($stackPos) { - $this->semValue = null; }, 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = $this->parseLNumber($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Scalar\DNumber(\PhpParser\Node\Scalar\DNumber::parse($this->semStack[$stackPos - (1 - 1)]), $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 517 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 518 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 519 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true); }, 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos - (2 - 1)], '', $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (2 - 2)] + $this->endAttributeStack[$stackPos - (2 - 2)], \true); }, 521 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 2)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes, $this->startAttributeStack[$stackPos - (3 - 3)] + $this->endAttributeStack[$stackPos - (3 - 3)], \true); }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = null; }, 523 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 524 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 525 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; }, 526 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 528 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\MethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 529 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\NullsafeMethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 530 => function ($stackPos) { - $this->semValue = null; - }, 531 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 529 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 530 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 531 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; }, 532 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 534 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 535 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 536 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 537 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\MethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 538 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\NullsafeMethodCall($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->semStack[$stackPos - (4 - 4)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Variable(new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes), $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - $this->errorState = 2; + $this->semValue = null; }, 540 => function ($stackPos) { - $var = $this->semStack[$stackPos - (1 - 1)]->name; - $this->semValue = \is_string($var) ? new \PhpParser\Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes) : $var; + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 541 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 542 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 543 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 544 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 545 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 546 => function ($stackPos) { + }, 544 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 547 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 548 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 549 => function ($stackPos) { + }, 545 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 546 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + }, 547 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 548 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Variable(new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes), $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->errorState = 2; + }, 549 => function ($stackPos) { + $var = $this->semStack[$stackPos - (1 - 1)]->name; + $this->semValue = \is_string($var) ? new \PhpParser\Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes) : $var; }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = new \PhpParser\Node\Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 551 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 552 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 555 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 556 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 557 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\StaticPropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 558 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 559 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + }, 560 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 561 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 562 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + }, 563 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + }, 564 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\Error($this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); $this->errorState = 2; - }, 556 => function ($stackPos) { + }, 565 => function ($stackPos) { $this->semValue = new \PhpParser\Node\Expr\List_($this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 557 => function ($stackPos) { + }, 566 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; $end = \count($this->semValue) - 1; if ($this->semValue[$end] === null) { \array_pop($this->semValue); } - }, 558 => function ($stackPos) { + }, 567 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; - }, 559 => function ($stackPos) { + }, 568 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, 560 => function ($stackPos) { + }, 569 => function ($stackPos) { $this->semStack[$stackPos - (3 - 1)][] = $this->semStack[$stackPos - (3 - 3)]; $this->semValue = $this->semStack[$stackPos - (3 - 1)]; - }, 561 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); - }, 562 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 563 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 564 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); - }, 565 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 566 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 1)], \true, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); - }, 567 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); - }, 568 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); - }, 569 => function ($stackPos) { - $this->semValue = null; }, 570 => function ($stackPos) { - $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)]; - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 571 => function ($stackPos) { - $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)]; - $this->semValue = $this->semStack[$stackPos - (2 - 1)]; - }, 572 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); + }, 571 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 572 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]); + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (1 - 1)], null, \false, $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\EncapsedStringPart($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (4 - 4)], $this->semStack[$stackPos - (4 - 1)], \true, $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (1 - 1)]; + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (3 - 3)], $this->semStack[$stackPos - (3 - 1)], \false, $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ArrayItem($this->semStack[$stackPos - (2 - 2)], null, \false, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes, \true, $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); }, 578 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = null; }, 579 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)]; + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; }, 580 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semStack[$stackPos - (2 - 1)][] = $this->semStack[$stackPos - (2 - 2)]; + $this->semValue = $this->semStack[$stackPos - (2 - 1)]; }, 581 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos - (1 - 1)]); }, 582 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 4)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos - (2 - 1)], $this->semStack[$stackPos - (2 - 2)]); }, 583 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + $this->semValue = new \PhpParser\Node\Scalar\EncapsedStringPart($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semValue = new \PhpParser\Node\Scalar\String_($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }, 586 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (4 - 1)], $this->semStack[$stackPos - (4 - 3)], $this->startAttributeStack[$stackPos - (4 - 1)] + $this->endAttributes); }, 587 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\PropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 588 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\NullsafePropertyFetch($this->semStack[$stackPos - (3 - 1)], $this->semStack[$stackPos - (3 - 3)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 589 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 590 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\Variable($this->semStack[$stackPos - (3 - 2)], $this->startAttributeStack[$stackPos - (3 - 1)] + $this->endAttributes); + }, 591 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Expr\ArrayDimFetch($this->semStack[$stackPos - (6 - 2)], $this->semStack[$stackPos - (6 - 4)], $this->startAttributeStack[$stackPos - (6 - 1)] + $this->endAttributes); + }, 592 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos - (3 - 2)]; + }, 593 => function ($stackPos) { + $this->semValue = new \PhpParser\Node\Scalar\String_($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 594 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos - (1 - 1)], $this->startAttributeStack[$stackPos - (1 - 1)] + $this->endAttributes); + }, 595 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos - (2 - 2)], $this->startAttributeStack[$stackPos - (2 - 1)] + $this->endAttributes); + }, 596 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos - (1 - 1)]; }]; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index a9a7aba6132..e731cf01af7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -24,6 +24,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract { return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } + protected function pVariadicPlaceholder(\PhpParser\Node\VariadicPlaceholder $node) + { + return '...'; + } protected function pConst(\PhpParser\Node\Const_ $node) { return $node->name . ' = ' . $this->p($node->value); @@ -36,6 +40,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract { return $this->pImplode($node->types, '|'); } + protected function pIntersectionType(\PhpParser\Node\IntersectionType $node) + { + return $this->pImplode($node->types, '&'); + } protected function pIdentifier(\PhpParser\Node\Identifier $node) { return $node->name; diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index b71572aca4c..b574ba01908 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -741,7 +741,9 @@ abstract class PrettyPrinterAbstract // We don't have insertion information for this list type return null; } - if ($insertStr === ', ' && $this->isMultiline($origNodes)) { + // We go multiline if the original code was multiline, + // or if it's an array item with a comment above it. + if ($insertStr === ', ' && ($this->isMultiline($origNodes) || $arrItem->getComments())) { $insertStr = ','; $insertNewline = \true; } @@ -755,11 +757,11 @@ abstract class PrettyPrinterAbstract $origIndentLevel = $this->indentLevel; $this->setIndentLevel($lastElemIndentLevel); if ($insertNewline) { + $result .= $insertStr . $this->nl; $comments = $arrItem->getComments(); if ($comments) { - $result .= $this->nl . $this->pComments($comments); + $result .= $this->pComments($comments) . $this->nl; } - $result .= $insertStr . $this->nl; } else { $result .= $insertStr; } @@ -1116,6 +1118,7 @@ abstract class PrettyPrinterAbstract //'Scalar_Encapsed->parts' => '', 'Stmt_Catch->types' => '|', 'UnionType->types' => '|', + 'IntersectionType->types' => '&', 'Stmt_If->elseifs' => ' ', 'Stmt_TryCatch->catches' => ' ', // comma-separated lists diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index b3481f4d7c3..356114ee9a5 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php'; if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20210927\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044', false) && !interface_exists('ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044', false) && !trait_exists('ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044', false)) { - spl_autoload_call('RectorPrefix20210927\ComposerAutoloaderInit61e8a34a87911b6fb5b14c5d781d3044'); +if (!class_exists('ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628', false) && !interface_exists('ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628', false) && !trait_exists('ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628', false)) { + spl_autoload_call('RectorPrefix20210927\ComposerAutoloaderInitbd1ed7b5302f7464c1582cf2b5f1f628'); } if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) { spl_autoload_call('RectorPrefix20210927\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -3291,11 +3291,6 @@ if (!class_exists('DemoClass', false) && !interface_exists('DemoClass', false) & // Functions whitelisting. For more information see: // https://github.com/humbug/php-scoper/blob/master/README.md#functions-whitelisting -if (!function_exists('should_include_preload')) { - function should_include_preload() { - return \RectorPrefix20210927\should_include_preload(...func_get_args()); - } -} if (!function_exists('dn')) { function dn() { return \RectorPrefix20210927\dn(...func_get_args()); @@ -3311,9 +3306,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20210927\print_node(...func_get_args()); } } -if (!function_exists('composerRequire61e8a34a87911b6fb5b14c5d781d3044')) { - function composerRequire61e8a34a87911b6fb5b14c5d781d3044() { - return \RectorPrefix20210927\composerRequire61e8a34a87911b6fb5b14c5d781d3044(...func_get_args()); +if (!function_exists('composerRequirebd1ed7b5302f7464c1582cf2b5f1f628')) { + function composerRequirebd1ed7b5302f7464c1582cf2b5f1f628() { + return \RectorPrefix20210927\composerRequirebd1ed7b5302f7464c1582cf2b5f1f628(...func_get_args()); } } if (!function_exists('parseArgs')) {