From 2d16105a21f74ee3dfb31e5713e2f1d75b40b913 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 1 Oct 2025 11:23:45 +1300 Subject: [PATCH 1/4] Upgrade dependencies, scope, and downgrade to match minimum PHP --- README.md | 24 + composer.json | 5 +- composer.lock | 282 +- plugin.json | 1 - vendor/autoload.php | 25 +- vendor/autoload_original.php | 25 + vendor/composer/autoload_psr4.php | 3 - vendor/composer/autoload_real.php | 2 - vendor/composer/autoload_static.php | 25 +- vendor/composer/installed.json | 299 +- vendor/composer/installed.php | 59 +- vendor/composer/platform_check.php | 26 - vendor/doctrine/annotations/LICENSE | 19 - .../annotations/docs/en/annotations.rst | 189 -- .../doctrine/annotations/docs/en/custom.rst | 443 --- vendor/doctrine/annotations/docs/en/index.rst | 109 - .../doctrine/annotations/docs/en/sidebar.rst | 6 - .../Common/Annotations/Annotation.php | 54 - .../Annotations/Annotation/Attribute.php | 21 - .../Annotations/Annotation/Attributes.php | 15 - .../Common/Annotations/Annotation/Enum.php | 69 - .../Annotation/IgnoreAnnotation.php | 43 - .../Annotation/NamedArgumentConstructor.php | 13 - .../Annotations/Annotation/Required.php | 13 - .../Common/Annotations/Annotation/Target.php | 101 - .../Annotations/AnnotationException.php | 158 - .../Common/Annotations/AnnotationReader.php | 392 --- .../Common/Annotations/AnnotationRegistry.php | 43 - .../Doctrine/Common/Annotations/DocLexer.php | 131 - .../Doctrine/Common/Annotations/DocParser.php | 1496 --------- .../ImplicitlyIgnoredAnnotationNames.php | 178 - .../Common/Annotations/IndexedReader.php | 99 - .../Doctrine/Common/Annotations/PhpParser.php | 78 - .../Common/Annotations/PsrCachedReader.php | 233 -- .../Doctrine/Common/Annotations/Reader.php | 80 - .../Common/Annotations/TokenParser.php | 205 -- vendor/doctrine/lexer/LICENSE | 19 - vendor/doctrine/lexer/src/AbstractLexer.php | 328 -- vendor/doctrine/lexer/src/Token.php | 56 - .../php-parser/lib/PhpParser/Builder.php | 12 - .../php-parser/lib/PhpParser/Builder/Use_.php | 49 - .../php-parser/lib/PhpParser/Comment/Doc.php | 6 - .../ConstExprEvaluationException.php | 6 - .../lib/PhpParser/ErrorHandler/Throwing.php | 17 - .../AsymmetricVisibilityTokenEmulator.php | 93 - .../Lexer/TokenEmulator/AttributeEmulator.php | 49 - .../Lexer/TokenEmulator/EnumTokenEmulator.php | 26 - .../TokenEmulator/ExplicitOctalEmulator.php | 45 - .../TokenEmulator/MatchTokenEmulator.php | 19 - .../TokenEmulator/NullsafeTokenEmulator.php | 60 - .../TokenEmulator/PipeOperatorEmulator.php | 45 - .../TokenEmulator/PropertyTokenEmulator.php | 19 - .../TokenEmulator/ReadonlyTokenEmulator.php | 31 - .../Lexer/TokenEmulator/ReverseEmulator.php | 37 - .../Lexer/TokenEmulator/TokenEmulator.php | 30 - .../php-parser/lib/PhpParser/Modifiers.php | 85 - .../lib/PhpParser/Node/ComplexType.php | 13 - .../php-parser/lib/PhpParser/Node/Expr.php | 8 - .../lib/PhpParser/Node/Expr/ArrayItem.php | 11 - .../lib/PhpParser/Node/Expr/Array_.php | 34 - .../Node/Expr/AssignOp/BitwiseAnd.php | 11 - .../Node/Expr/AssignOp/BitwiseOr.php | 11 - .../Node/Expr/AssignOp/BitwiseXor.php | 11 - .../PhpParser/Node/Expr/AssignOp/Coalesce.php | 11 - .../PhpParser/Node/Expr/AssignOp/Concat.php | 11 - .../lib/PhpParser/Node/Expr/AssignOp/Div.php | 11 - .../PhpParser/Node/Expr/AssignOp/Minus.php | 11 - .../lib/PhpParser/Node/Expr/AssignOp/Mod.php | 11 - .../lib/PhpParser/Node/Expr/AssignOp/Mul.php | 11 - .../lib/PhpParser/Node/Expr/AssignOp/Plus.php | 11 - .../lib/PhpParser/Node/Expr/AssignOp/Pow.php | 11 - .../Node/Expr/AssignOp/ShiftLeft.php | 11 - .../Node/Expr/AssignOp/ShiftRight.php | 11 - .../Node/Expr/BinaryOp/BitwiseAnd.php | 15 - .../Node/Expr/BinaryOp/BitwiseOr.php | 15 - .../Node/Expr/BinaryOp/BitwiseXor.php | 15 - .../Node/Expr/BinaryOp/BooleanAnd.php | 15 - .../Node/Expr/BinaryOp/BooleanOr.php | 15 - .../PhpParser/Node/Expr/BinaryOp/Coalesce.php | 15 - .../PhpParser/Node/Expr/BinaryOp/Concat.php | 15 - .../lib/PhpParser/Node/Expr/BinaryOp/Div.php | 15 - .../PhpParser/Node/Expr/BinaryOp/Equal.php | 15 - .../PhpParser/Node/Expr/BinaryOp/Greater.php | 15 - .../Node/Expr/BinaryOp/GreaterOrEqual.php | 15 - .../Node/Expr/BinaryOp/Identical.php | 15 - .../Node/Expr/BinaryOp/LogicalAnd.php | 15 - .../Node/Expr/BinaryOp/LogicalOr.php | 15 - .../Node/Expr/BinaryOp/LogicalXor.php | 15 - .../PhpParser/Node/Expr/BinaryOp/Minus.php | 15 - .../lib/PhpParser/Node/Expr/BinaryOp/Mod.php | 15 - .../lib/PhpParser/Node/Expr/BinaryOp/Mul.php | 15 - .../PhpParser/Node/Expr/BinaryOp/NotEqual.php | 15 - .../Node/Expr/BinaryOp/NotIdentical.php | 15 - .../lib/PhpParser/Node/Expr/BinaryOp/Pipe.php | 15 - .../lib/PhpParser/Node/Expr/BinaryOp/Plus.php | 15 - .../lib/PhpParser/Node/Expr/BinaryOp/Pow.php | 15 - .../Node/Expr/BinaryOp/ShiftLeft.php | 15 - .../Node/Expr/BinaryOp/ShiftRight.php | 15 - .../PhpParser/Node/Expr/BinaryOp/Smaller.php | 15 - .../Node/Expr/BinaryOp/SmallerOrEqual.php | 15 - .../Node/Expr/BinaryOp/Spaceship.php | 15 - .../lib/PhpParser/Node/Expr/Cast/Array_.php | 11 - .../lib/PhpParser/Node/Expr/Cast/Bool_.php | 11 - .../lib/PhpParser/Node/Expr/Cast/Double.php | 16 - .../lib/PhpParser/Node/Expr/Cast/Int_.php | 11 - .../lib/PhpParser/Node/Expr/Cast/Object_.php | 11 - .../lib/PhpParser/Node/Expr/Cast/String_.php | 11 - .../lib/PhpParser/Node/Expr/Cast/Unset_.php | 11 - .../lib/PhpParser/Node/Expr/Cast/Void_.php | 11 - .../lib/PhpParser/Node/Expr/ClosureUse.php | 11 - .../lib/PhpParser/Node/MatchArm.php | 29 - .../php-parser/lib/PhpParser/Node/Scalar.php | 6 - .../lib/PhpParser/Node/Scalar/DNumber.php | 11 - .../lib/PhpParser/Node/Scalar/Encapsed.php | 11 - .../Node/Scalar/EncapsedStringPart.php | 13 - .../lib/PhpParser/Node/Scalar/LNumber.php | 11 - .../lib/PhpParser/Node/Scalar/MagicConst.php | 27 - .../Node/Scalar/MagicConst/Class_.php | 15 - .../PhpParser/Node/Scalar/MagicConst/Dir.php | 15 - .../PhpParser/Node/Scalar/MagicConst/File.php | 15 - .../Node/Scalar/MagicConst/Function_.php | 15 - .../PhpParser/Node/Scalar/MagicConst/Line.php | 15 - .../Node/Scalar/MagicConst/Method.php | 15 - .../Node/Scalar/MagicConst/Namespace_.php | 15 - .../Node/Scalar/MagicConst/Property.php | 15 - .../Node/Scalar/MagicConst/Trait_.php | 15 - .../lib/PhpParser/Node/Scalar/String_.php | 161 - .../php-parser/lib/PhpParser/Node/Stmt.php | 8 - .../PhpParser/Node/Stmt/DeclareDeclare.php | 13 - .../lib/PhpParser/Node/Stmt/Label.php | 30 - .../lib/PhpParser/Node/Stmt/Nop.php | 16 - .../PhpParser/Node/Stmt/PropertyProperty.php | 13 - .../lib/PhpParser/Node/Stmt/StaticVar.php | 11 - .../Node/Stmt/TraitUseAdaptation.php | 12 - .../lib/PhpParser/Node/Stmt/UseUse.php | 13 - .../PhpParser/NodeVisitor/CloningVisitor.php | 19 - .../lib/PhpParser/NodeVisitorAbstract.php | 24 - .../php-parser/lib/PhpParser/Parser/Php7.php | 2908 ----------------- .../php-parser/lib/PhpParser/Parser/Php8.php | 2903 ---------------- .../nikic/php-parser/lib/PhpParser/Token.php | 18 - .../{ => prefixed}/nikic/php-parser/LICENSE | 0 .../nikic/php-parser/bin/php-parse | 125 +- .../php-parser/lib/PhpParser/Builder.php | 14 + .../lib/PhpParser/Builder/ClassConst.php | 99 +- .../lib/PhpParser/Builder/Class_.php | 104 +- .../lib/PhpParser/Builder/Declaration.php | 32 +- .../lib/PhpParser/Builder/EnumCase.php | 63 +- .../lib/PhpParser/Builder/Enum_.php | 79 +- .../lib/PhpParser/Builder/FunctionLike.php | 47 +- .../lib/PhpParser/Builder/Function_.php | 53 +- .../lib/PhpParser/Builder/Interface_.php | 62 +- .../lib/PhpParser/Builder/Method.php | 102 +- .../lib/PhpParser/Builder/Namespace_.php | 37 +- .../lib/PhpParser/Builder/Param.php | 118 +- .../lib/PhpParser/Builder/Property.php | 144 +- .../lib/PhpParser/Builder/TraitUse.php | 39 +- .../PhpParser/Builder/TraitUseAdaptation.php | 96 +- .../lib/PhpParser/Builder/Trait_.php | 58 +- .../php-parser/lib/PhpParser/Builder/Use_.php | 54 + .../lib/PhpParser/BuilderFactory.php | 181 +- .../lib/PhpParser/BuilderHelpers.php | 178 +- .../php-parser/lib/PhpParser/Comment.php | 110 +- .../php-parser/lib/PhpParser/Comment/Doc.php | 8 + .../ConstExprEvaluationException.php | 8 + .../lib/PhpParser/ConstExprEvaluator.php | 171 +- .../nikic/php-parser/lib/PhpParser/Error.php | 84 +- .../php-parser/lib/PhpParser/ErrorHandler.php | 10 +- .../lib/PhpParser/ErrorHandler/Collecting.php | 31 +- .../lib/PhpParser/ErrorHandler/Throwing.php | 19 + .../lib/PhpParser/Internal/DiffElem.php | 15 +- .../lib/PhpParser/Internal/Differ.php | 51 +- .../Internal/PrintableNewAnonClassNode.php | 49 +- .../lib/PhpParser/Internal/TokenPolyfill.php | 103 +- .../lib/PhpParser/Internal/TokenStream.php | 119 +- .../php-parser/lib/PhpParser/JsonDecoder.php | 60 +- .../nikic/php-parser/lib/PhpParser/Lexer.php | 75 +- .../lib/PhpParser/Lexer/Emulative.php | 149 +- .../AsymmetricVisibilityTokenEmulator.php | 66 + .../Lexer/TokenEmulator/AttributeEmulator.php | 48 + .../Lexer/TokenEmulator/EnumTokenEmulator.php | 25 + .../TokenEmulator/ExplicitOctalEmulator.php | 42 + .../Lexer/TokenEmulator/KeywordEmulator.php | 55 +- .../TokenEmulator/MatchTokenEmulator.php | 21 + .../TokenEmulator/NullsafeTokenEmulator.php | 48 + .../TokenEmulator/PipeOperatorEmulator.php | 42 + .../TokenEmulator/PropertyTokenEmulator.php | 21 + .../ReadonlyFunctionTokenEmulator.php | 26 +- .../TokenEmulator/ReadonlyTokenEmulator.php | 29 + .../Lexer/TokenEmulator/ReverseEmulator.php | 38 + .../Lexer/TokenEmulator/TokenEmulator.php | 28 + .../Lexer/TokenEmulator/VoidCastEmulator.php | 67 +- .../php-parser/lib/PhpParser/Modifiers.php | 66 + .../php-parser/lib/PhpParser/NameContext.php | 123 +- .../nikic/php-parser/lib/PhpParser/Node.php | 56 +- .../php-parser/lib/PhpParser/Node/Arg.php | 34 +- .../lib/PhpParser/Node/ArrayItem.php | 32 +- .../lib/PhpParser/Node/Attribute.php | 30 +- .../lib/PhpParser/Node/AttributeGroup.php | 25 +- .../lib/PhpParser/Node/ClosureUse.php | 28 +- .../lib/PhpParser/Node/ComplexType.php | 14 + .../php-parser/lib/PhpParser/Node/Const_.php | 30 +- .../lib/PhpParser/Node/DeclareItem.php | 30 +- .../php-parser/lib/PhpParser/Node/Expr.php | 9 + .../lib/PhpParser/Node/Expr/ArrayDimFetch.php | 27 +- .../lib/PhpParser/Node/Expr/ArrayItem.php | 12 + .../lib/PhpParser/Node/Expr/Array_.php | 36 + .../lib/PhpParser/Node/Expr/ArrowFunction.php | 67 +- .../lib/PhpParser/Node/Expr/Assign.php | 27 +- .../lib/PhpParser/Node/Expr/AssignOp.php | 23 +- .../Node/Expr/AssignOp/BitwiseAnd.php | 13 + .../Node/Expr/AssignOp/BitwiseOr.php | 13 + .../Node/Expr/AssignOp/BitwiseXor.php | 13 + .../PhpParser/Node/Expr/AssignOp/Coalesce.php | 13 + .../PhpParser/Node/Expr/AssignOp/Concat.php | 13 + .../lib/PhpParser/Node/Expr/AssignOp/Div.php | 13 + .../PhpParser/Node/Expr/AssignOp/Minus.php | 13 + .../lib/PhpParser/Node/Expr/AssignOp/Mod.php | 13 + .../lib/PhpParser/Node/Expr/AssignOp/Mul.php | 13 + .../lib/PhpParser/Node/Expr/AssignOp/Plus.php | 13 + .../lib/PhpParser/Node/Expr/AssignOp/Pow.php | 13 + .../Node/Expr/AssignOp/ShiftLeft.php | 13 + .../Node/Expr/AssignOp/ShiftRight.php | 13 + .../lib/PhpParser/Node/Expr/AssignRef.php | 27 +- .../lib/PhpParser/Node/Expr/BinaryOp.php | 26 +- .../Node/Expr/BinaryOp/BitwiseAnd.php | 17 + .../Node/Expr/BinaryOp/BitwiseOr.php | 17 + .../Node/Expr/BinaryOp/BitwiseXor.php | 17 + .../Node/Expr/BinaryOp/BooleanAnd.php | 17 + .../Node/Expr/BinaryOp/BooleanOr.php | 17 + .../PhpParser/Node/Expr/BinaryOp/Coalesce.php | 17 + .../PhpParser/Node/Expr/BinaryOp/Concat.php | 17 + .../lib/PhpParser/Node/Expr/BinaryOp/Div.php | 17 + .../PhpParser/Node/Expr/BinaryOp/Equal.php | 17 + .../PhpParser/Node/Expr/BinaryOp/Greater.php | 17 + .../Node/Expr/BinaryOp/GreaterOrEqual.php | 17 + .../Node/Expr/BinaryOp/Identical.php | 17 + .../Node/Expr/BinaryOp/LogicalAnd.php | 17 + .../Node/Expr/BinaryOp/LogicalOr.php | 17 + .../Node/Expr/BinaryOp/LogicalXor.php | 17 + .../PhpParser/Node/Expr/BinaryOp/Minus.php | 17 + .../lib/PhpParser/Node/Expr/BinaryOp/Mod.php | 17 + .../lib/PhpParser/Node/Expr/BinaryOp/Mul.php | 17 + .../PhpParser/Node/Expr/BinaryOp/NotEqual.php | 17 + .../Node/Expr/BinaryOp/NotIdentical.php | 17 + .../lib/PhpParser/Node/Expr/BinaryOp/Pipe.php | 17 + .../lib/PhpParser/Node/Expr/BinaryOp/Plus.php | 17 + .../lib/PhpParser/Node/Expr/BinaryOp/Pow.php | 17 + .../Node/Expr/BinaryOp/ShiftLeft.php | 17 + .../Node/Expr/BinaryOp/ShiftRight.php | 17 + .../PhpParser/Node/Expr/BinaryOp/Smaller.php | 17 + .../Node/Expr/BinaryOp/SmallerOrEqual.php | 17 + .../Node/Expr/BinaryOp/Spaceship.php | 17 + .../lib/PhpParser/Node/Expr/BitwiseNot.php | 25 +- .../lib/PhpParser/Node/Expr/BooleanNot.php | 25 +- .../lib/PhpParser/Node/Expr/CallLike.php | 34 +- .../lib/PhpParser/Node/Expr/Cast.php | 21 +- .../lib/PhpParser/Node/Expr/Cast/Array_.php | 13 + .../lib/PhpParser/Node/Expr/Cast/Bool_.php | 18 + .../lib/PhpParser/Node/Expr/Cast/Double.php | 20 + .../lib/PhpParser/Node/Expr/Cast/Int_.php | 18 + .../lib/PhpParser/Node/Expr/Cast/Object_.php | 13 + .../lib/PhpParser/Node/Expr/Cast/String_.php | 18 + .../lib/PhpParser/Node/Expr/Cast/Unset_.php | 13 + .../lib/PhpParser/Node/Expr/Cast/Void_.php | 13 + .../PhpParser/Node/Expr/ClassConstFetch.php | 33 +- .../lib/PhpParser/Node/Expr/Clone_.php | 25 +- .../lib/PhpParser/Node/Expr/Closure.php | 67 +- .../lib/PhpParser/Node/Expr/ClosureUse.php | 12 + .../lib/PhpParser/Node/Expr/ConstFetch.php | 27 +- .../lib/PhpParser/Node/Expr/Empty_.php | 25 +- .../lib/PhpParser/Node/Expr/Error.php | 22 +- .../lib/PhpParser/Node/Expr/ErrorSuppress.php | 25 +- .../lib/PhpParser/Node/Expr/Eval_.php | 25 +- .../lib/PhpParser/Node/Expr/Exit_.php | 26 +- .../lib/PhpParser/Node/Expr/FuncCall.php | 33 +- .../lib/PhpParser/Node/Expr/Include_.php | 32 +- .../lib/PhpParser/Node/Expr/Instanceof_.php | 31 +- .../lib/PhpParser/Node/Expr/Isset_.php | 25 +- .../lib/PhpParser/Node/Expr/List_.php | 34 +- .../lib/PhpParser/Node/Expr/Match_.php | 29 +- .../lib/PhpParser/Node/Expr/MethodCall.php | 41 +- .../lib/PhpParser/Node/Expr/New_.php | 37 +- .../Node/Expr/NullsafeMethodCall.php | 41 +- .../Node/Expr/NullsafePropertyFetch.php | 31 +- .../lib/PhpParser/Node/Expr/PostDec.php | 25 +- .../lib/PhpParser/Node/Expr/PostInc.php | 25 +- .../lib/PhpParser/Node/Expr/PreDec.php | 25 +- .../lib/PhpParser/Node/Expr/PreInc.php | 25 +- .../lib/PhpParser/Node/Expr/Print_.php | 25 +- .../lib/PhpParser/Node/Expr/PropertyFetch.php | 31 +- .../lib/PhpParser/Node/Expr/ShellExec.php | 27 +- .../lib/PhpParser/Node/Expr/StaticCall.php | 41 +- .../Node/Expr/StaticPropertyFetch.php | 33 +- .../lib/PhpParser/Node/Expr/Ternary.php | 29 +- .../lib/PhpParser/Node/Expr/Throw_.php | 25 +- .../lib/PhpParser/Node/Expr/UnaryMinus.php | 25 +- .../lib/PhpParser/Node/Expr/UnaryPlus.php | 25 +- .../lib/PhpParser/Node/Expr/Variable.php | 23 +- .../lib/PhpParser/Node/Expr/YieldFrom.php | 25 +- .../lib/PhpParser/Node/Expr/Yield_.php | 27 +- .../lib/PhpParser/Node/FunctionLike.php | 23 +- .../lib/PhpParser/Node/Identifier.php | 49 +- .../PhpParser/Node/InterpolatedStringPart.php | 26 +- .../lib/PhpParser/Node/IntersectionType.php | 22 +- .../lib/PhpParser/Node/MatchArm.php | 33 + .../php-parser/lib/PhpParser/Node/Name.php | 122 +- .../PhpParser/Node/Name/FullyQualified.php | 39 +- .../lib/PhpParser/Node/Name/Relative.php | 39 +- .../lib/PhpParser/Node/NullableType.php | 25 +- .../php-parser/lib/PhpParser/Node/Param.php | 90 +- .../lib/PhpParser/Node/PropertyHook.php | 75 +- .../lib/PhpParser/Node/PropertyItem.php | 30 +- .../php-parser/lib/PhpParser/Node/Scalar.php | 8 + .../lib/PhpParser/Node/Scalar/DNumber.php | 12 + .../lib/PhpParser/Node/Scalar/Encapsed.php | 12 + .../Node/Scalar/EncapsedStringPart.php | 13 + .../lib/PhpParser/Node/Scalar/Float_.php | 41 +- .../lib/PhpParser/Node/Scalar/Int_.php | 40 +- .../Node/Scalar/InterpolatedString.php | 30 +- .../lib/PhpParser/Node/Scalar/LNumber.php | 12 + .../lib/PhpParser/Node/Scalar/MagicConst.php | 28 + .../Node/Scalar/MagicConst/Class_.php | 17 + .../PhpParser/Node/Scalar/MagicConst/Dir.php | 17 + .../PhpParser/Node/Scalar/MagicConst/File.php | 17 + .../Node/Scalar/MagicConst/Function_.php | 17 + .../PhpParser/Node/Scalar/MagicConst/Line.php | 17 + .../Node/Scalar/MagicConst/Method.php | 17 + .../Node/Scalar/MagicConst/Namespace_.php | 17 + .../Node/Scalar/MagicConst/Property.php | 17 + .../Node/Scalar/MagicConst/Trait_.php | 17 + .../lib/PhpParser/Node/Scalar/String_.php | 131 + .../lib/PhpParser/Node/StaticVar.php | 32 +- .../php-parser/lib/PhpParser/Node/Stmt.php | 9 + .../lib/PhpParser/Node/Stmt/Block.php | 25 +- .../lib/PhpParser/Node/Stmt/Break_.php | 25 +- .../lib/PhpParser/Node/Stmt/Case_.php | 27 +- .../lib/PhpParser/Node/Stmt/Catch_.php | 33 +- .../lib/PhpParser/Node/Stmt/ClassConst.php | 58 +- .../lib/PhpParser/Node/Stmt/ClassLike.php | 46 +- .../lib/PhpParser/Node/Stmt/ClassMethod.php | 115 +- .../lib/PhpParser/Node/Stmt/Class_.php | 66 +- .../lib/PhpParser/Node/Stmt/Const_.php | 31 +- .../lib/PhpParser/Node/Stmt/Continue_.php | 25 +- .../PhpParser/Node/Stmt/DeclareDeclare.php | 13 + .../lib/PhpParser/Node/Stmt/Declare_.php | 29 +- .../lib/PhpParser/Node/Stmt/Do_.php | 27 +- .../lib/PhpParser/Node/Stmt/Echo_.php | 25 +- .../lib/PhpParser/Node/Stmt/ElseIf_.php | 27 +- .../lib/PhpParser/Node/Stmt/Else_.php | 25 +- .../lib/PhpParser/Node/Stmt/EnumCase.php | 31 +- .../lib/PhpParser/Node/Stmt/Enum_.php | 28 +- .../lib/PhpParser/Node/Stmt/Expression.php | 25 +- .../lib/PhpParser/Node/Stmt/Finally_.php | 25 +- .../lib/PhpParser/Node/Stmt/For_.php | 31 +- .../lib/PhpParser/Node/Stmt/Foreach_.php | 35 +- .../lib/PhpParser/Node/Stmt/Function_.php | 62 +- .../lib/PhpParser/Node/Stmt/Global_.php | 25 +- .../lib/PhpParser/Node/Stmt/Goto_.php | 27 +- .../lib/PhpParser/Node/Stmt/GroupUse.php | 33 +- .../lib/PhpParser/Node/Stmt/HaltCompiler.php | 25 +- .../lib/PhpParser/Node/Stmt/If_.php | 31 +- .../lib/PhpParser/Node/Stmt/InlineHTML.php | 25 +- .../lib/PhpParser/Node/Stmt/Interface_.php | 25 +- .../lib/PhpParser/Node/Stmt/Label.php | 31 + .../lib/PhpParser/Node/Stmt/Namespace_.php | 26 +- .../lib/PhpParser/Node/Stmt/Nop.php | 18 + .../lib/PhpParser/Node/Stmt/Property.php | 90 +- .../PhpParser/Node/Stmt/PropertyProperty.php | 13 + .../lib/PhpParser/Node/Stmt/Return_.php | 25 +- .../lib/PhpParser/Node/Stmt/StaticVar.php | 12 + .../lib/PhpParser/Node/Stmt/Static_.php | 27 +- .../lib/PhpParser/Node/Stmt/Switch_.php | 27 +- .../lib/PhpParser/Node/Stmt/TraitUse.php | 27 +- .../Node/Stmt/TraitUseAdaptation.php | 13 + .../Node/Stmt/TraitUseAdaptation/Alias.php | 27 +- .../Stmt/TraitUseAdaptation/Precedence.php | 25 +- .../lib/PhpParser/Node/Stmt/Trait_.php | 22 +- .../lib/PhpParser/Node/Stmt/TryCatch.php | 29 +- .../lib/PhpParser/Node/Stmt/Unset_.php | 25 +- .../lib/PhpParser/Node/Stmt/UseUse.php | 13 + .../lib/PhpParser/Node/Stmt/Use_.php | 30 +- .../lib/PhpParser/Node/Stmt/While_.php | 27 +- .../lib/PhpParser/Node/UnionType.php | 22 +- .../php-parser/lib/PhpParser/Node/UseItem.php | 39 +- .../lib/PhpParser/Node/VarLikeIdentifier.php | 11 +- .../PhpParser/Node/VariadicPlaceholder.php | 22 +- .../php-parser/lib/PhpParser/NodeAbstract.php | 81 +- .../php-parser/lib/PhpParser/NodeDumper.php | 202 +- .../php-parser/lib/PhpParser/NodeFinder.php | 41 +- .../lib/PhpParser/NodeTraverser.php | 144 +- .../lib/PhpParser/NodeTraverserInterface.php | 16 +- .../php-parser/lib/PhpParser/NodeVisitor.php | 16 +- .../PhpParser/NodeVisitor/CloningVisitor.php | 21 + .../NodeVisitor/CommentAnnotatingVisitor.php | 48 +- .../PhpParser/NodeVisitor/FindingVisitor.php | 33 +- .../NodeVisitor/FirstFindingVisitor.php | 35 +- .../PhpParser/NodeVisitor/NameResolver.php | 121 +- .../NodeVisitor/NodeConnectingVisitor.php | 47 +- .../NodeVisitor/ParentConnectingVisitor.php | 39 +- .../lib/PhpParser/NodeVisitorAbstract.php | 27 + .../nikic/php-parser/lib/PhpParser/Parser.php | 13 +- .../php-parser/lib/PhpParser/Parser/Php7.php | 1379 ++++++++ .../php-parser/lib/PhpParser/Parser/Php8.php | 1386 ++++++++ .../lib/PhpParser/ParserAbstract.php | 768 ++--- .../lib/PhpParser/ParserFactory.php | 24 +- .../php-parser/lib/PhpParser/PhpVersion.php | 112 +- .../lib/PhpParser/PrettyPrinter.php | 22 +- .../lib/PhpParser/PrettyPrinter/Standard.php | 1152 +++---- .../lib/PhpParser/PrettyPrinterAbstract.php | 952 ++---- .../nikic/php-parser/lib/PhpParser/Token.php | 21 + .../lib/PhpParser/compatibility_tokens.php | 25 +- .../symfony/deprecation-contracts/LICENSE | 0 .../deprecation-contracts/function.php | 9 +- .../symfony/finder/Comparator/Comparator.php | 69 + .../finder/Comparator/DateComparator.php | 15 +- .../finder/Comparator/NumberComparator.php | 13 +- .../Exception/AccessDeniedException.php | 3 +- .../Exception/DirectoryNotFoundException.php | 3 +- .../{ => prefixed}/symfony/finder/Finder.php | 386 +-- vendor/prefixed/symfony/finder/Gitignore.php | 81 + vendor/{ => prefixed}/symfony/finder/Glob.php | 35 +- .../finder/Iterator/CustomFilterIterator.php | 21 +- .../Iterator/DateRangeFilterIterator.php | 25 +- .../Iterator/DepthRangeFilterIterator.php | 13 +- .../ExcludeDirectoryFilterIterator.php | 53 +- .../Iterator/FileTypeFilterIterator.php | 21 +- .../Iterator/FilecontentFilterIterator.php | 23 +- .../Iterator/FilenameFilterIterator.php | 11 +- .../symfony/finder/Iterator/LazyIterator.php | 14 +- .../Iterator/MultiplePcreFilterIterator.php | 48 +- .../finder/Iterator/PathFilterIterator.php | 15 +- .../Iterator/RecursiveDirectoryIterator.php | 79 +- .../Iterator/SizeRangeFilterIterator.php | 24 +- .../finder/Iterator/SortableIterator.php | 66 +- .../Iterator/VcsIgnoredFilterIterator.php | 93 +- vendor/{ => prefixed}/symfony/finder/LICENSE | 0 .../symfony/finder/SplFileInfo.php | 36 +- .../symfony/polyfill-ctype/Ctype.php | 37 +- .../symfony/polyfill-ctype/LICENSE | 0 .../symfony/polyfill-ctype/bootstrap.php | 82 + .../symfony/polyfill-ctype/bootstrap80.php | 112 + .../symfony/yaml/Command/LintCommand.php | 185 +- vendor/prefixed/symfony/yaml/Dumper.php | 153 + vendor/prefixed/symfony/yaml/Escaper.php | 74 + .../symfony/yaml/Exception/DumpException.php | 3 +- .../yaml/Exception/ExceptionInterface.php | 3 +- .../symfony/yaml/Exception/ParseException.php | 81 +- .../yaml/Exception/RuntimeException.php | 3 +- vendor/{ => prefixed}/symfony/yaml/Inline.php | 432 +-- vendor/{ => prefixed}/symfony/yaml/LICENSE | 0 vendor/{ => prefixed}/symfony/yaml/Parser.php | 625 ++-- .../symfony/yaml/Resources/bin/yaml-lint | 35 + .../symfony/yaml/Tag/TaggedValue.php | 28 +- vendor/prefixed/symfony/yaml/Unescaper.php | 120 + vendor/{ => prefixed}/symfony/yaml/Yaml.php | 39 +- vendor/prefixed/vendor/autoload.php | 25 + .../prefixed/vendor/composer/ClassLoader.php | 579 ++++ .../vendor/composer/LICENSE} | 12 +- .../vendor/composer/autoload_classmap.php | 445 +++ .../vendor/composer/autoload_files.php | 11 + .../vendor/composer/autoload_namespaces.php | 9 + .../vendor/composer/autoload_psr4.php | 9 + .../vendor/composer/autoload_real.php | 48 + .../vendor/composer/autoload_static.php | 460 +++ .../zircote/swagger-php/LICENSE | 0 .../{ => prefixed}/zircote/swagger-php/NOTICE | 0 .../prefixed/zircote/swagger-php/bin/openapi | 181 + .../zircote/swagger-php/package.json | 0 .../prefixed/zircote/swagger-php/rector.php | 18 + .../src/Analysers/AnalyserInterface.php | 15 + .../Analysers/AnnotationFactoryInterface.php | 18 +- .../Analysers/AttributeAnnotationFactory.php | 88 +- .../Analysers/ComposerAutoloaderScanner.php | 16 +- .../Analysers/DocBlockAnnotationFactory.php | 40 +- .../src/Analysers/DocBlockParser.php | 49 +- .../src/Analysers/ReflectionAnalyser.php | 108 +- .../src/Analysers/TokenScanner.php | 78 +- .../zircote/swagger-php/src/Analysis.php | 144 +- .../src/Annotations/AbstractAnnotation.php | 247 +- .../src/Annotations/AdditionalProperties.php | 22 + .../src/Annotations/Attachable.php | 34 + .../src/Annotations/Components.php | 51 +- .../swagger-php/src/Annotations/Contact.php | 28 +- .../src/Annotations/CookieParameter.php | 6 +- .../swagger-php/src/Annotations/Delete.php | 11 +- .../src/Annotations/Discriminator.php | 31 +- .../swagger-php/src/Annotations/Examples.php | 38 +- .../src/Annotations/ExternalDocumentation.php | 43 +- .../swagger-php/src/Annotations/Flow.php | 34 +- .../swagger-php/src/Annotations/Get.php | 11 +- .../swagger-php/src/Annotations/Head.php | 11 +- .../swagger-php/src/Annotations/Header.php | 35 +- .../src/Annotations/HeaderParameter.php | 9 +- .../swagger-php/src/Annotations/Info.php | 35 +- .../swagger-php/src/Annotations/Items.php | 41 + .../src/Annotations/JsonContent.php | 41 + .../swagger-php/src/Annotations/License.php | 43 +- .../swagger-php/src/Annotations/Link.php | 28 +- .../swagger-php/src/Annotations/MediaType.php | 26 +- .../swagger-php/src/Annotations/OpenApi.php | 141 +- .../swagger-php/src/Annotations/Operation.php | 69 +- .../swagger-php/src/Annotations/Options.php | 11 +- .../swagger-php/src/Annotations/Parameter.php | 77 +- .../swagger-php/src/Annotations/Patch.php | 11 +- .../swagger-php/src/Annotations/PathItem.php | 53 +- .../src/Annotations/PathParameter.php | 13 +- .../swagger-php/src/Annotations/Post.php | 11 +- .../swagger-php/src/Annotations/Property.php | 29 + .../swagger-php/src/Annotations/Put.php | 11 +- .../src/Annotations/QueryParameter.php | 9 +- .../src/Annotations/RequestBody.php | 47 +- .../swagger-php/src/Annotations/Response.php | 48 +- .../swagger-php/src/Annotations/Schema.php | 117 +- .../src/Annotations/SecurityScheme.php | 44 +- .../swagger-php/src/Annotations/Server.php | 40 +- .../src/Annotations/ServerVariable.php | 30 +- .../swagger-php/src/Annotations/Tag.php | 29 +- .../swagger-php/src/Annotations/Trace.php | 11 +- .../swagger-php/src/Annotations/Webhook.php | 20 +- .../swagger-php/src/Annotations/Xml.php | 37 +- .../src/Annotations/XmlContent.php | 27 + .../src/Attributes/AdditionalProperties.php | 78 + .../swagger-php/src/Attributes/Attachable.php | 9 +- .../swagger-php/src/Attributes/Components.php | 21 +- .../swagger-php/src/Attributes/Contact.php | 29 + .../src/Attributes/CookieParameter.php | 6 +- .../swagger-php/src/Attributes/Delete.php | 9 +- .../src/Attributes/Discriminator.php | 21 +- .../swagger-php/src/Attributes/Examples.php | 34 + .../src/Attributes/ExternalDocumentation.php | 28 + .../swagger-php/src/Attributes/Flow.php | 24 +- .../swagger-php/src/Attributes/Get.php | 9 +- .../swagger-php/src/Attributes/Head.php | 9 +- .../swagger-php/src/Attributes/Header.php | 34 + .../src/Attributes/HeaderParameter.php | 6 +- .../swagger-php/src/Attributes/Info.php | 32 + .../swagger-php/src/Attributes/Items.php | 35 +- .../src/Attributes/JsonContent.php | 35 +- .../swagger-php/src/Attributes/License.php | 29 + .../swagger-php/src/Attributes/Link.php | 37 + .../swagger-php/src/Attributes/MediaType.php | 34 + .../swagger-php/src/Attributes/OpenApi.php | 23 +- .../src/Attributes/OperationTrait.php | 27 +- .../swagger-php/src/Attributes/Options.php | 9 +- .../swagger-php/src/Attributes/Parameter.php | 9 +- .../src/Attributes/ParameterTrait.php | 65 + .../swagger-php/src/Attributes/Patch.php | 9 +- .../swagger-php/src/Attributes/PathItem.php | 26 +- .../src/Attributes/PathParameter.php | 9 +- .../swagger-php/src/Attributes/Post.php | 9 +- .../swagger-php/src/Attributes/Property.php | 35 +- .../swagger-php/src/Attributes/Put.php | 9 +- .../src/Attributes/QueryParameter.php | 6 +- .../src/Attributes/RequestBody.php | 28 +- .../swagger-php/src/Attributes/Response.php | 30 +- .../swagger-php/src/Attributes/Schema.php | 82 + .../src/Attributes/SecurityScheme.php | 39 + .../swagger-php/src/Attributes/Server.php | 22 +- .../src/Attributes/ServerVariable.php | 32 + .../swagger-php/src/Attributes/Tag.php | 22 +- .../swagger-php/src/Attributes/Trace.php | 9 +- .../swagger-php/src/Attributes/Webhook.php | 27 +- .../swagger-php/src/Attributes/Xml.php | 31 + .../swagger-php/src/Attributes/XmlContent.php | 35 +- .../zircote/swagger-php/src/Context.php | 81 +- .../zircote/swagger-php/src/Generator.php | 236 +- .../src/GeneratorAwareInterface.php | 6 +- .../swagger-php/src/GeneratorAwareTrait.php | 20 + .../swagger-php/src/Loggers/ConsoleLogger.php | 52 +- .../swagger-php/src/Loggers/DefaultLogger.php | 13 +- .../swagger-php/src/OpenApiException.php | 11 + .../zircote/swagger-php/src/Pipeline.php | 39 +- .../src/Processors/AugmentDiscriminators.php | 18 +- .../src/Processors/AugmentParameters.php | 60 +- .../src/Processors/AugmentProperties.php | 167 + .../src/Processors/AugmentRefs.php | 35 +- .../src/Processors/AugmentRequestBody.php | 19 +- .../src/Processors/AugmentSchemas.php | 47 +- .../src/Processors/AugmentTags.php | 33 +- .../swagger-php/src/Processors/BuildPaths.php | 26 +- .../src/Processors/CleanUnmerged.php | 17 +- .../src/Processors/CleanUnusedComponents.php | 43 +- .../Processors/Concerns/AnnotationTrait.php | 24 +- .../src/Processors/Concerns/DocblockTrait.php | 120 +- .../Concerns/MergePropertiesTrait.php | 36 +- .../src/Processors/Concerns/RefTrait.php | 15 +- .../src/Processors/Concerns/TypesTrait.php | 34 + .../src/Processors/DocBlockDescriptions.php | 33 +- .../src/Processors/ExpandClasses.php | 20 +- .../src/Processors/ExpandEnums.php | 68 +- .../src/Processors/ExpandInterfaces.php | 23 +- .../src/Processors/ExpandTraits.php | 27 +- .../src/Processors/MergeIntoComponents.php | 33 + .../src/Processors/MergeIntoOpenApi.php | 25 +- .../src/Processors/MergeJsonContent.php | 32 +- .../src/Processors/MergeXmlContent.php | 32 +- .../src/Processors/OperationId.php | 37 +- .../swagger-php/src/Processors/PathFilter.php | 60 +- .../zircote/swagger-php/src/Serializer.php | 102 +- .../zircote/swagger-php/src/Util.php | 49 +- vendor/psr/cache/src/CacheException.php | 10 - vendor/psr/cache/src/CacheItemInterface.php | 105 - .../psr/cache/src/CacheItemPoolInterface.php | 138 - .../cache/src/InvalidArgumentException.php | 13 - vendor/scoper-autoload.php | 36 + .../symfony/finder/Comparator/Comparator.php | 62 - vendor/symfony/finder/Gitignore.php | 91 - vendor/symfony/polyfill-ctype/bootstrap.php | 50 - vendor/symfony/polyfill-ctype/bootstrap80.php | 46 - vendor/symfony/yaml/Dumper.php | 178 - vendor/symfony/yaml/Escaper.php | 95 - vendor/symfony/yaml/Resources/bin/yaml-lint | 49 - vendor/symfony/yaml/Unescaper.php | 108 - vendor/zircote/swagger-php/bin/openapi | 242 -- vendor/zircote/swagger-php/rector.php | 31 - .../src/Analysers/AnalyserInterface.php | 16 - .../src/Annotations/AdditionalProperties.php | 38 - .../src/Annotations/Attachable.php | 74 - .../swagger-php/src/Annotations/Items.php | 61 - .../src/Annotations/JsonContent.php | 51 - .../swagger-php/src/Annotations/Property.php | 47 - .../src/Annotations/XmlContent.php | 38 - .../src/Attributes/AdditionalProperties.php | 109 - .../swagger-php/src/Attributes/Contact.php | 35 - .../swagger-php/src/Attributes/Examples.php | 42 - .../src/Attributes/ExternalDocumentation.php | 33 - .../swagger-php/src/Attributes/Header.php | 43 - .../swagger-php/src/Attributes/Info.php | 40 - .../swagger-php/src/Attributes/License.php | 35 - .../swagger-php/src/Attributes/Link.php | 47 - .../swagger-php/src/Attributes/MediaType.php | 40 - .../src/Attributes/ParameterTrait.php | 64 - .../swagger-php/src/Attributes/Schema.php | 114 - .../src/Attributes/SecurityScheme.php | 52 - .../src/Attributes/ServerVariable.php | 40 - .../swagger-php/src/Attributes/Xml.php | 39 - .../swagger-php/src/GeneratorAwareTrait.php | 19 - .../swagger-php/src/OpenApiException.php | 11 - .../src/Processors/AugmentProperties.php | 203 -- .../src/Processors/Concerns/TypesTrait.php | 61 - .../src/Processors/MergeIntoComponents.php | 37 - 641 files changed, 15569 insertions(+), 25634 deletions(-) create mode 100644 vendor/autoload_original.php delete mode 100644 vendor/composer/platform_check.php delete mode 100644 vendor/doctrine/annotations/LICENSE delete mode 100644 vendor/doctrine/annotations/docs/en/annotations.rst delete mode 100644 vendor/doctrine/annotations/docs/en/custom.rst delete mode 100644 vendor/doctrine/annotations/docs/en/index.rst delete mode 100644 vendor/doctrine/annotations/docs/en/sidebar.rst delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php delete mode 100644 vendor/doctrine/lexer/LICENSE delete mode 100644 vendor/doctrine/lexer/src/AbstractLexer.php delete mode 100644 vendor/doctrine/lexer/src/Token.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Modifiers.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php delete mode 100644 vendor/nikic/php-parser/lib/PhpParser/Token.php rename vendor/{ => prefixed}/nikic/php-parser/LICENSE (100%) rename vendor/{ => prefixed}/nikic/php-parser/bin/php-parse (65%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php (65%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Class_.php (64%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Declaration.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php (52%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Enum_.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php (68%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Function_.php (50%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Interface_.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Method.php (65%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php (53%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Param.php (67%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Property.php (67%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php (67%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php (71%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Builder/Trait_.php (61%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Use_.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/BuilderFactory.php (70%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/BuilderHelpers.php (72%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Comment.php (76%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment/Doc.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php (61%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Error.php (76%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/ErrorHandler.php (50%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php (51%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php (76%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Internal/Differ.php (86%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php (68%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php (73%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php (80%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/JsonDecoder.php (74%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Lexer.php (65%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php (64%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php (51%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php (56%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php (55%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Modifiers.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NameContext.php (79%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node.php (79%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Arg.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php (65%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Attribute.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php (64%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ComplexType.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Const_.php (64%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php (63%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php (60%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php (66%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php (62%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php (68%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php (65%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php (57%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php (67%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php (53%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php (59%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php (59%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php (59%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php (54%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php (52%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php (53%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php (54%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php (54%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php (54%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php (64%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php (51%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php (61%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Identifier.php (71%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php (63%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php (62%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/MatchArm.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Name.php (80%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/NullableType.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Param.php (67%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php (64%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php (64%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php (79%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php (83%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php (57%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/StaticVar.php (54%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php (61%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php (78%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php (71%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php (58%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php (78%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php (75%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php (72%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php (69%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php (50%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php (57%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php (61%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php (73%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php (56%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php (76%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php (66%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php (65%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php (57%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php (61%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php (69%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php (65%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php (73%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php (64%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php (58%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php (73%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php (60%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/UnionType.php (64%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/UseItem.php (68%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php (66%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php (50%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeAbstract.php (79%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeDumper.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeFinder.php (74%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeTraverser.php (68%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php (53%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor.php (97%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php (63%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php (61%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php (58%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php (79%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php (72%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php (60%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/Parser.php (79%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Parser/Php7.php create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Parser/Php8.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/ParserAbstract.php (68%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/ParserFactory.php (72%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/PhpVersion.php (62%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/PrettyPrinter.php (78%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php (55%) rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php (64%) create mode 100644 vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php rename vendor/{ => prefixed}/nikic/php-parser/lib/PhpParser/compatibility_tokens.php (71%) rename vendor/{ => prefixed}/symfony/deprecation-contracts/LICENSE (100%) rename vendor/{ => prefixed}/symfony/deprecation-contracts/function.php (70%) create mode 100644 vendor/prefixed/symfony/finder/Comparator/Comparator.php rename vendor/{ => prefixed}/symfony/finder/Comparator/DateComparator.php (69%) rename vendor/{ => prefixed}/symfony/finder/Comparator/NumberComparator.php (81%) rename vendor/{ => prefixed}/symfony/finder/Exception/AccessDeniedException.php (82%) rename vendor/{ => prefixed}/symfony/finder/Exception/DirectoryNotFoundException.php (82%) rename vendor/{ => prefixed}/symfony/finder/Finder.php (74%) create mode 100644 vendor/prefixed/symfony/finder/Gitignore.php rename vendor/{ => prefixed}/symfony/finder/Glob.php (81%) rename vendor/{ => prefixed}/symfony/finder/Iterator/CustomFilterIterator.php (82%) rename vendor/{ => prefixed}/symfony/finder/Iterator/DateRangeFilterIterator.php (76%) rename vendor/{ => prefixed}/symfony/finder/Iterator/DepthRangeFilterIterator.php (88%) rename vendor/{ => prefixed}/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php (76%) rename vendor/{ => prefixed}/symfony/finder/Iterator/FileTypeFilterIterator.php (83%) rename vendor/{ => prefixed}/symfony/finder/Iterator/FilecontentFilterIterator.php (73%) rename vendor/{ => prefixed}/symfony/finder/Iterator/FilenameFilterIterator.php (80%) rename vendor/{ => prefixed}/symfony/finder/Iterator/LazyIterator.php (64%) rename vendor/{ => prefixed}/symfony/finder/Iterator/MultiplePcreFilterIterator.php (80%) rename vendor/{ => prefixed}/symfony/finder/Iterator/PathFilterIterator.php (78%) rename vendor/{ => prefixed}/symfony/finder/Iterator/RecursiveDirectoryIterator.php (70%) rename vendor/{ => prefixed}/symfony/finder/Iterator/SizeRangeFilterIterator.php (75%) rename vendor/{ => prefixed}/symfony/finder/Iterator/SortableIterator.php (55%) rename vendor/{ => prefixed}/symfony/finder/Iterator/VcsIgnoredFilterIterator.php (69%) rename vendor/{ => prefixed}/symfony/finder/LICENSE (100%) rename vendor/{ => prefixed}/symfony/finder/SplFileInfo.php (74%) rename vendor/{ => prefixed}/symfony/polyfill-ctype/Ctype.php (95%) rename vendor/{ => prefixed}/symfony/polyfill-ctype/LICENSE (100%) create mode 100644 vendor/prefixed/symfony/polyfill-ctype/bootstrap.php create mode 100644 vendor/prefixed/symfony/polyfill-ctype/bootstrap80.php rename vendor/{ => prefixed}/symfony/yaml/Command/LintCommand.php (61%) create mode 100644 vendor/prefixed/symfony/yaml/Dumper.php create mode 100644 vendor/prefixed/symfony/yaml/Escaper.php rename vendor/{ => prefixed}/symfony/yaml/Exception/DumpException.php (84%) rename vendor/{ => prefixed}/symfony/yaml/Exception/ExceptionInterface.php (84%) rename vendor/{ => prefixed}/symfony/yaml/Exception/ParseException.php (60%) rename vendor/{ => prefixed}/symfony/yaml/Exception/RuntimeException.php (85%) rename vendor/{ => prefixed}/symfony/yaml/Inline.php (67%) rename vendor/{ => prefixed}/symfony/yaml/LICENSE (100%) rename vendor/{ => prefixed}/symfony/yaml/Parser.php (73%) create mode 100755 vendor/prefixed/symfony/yaml/Resources/bin/yaml-lint rename vendor/{ => prefixed}/symfony/yaml/Tag/TaggedValue.php (57%) create mode 100644 vendor/prefixed/symfony/yaml/Unescaper.php rename vendor/{ => prefixed}/symfony/yaml/Yaml.php (61%) create mode 100644 vendor/prefixed/vendor/autoload.php create mode 100644 vendor/prefixed/vendor/composer/ClassLoader.php rename vendor/{psr/cache/LICENSE.txt => prefixed/vendor/composer/LICENSE} (83%) create mode 100644 vendor/prefixed/vendor/composer/autoload_classmap.php create mode 100644 vendor/prefixed/vendor/composer/autoload_files.php create mode 100644 vendor/prefixed/vendor/composer/autoload_namespaces.php create mode 100644 vendor/prefixed/vendor/composer/autoload_psr4.php create mode 100644 vendor/prefixed/vendor/composer/autoload_real.php create mode 100644 vendor/prefixed/vendor/composer/autoload_static.php rename vendor/{ => prefixed}/zircote/swagger-php/LICENSE (100%) rename vendor/{ => prefixed}/zircote/swagger-php/NOTICE (100%) create mode 100755 vendor/prefixed/zircote/swagger-php/bin/openapi rename vendor/{ => prefixed}/zircote/swagger-php/package.json (100%) create mode 100644 vendor/prefixed/zircote/swagger-php/rector.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Analysers/AnalyserInterface.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/AnnotationFactoryInterface.php (50%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php (73%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php (78%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php (74%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/DocBlockParser.php (66%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php (68%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysers/TokenScanner.php (71%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Analysis.php (86%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/AbstractAnnotation.php (85%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Annotations/AdditionalProperties.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Annotations/Attachable.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Components.php (73%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Contact.php (68%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/CookieParameter.php (73%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Delete.php (57%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Discriminator.php (73%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Examples.php (76%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/ExternalDocumentation.php (53%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Flow.php (78%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Get.php (56%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Head.php (56%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Header.php (81%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/HeaderParameter.php (62%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Info.php (76%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Annotations/Items.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Annotations/JsonContent.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/License.php (74%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Link.php (90%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/MediaType.php (84%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/OpenApi.php (64%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Operation.php (86%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Options.php (57%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Parameter.php (87%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Patch.php (56%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/PathItem.php (81%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/PathParameter.php (66%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Post.php (56%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Annotations/Property.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Put.php (56%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/QueryParameter.php (62%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/RequestBody.php (72%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Response.php (78%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Schema.php (89%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/SecurityScheme.php (79%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Server.php (65%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/ServerVariable.php (81%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Tag.php (67%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Trace.php (56%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Webhook.php (66%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Annotations/Xml.php (75%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Annotations/XmlContent.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/AdditionalProperties.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Attachable.php (61%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Components.php (67%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Contact.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/CookieParameter.php (75%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Delete.php (54%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Discriminator.php (51%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Examples.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/ExternalDocumentation.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Flow.php (52%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Get.php (53%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Head.php (53%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Header.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/HeaderParameter.php (75%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Info.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Items.php (85%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/JsonContent.php (86%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/License.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Link.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/MediaType.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/OpenApi.php (60%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/OperationTrait.php (50%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Options.php (54%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Parameter.php (61%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/ParameterTrait.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Patch.php (54%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/PathItem.php (59%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/PathParameter.php (72%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Post.php (53%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Property.php (86%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Put.php (53%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/QueryParameter.php (75%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/RequestBody.php (57%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Response.php (61%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Schema.php create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/SecurityScheme.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Server.php (52%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/ServerVariable.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Tag.php (51%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Trace.php (54%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/Webhook.php (57%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Attributes/Xml.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Attributes/XmlContent.php (86%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Context.php (79%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Generator.php (62%) rename vendor/{ => prefixed}/zircote/swagger-php/src/GeneratorAwareInterface.php (60%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/GeneratorAwareTrait.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Loggers/ConsoleLogger.php (67%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Loggers/DefaultLogger.php (64%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/OpenApiException.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Pipeline.php (84%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/AugmentDiscriminators.php (61%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/AugmentParameters.php (71%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Processors/AugmentProperties.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/AugmentRefs.php (82%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/AugmentRequestBody.php (75%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/AugmentSchemas.php (81%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/AugmentTags.php (80%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/BuildPaths.php (78%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/CleanUnmerged.php (65%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/CleanUnusedComponents.php (86%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php (78%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php (62%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php (64%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/Concerns/RefTrait.php (57%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/DocBlockDescriptions.php (84%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/ExpandClasses.php (81%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/ExpandEnums.php (75%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/ExpandInterfaces.php (84%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/ExpandTraits.php (85%) create mode 100644 vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoComponents.php rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php (69%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/MergeJsonContent.php (65%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/MergeXmlContent.php (65%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/OperationId.php (72%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Processors/PathFilter.php (74%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Serializer.php (72%) rename vendor/{ => prefixed}/zircote/swagger-php/src/Util.php (85%) delete mode 100644 vendor/psr/cache/src/CacheException.php delete mode 100644 vendor/psr/cache/src/CacheItemInterface.php delete mode 100644 vendor/psr/cache/src/CacheItemPoolInterface.php delete mode 100644 vendor/psr/cache/src/InvalidArgumentException.php create mode 100644 vendor/scoper-autoload.php delete mode 100644 vendor/symfony/finder/Comparator/Comparator.php delete mode 100644 vendor/symfony/finder/Gitignore.php delete mode 100644 vendor/symfony/polyfill-ctype/bootstrap.php delete mode 100644 vendor/symfony/polyfill-ctype/bootstrap80.php delete mode 100644 vendor/symfony/yaml/Dumper.php delete mode 100644 vendor/symfony/yaml/Escaper.php delete mode 100755 vendor/symfony/yaml/Resources/bin/yaml-lint delete mode 100644 vendor/symfony/yaml/Unescaper.php delete mode 100755 vendor/zircote/swagger-php/bin/openapi delete mode 100644 vendor/zircote/swagger-php/rector.php delete mode 100644 vendor/zircote/swagger-php/src/Analysers/AnalyserInterface.php delete mode 100644 vendor/zircote/swagger-php/src/Annotations/AdditionalProperties.php delete mode 100644 vendor/zircote/swagger-php/src/Annotations/Attachable.php delete mode 100644 vendor/zircote/swagger-php/src/Annotations/Items.php delete mode 100644 vendor/zircote/swagger-php/src/Annotations/JsonContent.php delete mode 100644 vendor/zircote/swagger-php/src/Annotations/Property.php delete mode 100644 vendor/zircote/swagger-php/src/Annotations/XmlContent.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/AdditionalProperties.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Contact.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Examples.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/ExternalDocumentation.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Header.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Info.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/License.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Link.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/MediaType.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/ParameterTrait.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Schema.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/SecurityScheme.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/ServerVariable.php delete mode 100644 vendor/zircote/swagger-php/src/Attributes/Xml.php delete mode 100644 vendor/zircote/swagger-php/src/GeneratorAwareTrait.php delete mode 100644 vendor/zircote/swagger-php/src/OpenApiException.php delete mode 100644 vendor/zircote/swagger-php/src/Processors/AugmentProperties.php delete mode 100644 vendor/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php delete mode 100644 vendor/zircote/swagger-php/src/Processors/MergeIntoComponents.php diff --git a/README.md b/README.md index 9514d4c..63cb3d1 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,27 @@ ## Description Allow generating OpenAPI documentation for the Matomo public APIs. + +## Dependencies +This plugin had its vendored dependencies scoped using [matomo scoper](https://github.com/matomo-org/matomo-scoper). This means that composer packages are prefixed so that they won't conflict with the same libraries used by other plugins. +If you need to update a dependency, you should be able to run `composer install` to populate the vendor directory and then follow the [instructions for scoping a plugin](https://github.com/matomo-org/matomo-scoper#how-to-scope-a-matomo-plugin). Since the scoper.inc.php file already exists, it will hopefully be as simple as running the scoper for this plugin. Once that's done, you'll also need to make some of the dependencies compatible with Matomo's minimum supported version of PHP. +This is done using the [Rector library](https://github.com/rectorphp/rector-downgrade-php). It's preferable that you install the composer package in a separate project and point to this project so that it doesn't get committed in this project. You should also have a config file saved containing the following: +```php += 7.2.5, but PHP 7.3 is close enough. We don't want to downgrade further than necessary. + $rectorConfig->sets([ + \Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_73 + ]); + + $rectorConfig->skip([ + \Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector::class + ]); +}; +``` +With all that in place, you should be able to run Rector like so: `vendor/bin/rector process {path_to_this_plugin/vendor/prefixed} --config={path_to_config_file}` + +> **_NOTE:_** For Matomo developers, there's an internal DevPluginCommands plugin with a command that handles scoping and running Rector. See the SearchEngineKeywordsPerformance plugin's README.md for more details. \ No newline at end of file diff --git a/composer.json b/composer.json index 33f4c47..eaadd00 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,6 @@ { "require": { - "zircote/swagger-php": "^5.1.4", - "doctrine/annotations": "^2.0", - "symfony/yaml": "^6.4", - "symfony/finder": "^6.4" + "zircote/swagger-php": "^5.4" }, "replace": { "monolog/monolog": "*", diff --git a/composer.lock b/composer.lock index 2652fd0..399cebf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,173 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "90dbd33beaf3a1c9a0c815781114b7ea", + "content-hash": "c8345434bce3699d515e040a2b2da4fa", "packages": [ - { - "name": "doctrine/annotations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.2" - }, - "time": "2024-09-05T10:17:24+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2024-02-05T11:56:58+00:00" - }, { "name": "nikic/php-parser", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", "shasum": "" }, "require": { @@ -189,7 +36,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -213,58 +60,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" }, - "time": "2025-07-27T20:03:57+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2025-08-13T20:13:15+00:00" }, { "name": "symfony/deprecation-contracts", @@ -335,23 +133,23 @@ }, { "name": "symfony/finder", - "version": "v6.4.17", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -379,7 +177,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.17" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -390,16 +188,20 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-29T13:51:37+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -458,7 +260,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -469,6 +271,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -478,28 +284,28 @@ }, { "name": "symfony/yaml", - "version": "v6.4.23", + "version": "v7.3.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "93e29e0deb5f1b2e360adfb389a20d25eb81a27b" + "reference": "d4f4a66866fe2451f61296924767280ab5732d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/93e29e0deb5f1b2e360adfb389a20d25eb81a27b", - "reference": "93e29e0deb5f1b2e360adfb389a20d25eb81a27b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d4f4a66866fe2451f61296924767280ab5732d9d", + "reference": "d4f4a66866fe2451f61296924767280ab5732d9d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "symfony/console": "^6.4|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -530,7 +336,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.23" + "source": "https://github.com/symfony/yaml/tree/v7.3.3" }, "funding": [ { @@ -541,25 +347,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-03T06:46:12+00:00" + "time": "2025-08-27T11:34:33+00:00" }, { "name": "zircote/swagger-php", - "version": "5.1.4", + "version": "5.4.0", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "471f2e7c24c9508a2ee08df245cab64b62dbf721" + "reference": "e25c377ec04db4d2b91186e2debaa1fb135f5cc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/471f2e7c24c9508a2ee08df245cab64b62dbf721", - "reference": "471f2e7c24c9508a2ee08df245cab64b62dbf721", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/e25c377ec04db4d2b91186e2debaa1fb135f5cc5", + "reference": "e25c377ec04db4d2b91186e2debaa1fb135f5cc5", "shasum": "" }, "require": { @@ -630,9 +440,9 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/5.1.4" + "source": "https://github.com/zircote/swagger-php/tree/5.4.0" }, - "time": "2025-07-15T23:54:13+00:00" + "time": "2025-09-12T03:49:27+00:00" } ], "packages-dev": [], diff --git a/plugin.json b/plugin.json index 4875a25..81eb46f 100644 --- a/plugin.json +++ b/plugin.json @@ -12,7 +12,6 @@ "license": "GPL v3+", "homepage": "https:\/\/matomo.org", "require": { - "php": ">=8.1.0", "matomo": ">=5.0.0-stable,<6.0.0-b1" }, "authors": [ diff --git a/vendor/autoload.php b/vendor/autoload.php index 1ef4989..717d21e 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -1,25 +1,10 @@ array($vendorDir . '/symfony/polyfill-ctype'), 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), - 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'OpenApi\\' => array($vendorDir . '/zircote/swagger-php/src'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 6f9061f..de59b22 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -22,8 +22,6 @@ public static function getLoader() return self::$loader; } - require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit90dbd33beaf3a1c9a0c815781114b7ea', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInit90dbd33beaf3a1c9a0c815781114b7ea', 'loadClassLoader')); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 93e7074..cb2f3a6 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -6,10 +6,9 @@ class ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea { - public static $files = array ( - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', - ); + public static $files = array( +); + public static $prefixLengthsPsr4 = array ( 'S' => @@ -20,18 +19,12 @@ class ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea ), 'P' => array ( - 'Psr\\Cache\\' => 10, 'PhpParser\\' => 10, ), 'O' => array ( 'OpenApi\\' => 8, ), - 'D' => - array ( - 'Doctrine\\Common\\Lexer\\' => 22, - 'Doctrine\\Common\\Annotations\\' => 28, - ), ); public static $prefixDirsPsr4 = array ( @@ -47,10 +40,6 @@ class ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea array ( 0 => __DIR__ . '/..' . '/symfony/finder', ), - 'Psr\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/cache/src', - ), 'PhpParser\\' => array ( 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', @@ -59,14 +48,6 @@ class ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea array ( 0 => __DIR__ . '/..' . '/zircote/swagger-php/src', ), - 'Doctrine\\Common\\Lexer\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/src', - ), - 'Doctrine\\Common\\Annotations\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', - ), ); public static $classMap = array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e9c7fea..138c187 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,177 +1,18 @@ { "packages": [ - { - "name": "doctrine/annotations", - "version": "2.0.2", - "version_normalized": "2.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "time": "2024-09-05T10:17:24+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.2" - }, - "install-path": "../doctrine/annotations" - }, - { - "name": "doctrine/lexer", - "version": "3.0.1", - "version_normalized": "3.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "time": "2024-02-05T11:56:58+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "install-path": "../doctrine/lexer" - }, { "name": "nikic/php-parser", - "version": "v5.6.0", - "version_normalized": "5.6.0.0", + "version": "v5.6.1", + "version_normalized": "5.6.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", "shasum": "" }, "require": { @@ -184,14 +25,14 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^9.0" }, - "time": "2025-07-27T20:03:57+00:00", + "time": "2025-08-13T20:13:15+00:00", "bin": [ "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.x-dev" } }, "installation-source": "dist", @@ -216,62 +57,10 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" }, "install-path": "../nikic/php-parser" }, - { - "name": "psr/cache", - "version": "3.0.0", - "version_normalized": "3.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "time": "2021-02-03T23:26:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "install-path": "../psr/cache" - }, { "name": "symfony/deprecation-contracts", "version": "v3.6.0", @@ -344,26 +133,26 @@ }, { "name": "symfony/finder", - "version": "v6.4.17", - "version_normalized": "6.4.17.0", + "version": "v7.3.2", + "version_normalized": "7.3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, - "time": "2024-12-29T13:51:37+00:00", + "time": "2025-07-15T13:41:35+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -391,7 +180,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.17" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -402,6 +191,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -411,8 +204,8 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", - "version_normalized": "1.32.0.0", + "version": "v1.33.0", + "version_normalized": "1.33.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -473,7 +266,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -484,6 +277,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -493,31 +290,31 @@ }, { "name": "symfony/yaml", - "version": "v6.4.23", - "version_normalized": "6.4.23.0", + "version": "v7.3.3", + "version_normalized": "7.3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "93e29e0deb5f1b2e360adfb389a20d25eb81a27b" + "reference": "d4f4a66866fe2451f61296924767280ab5732d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/93e29e0deb5f1b2e360adfb389a20d25eb81a27b", - "reference": "93e29e0deb5f1b2e360adfb389a20d25eb81a27b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d4f4a66866fe2451f61296924767280ab5732d9d", + "reference": "d4f4a66866fe2451f61296924767280ab5732d9d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "symfony/console": "^6.4|^7.0" }, - "time": "2025-06-03T06:46:12+00:00", + "time": "2025-08-27T11:34:33+00:00", "bin": [ "Resources/bin/yaml-lint" ], @@ -548,7 +345,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.23" + "source": "https://github.com/symfony/yaml/tree/v7.3.3" }, "funding": [ { @@ -559,6 +356,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -568,17 +369,17 @@ }, { "name": "zircote/swagger-php", - "version": "5.1.4", - "version_normalized": "5.1.4.0", + "version": "5.4.0", + "version_normalized": "5.4.0.0", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "471f2e7c24c9508a2ee08df245cab64b62dbf721" + "reference": "e25c377ec04db4d2b91186e2debaa1fb135f5cc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/471f2e7c24c9508a2ee08df245cab64b62dbf721", - "reference": "471f2e7c24c9508a2ee08df245cab64b62dbf721", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/e25c377ec04db4d2b91186e2debaa1fb135f5cc5", + "reference": "e25c377ec04db4d2b91186e2debaa1fb135f5cc5", "shasum": "" }, "require": { @@ -605,7 +406,7 @@ "suggest": { "doctrine/annotations": "^2.0" }, - "time": "2025-07-15T23:54:13+00:00", + "time": "2025-09-12T03:49:27+00:00", "bin": [ "bin/openapi" ], @@ -651,7 +452,7 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/5.1.4" + "source": "https://github.com/zircote/swagger-php/tree/5.4.0" }, "install-path": "../zircote/swagger-php" } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 8956d6f..6a066b3 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-5.x-dev', 'version' => 'dev-5.x-dev', - 'reference' => '8d1f23f1712e1f49d41f92671170c8bd883d22ca', + 'reference' => 'd3519004db86652d7e3d0b6682f262dd5725405c', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,30 +13,12 @@ '__root__' => array( 'pretty_version' => 'dev-5.x-dev', 'version' => 'dev-5.x-dev', - 'reference' => '8d1f23f1712e1f49d41f92671170c8bd883d22ca', + 'reference' => 'd3519004db86652d7e3d0b6682f262dd5725405c', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), - 'doctrine/annotations' => array( - 'pretty_version' => '2.0.2', - 'version' => '2.0.2.0', - 'reference' => '901c2ee5d26eb64ff43c47976e114bf00843acf7', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/annotations', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'doctrine/lexer' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/lexer', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'monolog/monolog' => array( 'dev_requirement' => false, 'replaced' => array( @@ -44,23 +26,14 @@ ), ), 'nikic/php-parser' => array( - 'pretty_version' => 'v5.6.0', - 'version' => '5.6.0.0', - 'reference' => '221b0d0fdf1369c71047ad1d18bb5880017bbc56', + 'pretty_version' => 'v5.6.1', + 'version' => '5.6.1.0', + 'reference' => 'f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => false, ), - 'psr/cache' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/cache', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'psr/log' => array( 'dev_requirement' => false, 'replaced' => array( @@ -77,17 +50,17 @@ 'dev_requirement' => false, ), 'symfony/finder' => array( - 'pretty_version' => 'v6.4.17', - 'version' => '6.4.17.0', - 'reference' => '1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7', + 'pretty_version' => 'v7.3.2', + 'version' => '7.3.2.0', + 'reference' => '2a6614966ba1074fa93dae0bc804227422df4dfe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.32.0', - 'version' => '1.32.0.0', + 'pretty_version' => 'v1.33.0', + 'version' => '1.33.0.0', 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', @@ -95,18 +68,18 @@ 'dev_requirement' => false, ), 'symfony/yaml' => array( - 'pretty_version' => 'v6.4.23', - 'version' => '6.4.23.0', - 'reference' => '93e29e0deb5f1b2e360adfb389a20d25eb81a27b', + 'pretty_version' => 'v7.3.3', + 'version' => '7.3.3.0', + 'reference' => 'd4f4a66866fe2451f61296924767280ab5732d9d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => false, ), 'zircote/swagger-php' => array( - 'pretty_version' => '5.1.4', - 'version' => '5.1.4.0', - 'reference' => '471f2e7c24c9508a2ee08df245cab64b62dbf721', + 'pretty_version' => '5.4.0', + 'version' => '5.4.0.0', + 'reference' => 'e25c377ec04db4d2b91186e2debaa1fb135f5cc5', 'type' => 'library', 'install_path' => __DIR__ . '/../zircote/swagger-php', 'aliases' => array(), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php deleted file mode 100644 index 4c3a5d6..0000000 --- a/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 80100)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/vendor/doctrine/annotations/LICENSE b/vendor/doctrine/annotations/LICENSE deleted file mode 100644 index 5e781fc..0000000 --- a/vendor/doctrine/annotations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/doctrine/annotations/docs/en/annotations.rst b/vendor/doctrine/annotations/docs/en/annotations.rst deleted file mode 100644 index d32b15d..0000000 --- a/vendor/doctrine/annotations/docs/en/annotations.rst +++ /dev/null @@ -1,189 +0,0 @@ -Handling Annotations -==================== - -There are several different approaches to handling annotations in PHP. -Doctrine Annotations maps docblock annotations to PHP classes. Because -not all docblock annotations are used for metadata purposes a filter is -applied to ignore or skip classes that are not Doctrine annotations. - -Take a look at the following code snippet: - -.. code-block:: php - - namespace MyProject\Entities; - - use Doctrine\ORM\Mapping AS ORM; - use Symfony\Component\Validator\Constraints AS Assert; - - /** - * @author Benjamin Eberlei - * @ORM\Entity - * @MyProject\Annotations\Foobarable - */ - class User - { - /** - * @ORM\Id @ORM\Column @ORM\GeneratedValue - * @dummy - * @var int - */ - private $id; - - /** - * @ORM\Column(type="string") - * @Assert\NotEmpty - * @Assert\Email - * @var string - */ - private $email; - } - -In this snippet you can see a variety of different docblock annotations: - -- Documentation annotations such as ``@var`` and ``@author``. These - annotations are ignored and never considered for throwing an - exception due to wrongly used annotations. -- Annotations imported through use statements. The statement ``use - Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace - available as ``@ORM\ClassName``. Same goes for the import of - ``@Assert``. -- The ``@dummy`` annotation. It is not a documentation annotation and - not ignored. For Doctrine Annotations it is not entirely clear how - to handle this annotation. Depending on the configuration an exception - (unknown annotation) will be thrown when parsing this annotation. -- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. - This is transformed directly into the given class name. - -How are these annotations loaded? From looking at the code you could -guess that the ORM Mapping, Assert Validation and the fully qualified -annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error -handling reasons every check for class existence inside the -``AnnotationReader`` sets the second parameter $autoload -of ``class_exists($name, $autoload)`` to false. To work flawlessly the -``AnnotationReader`` requires silent autoloaders which many autoloaders are -not. Silent autoloading is NOT part of the `PSR-0 specification -`_ -for autoloading. - -This is why Doctrine Annotations uses its own autoloading mechanism -through a global registry. If you are wondering about the annotation -registry being global, there is no other way to solve the architectural -problems of autoloading annotation classes in a straightforward fashion. -Additionally if you think about PHP autoloading then you recognize it is -a global as well. - -To anticipate the configuration section, making the above PHP class work -with Doctrine Annotations requires this setup: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - - $reader = new AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('dummy'); - -We create the actual ``AnnotationReader`` instance. -Note that we also add ``dummy`` to the global list of ignored -annotations for which we do not throw exceptions. Setting this is -necessary in our example case, otherwise ``@dummy`` would trigger an -exception to be thrown during the parsing of the docblock of -``MyProject\Entities\User#id``. - -Setup and Configuration ------------------------ - -To use the annotations library is simple, you just need to create a new -``AnnotationReader`` instance: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - -This creates a simple annotation reader with no caching other than in -memory (in php arrays). Since parsing docblocks can be expensive you -should cache this process by using a caching reader. - -To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``. -This reader decorates the original reader and stores all annotations in a PSR-6 -cache: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\PsrCachedReader; - - $cache = ... // instantiate a PSR-6 Cache pool - - $reader = new PsrCachedReader( - new AnnotationReader(), - $cache, - $debug = true - ); - -The ``debug`` flag is used here as well to invalidate the cache files -when the PHP class with annotations changed and should be used during -development. - -.. warning :: - - The ``AnnotationReader`` works and caches under the - assumption that all annotations of a doc-block are processed at - once. That means that annotation classes that do not exist and - aren't loaded and cannot be autoloaded (using the - AnnotationRegistry) would never be visible and not accessible if a - cache is used unless the cache is cleared and the annotations - requested again, this time with all annotations defined. - -By default the annotation reader returns a list of annotations with -numeric indexes. If you want your annotations to be indexed by their -class name you can wrap the reader in an ``IndexedReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\IndexedReader; - - $reader = new IndexedReader(new AnnotationReader()); - -.. warning:: - - You should never wrap the indexed reader inside a cached reader, - only the other way around. This way you can re-use the cache with - indexed or numeric keys, otherwise your code may experience failures - due to caching in a numerical or indexed format. - -Ignoring missing exceptions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default an exception is thrown from the ``AnnotationReader`` if an -annotation was found that: - -- is not part of the list of ignored "documentation annotations"; -- was not imported through a use statement; -- is not a fully qualified class that exists. - -You can disable this behavior for specific names if your docblocks do -not follow strict requirements: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('foo'); - -PHP Imports -~~~~~~~~~~~ - -By default the annotation reader parses the use-statement of a php file -to gain access to the import rules and register them for the annotation -processing. Only if you are using PHP Imports can you validate the -correct usage of annotations and throw exceptions if you misspelled an -annotation. This mechanism is enabled by default. - -To ease the upgrade path, we still allow you to disable this mechanism. -Note however that we will remove this in future versions: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setEnabledPhpImports(false); diff --git a/vendor/doctrine/annotations/docs/en/custom.rst b/vendor/doctrine/annotations/docs/en/custom.rst deleted file mode 100644 index 3005166..0000000 --- a/vendor/doctrine/annotations/docs/en/custom.rst +++ /dev/null @@ -1,443 +0,0 @@ -Custom Annotation Classes -========================= - -If you want to define your own annotations, you just have to group them -in a namespace. -Annotation classes have to contain a class-level docblock with the text -``@Annotation``: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** @Annotation */ - class Bar - { - // some code - } - -Inject annotation values ------------------------- - -The annotation parser checks if the annotation constructor has arguments, -if so then it will pass the value array, otherwise it will try to inject -values into public properties directly: - - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * - * Some Annotation using a constructor - */ - class Bar - { - private $foo; - - public function __construct(array $values) - { - $this->foo = $values['foo']; - } - } - - /** - * @Annotation - * - * Some Annotation without a constructor - */ - class Foo - { - public $bar; - } - -Optional: Constructors with Named Parameters --------------------------------------------- - -Starting with Annotations v1.11 a new annotation instantiation strategy -is available that aims at compatibility of Annotation classes with the PHP 8 -attribute feature. You need to declare a constructor with regular parameter -names that match the named arguments in the annotation syntax. - -To enable this feature, you can tag your annotation class with -``@NamedArgumentConstructor`` (available from v1.12) or implement the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface -(available from v1.11 and deprecated as of v1.12). -When using the ``@NamedArgumentConstructor`` tag, the first argument of the -constructor is considered as the default one. - - -Usage with the ``@NamedArgumentConstructor`` tag - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(string $foo) - { - $this->foo = $foo; - } - } - - /** Usable with @Bar(foo="baz") */ - /** Usable with @Bar("baz") */ - -In combination with PHP 8's constructor property promotion feature -you can simplify this to: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - public function __construct(private string $foo) {} - } - - -Usage with the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` -interface (v1.11, deprecated as of v1.12): -.. code-block:: php - - namespace MyCompany\Annotations; - - use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; - - /** @Annotation */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(private string $foo) {} - } - - /** Usable with @Bar(foo="baz") */ - -Annotation Target ------------------ - -``@Target`` indicates the kinds of class elements to which an annotation -type is applicable. Then you could define one or more targets: - -- ``CLASS`` Allowed in class docblocks -- ``PROPERTY`` Allowed in property docblocks -- ``METHOD`` Allowed in the method docblocks -- ``FUNCTION`` Allowed in function dockblocks -- ``ALL`` Allowed in class, property, method and function docblocks -- ``ANNOTATION`` Allowed inside other annotations - -If the annotations is not allowed in the current context, an -``AnnotationException`` is thrown. - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - // some code - } - - /** - * @Annotation - * @Target("CLASS") - */ - class Foo - { - // some code - } - -Attribute types ---------------- - -The annotation parser checks the given parameters using the phpdoc -annotation ``@var``, The data type could be validated using the ``@var`` -annotation on the annotation properties or using the ``@Attributes`` and -``@Attribute`` annotations. - -If the data type does not match you get an ``AnnotationException`` - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - /** @var mixed */ - public $mixed; - - /** @var boolean */ - public $boolean; - - /** @var bool */ - public $bool; - - /** @var float */ - public $float; - - /** @var string */ - public $string; - - /** @var integer */ - public $integer; - - /** @var array */ - public $array; - - /** @var SomeAnnotationClass */ - public $annotation; - - /** @var array */ - public $arrayOfIntegers; - - /** @var array */ - public $arrayOfAnnotations; - } - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - * @Attributes({ - * @Attribute("stringProperty", type = "string"), - * @Attribute("annotProperty", type = "SomeAnnotationClass"), - * }) - */ - class Foo - { - public function __construct(array $values) - { - $this->stringProperty = $values['stringProperty']; - $this->annotProperty = $values['annotProperty']; - } - - // some code - } - -Annotation Required -------------------- - -``@Required`` indicates that the field must be specified when the -annotation is used. If it is not used you get an ``AnnotationException`` -stating that this value can not be null. - -Declaring a required field: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Foo - { - /** @Required */ - public $requiredField; - } - -Usage: - -.. code-block:: php - - /** @Foo(requiredField="value") */ - public $direction; // Valid - - /** @Foo */ - public $direction; // Required field missing, throws an AnnotationException - - -Enumerated values ------------------ - -- An annotation property marked with ``@Enum`` is a field that accepts a - fixed set of scalar values. -- You should use ``@Enum`` fields any time you need to represent fixed - values. -- The annotation parser checks the given value and throws an - ``AnnotationException`` if the value does not match. - - -Declaring an enumerated property: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Direction - { - /** - * @Enum({"NORTH", "SOUTH", "EAST", "WEST"}) - */ - public $value; - } - -Annotation usage: - -.. code-block:: php - - /** @Direction("NORTH") */ - public $direction; // Valid value - - /** @Direction("NORTHEAST") */ - public $direction; // Invalid value, throws an AnnotationException - - -Constants ---------- - -The use of constants and class constants is available on the annotations -parser. - -The following usages are allowed: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - use MyCompany\Entity\SomeClass; - - /** - * @Foo(PHP_EOL) - * @Bar(Bar::FOO) - * @Foo({SomeClass::FOO, SomeClass::BAR}) - * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE}) - */ - class User - { - } - - -Be careful with constants and the cache ! - -.. note:: - - The cached reader will not re-evaluate each time an annotation is - loaded from cache. When a constant is changed the cache must be - cleaned. - - -Usage ------ - -Using the library API is simple. Using the annotations described in the -previous section, you can now annotate other classes with your -annotations: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - - /** - * @Foo(bar="foo") - * @Bar(foo="bar") - */ - class User - { - } - -Now we can write a script to get the annotations above: - -.. code-block:: php - - $reflClass = new ReflectionClass('MyCompany\Entity\User'); - $classAnnotations = $reader->getClassAnnotations($reflClass); - - foreach ($classAnnotations AS $annot) { - if ($annot instanceof \MyCompany\Annotations\Foo) { - echo $annot->bar; // prints "foo"; - } else if ($annot instanceof \MyCompany\Annotations\Bar) { - echo $annot->foo; // prints "bar"; - } - } - -You have a complete API for retrieving annotation class instances from a -class, property or method docblock: - - -Reader API -~~~~~~~~~~ - -Access all annotations of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotations(\ReflectionClass $class); - -Access one annotation of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotation(\ReflectionClass $class, $annotationName); - -Access all annotations of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotations(\ReflectionMethod $method); - -Access one annotation of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - -Access all annotations of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotations(\ReflectionProperty $property); - -Access one annotation of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); - -Access all annotations of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotations(\ReflectionFunction $property); - -Access one annotation of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/vendor/doctrine/annotations/docs/en/index.rst b/vendor/doctrine/annotations/docs/en/index.rst deleted file mode 100644 index 3cf37e5..0000000 --- a/vendor/doctrine/annotations/docs/en/index.rst +++ /dev/null @@ -1,109 +0,0 @@ -Deprecation notice -================== - -PHP 8 introduced `attributes -`_, -which are a native replacement for annotations. As such, this library is -considered feature complete, and should receive exclusively bugfixes and -security fixes. - -We do not recommend using this library in new projects and encourage authors -of downstream libraries to offer support for attributes as an alternative to -Doctrine Annotations. - -Have a look at [our blog](https://www.doctrine-project.org/2022/11/04/annotations-to-attributes.html) -to learn more. - -Introduction -============ - -Doctrine Annotations allows to implement custom annotation -functionality for PHP classes and functions. - -.. code-block:: php - - class Foo - { - /** - * @MyAnnotation(myProperty="value") - */ - private $bar; - } - -Annotations aren't implemented in PHP itself which is why this component -offers a way to use the PHP doc-blocks as a place for the well known -annotation syntax using the ``@`` char. - -Annotations in Doctrine are used for the ORM configuration to build the -class mapping, but it can be used in other projects for other purposes -too. - -Installation -============ - -You can install the Annotation component with composer: - -.. code-block:: - - $ composer require doctrine/annotations - -Create an annotation class -========================== - -An annotation class is a representation of the later used annotation -configuration in classes. The annotation class of the previous example -looks like this: - -.. code-block:: php - - /** - * @Annotation - */ - final class MyAnnotation - { - public $myProperty; - } - -The annotation class is declared as an annotation by ``@Annotation``. - -:ref:`Read more about custom annotations. ` - -Reading annotations -=================== - -The access to the annotations happens by reflection of the class or function -containing them. There are multiple reader-classes implementing the -``Doctrine\Common\Annotations\Reader`` interface, that can access the -annotations of a class. A common one is -``Doctrine\Common\Annotations\AnnotationReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - - $reflectionClass = new ReflectionClass(Foo::class); - $property = $reflectionClass->getProperty('bar'); - - $reader = new AnnotationReader(); - $myAnnotation = $reader->getPropertyAnnotation( - $property, - MyAnnotation::class - ); - - echo $myAnnotation->myProperty; // result: "value" - -A reader has multiple methods to access the annotations of a class or -function. - -:ref:`Read more about handling annotations. ` - -IDE Support ------------ - -Some IDEs already provide support for annotations: - -- Eclipse via the `Symfony2 Plugin `_ -- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ - -.. _Read more about handling annotations.: annotations -.. _Read more about custom annotations.: custom diff --git a/vendor/doctrine/annotations/docs/en/sidebar.rst b/vendor/doctrine/annotations/docs/en/sidebar.rst deleted file mode 100644 index 6f5d13c..0000000 --- a/vendor/doctrine/annotations/docs/en/sidebar.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. toctree:: - :depth: 3 - - index - annotations - custom diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index fba23e9..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,54 +0,0 @@ - $data Key-value for properties to be defined in this class. */ - final public function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @throws BadMethodCallException - */ - public function __get(string $name) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param mixed $value Property value. - * - * @throws BadMethodCallException - */ - public function __set(string $name, $value) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index b1f8514..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,21 +0,0 @@ - */ - public $value; -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index 6f24d9f..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,69 +0,0 @@ - */ - public $value; - - /** - * Literal target declaration. - * - * @var mixed[] - */ - public $literal; - - /** - * @phpstan-param array{literal?: mixed[], value: list} $values - * - * @throws InvalidArgumentException - */ - public function __construct(array $values) - { - if (! isset($values['literal'])) { - $values['literal'] = []; - } - - foreach ($values['value'] as $var) { - if (! is_scalar($var)) { - throw new InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if (! in_array($key, $values['value'])) { - throw new InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key, - $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index 97a15c2..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,43 +0,0 @@ - */ - public $names; - - /** - * @phpstan-param array{value: string|list} $values - * - * @throws RuntimeException - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new RuntimeException(sprintf( - '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', - json_encode($values['value']) - )); - } - - $this->names = $values['value']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php deleted file mode 100644 index 1690601..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php +++ /dev/null @@ -1,13 +0,0 @@ - */ - private static $map = [ - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'FUNCTION' => self::TARGET_FUNCTION, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ]; - - /** @phpstan-var list */ - public $value; - - /** - * Targets as bitmask. - * - * @var int - */ - public $targets; - - /** - * Literal target declaration. - * - * @var string - */ - public $literal; - - /** - * @phpstan-param array{value?: string|list} $values - * - * @throws InvalidArgumentException - */ - public function __construct(array $values) - { - if (! isset($values['value'])) { - $values['value'] = null; - } - - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new InvalidArgumentException( - sprintf( - '@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if (! isset(self::$map[$literal])) { - throw new InvalidArgumentException( - sprintf( - 'Invalid Target "%s". Available targets: [%s]', - $literal, - implode(', ', array_keys(self::$map)) - ) - ); - } - - $bitmask |= self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index 002ee04..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,158 +0,0 @@ - $available - * - * @return AnnotationException - */ - public static function enumeratorError( - string $attributeName, - string $annotationName, - string $context, - array $available, - $given - ) { - return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** @return AnnotationException */ - public static function optimizerPlusSaveComments() - { - return new self( - 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.' - ); - } - - /** @return AnnotationException */ - public static function optimizerPlusLoadComments() - { - return new self( - 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.' - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index c7ea577..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,392 +0,0 @@ - - */ - private static $globalImports = [ - 'ignoreannotation' => Annotation\IgnoreAnnotation::class, - ]; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNamespaces = []; - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - */ - public static function addGlobalIgnoredName(string $name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling. - */ - public static function addGlobalIgnoredNamespace(string $namespace) - { - self::$globalIgnoredNamespaces[$namespace] = true; - } - - /** - * Annotations parser. - * - * @var DocParser - */ - private $parser; - - /** - * Annotations parser used to collect parsing metadata. - * - * @var DocParser - */ - private $preParser; - - /** - * PHP parser used to collect imports. - * - * @var PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $imports = []; - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $ignoredAnnotationNames = []; - - /** - * Initializes a new AnnotationReader. - * - * @throws AnnotationException - */ - public function __construct(?DocParser $parser = null) - { - if ( - extension_loaded('Zend Optimizer+') && - (filter_var(ini_get('zend_optimizerplus.save_comments'), FILTER_VALIDATE_BOOLEAN) === false || - filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false) - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if ( - extension_loaded('Zend OPcache') && - filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - // Make sure that the IgnoreAnnotation annotation is loaded - class_exists(IgnoreAnnotation::class); - - $this->parser = $parser ?: new DocParser(); - - $this->preParser = new DocParser(); - - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); - - $this->phpParser = new PhpParser(); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . '::$' . $property->getName(); - - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getPropertyImports($property)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getMethodImports($method)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a function. - * - * @phpstan-return list An array of Annotations. - */ - public function getFunctionAnnotations(ReflectionFunction $function): array - { - $context = 'function ' . $function->getName(); - - $this->parser->setTarget(Target::TARGET_FUNCTION); - $this->parser->setImports($this->getImports($function)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($function->getDocComment(), $context); - } - - /** - * Gets a function annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) - { - $annotations = $this->getFunctionAnnotations($function); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getIgnoredAnnotationNames($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->ignoredAnnotationNames[$type][$name])) { - return $this->ignoredAnnotationNames[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->ignoredAnnotationNames[$type][$name]; - } - - /** - * Retrieves imports for a class or a function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getImports($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->imports[$type][$name])) { - return $this->imports[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->imports[$type][$name]; - } - - /** - * Retrieves imports for methods. - * - * @return array - */ - private function getMethodImports(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if ( - ! $trait->hasMethod($method->getName()) - || $trait->getFileName() !== $method->getFileName() - ) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Retrieves imports for properties. - * - * @return array - */ - private function getPropertyImports(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if (! $trait->hasProperty($property->getName())) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Collects parsing metadata for a given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - */ - private function collectParsingMetadata($reflection): void - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); - - foreach ($annotations as $annotation) { - if (! ($annotation instanceof IgnoreAnnotation)) { - continue; - } - - foreach ($annotation->names as $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - - $this->imports[$type][$name] = array_merge( - self::$globalImports, - $this->phpParser->parseUseStatements($reflection), - [ - '__NAMESPACE__' => $reflection->getNamespaceName(), - 'self' => $name, - ] - ); - - $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 290e60a..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -final class DocLexer extends AbstractLexer -{ - public const T_NONE = 1; - public const T_INTEGER = 2; - public const T_STRING = 3; - public const T_FLOAT = 4; - - // All tokens that are also identifiers should be >= 100 - public const T_IDENTIFIER = 100; - public const T_AT = 101; - public const T_CLOSE_CURLY_BRACES = 102; - public const T_CLOSE_PARENTHESIS = 103; - public const T_COMMA = 104; - public const T_EQUALS = 105; - public const T_FALSE = 106; - public const T_NAMESPACE_SEPARATOR = 107; - public const T_OPEN_CURLY_BRACES = 108; - public const T_OPEN_PARENTHESIS = 109; - public const T_TRUE = 110; - public const T_NULL = 111; - public const T_COLON = 112; - public const T_MINUS = 113; - - /** @var array */ - protected $noCase = [ - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '-' => self::T_MINUS, - '\\' => self::T_NAMESPACE_SEPARATOR, - ]; - - /** @var array */ - protected $withCase = [ - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL, - ]; - - /** - * Whether the next token starts immediately, or if there were - * non-captured symbols before that - */ - public function nextTokenIsAdjacent(): bool - { - return $this->token === null - || ($this->lookahead !== null - && ($this->lookahead->position - $this->token->position) === strlen($this->token->value)); - } - - /** - * {@inheritDoc} - */ - protected function getCatchablePatterns() - { - return [ - '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:""|[^"])*+"', - ]; - } - - /** - * {@inheritDoc} - */ - protected function getNonCatchablePatterns() - { - return ['\s+', '\*+', '(.)']; - } - - /** - * {@inheritDoc} - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return strpos($value, '.') !== false || stripos($value, 'e') !== false - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index 6faff09..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1496 +0,0 @@ -, named_arguments?: array} - */ -final class DocParser -{ - /** - * An array of all valid tokens for a class name. - * - * @phpstan-var list - */ - private static $classIdentifiers = [ - DocLexer::T_IDENTIFIER, - DocLexer::T_TRUE, - DocLexer::T_FALSE, - DocLexer::T_NULL, - ]; - - /** - * The lexer. - * - * @var DocLexer - */ - private $lexer; - - /** - * Current target context. - * - * @var int - */ - private $target; - - /** - * Doc parser used to collect annotation target. - * - * @var DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var bool - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = []; - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = []; - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var bool - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var string[] - */ - private $namespaces = []; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * - * @var bool[] indexed by annotation name - */ - private $ignoredAnnotationNames = []; - - /** - * A list with annotations in namespaced format - * that are not causing exceptions when not resolved to an annotation class. - * - * @var bool[] indexed by namespace name - */ - private $ignoredAnnotationNamespaces = []; - - /** @var string */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata. - * - * @var array - */ - private static $annotationMetadata = [ - Annotation\Target::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'properties' => [], - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => [ - 'value' => [ - 'required' => false, - 'type' => 'array', - 'array_type' => 'string', - 'value' => 'array', - ], - ], - ], - Annotation\Attribute::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => [ - 'name' => 'name', - 'type' => 'type', - 'required' => 'required', - ], - 'attribute_types' => [ - 'value' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'type' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'required' => [ - 'required' => false, - 'type' => 'boolean', - 'value' => 'boolean', - ], - ], - ], - Annotation\Attributes::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - 'array_type' => Annotation\Attribute::class, - 'value' => 'array<' . Annotation\Attribute::class . '>', - ], - ], - ], - Annotation\Enum::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - ], - 'literal' => [ - 'type' => 'array', - 'required' => false, - ], - ], - ], - Annotation\NamedArgumentConstructor::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => null, - 'properties' => [], - 'attribute_types' => [], - ], - ]; - - /** - * Hash-map for handle types declaration. - * - * @var array - */ - private static $typeMap = [ - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ]; - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer(); - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param bool[] $names indexed by annotation name - * - * @return void - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets the annotation namespaces that are ignored during the parsing process. - * - * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name - * - * @return void - */ - public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces) - { - $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces; - } - - /** - * Sets ignore on not-imported annotations. - * - * @return void - */ - public function setIgnoreNotImportedAnnotations(bool $bool) - { - $this->ignoreNotImportedAnnotations = $bool; - } - - /** - * Sets the default namespaces. - * - * @return void - * - * @throws RuntimeException - */ - public function addNamespace(string $namespace) - { - if ($this->imports) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports. - * - * @param array $imports - * - * @return void - * - * @throws RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @return void - */ - public function setTarget(int $target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. - * - * @throws AnnotationException - * @throws ReflectionException - */ - public function parse(string $input, string $context = '') - { - $pos = $this->findInitialTokenPosition($input); - if ($pos === null) { - return []; - } - - $this->context = $context; - - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Finds the first valid annotation - */ - private function findInitialTokenPosition(string $input): ?int - { - $pos = 0; - - // search for first valid annotation - while (($pos = strpos($input, '@', $pos)) !== false) { - $preceding = substr($input, $pos - 1, 1); - - // if the @ is preceded by a space, a tab or * it is valid - if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") { - return $pos; - } - - $pos++; - } - - return null; - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param int $token Type of token. - * - * @return bool True if tokens match; false otherwise. - * - * @throws AnnotationException - */ - private function match(int $token): bool - { - if (! $this->lexer->isNextToken($token)) { - throw $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @phpstan-param list $tokens - * - * @throws AnnotationException - */ - private function matchAny(array $tokens): bool - { - if (! $this->lexer->isNextTokenAny($tokens)) { - throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param mixed[]|null $token Optional token. - */ - private function syntaxError(string $expected, ?array $token = null): AnnotationException - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = sprintf('Expected %s, got ', $expected); - $message .= $this->lexer->lookahead === null - ? 'end of string' - : sprintf("'%s' at position %s", $token->value, $token->position); - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - return AnnotationException::syntaxError($message); - } - - /** - * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param class-string $fqcn - */ - private function classExists(string $fqcn): bool - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param class-string $name The annotation name - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function collectAnnotationMetadata(string $name): void - { - if (self::$metadataParser === null) { - self::$metadataParser = new self(); - - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports([ - 'enum' => Enum::class, - 'target' => Target::class, - 'attribute' => Attribute::class, - 'attributes' => Attributes::class, - 'namedargumentconstructor' => NamedArgumentConstructor::class, - ]); - - // Make sure that annotations from metadata are loaded - class_exists(Enum::class); - class_exists(Target::class); - class_exists(Attribute::class); - class_exists(Attributes::class); - class_exists(NamedArgumentConstructor::class); - } - - $class = new ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $constructor = $class->getConstructor(); - $metadata = [ - 'default_property' => null, - 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, - 'constructor_args' => [], - 'properties' => [], - 'property_types' => [], - 'attribute_types' => [], - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => strpos($docComment, '@Annotation') !== false, - ]; - - $metadata['has_named_argument_constructor'] = false; - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - continue; - } - - if ($annotation instanceof NamedArgumentConstructor) { - $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; - if ($metadata['has_named_argument_constructor']) { - // choose the first argument as the default property - $metadata['default_property'] = $constructor->getParameters()[0]->getName(); - } - } - - if (! ($annotation instanceof Attributes)) { - continue; - } - - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); - } - } - - // if not has a constructor will inject values into public properties - if ($metadata['has_constructor'] === false) { - // collect all public properties - foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - $propertyComment = $property->getDocComment(); - if ($propertyComment === false) { - continue; - } - - $attribute = new Attribute(); - - $attribute->required = (strpos($propertyComment, '@Required') !== false); - $attribute->name = $property->name; - $attribute->type = (strpos($propertyComment, '@var') !== false && - preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches)) - ? $matches[1] - : 'mixed'; - - $this->collectAttributeTypeMetadata($metadata, $attribute); - - // checks if the property has @Enum - if (strpos($propertyComment, '@Enum') === false) { - continue; - } - - $context = 'property ' . $class->name . '::$' . $property->name; - - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if (! $annotation instanceof Enum) { - continue; - } - - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } elseif ($metadata['has_named_argument_constructor']) { - foreach ($constructor->getParameters() as $parameter) { - if ($parameter->isVariadic()) { - break; - } - - $metadata['constructor_args'][$parameter->getName()] = [ - 'position' => $parameter->getPosition(), - 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null, - ]; - } - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Collects parsing metadata for a given attribute. - * - * @param mixed[] $metadata - */ - private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void - { - // handle internal type declaration - $type = self::$typeMap[$attribute->type] ?? $attribute->type; - - // handle the case if the property type is mixed - if ($type === 'mixed') { - return; - } - - // Evaluate type - $pos = strpos($type, '<'); - if ($pos !== false) { - // Checks if the property has array - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } else { - // Checks if the property has type[] - $pos = strrpos($type, '['); - if ($pos !== false) { - $arrayType = substr($type, 0, $pos); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } - } - - $metadata['attribute_types'][$attribute->name]['type'] = $type; - $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; - $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @phpstan-return list - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotations(): array - { - $annotations = []; - - while ($this->lexer->lookahead !== null) { - if ($this->lexer->lookahead->type !== DocLexer::T_AT) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if ( - $this->lexer->token !== null && - $this->lexer->lookahead->position === $this->lexer->token->position + strlen( - $this->lexer->token->value - ) - ) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - $peek = $this->lexer->glimpse(); - if ( - ($peek === null) - || ($peek->type !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array( - $peek->type, - self::$classIdentifiers, - true - )) - || $peek->position !== $this->lexer->lookahead->position + 1 - ) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - $annot = $this->Annotation(); - if ($annot === false) { - continue; - } - - $annotations[] = $annot; - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName MethodCall - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @return object|false False if it is not a valid annotation. - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - if ( - $this->lexer->isNextToken(DocLexer::T_MINUS) - && $this->lexer->nextTokenIsAdjacent() - ) { - // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded - return false; - } - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - - if ($name[0] !== '\\') { - $pos = strpos($name, '\\'); - $alias = ($pos === false) ? $name : substr($name, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace . '\\' . $name)) { - $name = $namespace . '\\' . $name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias])) { - $namespace = ltrim($this->imports[$loweredAlias], '\\'); - $name = ($pos !== false) - ? $namespace . substr($name, $pos) - : $namespace; - $found = $this->classExists($name); - } elseif ( - ! isset($this->ignoredAnnotationNames[$name]) - && isset($this->imports['__NAMESPACE__']) - && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) - ) { - $name = $this->imports['__NAMESPACE__'] . '\\' . $name; - $found = true; - } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { - $found = true; - } - - if (! $found) { - if ($this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? -EXCEPTION - , - $name, - $this->context - )); - } - } - - $name = ltrim($name, '\\'); - - if (! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf( - 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.', - $name, - $this->context - )); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - // collects the metadata annotation only if there is not yet - if (! isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The class "%s" is not annotated with @Annotation. -Are you sure this class can be used as annotation? -If so, then you need to add @Annotation to the _class_ doc comment of "%s". -If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. -EXCEPTION - , - $name, - $name, - $originalName, - $this->context - )); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { - throw AnnotationException::semanticalError( - sprintf( - <<<'EXCEPTION' -Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. -EXCEPTION - , - $originalName, - $this->context, - self::$annotationMetadata[$name]['targets_literal'] - ) - ); - } - - $arguments = $this->MethodCall(); - $values = $this->resolvePositionalValues($arguments, $name); - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError( - $property, - $name, - $this->context, - $enum['literal'], - $values[$property] - ); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ( - $property === self::$annotationMetadata[$name]['default_property'] - && ! isset($values[$property]) && isset($values['value']) - ) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (! isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'] - ); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if (! is_array($values[$property])) { - $values[$property] = [$values[$property]]; - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', - $item - ); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'], - $values[$property] - ); - } - } - - if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { - if (PHP_VERSION_ID >= 80000) { - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - } - - return $this->instantiateAnnotiation($originalName, $this->context, $name, $values); - } - - $positionalValues = []; - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $positionalValues[$parameter['position']] = $parameter['default']; - } - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - - $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; - } - - return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues); - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]); - } - - $instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []); - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ($property !== 'value') { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s". -Available properties: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', self::$annotationMetadata[$name]['properties']) - )); - } - - // handle the case if the property has no annotations - $property = self::$annotationMetadata[$name]['default_property']; - if (! $property) { - throw AnnotationException::creationError(sprintf( - 'The annotation @%s declared on %s does not accept any values, but got %s.', - $originalName, - $this->context, - json_encode($values) - )); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * MethodCall ::= ["(" [Values] ")"] - * - * @psalm-return Arguments - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function MethodCall(): array - { - $values = []; - - if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - return $values; - } - - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - - return $values; - } - - /** - * Values ::= Array | Value {"," Value}* [","] - * - * @psalm-return Arguments - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Values(): array - { - $values = [$this->Value()]; - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - break; - } - - $token = $this->lexer->lookahead; - $value = $this->Value(); - - $values[] = $value; - } - - $namedArguments = []; - $positionalArguments = []; - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof stdClass) { - $namedArguments[$value->name] = $value->value; - } else { - $positionalArguments[$k] = $value; - } - } - - return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @return mixed - * - * @throws AnnotationException - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') { - [$className, $const] = explode('::', $identifier); - - $pos = strpos($className, '\\'); - $alias = ($pos === false) ? $className : substr($className, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - switch (true) { - case ! empty($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - break; - } - } - - break; - - case isset($this->imports[$loweredAlias]): - $found = true; - $className = ($pos !== false) - ? $this->imports[$loweredAlias] . substr($className, $pos) - : $this->imports[$loweredAlias]; - break; - - default: - if (isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - } - } - - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - /** - * Checks if identifier ends with ::class and remove the leading backslash if it exists. - */ - if ( - $this->identifierEndsWithClassConstant($identifier) && - ! $this->identifierStartsWithBackslash($identifier) - ) { - return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); - } - - if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { - return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); - } - - if (! defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - private function identifierStartsWithBackslash(string $identifier): bool - { - return $identifier[0] === '\\'; - } - - private function identifierEndsWithClassConstant(string $identifier): bool - { - return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); - } - - /** @return int|false */ - private function getClassConstantPositionInIdentifier(string $identifier) - { - return stripos($identifier, '::class'); - } - - /** - * Identifier ::= string - * - * @throws AnnotationException - */ - private function Identifier(): string - { - // check if we have an annotation - if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - throw $this->syntaxError('namespace separator or identifier'); - } - - $this->lexer->moveNext(); - - $className = $this->lexer->token->value; - - while ( - $this->lexer->lookahead !== null && - $this->lexer->lookahead->position === ($this->lexer->token->position + - strlen($this->lexer->token->value)) && - $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) - ) { - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - - $className .= '\\' . $this->lexer->token->value; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if ($peek->type === DocLexer::T_EQUALS) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead->type) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - - return $this->lexer->token->value; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - - return (int) $this->lexer->token->value; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - - return (float) $this->lexer->token->value; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - - return null; - - default: - throw $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function FieldAssignment(): stdClass - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token->value; - - $this->match(DocLexer::T_EQUALS); - - $item = new stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Arrayx(): array - { - $array = $values = []; - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - - // If the array is empty, stop parsing and return. - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - return $array; - } - - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - [$key, $val] = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @phpstan-return array{mixed, mixed} - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function ArrayEntry(): array - { - $peek = $this->lexer->glimpse(); - - if ( - $peek->type === DocLexer::T_EQUALS - || $peek->type === DocLexer::T_COLON - ) { - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]); - $key = $this->lexer->token->value; - } - - $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]); - - return [$key, $this->PlainValue()]; - } - - return [null, $this->Value()]; - } - - /** - * Checks whether the given $name matches any ignored annotation name or namespace - */ - private function isIgnoredAnnotation(string $name): bool - { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return true; - } - - foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { - $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; - - if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { - return true; - } - } - - return false; - } - - /** - * Resolve positional arguments (without name) to named ones - * - * @psalm-param Arguments $arguments - * - * @return array - */ - private function resolvePositionalValues(array $arguments, string $name): array - { - $positionalArguments = $arguments['positional_arguments'] ?? []; - $values = $arguments['named_arguments'] ?? []; - - if ( - self::$annotationMetadata[$name]['has_named_argument_constructor'] - && self::$annotationMetadata[$name]['default_property'] !== null - ) { - // We must ensure that we don't have positional arguments after named ones - $positions = array_keys($positionalArguments); - $lastPosition = null; - foreach ($positions as $position) { - if ( - ($lastPosition === null && $position !== 0) || - ($lastPosition !== null && $position !== $lastPosition + 1) - ) { - throw $this->syntaxError('Positional arguments after named arguments is not allowed'); - } - - $lastPosition = $position; - } - - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $position = $parameter['position']; - if (isset($values[$property]) || ! isset($positionalArguments[$position])) { - continue; - } - - $values[$property] = $positionalArguments[$position]; - } - } else { - if (count($positionalArguments) > 0 && ! isset($values['value'])) { - if (count($positionalArguments) === 1) { - $value = array_pop($positionalArguments); - } else { - $value = array_values($positionalArguments); - } - - $values['value'] = $value; - } - } - - return $values; - } - - /** - * Try to instantiate the annotation and catch and process any exceptions related to failure - * - * @param class-string $name - * @param array $arguments - * - * @return object - * - * @throws AnnotationException - */ - private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments) - { - try { - return new $name(...$arguments); - } catch (Throwable $exception) { - throw AnnotationException::creationError( - sprintf( - 'An error occurred while instantiating the annotation @%s declared on %s: "%s".', - $originalName, - $context, - $exception->getMessage() - ), - $exception - ); - } - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php deleted file mode 100644 index ab27f8a..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php +++ /dev/null @@ -1,178 +0,0 @@ - true, - 'Attribute' => true, - 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - 'NamedArgumentConstructor' => true, - ]; - - private const WidelyUsedNonStandard = [ - 'fix' => true, - 'fixme' => true, - 'override' => true, - ]; - - private const PhpDocumentor1 = [ - 'abstract' => true, - 'access' => true, - 'code' => true, - 'deprec' => true, - 'endcode' => true, - 'exception' => true, - 'final' => true, - 'ingroup' => true, - 'inheritdoc' => true, - 'inheritDoc' => true, - 'magic' => true, - 'name' => true, - 'private' => true, - 'static' => true, - 'staticvar' => true, - 'staticVar' => true, - 'toc' => true, - 'tutorial' => true, - 'throw' => true, - ]; - - private const PhpDocumentor2 = [ - 'api' => true, - 'author' => true, - 'category' => true, - 'copyright' => true, - 'deprecated' => true, - 'example' => true, - 'filesource' => true, - 'global' => true, - 'ignore' => true, - /* Can we enable this? 'index' => true, */ - 'internal' => true, - 'license' => true, - 'link' => true, - 'method' => true, - 'package' => true, - 'param' => true, - 'property' => true, - 'property-read' => true, - 'property-write' => true, - 'return' => true, - 'see' => true, - 'since' => true, - 'source' => true, - 'subpackage' => true, - 'throws' => true, - 'todo' => true, - 'TODO' => true, - 'usedby' => true, - 'uses' => true, - 'var' => true, - 'version' => true, - ]; - - private const PHPUnit = [ - 'author' => true, - 'after' => true, - 'afterClass' => true, - 'backupGlobals' => true, - 'backupStaticAttributes' => true, - 'before' => true, - 'beforeClass' => true, - 'codeCoverageIgnore' => true, - 'codeCoverageIgnoreStart' => true, - 'codeCoverageIgnoreEnd' => true, - 'covers' => true, - 'coversDefaultClass' => true, - 'coversNothing' => true, - 'dataProvider' => true, - 'depends' => true, - 'doesNotPerformAssertions' => true, - 'expectedException' => true, - 'expectedExceptionCode' => true, - 'expectedExceptionMessage' => true, - 'expectedExceptionMessageRegExp' => true, - 'group' => true, - 'large' => true, - 'medium' => true, - 'preserveGlobalState' => true, - 'requires' => true, - 'runTestsInSeparateProcesses' => true, - 'runInSeparateProcess' => true, - 'small' => true, - 'test' => true, - 'testdox' => true, - 'testWith' => true, - 'ticket' => true, - 'uses' => true, - ]; - - private const PhpCheckStyle = ['SuppressWarnings' => true]; - - private const PhpStorm = ['noinspection' => true]; - - private const PEAR = ['package_version' => true]; - - private const PlainUML = [ - 'startuml' => true, - 'enduml' => true, - ]; - - private const Symfony = ['experimental' => true]; - - private const PhpCodeSniffer = [ - 'codingStandardsIgnoreStart' => true, - 'codingStandardsIgnoreEnd' => true, - ]; - - private const SlevomatCodingStandard = ['phpcsSuppress' => true]; - - private const Phan = ['suppress' => true]; - - private const Rector = ['noRector' => true]; - - private const StaticAnalysis = [ - // PHPStan, Psalm - 'extends' => true, - 'implements' => true, - 'readonly' => true, - 'template' => true, - 'use' => true, - - // Psalm - 'pure' => true, - 'immutable' => true, - ]; - - public const LIST = self::Reserved - + self::WidelyUsedNonStandard - + self::PhpDocumentor1 - + self::PhpDocumentor2 - + self::PHPUnit - + self::PhpCheckStyle - + self::PhpStorm - + self::PEAR - + self::PlainUML - + self::Symfony - + self::SlevomatCodingStandard - + self::PhpCodeSniffer - + self::Phan - + self::Rector - + self::StaticAnalysis; - - private function __construct() - { - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index 77b5b9c..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,99 +0,0 @@ -delegate = $reader; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $annotations = []; - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - return $this->delegate->getClassAnnotation($class, $annotationName); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $annotations = []; - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - return $this->delegate->getMethodAnnotation($method, $annotationName); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $annotations = []; - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - return $this->delegate->getPropertyAnnotation($property, $annotationName); - } - - /** - * Proxies all methods to the delegate. - * - * @param mixed[] $args - * - * @return mixed - */ - public function __call(string $method, array $args) - { - return call_user_func_array([$this->delegate, $method], $args); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php deleted file mode 100644 index 312a2ab..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php +++ /dev/null @@ -1,78 +0,0 @@ - a list with use statements in the form (Alias => FQN). - */ - public function parseUseStatements($reflection): array - { - if (method_exists($reflection, 'getUseStatements')) { - return $reflection->getUseStatements(); - } - - $filename = $reflection->getFileName(); - - if ($filename === false) { - return []; - } - - $content = $this->getFileContent($filename, $reflection->getStartLine()); - - if ($content === null) { - return []; - } - - $namespace = preg_quote($reflection->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); - } - - /** - * Gets the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param int $lineNumber The number of lines to read from file. - * - * @return string|null The content of the file or null if the file does not exist. - */ - private function getFileContent(string $filename, $lineNumber) - { - if (! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (! $file->eof()) { - if ($lineCnt++ === $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php deleted file mode 100644 index b42da39..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php +++ /dev/null @@ -1,233 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var int[] */ - private $loadedFilemtimes = []; - - public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (bool) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName() . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName() . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - public function clearLoadedAnnotations(): void - { - $this->loadedAnnotations = []; - $this->loadedFilemtimes = []; - } - - /** @return mixed[] */ - private function fetchFromCache( - string $cacheKey, - ReflectionClass $class, - string $method, - Reflector $reflector - ): array { - $cacheKey = rawurlencode($cacheKey); - - $item = $this->cache->getItem($cacheKey); - if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) { - $this->cache->save($item->set($this->delegate->{$method}($reflector))); - } - - return $item->get(); - } - - /** - * Used in debug mode to check if the cache is fresh. - * - * @return bool Returns true if the cache was fresh, or false if the class - * being read was modified since writing to the cache. - */ - private function refresh(string $cacheKey, ReflectionClass $class): bool - { - $lastModification = $this->getLastModification($class); - if ($lastModification === 0) { - return true; - } - - $item = $this->cache->getItem('[C]' . $cacheKey); - if ($item->isHit() && $item->get() >= $lastModification) { - return true; - } - - $this->cache->save($item->set(time())); - - return false; - } - - /** - * Returns the time the class was last modified, testing traits and parents - */ - private function getLastModification(ReflectionClass $class): int - { - $filename = $class->getFileName(); - - if (isset($this->loadedFilemtimes[$filename])) { - return $this->loadedFilemtimes[$filename]; - } - - $parent = $class->getParentClass(); - - $lastModification = max(array_merge( - [$filename !== false && is_file($filename) ? filemtime($filename) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $class->getTraits()), - array_map(function (ReflectionClass $class): int { - return $this->getLastModification($class); - }, $class->getInterfaces()), - $parent ? [$this->getLastModification($parent)] : [] - )); - - assert($lastModification !== false); - - return $this->loadedFilemtimes[$filename] = $lastModification; - } - - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int - { - $fileName = $reflectionTrait->getFileName(); - - if (isset($this->loadedFilemtimes[$fileName])) { - return $this->loadedFilemtimes[$fileName]; - } - - $lastModificationTime = max(array_merge( - [$fileName !== false && is_file($fileName) ? filemtime($fileName) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $reflectionTrait->getTraits()) - )); - - assert($lastModificationTime !== false); - - return $this->loadedFilemtimes[$fileName] = $lastModificationTime; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 0663ffd..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,80 +0,0 @@ - An array of Annotations. - */ - public function getClassAnnotations(ReflectionClass $class); - - /** - * Gets a class annotation. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName); - - /** - * Gets the annotations applied to a method. - * - * @param ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(ReflectionMethod $method); - - /** - * Gets a method annotation. - * - * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName); - - /** - * Gets the annotations applied to a property. - * - * @param ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(ReflectionProperty $property); - - /** - * Gets a property annotation. - * - * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index 0534fd1..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,205 +0,0 @@ - - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - public function __construct(string $contents) - { - $this->tokens = token_get_all($contents); - - // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it - // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored - // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a - // docblock. If the first thing in the file is a class without a doc block this would cause calls to - // getDocBlock() on said class to return our long lost doc_comment. Argh. - // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least - // it's harmless to us. - token_get_all("numTokens = count($this->tokens); - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return mixed[]|string|null The token if exists, null otherwise. - */ - public function next(bool $docCommentIsComment = true) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ( - $this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) - ) { - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parses a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $groupRoot = ''; - $class = ''; - $alias = ''; - $statements = []; - $explicitAlias = false; - while (($token = $this->next())) { - if (! $explicitAlias && $token[0] === T_STRING) { - $class .= $token[1]; - $alias = $token[1]; - } elseif ($explicitAlias && $token[0] === T_STRING) { - $alias = $token[1]; - } elseif ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - ) { - $class .= $token[1]; - - $classSplit = explode('\\', $token[1]); - $alias = $classSplit[count($classSplit) - 1]; - } elseif ($token[0] === T_NS_SEPARATOR) { - $class .= '\\'; - $alias = ''; - } elseif ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } elseif ($token === ',') { - $statements[strtolower($alias)] = $groupRoot . $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } elseif ($token === ';') { - $statements[strtolower($alias)] = $groupRoot . $class; - break; - } elseif ($token === '{') { - $groupRoot = $class; - $class = ''; - } elseif ($token === '}') { - continue; - } else { - break; - } - } - - return $statements; - } - - /** - * Gets all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * - * @return array A list with all found use statements. - */ - public function parseUseStatements(string $namespaceName) - { - $statements = []; - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = []; - } - - return $statements; - } - - /** - * Gets the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while ( - ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - )) - ) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Gets the class name. - * - * @return string The found class name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE deleted file mode 100644 index e8fdec4..0000000 --- a/vendor/doctrine/lexer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2018 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/doctrine/lexer/src/AbstractLexer.php b/vendor/doctrine/lexer/src/AbstractLexer.php deleted file mode 100644 index 2436885..0000000 --- a/vendor/doctrine/lexer/src/AbstractLexer.php +++ /dev/null @@ -1,328 +0,0 @@ -> - */ - private array $tokens = []; - - /** - * Current lexer position in input string. - */ - private int $position = 0; - - /** - * Current peek of current lexer position. - */ - private int $peek = 0; - - /** - * The next token in the input. - * - * @var Token|null - */ - public Token|null $lookahead; - - /** - * The last matched/seen token. - * - * @var Token|null - */ - public Token|null $token; - - /** - * Composed regex for input parsing. - * - * @var non-empty-string|null - */ - private string|null $regex = null; - - /** - * Sets the input data to be tokenized. - * - * The Lexer is immediately reset and the new input tokenized. - * Any unprocessed tokens from any previous input are lost. - * - * @param string $input The input to be tokenized. - * - * @return void - */ - public function setInput(string $input) - { - $this->input = $input; - $this->tokens = []; - - $this->reset(); - $this->scan($input); - } - - /** - * Resets the lexer. - * - * @return void - */ - public function reset() - { - $this->lookahead = null; - $this->token = null; - $this->peek = 0; - $this->position = 0; - } - - /** - * Resets the peek pointer to 0. - * - * @return void - */ - public function resetPeek() - { - $this->peek = 0; - } - - /** - * Resets the lexer position on the input to the given position. - * - * @param int $position Position to place the lexical scanner. - * - * @return void - */ - public function resetPosition(int $position = 0) - { - $this->position = $position; - } - - /** - * Retrieve the original lexer's input until a given position. - * - * @return string - */ - public function getInputUntilPosition(int $position) - { - return substr($this->input, 0, $position); - } - - /** - * Checks whether a given token matches the current lookahead. - * - * @param T $type - * - * @return bool - * - * @psalm-assert-if-true !=null $this->lookahead - */ - public function isNextToken(int|string|UnitEnum $type) - { - return $this->lookahead !== null && $this->lookahead->isA($type); - } - - /** - * Checks whether any of the given tokens matches the current lookahead. - * - * @param list $types - * - * @return bool - * - * @psalm-assert-if-true !=null $this->lookahead - */ - public function isNextTokenAny(array $types) - { - return $this->lookahead !== null && $this->lookahead->isA(...$types); - } - - /** - * Moves to the next token in the input string. - * - * @return bool - * - * @psalm-assert-if-true !null $this->lookahead - */ - public function moveNext() - { - $this->peek = 0; - $this->token = $this->lookahead; - $this->lookahead = isset($this->tokens[$this->position]) - ? $this->tokens[$this->position++] : null; - - return $this->lookahead !== null; - } - - /** - * Tells the lexer to skip input tokens until it sees a token with the given value. - * - * @param T $type The token type to skip until. - * - * @return void - */ - public function skipUntil(int|string|UnitEnum $type) - { - while ($this->lookahead !== null && ! $this->lookahead->isA($type)) { - $this->moveNext(); - } - } - - /** - * Checks if given value is identical to the given token. - * - * @return bool - */ - public function isA(string $value, int|string|UnitEnum $token) - { - return $this->getType($value) === $token; - } - - /** - * Moves the lookahead token forward. - * - * @return Token|null The next token or NULL if there are no more tokens ahead. - */ - public function peek() - { - if (isset($this->tokens[$this->position + $this->peek])) { - return $this->tokens[$this->position + $this->peek++]; - } - - return null; - } - - /** - * Peeks at the next token, returns it and immediately resets the peek. - * - * @return Token|null The next token or NULL if there are no more tokens ahead. - */ - public function glimpse() - { - $peek = $this->peek(); - $this->peek = 0; - - return $peek; - } - - /** - * Scans the input string for tokens. - * - * @param string $input A query string. - * - * @return void - */ - protected function scan(string $input) - { - if (! isset($this->regex)) { - $this->regex = sprintf( - '/(%s)|%s/%s', - implode(')|(', $this->getCatchablePatterns()), - implode('|', $this->getNonCatchablePatterns()), - $this->getModifiers(), - ); - } - - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - $matches = preg_split($this->regex, $input, -1, $flags); - - if ($matches === false) { - // Work around https://bugs.php.net/78122 - $matches = [[$input, 0]]; - } - - foreach ($matches as $match) { - // Must remain before 'value' assignment since it can change content - $firstMatch = $match[0]; - $type = $this->getType($firstMatch); - - $this->tokens[] = new Token( - $firstMatch, - $type, - $match[1], - ); - } - } - - /** - * Gets the literal for a given token. - * - * @param T $token - * - * @return int|string - */ - public function getLiteral(int|string|UnitEnum $token) - { - if ($token instanceof UnitEnum) { - return $token::class . '::' . $token->name; - } - - $className = static::class; - - $reflClass = new ReflectionClass($className); - $constants = $reflClass->getConstants(); - - foreach ($constants as $name => $value) { - if ($value === $token) { - return $className . '::' . $name; - } - } - - return $token; - } - - /** - * Regex modifiers - * - * @return string - */ - protected function getModifiers() - { - return 'iu'; - } - - /** - * Lexical catchable patterns. - * - * @return string[] - */ - abstract protected function getCatchablePatterns(); - - /** - * Lexical non-catchable patterns. - * - * @return string[] - */ - abstract protected function getNonCatchablePatterns(); - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @return T|null - * - * @param-out V $value - */ - abstract protected function getType(string &$value); -} diff --git a/vendor/doctrine/lexer/src/Token.php b/vendor/doctrine/lexer/src/Token.php deleted file mode 100644 index b6df694..0000000 --- a/vendor/doctrine/lexer/src/Token.php +++ /dev/null @@ -1,56 +0,0 @@ -value = $value; - $this->type = $type; - $this->position = $position; - } - - /** @param T ...$types */ - public function isA(...$types): bool - { - return in_array($this->type, $types, true); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/nikic/php-parser/lib/PhpParser/Builder.php deleted file mode 100644 index d6aa124..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder.php +++ /dev/null @@ -1,12 +0,0 @@ -name = BuilderHelpers::normalizeName($name); - $this->type = $type; - } - - /** - * Sets alias for used name. - * - * @param string $alias Alias to use (last component of full name by default) - * - * @return $this The builder instance (for fluid interface) - */ - public function as(string $alias) { - $this->alias = $alias; - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Use_ The built node - */ - public function getNode(): Node { - return new Stmt\Use_([ - new Node\UseItem($this->name, $this->alias) - ], $this->type); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php deleted file mode 100644 index bb3e914..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +++ /dev/null @@ -1,6 +0,0 @@ - \T_PUBLIC_SET, - \T_PROTECTED => \T_PROTECTED_SET, - \T_PRIVATE => \T_PRIVATE_SET, - ]; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if (isset($map[$token->id]) && $i + 3 < $c && $tokens[$i + 1]->text === '(' && - $tokens[$i + 2]->id === \T_STRING && \strtolower($tokens[$i + 2]->text) === 'set' && - $tokens[$i + 3]->text === ')' && - $this->isKeywordContext($tokens, $i) - ) { - array_splice($tokens, $i, 4, [ - new Token( - $map[$token->id], $token->text . '(' . $tokens[$i + 2]->text . ')', - $token->line, $token->pos), - ]); - $c -= 3; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - $reverseMap = [ - \T_PUBLIC_SET => \T_PUBLIC, - \T_PROTECTED_SET => \T_PROTECTED, - \T_PRIVATE_SET => \T_PRIVATE, - ]; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if (isset($reverseMap[$token->id]) && - \preg_match('/(public|protected|private)\((set)\)/i', $token->text, $matches) - ) { - [, $modifier, $set] = $matches; - $modifierLen = \strlen($modifier); - array_splice($tokens, $i, 1, [ - new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), - new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), - new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), - new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4), - ]); - $i += 3; - $c += 3; - } - } - - return $tokens; - } - - /** @param Token[] $tokens */ - protected function isKeywordContext(array $tokens, int $pos): bool { - $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); - if ($prevToken === null) { - return false; - } - return $prevToken->id !== \T_OBJECT_OPERATOR - && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; - } - - /** @param Token[] $tokens */ - private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { - for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i]->id === T_WHITESPACE) { - continue; - } - - return $tokens[$i]; - } - - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php deleted file mode 100644 index 2c12f33..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ /dev/null @@ -1,49 +0,0 @@ -text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { - array_splice($tokens, $i, 2, [ - new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), - ]); - $c--; - continue; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // TODO - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - $pos = 0; - while (false !== $pos = strpos($code, '#[', $pos)) { - // Replace #[ with %[ - $code[$pos] = '%'; - $patches[] = [$pos, 'replace', '#']; - $pos += 2; - } - return $code; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php deleted file mode 100644 index 5418f52..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ /dev/null @@ -1,26 +0,0 @@ -id === \T_WHITESPACE - && $tokens[$pos + 2]->id === \T_STRING; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php deleted file mode 100644 index 9cadf42..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ /dev/null @@ -1,45 +0,0 @@ -id == \T_LNUMBER && $token->text === '0' && - isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && - preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) - ) { - $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); - array_splice($tokens, $i, 2, [ - new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), - ]); - $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; - } - - public function reverseEmulate(string $code, array $tokens): array { - // Explicit octals were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php deleted file mode 100644 index 0fa5fbc..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ /dev/null @@ -1,19 +0,0 @@ -') !== false; - } - - public function emulate(string $code, array $tokens): array { - // We need to manually iterate and manage a count because we'll change - // the tokens array on the way - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { - array_splice($tokens, $i, 2, [ - new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), - ]); - $c--; - continue; - } - - // Handle ?-> inside encapsed string. - if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1]->id === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) - ) { - $replacement = [ - new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), - new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), - ]; - $matchLen = \strlen($matches[0]); - if ($matchLen !== \strlen($token->text)) { - $replacement[] = new Token( - \T_ENCAPSED_AND_WHITESPACE, - \substr($token->text, $matchLen), - $token->line, $token->pos + $matchLen - ); - } - array_splice($tokens, $i, 1, $replacement); - $c += \count($replacement) - 1; - continue; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // ?-> was not valid code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php deleted file mode 100644 index b561692..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php +++ /dev/null @@ -1,45 +0,0 @@ -') !== false; - } - - public function emulate(string $code, array $tokens): array { - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->text === '|' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '>') { - array_splice($tokens, $i, 2, [ - new Token(\T_PIPE, '|>', $token->line, $token->pos), - ]); - $c--; - } - } - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->id === \T_PIPE) { - array_splice($tokens, $i, 1, [ - new Token(\ord('|'), '|', $token->line, $token->pos), - new Token(\ord('>'), '>', $token->line, $token->pos + 1), - ]); - $i++; - $c++; - } - } - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php deleted file mode 100644 index 71b7fc2..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php +++ /dev/null @@ -1,19 +0,0 @@ -text === '(' || - ($tokens[$pos + 1]->id === \T_WHITESPACE && - isset($tokens[$pos + 2]) && - $tokens[$pos + 2]->text === '('))); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php deleted file mode 100644 index 851b5c4..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ /dev/null @@ -1,37 +0,0 @@ -emulator = $emulator; - } - - public function getPhpVersion(): PhpVersion { - return $this->emulator->getPhpVersion(); - } - - public function isEmulationNeeded(string $code): bool { - return $this->emulator->isEmulationNeeded($code); - } - - public function emulate(string $code, array $tokens): array { - return $this->emulator->reverseEmulate($code, $tokens); - } - - public function reverseEmulate(string $code, array $tokens): array { - return $this->emulator->emulate($code, $tokens); - } - - public function preprocessCode(string $code, array &$patches): string { - return $code; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php deleted file mode 100644 index fec2f19..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ /dev/null @@ -1,30 +0,0 @@ - 'public', - self::PROTECTED => 'protected', - self::PRIVATE => 'private', - self::STATIC => 'static', - self::ABSTRACT => 'abstract', - self::FINAL => 'final', - self::READONLY => 'readonly', - self::PUBLIC_SET => 'public(set)', - self::PROTECTED_SET => 'protected(set)', - self::PRIVATE_SET => 'private(set)', - ]; - - public static function toString(int $modifier): string { - if (!isset(self::TO_STRING_MAP[$modifier])) { - throw new \InvalidArgumentException("Unknown modifier $modifier"); - } - return self::TO_STRING_MAP[$modifier]; - } - - private static function isValidModifier(int $modifier): bool { - $isPow2 = ($modifier & ($modifier - 1)) == 0 && $modifier != 0; - return $isPow2 && $modifier <= self::PRIVATE_SET; - } - - /** - * @internal - */ - public static function verifyClassModifier(int $a, int $b): void { - assert(self::isValidModifier($b)); - if (($a & $b) != 0) { - throw new Error( - 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class'); - } - } - - /** - * @internal - */ - public static function verifyModifier(int $a, int $b): void { - assert(self::isValidModifier($b)); - if (($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) || - ($a & Modifiers::VISIBILITY_SET_MASK && $b & Modifiers::VISIBILITY_SET_MASK) - ) { - throw new Error('Multiple access type modifiers are not allowed'); - } - - if (($a & $b) != 0) { - throw new Error( - 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class member'); - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php deleted file mode 100644 index 05a5e5e..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +++ /dev/null @@ -1,13 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $items = [], array $attributes = []) { - $this->attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames(): array { - return ['items']; - } - - public function getType(): string { - return 'Expr_Array'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php deleted file mode 100644 index 4f3623f..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ /dev/null @@ -1,11 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Greater'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php deleted file mode 100644 index 4d440b1..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ /dev/null @@ -1,15 +0,0 @@ -='; - } - - public function getType(): string { - return 'Expr_BinaryOp_GreaterOrEqual'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php deleted file mode 100644 index e25d17c..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Pipe'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php deleted file mode 100644 index fe34b84..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +++ /dev/null @@ -1,15 +0,0 @@ ->'; - } - - public function getType(): string { - return 'Expr_BinaryOp_ShiftRight'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php deleted file mode 100644 index 01e9b23..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Spaceship'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php deleted file mode 100644 index 471cb82..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +++ /dev/null @@ -1,11 +0,0 @@ - */ - public ?array $conds; - public Expr $body; - - /** - * @param null|list $conds - */ - public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { - $this->conds = $conds; - $this->body = $body; - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return ['conds', 'body']; - } - - public function getType(): string { - return 'MatchArm'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php deleted file mode 100644 index 3df2572..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +++ /dev/null @@ -1,6 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return []; - } - - /** - * Get name of magic constant. - * - * @return string Name of magic constant - */ - abstract public function getName(): string; -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php deleted file mode 100644 index 732ed14..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ /dev/null @@ -1,15 +0,0 @@ - Escaped character to its decoded value */ - protected static array $replacements = [ - '\\' => '\\', - '$' => '$', - 'n' => "\n", - 'r' => "\r", - 't' => "\t", - 'f' => "\f", - 'v' => "\v", - 'e' => "\x1B", - ]; - - /** - * Constructs a string scalar node. - * - * @param string $value Value of the string - * @param array $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - /** - * @param array $attributes - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - */ - public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { - $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) - ? Scalar\String_::KIND_SINGLE_QUOTED - : Scalar\String_::KIND_DOUBLE_QUOTED; - - $attributes['rawValue'] = $str; - - $string = self::parse($str, $parseUnicodeEscape); - - return new self($string, $attributes); - } - - /** - * @internal - * - * Parses a string token. - * - * @param string $str String token content - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string The parsed string - */ - public static function parse(string $str, bool $parseUnicodeEscape = true): string { - $bLength = 0; - if ('b' === $str[0] || 'B' === $str[0]) { - $bLength = 1; - } - - if ('\'' === $str[$bLength]) { - return str_replace( - ['\\\\', '\\\''], - ['\\', '\''], - substr($str, $bLength + 1, -1) - ); - } else { - return self::parseEscapeSequences( - substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape - ); - } - } - - /** - * @internal - * - * Parses escape sequences in strings (all string types apart from single quoted). - * - * @param string $str String without quotes - * @param null|string $quote Quote type - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string String with escape sequences parsed - */ - public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { - if (null !== $quote) { - $str = str_replace('\\' . $quote, $quote, $str); - } - - $extra = ''; - if ($parseUnicodeEscape) { - $extra = '|u\{([0-9a-fA-F]+)\}'; - } - - return preg_replace_callback( - '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function ($matches) { - $str = $matches[1]; - - if (isset(self::$replacements[$str])) { - return self::$replacements[$str]; - } - if ('x' === $str[0] || 'X' === $str[0]) { - return chr(hexdec(substr($str, 1))); - } - if ('u' === $str[0]) { - $dec = hexdec($matches[2]); - // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. - return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); - } else { - return chr(octdec($str)); - } - }, - $str - ); - } - - /** - * Converts a Unicode code point to its UTF-8 encoded representation. - * - * @param int $num Code point - * - * @return string UTF-8 representation of code point - */ - private static function codePointToUtf8(int $num): string { - if ($num <= 0x7F) { - return chr($num); - } - if ($num <= 0x7FF) { - return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); - } - if ($num <= 0xFFFF) { - return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); - } - if ($num <= 0x1FFFFF) { - return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) - . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); - } - throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); - } - - public function getType(): string { - return 'Scalar_String'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php deleted file mode 100644 index 481d31a..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +++ /dev/null @@ -1,8 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Stmt_Label'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php deleted file mode 100644 index 3acfa46..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +++ /dev/null @@ -1,16 +0,0 @@ -setAttribute('origNode', $origNode); - return $node; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php deleted file mode 100644 index 6fb15cc..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ /dev/null @@ -1,24 +0,0 @@ -'", - "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_PUBLIC_SET", - "T_PROTECTED_SET", - "T_PRIVATE_SET", - "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_PROPERTY_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 array $tokenToSymbol = array( - 0, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 57, 171, 173, 172, 56, 173, 173, - 166, 167, 54, 51, 9, 52, 53, 55, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 32, 164, - 45, 17, 47, 31, 69, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 71, 173, 165, 37, 173, 170, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 168, 36, 169, 59, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 1, 2, 3, 4, - 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, - 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, - 41, 42, 43, 44, 46, 48, 49, 50, 58, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 70, 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, 159, 160, 161, 162, - 163 - ); - - protected array $action = array( - 133, 134, 135, 575, 136, 137, 1049, 766, 767, 768, - 138, 41, 850, -341, 495, 1390,-32766,-32766,-32766, 1008, - 841, 1145, 1146, 1147, 1141, 1140, 1139, 1148, 1142, 1143, - 1144,-32766,-32766,-32766, -195, 760, 759,-32766, -194,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 0,-32766, 3, 4, 769, 1145, 1146, 1147, 1141, - 1140, 1139, 1148, 1142, 1143, 1144, 388, 389, 448, 272, - 53, 391, 773, 774, 775, 776, 433, 5, 434, 571, - 337, 39, 254, 29, 298, 830, 777, 778, 779, 780, - 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, - 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, - 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, - 577, -382, 306, -382, 794, 795, 578, 579, 244, 818, - 816, 817, 829, 813, 814, 1313, 38, 580, 581, 812, - 582, 583, 584, 585, 1325, 586, 587, 481, 482, -628, - 496, 1009, 815, 588, 589, 140, 139, -628, 133, 134, - 135, 575, 136, 137, 1085, 766, 767, 768, 138, 41, - -32766, -341, 1046, 1041, 1040, 1039, 1045, 1042, 1043, 1044, - -32766,-32766,-32766,-32767,-32767,-32767,-32767, 106, 107, 108, - 109, 110, -195, 760, 759, 1058, -194,-32766,-32766,-32766, - 149,-32766, 852,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 936, 303, 257, 769,-32766,-32766,-32766, 850,-32766, 297, - -32766,-32766,-32766,-32766,-32766, 1371, 1355, 272, 53, 391, - 773, 774, 775, 776, -625,-32766, 434,-32766,-32766,-32766, - -32766, 730, -625, 830, 777, 778, 779, 780, 781, 782, - 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, - 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, - 792, 793, 364, 833, 834, 835, 836, 837, 577, -579, - -275, 317, 794, 795, 578, 579, -577, 818, 816, 817, - 829, 813, 814, 957, 926, 580, 581, 812, 582, 583, - 584, 585, 144, 586, 587, 841, 336,-32766,-32766,-32766, - 815, 588, 589, -628, 139, -628, 133, 134, 135, 575, - 136, 137, 1082, 766, 767, 768, 138, 41,-32766, 1375, - -32766,-32766,-32766,-32766,-32766,-32766,-32766, 1374, 629, 388, - 389,-32766,-32766,-32766,-32766,-32766, -579, -579, 1081, 433, - 321, 760, 759, -577, -577,-32766, 1293,-32766,-32766, 111, - 112, 113, -579, 282, 843, 851, 623, 1400, 936, -577, - 1401, 769, 333, 938, -585, 114, -579, 725, 294, 298, - 1119, -584, 349, -577, 752, 272, 53, 391, 773, 774, - 775, 776, 145, 86, 434, 306, 336, 336, -625, 731, - -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, - 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, - 364, 833, 834, 835, 836, 837, 577, -576, 850, -578, - 794, 795, 578, 579, 845, 818, 816, 817, 829, 813, - 814, 727, 926, 580, 581, 812, 582, 583, 584, 585, - 740, 586, 587, 243, 1055,-32766,-32766, -85, 815, 588, - 589, 878, 152, 879, 133, 134, 135, 575, 136, 137, - 1087, 766, 767, 768, 138, 41, 350, 961, 960, 1058, - 1058, 1058,-32766,-32766,-32766, 841,-32766, 131, 977, 978, - 400, 1055, 10, 979, -576, -576, -578, -578, 378, 760, - 759, 936, 973, 290, 297, 297,-32766, 846, 936, 154, - -576, 79, -578, 382, 849, 936, 1058, 336, 878, 769, - 879, 938, -583, -85, -576, 725, -578, 959, 108, 109, - 110, 1058, 732, 272, 53, 391, 773, 774, 775, 776, - 290, 155, 434, 470, 471, 472, 735, 760, 759, 830, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, - 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, - 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, - 834, 835, 836, 837, 577, 926, 434, 847, 794, 795, - 578, 579, 926, 818, 816, 817, 829, 813, 814, 926, - 398, 580, 581, 812, 582, 583, 584, 585, 452, 586, - 587, 157, 87, 88, 89, 453, 815, 588, 589, 454, - 152, 790, 761, 762, 763, 764, 765, 158, 766, 767, - 768, 803, 804, 40, 27, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 1134, - 282, 1055, 455,-32766, 994, 1288, 1287, 1289, 725, 390, - 389, 938, 114, 856, 1120, 725, 769, 159, 938, 433, - 672, 23, 725, 1118, 691, 692, 1058,-32766, 153, 416, - 770, 771, 772, 773, 774, 775, 776, -78, -619, 839, - -619, -581, 386, 387, 392, 393, 830, 777, 778, 779, - 780, 781, 782, 783, 784, 785, 786, 806, 828, 807, - 808, 809, 810, 798, 799, 800, 827, 801, 802, 787, - 788, 789, 791, 792, 793, 832, 833, 834, 835, 836, - 837, 838, 161, 663, 664, 794, 795, 796, 797, 36, - 818, 816, 817, 829, 813, 814, -58, -57, 805, 811, - 812, 819, 820, 822, 821, -87, 823, 824, -581, -581, - 128, 129, 141, 815, 826, 825, 54, 55, 56, 57, - 527, 58, 59, 142, -110, 148, 162, 60, 61, -110, - 62, -110, 936, 163, 164, 165, 313, 166, -581, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - 1293, -84, 953, -78, -73, -72, -71, -70, -69, -68, - -67, -66, -65, 742, -46, 63, 64, -18, -575, 1286, - 146, 65, 51, 66, 251, 252, 67, 68, 69, 70, - 71, 72, 73, 74, 281, 31, 273, 47, 450, 528, - 291, -357, 741, 1319, 1320, 529, 744, 850, 935, 151, - 295, 1317, 45, 22, 530, 1284, 531, -309, 532, -305, - 533, 286, 936, 534, 535, 287, 926, 292, 48, 49, - 456, 385, 384, 293, 50, 536, 342, 296, 282, 1057, - 376, 348, 850, 299, 300, -575, -575, 1279, 114, 307, - 308, 701, 538, 539, 540, 150, 841,-32766, 1288, 1287, - 1289, -575, 850, 294, 542, 543, 1402, 1305, 1306, 1307, - 1308, 1310, 1302, 1303, 305, -575, 716, -110, -110, 130, - 1309, 1304, -110, 593, 1288, 1287, 1289, 306, 13, 673, - 75, -110, 1152, 678, 331, 332, 336, -154, -154, -154, - -32766, 718, 694, -4, 936, 938, 926, 314, 478, 725, - 506, 1324, -154, 705, -154, 679, -154, 695, -154, 974, - 1326, -541, 306, 312, 311, 79, 849, 661, 383, 43, - 320, 336, 37, 1252, 0, 0, 52, 0, 0, 977, - 978, 0, 760, 759, 537,-32766, 0, 0, 0, 706, - 0, 0, 912, 973, -110, -110, -110, 35, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, -531, 11, 707, 708, 31, 274, 30, 380, 955, - 599, -613, 306, 627, 0, 938, 0, 850, 926, 725, - -154, 1317, 1288, 1287, 1289, 44, -612, 749, 290, 750, - 1194, 1196, 869, 309, 310, 917, 1018, 995, 1002, 992, - 383, -575, 446, 1003, 915, 990, 1123, 304, 1126, 381, - 1127, 977, 978, 1124, 1125, 1131, 537, 1279, 1314, 861, - 330, 760, 759, 132, 541, 973, -110, -110, -110, 1341, - 1359, 1393, 1293, 666, 542, 543, -611, 1305, 1306, 1307, - 1308, 1310, 1302, 1303, -585, -584, -583, -582, 21, -525, - 1309, 1304, 1, 32, 760, 759, 33, 938,-32766, -278, - 77, 725, -4, -16, 1286, 332, 336, 42, -575, -575, - 46,-32766,-32766,-32766, 76,-32766, 80,-32766, 81,-32766, - 82, 83,-32766, 84, -575, 85, 147,-32766,-32766,-32766, - 156,-32766, 160,-32766,-32766, 249, 379, 1286, -575,-32766, - 430, 31, 273, 338,-32766,-32766,-32766, 365,-32766, 366, - -32766,-32766,-32766, 850, 850,-32766, 367, 1317, 368, 369, - -32766,-32766,-32766, 370, 371, 372,-32766,-32766, 373, 374, - 375, 377,-32766, 430, 447, 570, 31, 274, -276, -275, - 15, 16, 78, 17,-32766, 18, 20, 414, 850, -110, - -110, 497, 1317, 1279, -110, 498, 505, 508, 509, 510, - 511, 515, 516, -110, 517, 525, 604, 711, 1088, 1084, - 1234, 543,-32766, 1305, 1306, 1307, 1308, 1310, 1302, 1303, - 1315, 1086, 1083, -50, 1064, 1274, 1309, 1304, 1279, 1060, - -280, -102, 14, 19, 306, 24, 77, 79, 415, 303, - 413, 332, 336, 336, 618, 624, 543, 652, 1305, 1306, - 1307, 1308, 1310, 1302, 1303, 717, 143, 1238, 1292, 1235, - 1372, 1309, 1304, 726, 729, 733,-32766, 734, 736, 737, - 738, 77, 1286, 419, 739, 743, 332, 336, 728,-32766, - -32766,-32766, 746,-32766, 913,-32766, 1397,-32766, 1399, 872, - -32766, 871, 967, 1010, 1398,-32766,-32766,-32766, 966,-32766, - 964,-32766,-32766, 965, 968, 1286, 1267,-32766, 430, 946, - 956, 944,-32766,-32766,-32766, 1000,-32766, 1001,-32766,-32766, - -32766, 650, 1396,-32766, 1353, 1342, 1360, 1369,-32766,-32766, - -32766, 1318,-32766, 336,-32766,-32766, 936, 0, 1286, 0, - -32766, 430, 0, 0, 0,-32766,-32766,-32766, 0,-32766, - 0,-32766,-32766,-32766, 0, 0,-32766, 0, 0, 936, - 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766, 0, - 0, 1286, 0,-32766, 430, 0, 0, 0,-32766,-32766, - -32766, 0,-32766, 0,-32766,-32766,-32766, 0, 0,-32766, - 0, 0, 0, 501,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0, 0, 1286, 606,-32766, 430, 0, 0, - 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, - 926, 0,-32766, 2, 0, 0, 0,-32766,-32766,-32766, - 0, 0, 0,-32766,-32766, 0, -253, -253, -253,-32766, - 430, 0, 383, 926, 0, 0, 0, 0, 0, 0, - 0,-32766, 0, 977, 978, 0, 0, 0, 537, -252, - -252, -252, 0, 0, 0, 383, 912, 973, -110, -110, - -110, 0, 0, 0, 0, 0, 977, 978, 0, 0, - 0, 537, 0, 0, 0, 0, 0, 0, 0, 912, - 973, -110, -110, -110,-32766, 0, 0, 0, 0, 938, - 1286, 0, 0, 725, -253, 0, 0,-32766,-32766,-32766, - 0,-32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, - 0, 0, 938,-32766,-32766,-32766, 725, -252, 0,-32766, - -32766, 0, 0, 0, 0,-32766, 430, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,-32766 - ); - - protected array $actionCheck = array( - 3, 4, 5, 6, 7, 8, 1, 10, 11, 12, - 13, 14, 83, 9, 32, 86, 10, 11, 12, 32, - 81, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 10, 11, 12, 9, 38, 39, 31, 9, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 0, 31, 9, 9, 58, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 107, 108, 109, 72, - 73, 74, 75, 76, 77, 78, 117, 9, 81, 86, - 71, 152, 153, 9, 31, 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, 107, 163, 109, 127, 128, 129, 130, 15, 132, - 133, 134, 135, 136, 137, 1, 9, 140, 141, 142, - 143, 144, 145, 146, 151, 148, 149, 138, 139, 1, - 168, 164, 155, 156, 157, 9, 159, 9, 3, 4, - 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, - 117, 167, 119, 120, 121, 122, 123, 124, 125, 126, - 10, 11, 12, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 167, 38, 39, 142, 167, 10, 11, 12, - 9, 31, 1, 33, 34, 35, 36, 37, 38, 39, - 1, 167, 9, 58, 10, 11, 12, 83, 31, 166, - 33, 34, 35, 36, 37, 1, 1, 72, 73, 74, - 75, 76, 77, 78, 1, 31, 81, 33, 34, 35, - 36, 32, 9, 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, 71, - 167, 9, 127, 128, 129, 130, 71, 132, 133, 134, - 135, 136, 137, 1, 85, 140, 141, 142, 143, 144, - 145, 146, 168, 148, 149, 81, 172, 10, 11, 12, - 155, 156, 157, 165, 159, 167, 3, 4, 5, 6, - 7, 8, 167, 10, 11, 12, 13, 14, 31, 1, - 33, 34, 35, 10, 10, 11, 12, 9, 52, 107, - 108, 10, 11, 12, 10, 11, 138, 139, 1, 117, - 9, 38, 39, 138, 139, 31, 1, 33, 34, 54, - 55, 56, 154, 58, 81, 164, 1, 81, 1, 154, - 84, 58, 9, 164, 166, 70, 168, 168, 31, 31, - 164, 166, 9, 168, 168, 72, 73, 74, 75, 76, - 77, 78, 168, 168, 81, 163, 172, 172, 165, 32, - 167, 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, 71, 83, 71, - 127, 128, 129, 130, 161, 132, 133, 134, 135, 136, - 137, 168, 85, 140, 141, 142, 143, 144, 145, 146, - 168, 148, 149, 98, 117, 117, 117, 32, 155, 156, - 157, 107, 159, 109, 3, 4, 5, 6, 7, 8, - 167, 10, 11, 12, 13, 14, 9, 73, 74, 142, - 142, 142, 10, 11, 12, 81, 141, 15, 118, 119, - 107, 117, 109, 123, 138, 139, 138, 139, 9, 38, - 39, 1, 132, 166, 166, 166, 117, 81, 1, 15, - 154, 166, 154, 9, 160, 1, 142, 172, 107, 58, - 109, 164, 166, 98, 168, 168, 168, 123, 51, 52, - 53, 142, 32, 72, 73, 74, 75, 76, 77, 78, - 166, 15, 81, 133, 134, 135, 32, 38, 39, 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, 85, 81, 161, 127, 128, - 129, 130, 85, 132, 133, 134, 135, 136, 137, 85, - 9, 140, 141, 142, 143, 144, 145, 146, 9, 148, - 149, 15, 10, 11, 12, 9, 155, 156, 157, 9, - 159, 3, 4, 5, 6, 7, 8, 15, 10, 11, - 12, 13, 14, 31, 102, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 127, - 58, 117, 9, 117, 164, 160, 161, 162, 168, 107, - 108, 164, 70, 9, 169, 168, 58, 15, 164, 117, - 76, 77, 168, 1, 76, 77, 142, 141, 102, 103, - 72, 73, 74, 75, 76, 77, 78, 17, 165, 81, - 167, 71, 107, 108, 107, 108, 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, 15, 112, 113, 127, 128, 129, 130, 15, - 132, 133, 134, 135, 136, 137, 17, 17, 140, 141, - 142, 143, 144, 145, 146, 32, 148, 149, 138, 139, - 17, 17, 17, 155, 156, 157, 2, 3, 4, 5, - 6, 7, 8, 17, 102, 17, 17, 13, 14, 107, - 16, 109, 1, 17, 17, 17, 114, 17, 168, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 1, 32, 39, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 51, 52, 32, 71, 81, - 32, 57, 71, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 32, 71, 72, 73, 74, 75, - 32, 169, 32, 79, 80, 81, 32, 83, 32, 32, - 38, 87, 88, 89, 90, 117, 92, 36, 94, 36, - 96, 36, 1, 99, 100, 36, 85, 36, 104, 105, - 106, 107, 108, 36, 110, 111, 36, 38, 58, 141, - 116, 117, 83, 38, 38, 138, 139, 123, 70, 138, - 139, 78, 128, 129, 130, 71, 81, 86, 160, 161, - 162, 154, 83, 31, 140, 141, 84, 143, 144, 145, - 146, 147, 148, 149, 150, 168, 81, 118, 119, 168, - 156, 157, 123, 90, 160, 161, 162, 163, 98, 91, - 166, 132, 83, 97, 170, 171, 172, 76, 77, 78, - 141, 93, 95, 0, 1, 164, 85, 115, 98, 168, - 98, 151, 91, 81, 93, 101, 95, 101, 97, 132, - 151, 154, 163, 137, 136, 166, 160, 114, 107, 164, - 136, 172, 168, 170, -1, -1, 71, -1, -1, 118, - 119, -1, 38, 39, 123, 141, -1, -1, -1, 117, - -1, -1, 131, 132, 133, 134, 135, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 154, 154, 141, 142, 71, 72, 154, 154, 159, - 158, 166, 163, 158, -1, 164, -1, 83, 85, 168, - 169, 87, 160, 161, 162, 164, 166, 164, 166, 164, - 60, 61, 164, 138, 139, 164, 164, 164, 164, 164, - 107, 71, 109, 164, 164, 164, 164, 114, 164, 154, - 164, 118, 119, 164, 164, 164, 123, 123, 165, 165, - 168, 38, 39, 168, 131, 132, 133, 134, 135, 165, - 165, 165, 1, 165, 140, 141, 166, 143, 144, 145, - 146, 147, 148, 149, 166, 166, 166, 166, 155, 166, - 156, 157, 166, 166, 38, 39, 166, 164, 75, 167, - 166, 168, 169, 32, 81, 171, 172, 166, 138, 139, - 166, 88, 89, 90, 166, 92, 166, 94, 166, 96, - 166, 166, 99, 166, 154, 166, 166, 104, 105, 106, - 166, 75, 166, 110, 111, 166, 168, 81, 168, 116, - 117, 71, 72, 166, 88, 89, 90, 166, 92, 166, - 94, 128, 96, 83, 83, 99, 166, 87, 166, 166, - 104, 105, 106, 166, 166, 166, 110, 111, 166, 166, - 166, 166, 116, 117, 166, 166, 71, 72, 167, 167, - 167, 167, 159, 167, 128, 167, 167, 167, 83, 118, - 119, 167, 87, 123, 123, 167, 167, 167, 167, 167, - 167, 167, 167, 132, 167, 167, 167, 167, 167, 167, - 167, 141, 141, 143, 144, 145, 146, 147, 148, 149, - 167, 167, 167, 32, 167, 167, 156, 157, 123, 167, - 167, 167, 167, 167, 163, 167, 166, 166, 169, 167, - 167, 171, 172, 172, 167, 167, 141, 167, 143, 144, - 145, 146, 147, 148, 149, 167, 32, 167, 167, 167, - 167, 156, 157, 168, 168, 168, 75, 168, 168, 168, - 168, 166, 81, 169, 168, 168, 171, 172, 168, 88, - 89, 90, 169, 92, 169, 94, 169, 96, 169, 169, - 99, 169, 169, 169, 169, 104, 105, 106, 169, 75, - 169, 110, 111, 169, 169, 81, 169, 116, 117, 169, - 169, 169, 88, 89, 90, 169, 92, 169, 94, 128, - 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, - 106, 171, 75, 172, 110, 111, 1, -1, 81, -1, - 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, - -1, 94, 128, 96, -1, -1, 99, -1, -1, 1, - -1, 104, 105, 106, -1, 75, -1, 110, 111, -1, - -1, 81, -1, 116, 117, -1, -1, -1, 88, 89, - 90, -1, 92, -1, 94, 128, 96, -1, -1, 99, - -1, -1, -1, 103, 104, 105, 106, -1, 75, -1, - 110, 111, -1, -1, 81, 82, 116, 117, -1, -1, - -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, - 85, -1, 99, 166, -1, -1, -1, 104, 105, 106, - -1, -1, -1, 110, 111, -1, 101, 102, 103, 116, - 117, -1, 107, 85, -1, -1, -1, -1, -1, -1, - -1, 128, -1, 118, 119, -1, -1, -1, 123, 101, - 102, 103, -1, -1, -1, 107, 131, 132, 133, 134, - 135, -1, -1, -1, -1, -1, 118, 119, -1, -1, - -1, 123, -1, -1, -1, -1, -1, -1, -1, 131, - 132, 133, 134, 135, 75, -1, -1, -1, -1, 164, - 81, -1, -1, 168, 169, -1, -1, 88, 89, 90, - -1, 92, -1, 94, -1, 96, -1, -1, 99, -1, - -1, -1, 164, 104, 105, 106, 168, 169, -1, 110, - 111, -1, -1, -1, -1, 116, 117, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 128 - ); - - protected array $actionBase = array( - 0, 155, -3, 313, 471, 471, 881, 963, 1365, 1388, - 892, 134, 515, -61, 367, 524, 524, 801, 524, 209, - 510, 283, 517, 517, 517, 920, 855, 628, 628, 855, - 628, 1053, 1053, 1053, 1053, 1086, 1086, 1320, 1320, 1353, - 1254, 1221, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, - 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 201, -13, 44, - 365, 744, 1102, 1120, 1107, 1121, 1096, 1095, 1103, 1108, - 1122, 1183, 1185, 837, 1186, 1187, 1182, 1188, 1110, 938, - 1098, 1118, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 323, 482, 334, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 964, 964, 21, 21, 21, 324, 1135, - 1100, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 297, - 204, 1000, 187, 170, 170, 6, 6, 6, 6, 6, - 692, 53, 1101, 819, 819, 138, 138, 138, 138, 542, - 14, 347, 355, -41, 348, 232, 384, 384, 487, 487, - 554, 554, 349, 349, 554, 554, 554, 399, 399, 399, - 399, 208, 215, 366, 364, -7, 864, 224, 224, 224, - 224, 864, 864, 864, 864, 829, 1190, 864, 1011, 1027, - 864, 864, 368, 767, 767, 925, 305, 305, 305, 767, - 421, -71, -71, 421, 380, -71, 225, 286, 556, 847, - 572, 543, 556, 640, 771, 233, 148, 826, 605, 826, - 1094, 831, 831, 802, 792, 921, 1140, 1123, 874, 1176, - 876, 1178, 420, 9, 791, 1093, 1093, 1093, 1093, 1093, - 1093, 1093, 1093, 1093, 1093, 1093, 1191, 519, 1094, 436, - 1191, 1191, 1191, 519, 519, 519, 519, 519, 519, 519, - 519, 805, 519, 519, 641, 436, 614, 618, 436, 860, - 519, 877, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, -18, 201, 201, -13, 292, 292, 201, - 216, 5, 292, 292, 292, 292, 201, 201, 201, 201, - 605, 840, 882, 607, 435, 885, 29, 840, 840, 840, - 4, 113, 25, 841, 843, 393, 835, 835, 835, 869, - 956, 956, 835, 839, 835, 869, 835, 835, 956, 956, - 879, 956, 146, 609, 373, 514, 616, 956, 272, 835, - 835, 835, 835, 854, 956, 45, 68, 620, 835, 203, - 191, 835, 835, 854, 848, 828, 846, 956, 956, 956, - 854, 499, 846, 846, 846, 893, 895, 873, 822, 363, - 341, 674, 127, 783, 822, 822, 835, 601, 873, 822, - 873, 822, 880, 822, 822, 822, 873, 822, 839, 477, - 822, 779, 786, 663, 74, 822, 51, 978, 980, 743, - 982, 971, 984, 1038, 985, 987, 1125, 953, 999, 974, - 989, 1039, 960, 957, 836, 763, 764, 878, 827, 951, - 838, 838, 838, 948, 949, 838, 838, 838, 838, 838, - 838, 838, 838, 763, 923, 884, 853, 1013, 765, 776, - 1069, 820, 1145, 823, 1011, 978, 987, 789, 974, 989, - 960, 957, 800, 799, 797, 798, 796, 795, 793, 794, - 808, 1071, 1072, 990, 825, 778, 1049, 1020, 1143, 922, - 1022, 1023, 1050, 1073, 898, 1083, 1147, 844, 1149, 1150, - 924, 1028, 1126, 838, 940, 875, 934, 1027, 950, 763, - 935, 1084, 1085, 1043, 824, 1054, 1058, 998, 870, 842, - 936, 1152, 1029, 1032, 1033, 1127, 1129, 891, 1044, 962, - 1059, 872, 1099, 1060, 1061, 1062, 1063, 1130, 1153, 1131, - 890, 1132, 901, 858, 1041, 856, 1154, 504, 851, 857, - 866, 1035, 536, 1007, 1136, 1134, 1155, 1064, 1065, 1067, - 1159, 1161, 994, 902, 1046, 867, 1048, 1042, 903, 904, - 606, 865, 1087, 845, 849, 859, 622, 672, 1164, 1165, - 1167, 996, 830, 833, 905, 909, 1088, 832, 1092, 1170, - 737, 910, 1171, 1070, 787, 788, 690, 750, 749, 790, - 868, 1137, 883, 852, 850, 1034, 788, 834, 911, 1172, - 912, 914, 916, 1068, 919, 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, 0, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 628, 628, 628, 628, 784, 784, - 784, 784, 784, 784, 784, 628, 784, 784, 784, 628, - 628, 0, 0, 628, 0, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 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, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 758, 758, 612, - 612, 612, 612, 758, 758, 758, 758, 758, 758, 758, - 758, 758, 758, 612, 612, 0, 612, 612, 612, 612, - 612, 612, 612, 612, 879, 758, 758, 758, 758, 305, - 305, 305, 305, -96, -96, 758, 758, 380, 758, 380, - 758, 758, 305, 305, 758, 758, 758, 758, 758, 758, - 758, 758, 758, 758, 758, 0, 0, 0, 436, -71, - 758, 839, 839, 839, 839, 758, 758, 758, 758, -71, - -71, 758, 414, 414, 758, 758, 0, 0, 0, 0, - 0, 0, 0, 0, 436, 0, 0, 436, 0, 0, - 839, 839, 758, 380, 879, 328, 758, 0, 0, 0, - 0, 436, 839, 436, 519, -71, -71, 519, 519, 292, - 201, 328, 596, 596, 596, 596, 0, 0, 605, 879, - 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, - 839, 0, 879, 0, 839, 839, 839, 0, 0, 0, - 0, 0, 0, 0, 0, 956, 0, 0, 0, 0, - 0, 0, 0, 839, 0, 956, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 839, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 838, 870, 0, 0, 870, - 0, 838, 838, 838, 0, 0, 0, 865, 832 - ); - - protected array $actionDefault = array( - 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 631, 631, 631, 631,32767,32767, 257, 102,32767, - 32767, 500, 415, 415, 415,32767,32767,32767, 573, 573, - 573, 573, 573, 17,32767,32767,32767,32767,32767,32767, - 32767, 500,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, 36, 7, 8, 10, 11, 49, 338, - 100,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 624,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 403, 494, 504, 482, 483, 485, 486, 414, - 574, 630, 344, 627, 342, 413, 146, 354, 343, 245, - 261, 505, 262, 506, 509, 510, 218, 400, 150, 151, - 446, 501, 448, 499, 503, 447, 420, 427, 428, 429, - 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, - 418, 419, 502,32767,32767, 479, 478, 477, 444,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 445, - 449, 417, 452, 450, 451, 468, 469, 466, 467, 470, - 32767, 323,32767,32767,32767, 471, 472, 473, 474, 381, - 379,32767,32767, 111, 323, 111,32767,32767, 459, 460, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 517, 567, 476,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767,32767, - 32767, 100, 569, 441, 443, 537, 454, 455, 453, 421, - 32767, 542,32767, 102,32767, 544,32767,32767,32767,32767, - 32767,32767,32767, 568,32767, 575, 575,32767, 530, 100, - 196,32767, 543, 196, 196,32767,32767,32767,32767,32767, - 32767,32767,32767, 638, 530, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110,32767, 196, 110,32767, - 32767,32767, 100, 196, 196, 196, 196, 196, 196, 196, - 196, 545, 196, 196, 191,32767, 271, 273, 102, 592, - 196, 547,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, - 530, 464, 139,32767, 532, 139, 575, 456, 457, 458, - 575, 575, 575, 319, 296,32767,32767,32767,32767,32767, - 545, 545, 100, 100, 100, 100,32767,32767,32767,32767, - 111, 516, 99, 99, 99, 99, 99, 103, 101,32767, - 32767,32767,32767, 226,32767, 101, 101, 99,32767, 101, - 101,32767,32767, 226, 228, 215, 230,32767, 596, 597, - 226, 101, 230, 230, 230, 250, 250, 519, 325, 101, - 99, 101, 101, 198, 325, 325,32767, 101, 519, 325, - 519, 325, 200, 325, 325, 325, 519, 325,32767, 101, - 325, 217, 403, 99, 99, 325,32767,32767,32767, 532, - 32767,32767,32767,32767,32767,32767,32767, 225,32767,32767, - 32767,32767,32767,32767,32767,32767, 562,32767, 580, 594, - 462, 463, 465, 579, 577, 487, 488, 489, 490, 491, - 492, 493, 496, 626,32767, 536,32767,32767,32767, 353, - 32767, 636,32767,32767,32767, 9, 74, 525, 42, 43, - 51, 57, 551, 552, 553, 554, 548, 549, 555, 550, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 637,32767, 575,32767, - 32767,32767,32767, 461, 557, 602,32767,32767, 576, 629, - 32767,32767,32767,32767,32767,32767,32767,32767, 139,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 562, - 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 558,32767,32767,32767, 575,32767,32767,32767,32767, 321, - 318,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 575,32767,32767, - 32767,32767,32767, 298,32767, 315,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 399, 532, 301, 303, 304,32767, - 32767,32767,32767, 375,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 153, 153, 3, 3, 356, - 153, 153, 153, 356, 356, 153, 356, 356, 356, 153, - 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, - 250, 153, 367, 153 - ); - - protected array $goto = array( - 202, 169, 202, 202, 202, 1056, 842, 712, 359, 670, - 671, 598, 688, 689, 690, 748, 653, 655, 591, 929, - 675, 930, 1090, 721, 699, 702, 1028, 710, 719, 1024, - 171, 171, 171, 171, 226, 203, 199, 199, 181, 183, - 221, 199, 199, 199, 199, 199, 1180, 200, 200, 200, - 200, 200, 1180, 193, 194, 195, 196, 197, 198, 223, - 221, 224, 550, 551, 431, 552, 555, 556, 557, 558, - 559, 560, 561, 562, 172, 173, 174, 201, 175, 176, - 177, 170, 178, 179, 180, 182, 220, 222, 225, 245, - 248, 259, 260, 262, 263, 264, 265, 266, 267, 268, - 269, 275, 276, 277, 278, 288, 289, 326, 327, 328, - 437, 438, 439, 613, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 184, - 242, 185, 194, 195, 196, 197, 198, 223, 204, 205, - 206, 207, 246, 186, 187, 208, 188, 209, 205, 189, - 247, 204, 168, 210, 211, 190, 212, 213, 214, 191, - 215, 216, 192, 217, 218, 219, 285, 283, 285, 285, - 870, 1089, 1091, 1094, 615, 255, 255, 255, 255, 255, - 441, 677, 614, 1130, 884, 867, 436, 329, 323, 324, - 345, 608, 440, 346, 442, 654, 724, 492, 521, 715, - 896, 1128, 993, 883, 494, 253, 253, 253, 253, 250, - 256, 489, 1361, 1362, 1386, 1386, 925, 920, 921, 934, - 876, 922, 873, 923, 924, 874, 877, 363, 928, 881, - 480, 480, 868, 880, 1386, 848, 474, 363, 363, 480, - 1117, 1112, 1113, 1114, 1229, 351, 362, 362, 362, 362, - 1389, 1389, 429, 363, 363, 1017, 902, 363, 989, 1403, - 747, 360, 361, 566, 1026, 1021, 1056, 1285, 1285, 1285, - 569, 352, 351, 363, 363, 605, 1056, 1285, 848, 1056, - 848, 1056, 1056, 1137, 1138, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 357, 1261, 962, 637, - 674, 1285, 1262, 1265, 963, 1266, 1285, 1285, 1285, 1285, - 1376, 435, 1285, 628, 402, 1285, 1285, 1368, 1368, 1368, - 1368, 1347, 574, 567, 1062, 1061, 1059, 1059, 958, 958, - 697, 970, 1014, 942, 1051, 1067, 1068, 943, 565, 565, - 565, 603, 513, 522, 514, 863, 676, 863, 565, 709, - 520, 1176, 318, 567, 574, 600, 601, 319, 611, 617, - 844, 633, 634, 1080, 8, 709, 9, 449, 709, 28, - 1065, 1066, 467, 335, 316, 569, 698, 987, 987, 987, - 987, 1363, 1364, 467, 639, 639, 981, 988, 609, 631, - 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, - 1335, 1335, 863, 469, 682, 469, 1335, 1335, 1335, 1335, - 1335, 1335, 1335, 1335, 1335, 1335, 347, 258, 258, 626, - 640, 643, 644, 645, 646, 667, 668, 669, 723, 632, - 460, 860, 460, 460, 460, 1358, 1358, 1358, 553, 553, - 1278, 985, 420, 720, 553, 1358, 553, 553, 553, 553, - 553, 553, 553, 553, 451, 889, 568, 595, 568, 647, - 649, 651, 568, 976, 595, 411, 405, 473, 886, 1276, - 1370, 1370, 1370, 1370, 909, 866, 909, 909, 1036, 483, - 612, 484, 485, 751, 563, 563, 563, 563, 894, 619, - 1101, 1394, 1395, 412, 1332, 1332, 898, 490, 1151, 1354, - 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, - 279, 1105, 334, 334, 334, 998, 892, 0, 1280, 1047, - 0, 0, 863, 0, 0, 460, 460, 460, 460, 460, - 460, 460, 460, 460, 460, 460, 0, 0, 460, 1103, - 554, 554, 0, 1356, 1356, 1103, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 621, 622, 417, 418, - 947, 1166, 0, 686, 0, 687, 0, 422, 423, 424, - 0, 700, 1033, 0, 425, 1281, 1282, 0, 1268, 355, - 888, 0, 680, 1012, 858, 0, 0, 0, 882, 443, - 0, 1268, 0, 897, 885, 1100, 1104, 0, 0, 0, - 1275, 0, 443, 0, 1283, 1344, 1345, 996, 0, 0, - 1063, 1063, 0, 0, 0, 681, 1074, 1070, 1071, 404, - 407, 616, 620, 0, 0, 0, 0, 0, 0, 0, - 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1149, 901, 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, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1031, 1031 - ); - - protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 6, 73, 97, 86, - 86, 48, 86, 86, 86, 48, 48, 48, 127, 65, - 48, 65, 131, 9, 48, 48, 48, 48, 48, 48, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 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, 130, 130, 130, 134, 5, 5, 5, 5, 5, - 66, 66, 8, 8, 35, 26, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 8, 84, 8, 8, - 35, 8, 49, 35, 84, 5, 5, 5, 5, 5, - 5, 185, 185, 185, 191, 191, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, - 157, 157, 27, 15, 191, 12, 159, 14, 14, 157, - 15, 15, 15, 15, 159, 177, 24, 24, 24, 24, - 191, 191, 43, 14, 14, 50, 45, 14, 50, 14, - 50, 97, 97, 50, 50, 50, 73, 73, 73, 73, - 14, 177, 177, 14, 14, 181, 73, 73, 12, 73, - 12, 73, 73, 148, 148, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 188, 79, 79, 56, - 56, 73, 79, 79, 79, 79, 73, 73, 73, 73, - 190, 13, 73, 13, 62, 73, 73, 9, 9, 9, - 9, 14, 76, 76, 119, 119, 89, 89, 9, 9, - 89, 89, 103, 73, 89, 89, 89, 73, 19, 19, - 19, 104, 163, 14, 163, 22, 64, 22, 19, 7, - 163, 158, 76, 76, 76, 76, 76, 76, 76, 76, - 7, 76, 76, 115, 46, 7, 46, 113, 7, 76, - 120, 120, 19, 178, 178, 14, 117, 19, 19, 19, - 19, 187, 187, 19, 108, 108, 19, 19, 2, 2, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 179, 179, 22, 83, 121, 83, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 29, 5, 5, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 80, - 23, 18, 23, 23, 23, 134, 134, 134, 165, 165, - 14, 93, 93, 93, 165, 134, 165, 165, 165, 165, - 165, 165, 165, 165, 83, 39, 9, 9, 9, 85, - 85, 85, 9, 92, 9, 28, 9, 9, 37, 169, - 134, 134, 134, 134, 25, 25, 25, 25, 110, 9, - 9, 9, 9, 99, 107, 107, 107, 107, 9, 107, - 133, 9, 9, 31, 180, 180, 41, 160, 151, 134, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 24, 136, 24, 24, 24, 96, 9, -1, 20, 114, - -1, -1, 22, -1, -1, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, -1, -1, 23, 134, - 182, 182, -1, 134, 134, 134, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 17, 17, 82, 82, - 17, 17, -1, 82, -1, 82, -1, 82, 82, 82, - -1, 82, 17, -1, 82, 20, 20, -1, 20, 82, - 17, -1, 17, 17, 20, -1, -1, -1, 17, 118, - -1, 20, -1, 16, 16, 16, 16, -1, -1, -1, - 17, -1, 118, -1, 20, 20, 20, 16, -1, -1, - 118, 118, -1, -1, -1, 118, 118, 118, 118, 59, - 59, 59, 59, -1, -1, -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, -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, 107, 107 - ); - - protected array $gotoBase = array( - 0, 0, -339, 0, 0, 174, -7, 339, 171, 10, - 0, 0, -69, -36, -78, -186, 130, 81, 114, 66, - 117, 0, 62, 160, 240, 468, 178, 225, 118, 112, - 0, 45, 0, 0, 0, -195, 0, 119, 0, 122, - 0, 44, -1, 226, 0, 227, -387, 0, -715, 182, - 241, 0, 0, 0, 0, 0, 256, 0, 0, 570, - 0, 0, 269, 0, 102, 3, -63, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -31, 0, 0, -120, - 110, 53, 54, 120, -286, -33, -724, 0, 0, 40, - 0, 0, 124, 129, 0, 0, 61, -488, 0, 67, - 0, 0, 0, 294, 295, 0, 0, 453, 141, 0, - 100, 0, 0, 83, -3, 82, 0, 86, 318, 38, - 78, 107, 0, 0, 0, 0, 0, 16, 0, 0, - 168, 20, 0, 108, 163, 0, 58, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, - 0, 43, 0, 0, 0, 0, 0, 193, 101, -38, - 46, 0, 0, -166, 0, 195, 0, 0, 0, 92, - 0, 0, 0, 0, 0, 0, 0, -60, 42, 157, - 251, 243, 297, 0, 0, -97, 0, 1, 263, 0, - 276, -101, 0, 0 - ); - - protected array $gotoDefault = array( - -32768, 526, 755, 7, 756, 951, 831, 840, 590, 544, - 722, 356, 641, 432, 1352, 927, 1165, 610, 859, 1294, - 1300, 468, 862, 340, 745, 939, 910, 911, 408, 395, - 875, 406, 665, 642, 507, 895, 464, 887, 499, 890, - 463, 899, 167, 428, 524, 903, 6, 906, 572, 937, - 991, 396, 914, 397, 693, 916, 594, 918, 919, 403, - 409, 410, 1170, 602, 638, 931, 261, 596, 932, 394, - 933, 941, 399, 401, 703, 479, 518, 512, 421, 1132, - 597, 625, 662, 457, 486, 636, 648, 635, 493, 444, - 426, 339, 975, 983, 500, 477, 997, 358, 1005, 753, - 1178, 656, 502, 1013, 657, 1020, 1023, 545, 546, 491, - 1035, 271, 1038, 503, 1048, 26, 683, 1053, 1054, 684, - 658, 1076, 659, 685, 660, 1078, 476, 592, 1179, 475, - 1093, 1099, 465, 1102, 1340, 466, 1106, 270, 1109, 284, - 427, 445, 1115, 1116, 12, 1122, 713, 714, 25, 280, - 523, 1150, 704,-32768,-32768,-32768,-32768, 462, 1177, 461, - 1249, 1251, 573, 504, 1269, 301, 1272, 696, 519, 1277, - 458, 1343, 459, 547, 487, 325, 548, 1387, 315, 343, - 322, 564, 302, 344, 549, 488, 1349, 1357, 341, 34, - 1377, 1388, 607, 630 - ); - - protected array $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, 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, 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, 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, 50, 69, 69, 72, 72, - 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, - 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, - 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, - 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, - 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, - 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, - 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, - 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, - 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, - 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, - 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, - 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, - 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, - 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, - 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, - 138, 138, 138, 138, 138, 143, 143, 144, 144, 145, - 145, 145, 145, 145, 146, 147, 147, 142, 142, 139, - 139, 141, 141, 149, 149, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 140, 150, 150, 152, 151, - 151, 153, 153, 114, 154, 154, 156, 156, 156, 155, - 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, - 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, - 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, - 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, - 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, - 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, - 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, - 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, - 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, - 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, - 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, - 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, - 191, 191, 191, 191, 191, 191, 193, 193, 193, 193 - ); - - protected array $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, 0, - 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, - 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, - 3, 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, 1, 0, 2, 1, 3, - 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, - 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, - 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, - 2, 1, 2, 1, 1, 1, 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, 1, - 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, - 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, - 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, - 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, - 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, - 6, 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, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, - 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, - 3, 4, 4, 1, 1, 2, 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, 2, 1, 3, 2, - 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, - 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 3, 1, 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(): void { - $this->reduceCallbacks = [ - 0 => null, - 1 => static function ($self, $stackPos) { - $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); - }, - 2 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 3 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 4 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 5 => null, - 6 => null, - 7 => null, - 8 => null, - 9 => null, - 10 => null, - 11 => null, - 12 => null, - 13 => null, - 14 => null, - 15 => null, - 16 => null, - 17 => null, - 18 => null, - 19 => null, - 20 => null, - 21 => null, - 22 => null, - 23 => null, - 24 => null, - 25 => null, - 26 => null, - 27 => null, - 28 => null, - 29 => null, - 30 => null, - 31 => null, - 32 => null, - 33 => null, - 34 => null, - 35 => null, - 36 => null, - 37 => null, - 38 => null, - 39 => null, - 40 => null, - 41 => null, - 42 => null, - 43 => null, - 44 => null, - 45 => null, - 46 => null, - 47 => null, - 48 => null, - 49 => null, - 50 => null, - 51 => null, - 52 => null, - 53 => null, - 54 => null, - 55 => null, - 56 => null, - 57 => null, - 58 => null, - 59 => null, - 60 => null, - 61 => null, - 62 => null, - 63 => null, - 64 => null, - 65 => null, - 66 => null, - 67 => null, - 68 => null, - 69 => null, - 70 => null, - 71 => null, - 72 => null, - 73 => null, - 74 => null, - 75 => null, - 76 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 77 => null, - 78 => null, - 79 => null, - 80 => null, - 81 => null, - 82 => null, - 83 => null, - 84 => null, - 85 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 86 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 87 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 88 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 89 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 90 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 91 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 92 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 93 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 94 => null, - 95 => static function ($self, $stackPos) { - $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 96 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 97 => static function ($self, $stackPos) { - /* nothing */ - }, - 98 => static function ($self, $stackPos) { - /* nothing */ - }, - 99 => static function ($self, $stackPos) { - /* nothing */ - }, - 100 => static function ($self, $stackPos) { - $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 101 => null, - 102 => null, - 103 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 104 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 105 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 106 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 107 => static function ($self, $stackPos) { - $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 108 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 109 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 110 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 111 => null, - 112 => null, - 113 => null, - 114 => null, - 115 => static function ($self, $stackPos) { - $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 116 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $self->checkNamespace($self->semValue); - }, - 117 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 118 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 119 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 120 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 121 => null, - 122 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); - }, - 123 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); - $self->checkConstantAttributes($self->semValue); - }, - 124 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 125 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 126 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 127 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 128 => null, - 129 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 130 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 131 => null, - 132 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 133 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 134 => null, - 135 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 136 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 137 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 138 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 139 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 140 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 141 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 142 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; - }, - 143 => null, - 144 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 145 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 146 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 147 => null, - 148 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 149 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 150 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 151 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 152 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 153 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 154 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 155 => null, - 156 => null, - 157 => null, - 158 => static function ($self, $stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 159 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 160 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 161 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 162 => static function ($self, $stackPos) { - $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 163 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 164 => static function ($self, $stackPos) { - $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 165 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 166 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 167 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 168 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 169 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 170 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 171 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 172 => static function ($self, $stackPos) { - - $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); - - }, - 173 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 174 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 175 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 176 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 177 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 178 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 179 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); - }, - 180 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 181 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 182 => static function ($self, $stackPos) { - $self->semValue = null; /* means: no statement */ - }, - 183 => null, - 184 => static function ($self, $stackPos) { - $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); - }, - 185 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 186 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 187 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 188 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 189 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 190 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 191 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 192 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 193 => null, - 194 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 195 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 196 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 197 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 198 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 199 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 200 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 201 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 202 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 203 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 204 => null, - 205 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 206 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 207 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 208 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 209 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 210 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(7-2)); - }, - 211 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(8-3)); - }, - 212 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkInterface($self->semValue, $stackPos-(7-3)); - }, - 213 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 214 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkEnum($self->semValue, $stackPos-(8-3)); - }, - 215 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 216 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 217 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 218 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 219 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 220 => null, - 221 => null, - 222 => static function ($self, $stackPos) { - $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 223 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 224 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 225 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 226 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 227 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 228 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 229 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 230 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 231 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 232 => null, - 233 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 234 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 235 => null, - 236 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 237 => null, - 238 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 239 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 240 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 241 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 242 => null, - 243 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 244 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 245 => static function ($self, $stackPos) { - $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 246 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 247 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 248 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 249 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(5-3)]; - }, - 250 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 251 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 252 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 253 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 254 => null, - 255 => null, - 256 => static function ($self, $stackPos) { - $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 257 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 258 => null, - 259 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 260 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 261 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 262 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 263 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 264 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 265 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 266 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 267 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 268 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 269 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 270 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 271 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 272 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 273 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 274 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 275 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 276 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-2)], true); - }, - 277 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 278 => static function ($self, $stackPos) { - $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); - }, - 279 => null, - 280 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 281 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 282 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 283 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 284 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 285 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 286 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 287 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 288 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 289 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 290 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 291 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 292 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 293 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 294 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 295 => static function ($self, $stackPos) { - $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); - }, - 296 => null, - 297 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 298 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 299 => null, - 300 => null, - 301 => static function ($self, $stackPos) { - $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 302 => static function ($self, $stackPos) { - $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); - }, - 303 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 304 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 305 => null, - 306 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 307 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 308 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 309 => null, - 310 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 311 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 312 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 313 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 314 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 315 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 316 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 317 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 318 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 319 => null, - 320 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 321 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 322 => null, - 323 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 324 => null, - 325 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 326 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 327 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 328 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 329 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 330 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 331 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 332 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 333 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - }, - 334 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 335 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); - }, - 336 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 337 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 338 => static function ($self, $stackPos) { - $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 339 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 340 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 341 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 342 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 343 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); - }, - 344 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 345 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 346 => null, - 347 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 348 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 349 => null, - 350 => null, - 351 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 352 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 353 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 354 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 355 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } - }, - 356 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 357 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); - }, - 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); - $self->checkClassConst($self->semValue, $stackPos-(5-2)); - }, - 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); - $self->checkClassConst($self->semValue, $stackPos-(6-2)); - }, - 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - $self->checkClassMethod($self->semValue, $stackPos-(10-2)); - }, - 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 363 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 364 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ - }, - 365 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 366 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 367 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 368 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 369 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 370 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 371 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 372 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 373 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 374 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 375 => null, - 376 => static function ($self, $stackPos) { - $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); - }, - 377 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 378 => null, - 379 => null, - 380 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 381 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 382 => null, - 383 => null, - 384 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 385 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 386 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 387 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 388 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 389 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 390 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 391 => static function ($self, $stackPos) { - $self->semValue = Modifiers::STATIC; - }, - 392 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 393 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 394 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 395 => null, - 396 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 397 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 398 => static function ($self, $stackPos) { - $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 399 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 400 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 401 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 402 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 403 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 404 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, null); - }, - 405 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); - }, - 406 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 407 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 408 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 409 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 410 => static function ($self, $stackPos) { - $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 411 => null, - 412 => null, - 413 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 414 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 415 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 416 => null, - 417 => null, - 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - if (!$self->phpVersion->allowsAssignNewByReference()) { - $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - } - - }, - 423 => null, - 424 => null, - 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 476 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 479 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 487 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 488 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); - }, - 489 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 490 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 491 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 492 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 493 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 494 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 495 => static function ($self, $stackPos) { - $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 496 => static function ($self, $stackPos) { - $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 497 => null, - 498 => static function ($self, $stackPos) { - $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 499 => static function ($self, $stackPos) { - $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 500 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 501 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 502 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 503 => static function ($self, $stackPos) { - $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 504 => static function ($self, $stackPos) { - $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 505 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 506 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 507 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 508 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 509 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 510 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 511 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 512 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 513 => static function ($self, $stackPos) { - $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); - $self->checkClass($self->semValue[0], -1); - }, - 514 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 515 => static function ($self, $stackPos) { - list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 516 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 517 => null, - 518 => null, - 519 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 520 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 521 => null, - 522 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 523 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 524 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 525 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 526 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 527 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 528 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 530 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 531 => null, - 532 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 533 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 534 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 535 => static function ($self, $stackPos) { - $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 536 => null, - 537 => null, - 538 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 539 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 540 => null, - 541 => null, - 542 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 543 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; - }, - 544 => static function ($self, $stackPos) { - foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 545 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 546 => null, - 547 => static function ($self, $stackPos) { - $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 548 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 549 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 550 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 551 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 552 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 553 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 554 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 555 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 556 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 557 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 558 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 559 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 560 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); - }, - 561 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); - $self->createdArrays->attach($self->semValue); - }, - 562 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); - }, - 563 => static function ($self, $stackPos) { - $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); - }, - 564 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); - }, - 565 => static function ($self, $stackPos) { - $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); - }, - 566 => static function ($self, $stackPos) { - $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 567 => null, - 568 => null, - 569 => null, - 570 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 571 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); - }, - 572 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 573 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 574 => null, - 575 => null, - 576 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 577 => null, - 578 => null, - 579 => null, - 580 => null, - 581 => null, - 582 => null, - 583 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 584 => null, - 585 => null, - 586 => null, - 587 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 588 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 589 => null, - 590 => static function ($self, $stackPos) { - $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 591 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 592 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 593 => null, - 594 => null, - 595 => null, - 596 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 597 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 598 => null, - 599 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 600 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 601 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 602 => static function ($self, $stackPos) { - $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; - }, - 603 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 604 => null, - 605 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 606 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 607 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 609 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 610 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 611 => null, - 612 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 613 => null, - 614 => null, - 615 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 616 => null, - 617 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 618 => static function ($self, $stackPos) { - $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $self->postprocessList($self->semValue); - }, - 619 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); - }, - 620 => null, - 621 => static function ($self, $stackPos) { - /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ - }, - 622 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 623 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 624 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 625 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 626 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 627 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 628 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 629 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 630 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); - }, - 631 => static function ($self, $stackPos) { - /* Create an Error node now to remember the position. We'll later either report an error, - or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $self->createEmptyElemAttributes($self->tokenPos); - $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); - }, - 632 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 633 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 634 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 635 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); - }, - 636 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); - }, - 637 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 638 => null, - 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 643 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 644 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 645 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 646 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 647 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 648 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 649 => null, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php deleted file mode 100644 index 8745e67..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php +++ /dev/null @@ -1,2903 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_PIPE", - "'.'", - "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_PUBLIC_SET", - "T_PROTECTED_SET", - "T_PRIVATE_SET", - "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_PROPERTY_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 array $tokenToSymbol = array( - 0, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 58, 172, 174, 173, 57, 174, 174, - 167, 168, 55, 53, 9, 54, 50, 56, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 32, 165, - 45, 17, 47, 31, 70, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 72, 174, 166, 37, 174, 171, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 169, 36, 170, 60, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 1, 2, 3, 4, - 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, - 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, - 41, 42, 43, 44, 46, 48, 49, 51, 52, 59, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, - 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, 159, 160, 161, 162, - 163, 164 - ); - - protected array $action = array( - 132, 133, 134, 582, 135, 136, 162, 779, 780, 781, - 137, 41, 863,-32766, 970, 1404, -584, 974, 973, 1302, - 0, 395, 396, 455, 246, 854,-32766,-32766,-32766,-32766, - -32766, 440,-32766, 27,-32766, 773, 772,-32766,-32766,-32766, - -32766, 508,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 131,-32766,-32766,-32766,-32766, 437, 782, 859, 1148,-32766, - 949,-32766,-32766,-32766,-32766,-32766,-32766, 972, 1385, 300, - 271, 53, 398, 786, 787, 788, 789, 305, 865, 441, - -341, 39, 254, -584, -584, -195, 843, 790, 791, 792, - 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, - 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, - 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, - 850, 584, 1062, -194, 856, 807, 808, 585, 586, 3, - 831, 829, 830, 842, 826, 827, 4, 860, 587, 588, - 825, 589, 590, 591, 592, 939, 593, 594, 5, 854, - -32766,-32766,-32766, 828, 595, 596,-32766, 138, 764, 132, - 133, 134, 582, 135, 136, 1098, 779, 780, 781, 137, - 41,-32766,-32766,-32766,-32766,-32766,-32766, -275, 1302, 613, - 153, 1071, 749, 990, 991,-32766,-32766,-32766, 992,-32766, - 891,-32766, 892,-32766, 773, 772,-32766, 986, 1309, 397, - 396,-32766,-32766,-32766, 858, 299, 630,-32766,-32766, 440, - 502, 736,-32766,-32766, 437, 782,-32767,-32767,-32767,-32767, - 106, 107, 108, 109, 951,-32766, 1021, 29, 734, 271, - 53, 398, 786, 787, 788, 789, 144, 1071, 441, -341, - 332, 38, 864, 862, -195, 843, 790, 791, 792, 793, - 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, - 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, - 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, - 584, 863, -194, 139, 807, 808, 585, 586, 323, 831, - 829, 830, 842, 826, 827, 1370, 148, 587, 588, 825, - 589, 590, 591, 592, 245, 593, 594, 395, 396,-32766, - -32766,-32766, 828, 595, 596, -85, 138, 440, 132, 133, - 134, 582, 135, 136, 1095, 779, 780, 781, 137, 41, - -32766,-32766,-32766,-32766,-32766, 51, 578, 1302, 257,-32766, - 636, 107, 108, 109,-32766,-32766,-32766, 503,-32766, 316, - -32766,-32766,-32766, 773, 772,-32766, -383, 166, -383, 1022, - -32766,-32766,-32766, 305, 79, 1133,-32766,-32766, 1414, 762, - 332, 1415,-32766, 437, 782,-32766, 1071, 110, 111, 112, - 113, 114, -85, 283,-32766, 477, 478, 479, 271, 53, - 398, 786, 787, 788, 789, 115, 407, 441, 10,-32766, - 299, 1341, 306, 307, 843, 790, 791, 792, 793, 794, - 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, - 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, - 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, - 320, 1068, -582, 807, 808, 585, 586, 1389, 831, 829, - 830, 842, 826, 827, 329, 1388, 587, 588, 825, 589, - 590, 591, 592, 86, 593, 594, 1071, 332,-32766,-32766, - -32766, 828, 595, 596, 349, 151, -581, 132, 133, 134, - 582, 135, 136, 1100, 779, 780, 781, 137, 41,-32766, - 290,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 891, 1175, 892, -582, - -582, 754, 773, 772, 1159, 1160, 1161, 1155, 1154, 1153, - 1162, 1156, 1157, 1158,-32766, -582,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 782,-32766,-32766,-32766, -588, -78,-32766, - -32766,-32766, 350, -581, -581,-32766,-32766, 271, 53, 398, - 786, 787, 788, 789, 383,-32766, 441,-32766,-32766, -581, - -32766, 773, 772, 843, 790, 791, 792, 793, 794, 795, - 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, - 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, - 805, 806, 368, 846, 847, 848, 849, 850, 584, -620, - 1068, -620, 807, 808, 585, 586, 389, 831, 829, 830, - 842, 826, 827, 441, 405, 587, 588, 825, 589, 590, - 591, 592, 333, 593, 594, 1071, 87, 88, 89, 459, - 828, 595, 596, 460, 151, 803, 774, 775, 776, 777, - 778, 854, 779, 780, 781, 816, 817, 40, 461, 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, 462, 283, 1329, 1159, 1160, 1161, - 1155, 1154, 1153, 1162, 1156, 1157, 1158, 115, 869, 488, - 489, 782, 1304, 1303, 1305, 108, 109, 1132, 154,-32766, - -32766, 1134, 679, 23, 156, 783, 784, 785, 786, 787, - 788, 789, 698, 699, 852, 152, 423, -580, 393, 394, - 157, 843, 790, 791, 792, 793, 794, 795, 796, 797, - 798, 799, 819, 841, 820, 821, 822, 823, 811, 812, - 813, 840, 814, 815, 800, 801, 802, 804, 805, 806, - 845, 846, 847, 848, 849, 850, 851, 1094, -578, 863, - 807, 808, 809, 810, -58, 831, 829, 830, 842, 826, - 827, 399, 400, 818, 824, 825, 832, 833, 835, 834, - 294, 836, 837, 158, -580, -580, 160, 294, 828, 839, - 838, 54, 55, 56, 57, 534, 58, 59, 36, -110, - -580, -57, 60, 61, -110, 62, -110, 670, 671, 129, - 130, 312, -587, 140, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -578, -578, 141, 147, 949, - 161, 712, -87, 163, 164, 165, -84, 949, -78, -73, - -72, -578, 63, 64, 143, -309, -71, 65, 332, 66, - 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, - 739, 31, 276, 47, 457, 535, -357, 713, 740, 1335, - 1336, 536, -70, 863, 1068, -69, -68, 1333, 45, 22, - 537, 949, 538, -67, 539, -66, 540, 52, -65, 541, - 542, 714, 715, -46, 48, 49, 463, 392, 391, 1071, - 50, 543, -18, 145, 281, 1302, 381, 348, 291, 750, - 1304, 1303, 1305, 1295, 939, 753, 290, 948, 545, 546, - 547, 150, 939, 290, -305, 295, 288, 289, 292, 293, - 549, 550, 338, 1321, 1322, 1323, 1324, 1326, 1318, 1319, - 304, 1300, 296, 301, 302, 283, 1325, 1320, 773, 772, - 1304, 1303, 1305, 305, 308, 309, 75, -154, -154, -154, - 327, 328, 332, 966, 854, 1070, 939, 149, 115, 1416, - 388, 680, -154, 708, -154, 725, -154, 13, -154, 668, - 723, 313, 31, 277, 1304, 1303, 1305, 863, 390,-32766, - 600, 1166, 987, 951, 863, 310, 701, 734, 1333, 990, - 991, 951,-32766, 686, 544, 734, 949, 685, 606, 1340, - 485, 513, 925, 986, -110, -110, -110, 35, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 702, 949, 634, 1295, 773, 772, 741, -579, 305, - -614, 1334, 0, 0, 0, 951, 311, 949, 0, 734, - -154, 549, 550, 319, 1321, 1322, 1323, 1324, 1326, 1318, - 1319, 1209, 1211, 744, 0, 1342, 0, 1325, 1320, -544, - -534, 0, -578,-32766, -4, 949, 11, 77, 751, 1302, - 30, 387, 328, 332, 862, 43,-32766,-32766,-32766, -613, - -32766, 939,-32766, 968,-32766, 44, 759,-32766, 1330, 773, - 772, 760,-32766,-32766,-32766, -579, -579, 882,-32766,-32766, - 930, 1031, 1008, 1015,-32766, 437, 1005, 939, 1016, 928, - 1003, -579, 1137, 1140, 1141, 1138,-32766, 1177, 1139, 1145, - 37, 874, 939, -586, 1357, 1374, 1407,-32766, 673, -578, - -578, -612, -588, 1302, -587, -586, -585, 31, 276, -528, - -32766,-32766,-32766, 1,-32766, -578,-32766, 78,-32766, 863, - 939,-32766, 32, 1333, -278, 33,-32766,-32766,-32766, 42, - 1007, 46,-32766,-32766, 734, 76, 80, 81,-32766, 437, - 82, 83, 390, 84, 453, 31, 277, 85, 146, 303, - -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1295, - 734, 1333, 334, 369, 370, 371, 548, 986, -110, -110, - -110, 951, 372, 326, 373, 734, 374, 550, 375, 1321, - 1322, 1323, 1324, 1326, 1318, 1319, 376, 377, 422, 378, - 21, -50, 1325, 1320, 379, 382, 454, 1295, 577, 951, - 380, 384, 77, 734, -4, -276, -275, 328, 332, 15, - 16, 17, 18, 20, 363, 550, 421, 1321, 1322, 1323, - 1324, 1326, 1318, 1319, 142, 504, 505, 512, 515, 516, - 1325, 1320, 949, 517, 518,-32766, 522, 523, 524, 531, - 77, 1302, 611, 718, 1101, 328, 332, 1097,-32766,-32766, - -32766, 1250,-32766, 1331,-32766, 949,-32766, 1099, 1096,-32766, - 1077, 1290, 1309, 1073,-32766,-32766,-32766, -280,-32766, -102, - -32766,-32766, 14, 19, 1302, 24,-32766, 437, 323, 420, - 625,-32766,-32766,-32766, 631,-32766, 659,-32766,-32766,-32766, - 724, 1254,-32766, -16, 1308, 1251, 1386,-32766,-32766,-32766, - 735,-32766, 738,-32766,-32766, 742, 743, 1302, 745,-32766, - 437, 746, 747, 748,-32766,-32766,-32766, 939,-32766, 300, - -32766,-32766,-32766, 752, 1309,-32766, 764, 737, 332, 765, - -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 426, 390, - 939, 756,-32766, 437, 926, 863, 1411, 1413, 885, 884, - 990, 991, 980, 1023,-32766, 544, -252, -252, -252, 1412, - 979, 977, 390, 925, 986, -110, -110, -110, 978, 981, - 1283, 959, 969, 990, 991, 957, 1176, 1172, 544, 1126, - -110, -110, 1013, 1014, 657, -110, 925, 986, -110, -110, - -110, 1410, 2, 1368, -110, 1268, 951, 1383, 0, 0, - 734, -253, 0,-32766, 0, 0,-32766, 863, 1059, 1054, - 1053, 1052, 1058, 1055, 1056, 1057, 0, 0, 0, 951, - 0, 0, 0, 734, -252, 305, 0, 0, 79, 0, - 0, 1071, 0, 0, 332, 0, 0, 0, 0, 0, - 0, 0, -110, -110, 0, 0, 0, -110, 0, 0, - 0, 0, 0, 0, 0, 299, -110, 0, 0, 0, - 0, 0, 0, 0, 0,-32766, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, - 79, 0, 0, 0, 0, 0, 332 - ); - - protected array $actionCheck = array( - 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, - 13, 14, 84, 76, 1, 87, 72, 74, 75, 82, - 0, 108, 109, 110, 15, 82, 89, 90, 91, 10, - 93, 118, 95, 103, 97, 38, 39, 100, 10, 11, - 12, 104, 105, 106, 107, 10, 11, 12, 111, 112, - 15, 10, 11, 12, 117, 118, 59, 82, 128, 31, - 1, 33, 34, 35, 36, 37, 129, 124, 1, 31, - 73, 74, 75, 76, 77, 78, 79, 164, 1, 82, - 9, 153, 154, 139, 140, 9, 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, 1, 9, 82, 128, 129, 130, 131, 9, - 133, 134, 135, 136, 137, 138, 9, 162, 141, 142, - 143, 144, 145, 146, 147, 86, 149, 150, 9, 82, - 10, 11, 12, 156, 157, 158, 118, 160, 169, 3, - 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, - 14, 31, 76, 33, 34, 35, 36, 168, 82, 83, - 15, 143, 169, 119, 120, 89, 90, 91, 124, 93, - 108, 95, 110, 97, 38, 39, 100, 133, 1, 108, - 109, 105, 106, 107, 162, 167, 1, 111, 112, 118, - 32, 169, 118, 117, 118, 59, 45, 46, 47, 48, - 49, 50, 51, 52, 165, 129, 32, 9, 169, 73, - 74, 75, 76, 77, 78, 79, 169, 143, 82, 168, - 173, 9, 165, 161, 168, 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, 84, 168, 9, 128, 129, 130, 131, 168, 133, - 134, 135, 136, 137, 138, 1, 9, 141, 142, 143, - 144, 145, 146, 147, 99, 149, 150, 108, 109, 10, - 11, 12, 156, 157, 158, 32, 160, 118, 3, 4, - 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, - 31, 76, 33, 34, 35, 72, 87, 82, 9, 142, - 54, 50, 51, 52, 89, 90, 91, 169, 93, 9, - 95, 118, 97, 38, 39, 100, 108, 15, 110, 165, - 105, 106, 107, 164, 167, 165, 111, 112, 82, 169, - 173, 85, 117, 118, 59, 118, 143, 53, 54, 55, - 56, 57, 99, 59, 129, 134, 135, 136, 73, 74, - 75, 76, 77, 78, 79, 71, 108, 82, 110, 142, - 167, 152, 139, 140, 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, - 9, 118, 72, 128, 129, 130, 131, 1, 133, 134, - 135, 136, 137, 138, 9, 9, 141, 142, 143, 144, - 145, 146, 147, 169, 149, 150, 143, 173, 10, 11, - 12, 156, 157, 158, 9, 160, 72, 3, 4, 5, - 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, - 167, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 10, 11, 12, 108, 165, 110, 139, - 140, 169, 38, 39, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 31, 155, 33, 34, 35, 36, - 37, 38, 39, 59, 10, 11, 12, 167, 17, 10, - 11, 12, 9, 139, 140, 10, 11, 73, 74, 75, - 76, 77, 78, 79, 9, 31, 82, 33, 34, 155, - 31, 38, 39, 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, 166, - 118, 168, 128, 129, 130, 131, 9, 133, 134, 135, - 136, 137, 138, 82, 9, 141, 142, 143, 144, 145, - 146, 147, 72, 149, 150, 143, 10, 11, 12, 9, - 156, 157, 158, 9, 160, 3, 4, 5, 6, 7, - 8, 82, 10, 11, 12, 13, 14, 31, 9, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 9, 59, 1, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 71, 9, 139, - 140, 59, 161, 162, 163, 51, 52, 1, 15, 53, - 54, 170, 77, 78, 15, 73, 74, 75, 76, 77, - 78, 79, 77, 78, 82, 103, 104, 72, 108, 109, - 15, 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, 1, 72, 84, - 128, 129, 130, 131, 17, 133, 134, 135, 136, 137, - 138, 108, 109, 141, 142, 143, 144, 145, 146, 147, - 31, 149, 150, 15, 139, 140, 15, 31, 156, 157, - 158, 2, 3, 4, 5, 6, 7, 8, 15, 103, - 155, 17, 13, 14, 108, 16, 110, 113, 114, 17, - 17, 115, 167, 17, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 139, 140, 17, 17, 1, - 17, 82, 32, 17, 17, 17, 32, 1, 32, 32, - 32, 155, 53, 54, 169, 36, 32, 58, 173, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 32, 72, 73, 74, 75, 76, 170, 118, 32, 80, - 81, 82, 32, 84, 118, 32, 32, 88, 89, 90, - 91, 1, 93, 32, 95, 32, 97, 72, 32, 100, - 101, 142, 143, 32, 105, 106, 107, 108, 109, 143, - 111, 112, 32, 32, 32, 82, 117, 118, 32, 32, - 161, 162, 163, 124, 86, 32, 167, 32, 129, 130, - 131, 32, 86, 167, 36, 38, 36, 36, 36, 36, - 141, 142, 36, 144, 145, 146, 147, 148, 149, 150, - 151, 118, 38, 38, 38, 59, 157, 158, 38, 39, - 161, 162, 163, 164, 139, 140, 167, 77, 78, 79, - 171, 172, 173, 39, 82, 142, 86, 72, 71, 85, - 155, 92, 92, 79, 94, 94, 96, 99, 98, 115, - 82, 116, 72, 73, 161, 162, 163, 84, 108, 87, - 91, 84, 133, 165, 84, 137, 96, 169, 88, 119, - 120, 165, 142, 102, 124, 169, 1, 98, 159, 152, - 99, 99, 132, 133, 134, 135, 136, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 102, 1, 159, 124, 38, 39, 32, 72, 164, - 167, 172, -1, -1, -1, 165, 138, 1, -1, 169, - 170, 141, 142, 137, 144, 145, 146, 147, 148, 149, - 150, 61, 62, 32, -1, 152, -1, 157, 158, 155, - 155, -1, 72, 76, 0, 1, 155, 167, 32, 82, - 155, 155, 172, 173, 161, 165, 89, 90, 91, 167, - 93, 86, 95, 160, 97, 165, 165, 100, 166, 38, - 39, 165, 105, 106, 107, 139, 140, 165, 111, 112, - 165, 165, 165, 165, 117, 118, 165, 86, 165, 165, - 165, 155, 165, 165, 165, 165, 129, 165, 165, 165, - 169, 166, 86, 167, 166, 166, 166, 76, 166, 139, - 140, 167, 167, 82, 167, 167, 167, 72, 73, 167, - 89, 90, 91, 167, 93, 155, 95, 160, 97, 84, - 86, 100, 167, 88, 168, 167, 105, 106, 107, 167, - 165, 167, 111, 112, 169, 167, 167, 167, 117, 118, - 167, 167, 108, 167, 110, 72, 73, 167, 167, 115, - 129, 167, 167, 119, 120, 167, 165, 84, 124, 124, - 169, 88, 167, 167, 167, 167, 132, 133, 134, 135, - 136, 165, 167, 169, 167, 169, 167, 142, 167, 144, - 145, 146, 147, 148, 149, 150, 167, 167, 170, 167, - 156, 32, 157, 158, 167, 167, 167, 124, 167, 165, - 167, 169, 167, 169, 170, 168, 168, 172, 173, 168, - 168, 168, 168, 168, 168, 142, 168, 144, 145, 146, - 147, 148, 149, 150, 32, 168, 168, 168, 168, 168, - 157, 158, 1, 168, 168, 76, 168, 168, 168, 168, - 167, 82, 168, 168, 168, 172, 173, 168, 89, 90, - 91, 168, 93, 168, 95, 1, 97, 168, 168, 100, - 168, 168, 1, 168, 105, 106, 107, 168, 76, 168, - 111, 112, 168, 168, 82, 168, 117, 118, 168, 168, - 168, 89, 90, 91, 168, 93, 168, 95, 129, 97, - 168, 168, 100, 32, 168, 168, 168, 105, 106, 107, - 169, 76, 169, 111, 112, 169, 169, 82, 169, 117, - 118, 169, 169, 169, 89, 90, 91, 86, 93, 31, - 95, 129, 97, 169, 1, 100, 169, 169, 173, 169, - 105, 106, 107, 102, 103, 104, 111, 112, 170, 108, - 86, 170, 117, 118, 170, 84, 170, 170, 170, 170, - 119, 120, 170, 170, 129, 124, 102, 103, 104, 170, - 170, 170, 108, 132, 133, 134, 135, 136, 170, 170, - 170, 170, 170, 119, 120, 170, 170, 170, 124, 170, - 119, 120, 170, 170, 170, 124, 132, 133, 134, 135, - 136, 170, 167, 170, 133, 171, 165, 170, -1, -1, - 169, 170, -1, 142, -1, -1, 118, 84, 120, 121, - 122, 123, 124, 125, 126, 127, -1, -1, -1, 165, - -1, -1, -1, 169, 170, 164, -1, -1, 167, -1, - -1, 143, -1, -1, 173, -1, -1, -1, -1, -1, - -1, -1, 119, 120, -1, -1, -1, 124, -1, -1, - -1, -1, -1, -1, -1, 167, 133, -1, -1, -1, - -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 164, -1, -1, - 167, -1, -1, -1, -1, -1, 173 - ); - - protected array $actionBase = array( - 0, 156, -3, 315, 474, 474, 880, 1074, 1271, 1294, - 749, 675, 531, 559, 836, 1031, 1031, 1046, 1031, 828, - 1005, 42, 59, 59, 59, 963, 898, 632, 632, 898, - 632, 997, 997, 997, 997, 1061, 1061, -63, -63, 96, - 1232, 1199, 255, 255, 255, 255, 255, 1265, 255, 255, - 255, 255, 255, 1265, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 77, 194, 120, - 205, 1197, 783, 1150, 1163, 1152, 1166, 1145, 1144, 1151, - 1156, 1167, 1261, 1263, 889, 1254, 1267, 1158, 972, 1147, - 1162, 962, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 19, - 35, 535, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 529, 529, 529, 910, 910, 524, 299, 1113, - 1075, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 140, - 28, 1000, 493, 493, 458, 458, 458, 458, 458, 696, - 1328, 1301, 171, 171, 171, 171, 1363, 1363, -70, 523, - 248, 756, 291, 197, -87, 644, 38, 199, 323, 323, - 482, 482, 233, 233, 482, 482, 482, 324, 324, 94, - 94, 94, 94, 82, 249, 860, 67, 67, 67, 67, - 860, 860, 860, 860, 913, 869, 860, 1036, 1049, 860, - 860, 370, 645, 966, 646, 646, 398, -72, -72, 398, - 64, -72, 294, 286, 257, 859, 91, 433, 257, 1073, - 404, 686, 686, 815, 686, 686, 686, 923, 610, 923, - 1141, 902, 902, 861, 807, 964, 1198, 1168, 901, 1252, - 929, 1253, 1200, 342, 251, -56, 263, 550, 806, 1139, - 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, - 1139, 1195, 523, 1141, -25, 1247, 1249, 1195, 1195, 1195, - 523, 523, 523, 523, 523, 523, 523, 523, 870, 523, - 523, 694, -25, 625, 635, -25, 896, 523, 915, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 178, 77, 77, 194, 13, 13, 77, 200, 121, 13, - 13, 13, -11, 13, 77, 77, 77, 610, 886, 849, - 663, 283, 874, 114, 886, 886, 886, 71, 9, 76, - 809, 888, 288, 882, 882, 882, 907, 986, 986, 882, - 903, 882, 907, 882, 882, 986, 986, 875, 986, 274, - 620, 465, 597, 624, 986, 340, 882, 882, 882, 882, - 916, 986, 127, 139, 639, 882, 329, 287, 882, 882, - 916, 858, 876, 908, 986, 986, 986, 916, 545, 908, - 908, 908, 931, 936, 864, 872, 445, 431, 679, 232, - 924, 872, 872, 882, 605, 864, 872, 864, 872, 933, - 872, 872, 872, 864, 872, 903, 533, 872, 813, 665, - 218, 872, 882, 20, 1008, 1009, 800, 1010, 1002, 1013, - 1069, 1014, 1016, 1171, 982, 1028, 1004, 1020, 1071, 998, - 995, 885, 792, 793, 921, 914, 979, 897, 897, 897, - 975, 977, 897, 897, 897, 897, 897, 897, 897, 897, - 792, 932, 926, 899, 1037, 796, 810, 1114, 857, 1214, - 1264, 1036, 1008, 1016, 804, 1004, 1020, 998, 995, 856, - 853, 844, 851, 843, 840, 808, 814, 871, 1116, 1119, - 1021, 920, 811, 1085, 1038, 1211, 1044, 1045, 1047, 1088, - 1123, 942, 1125, 1216, 895, 1217, 1218, 965, 1051, 1173, - 897, 974, 873, 968, 1049, 978, 792, 969, 1129, 1130, - 1081, 961, 1097, 1098, 1072, 911, 884, 970, 1219, 1059, - 1060, 1062, 1176, 1177, 930, 1082, 996, 1099, 912, 1058, - 1100, 1101, 1105, 1106, 1179, 1222, 1182, 922, 1183, 945, - 879, 1077, 909, 1223, 165, 892, 893, 906, 1068, 683, - 1035, 1184, 1208, 1229, 1108, 1109, 1110, 1230, 1231, 1024, - 946, 1083, 900, 1084, 1078, 947, 948, 689, 905, 1132, - 890, 891, 904, 705, 768, 1238, 1239, 1240, 1025, 877, - 894, 951, 953, 1133, 887, 1135, 1241, 771, 954, 1242, - 1115, 816, 817, 521, 784, 747, 818, 881, 1194, 925, - 865, 878, 1067, 817, 883, 955, 1245, 957, 958, 959, - 1111, 960, 1086, 1246, 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, 0, 0, 0, 0, 0, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 632, 632, 632, - 632, 789, 789, 789, 789, 789, 789, 789, 632, 789, - 789, 789, 632, 632, 0, 0, 632, 0, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 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, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 823, 823, 616, 616, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 616, 616, 0, 616, - 616, 616, 616, 616, 616, 616, 875, 823, 823, 324, - 324, 324, 324, 823, 823, 396, 396, 396, 823, 324, - 823, 64, 324, 823, 64, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 0, 0, 823, 823, 823, 823, - -25, -72, 823, 903, 903, 903, 903, 823, 823, 823, - 823, -72, -72, 823, -57, -57, 823, 823, 0, 0, - 0, 324, 324, -25, 0, 0, -25, 0, 0, 903, - 903, 823, 64, 875, 446, 823, 342, 0, 0, 0, - 0, 0, 0, 0, -25, 903, -25, 523, -72, -72, - 523, 523, 13, 77, 446, 612, 612, 612, 612, 77, - 0, 0, 0, 0, 0, 610, 875, 875, 875, 875, - 875, 875, 875, 875, 875, 875, 875, 875, 903, 0, - 875, 0, 875, 875, 903, 903, 903, 0, 0, 0, - 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, - 0, 0, 0, 903, 0, 986, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 903, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 897, 911, 0, 0, 911, - 0, 897, 897, 897, 0, 0, 0, 905, 887 - ); - - protected array $actionDefault = array( - 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 632, 632, 632, 632,32767,32767, 257, 102,32767, - 32767, 503, 417, 417, 417,32767,32767,32767, 576, 576, - 576, 576, 576, 17,32767,32767,32767,32767,32767,32767, - 32767, 503,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, 36, 7, 8, 10, 11, 49, 338, 100, - 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 404, 625,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 497, 507, 485, 486, 488, 489, 416, 577, - 631, 344, 628, 342, 415, 146, 354, 343, 245, 261, - 508, 262, 509, 512, 513, 218, 401, 150, 151, 448, - 504, 450, 502, 506, 449, 422, 429, 430, 431, 432, - 433, 434, 435, 436, 437, 438, 439, 440, 441, 420, - 421, 505, 482, 481, 480,32767,32767, 446, 447,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 451, - 454, 419, 452, 453, 470, 471, 468, 469, 472,32767, - 323,32767, 473, 474, 475, 476,32767,32767, 382, 196, - 380,32767, 477,32767, 111, 455, 323, 111,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 461, 462,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, - 100, 520, 570, 479, 456, 457,32767, 545,32767, 102, - 32767, 547,32767,32767,32767,32767,32767,32767,32767,32767, - 572, 443, 445, 540, 626, 423, 629,32767, 533, 100, - 196,32767, 546, 196, 196,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 571,32767, 639, 533, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110,32767, 196, 110,32767, 110, 110,32767,32767, 100, - 196, 196, 196, 196, 196, 196, 196, 196, 548, 196, - 196, 191,32767, 271, 273, 102, 594, 196, 550,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 404,32767,32767,32767,32767, 533, 466, 139, - 32767, 535, 139, 578, 458, 459, 460, 578, 578, 578, - 319, 296,32767,32767,32767,32767,32767, 548, 548, 100, - 100, 100, 100,32767,32767,32767,32767, 111, 519, 99, - 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, - 226,32767, 101, 101, 99,32767, 101, 101,32767,32767, - 226, 228, 215, 230,32767, 598, 599, 226, 101, 230, - 230, 230, 250, 250, 522, 325, 101, 99, 101, 101, - 198, 325, 325,32767, 101, 522, 325, 522, 325, 200, - 325, 325, 325, 522, 325,32767, 101, 325, 217, 99, - 99, 325,32767,32767,32767,32767, 535,32767,32767,32767, - 32767,32767,32767,32767, 225,32767,32767,32767,32767,32767, - 32767,32767,32767, 565,32767, 583, 596, 464, 465, 467, - 582, 580, 490, 491, 492, 493, 494, 495, 496, 499, - 627,32767, 539,32767,32767,32767, 353,32767, 637,32767, - 32767,32767, 9, 74, 528, 42, 43, 51, 57, 554, - 555, 556, 557, 551, 552, 558, 553,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 638,32767, 578,32767,32767,32767,32767, - 463, 560, 604,32767,32767, 579, 630,32767,32767,32767, - 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 565,32767, 137,32767, - 32767,32767,32767,32767,32767,32767,32767, 561,32767,32767, - 32767, 578,32767,32767,32767,32767, 321, 318,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 578,32767,32767,32767,32767,32767, - 298,32767, 315,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 400, 535, 301, 303, 304,32767,32767,32767,32767, - 376,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 153, 153, 3, 3, 356, 153, - 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, - 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, - 250, 153, 368, 153, 402, 402, 411 - ); - - protected array $goto = array( - 201, 169, 201, 201, 201, 1069, 598, 719, 448, 684, - 644, 681, 443, 345, 341, 342, 344, 615, 447, 346, - 449, 661, 481, 728, 570, 570, 570, 570, 1245, 626, - 172, 172, 172, 172, 225, 202, 198, 198, 182, 184, - 220, 198, 198, 198, 198, 198, 1195, 199, 199, 199, - 199, 199, 1195, 192, 193, 194, 195, 196, 197, 222, - 220, 223, 557, 558, 438, 559, 562, 563, 564, 565, - 566, 567, 568, 569, 173, 174, 175, 200, 176, 177, - 178, 170, 179, 180, 181, 183, 219, 221, 224, 242, - 247, 248, 259, 260, 262, 263, 264, 265, 266, 267, - 268, 272, 273, 274, 275, 282, 285, 297, 298, 324, - 325, 444, 445, 446, 620, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 193, 194, 195, 196, 197, 222, 203, 204, 205, - 206, 243, 185, 186, 207, 187, 208, 204, 188, 244, - 203, 168, 209, 210, 189, 211, 212, 213, 190, 214, - 215, 171, 216, 217, 218, 191, 287, 284, 287, 287, - 883, 255, 255, 255, 255, 255, 1125, 605, 487, 487, - 622, 758, 660, 662, 1103, 359, 682, 487, 1075, 1074, - 706, 709, 1041, 717, 726, 1037, 733, 922, 879, 922, - 922, 253, 253, 253, 253, 250, 256, 646, 646, 1078, - 1079, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, - 1332, 880, 351, 938, 933, 934, 947, 889, 935, 886, - 936, 937, 887, 890, 476, 941, 894, 476, 1044, 1044, - 893, 364, 364, 364, 364, 352, 351, 532, 1131, 1127, - 1128, 1351, 1351, 331, 315, 1351, 1351, 1351, 1351, 1351, - 1351, 1351, 1351, 1351, 1351, 1069, 1301, 1072, 1072, 704, - 983, 1301, 1301, 1064, 1080, 1081, 1069, 942, 1301, 943, - 458, 1069, 881, 1069, 1069, 1069, 1069, 1069, 1069, 1069, - 1069, 1069, 897, 855, 1069, 1069, 1069, 1069, 677, 678, - 1301, 695, 696, 697, 1006, 1301, 1301, 1301, 1301, 450, - 909, 1301, 436, 896, 1301, 1301, 1382, 1382, 1382, 1382, - 915, 581, 574, 499, 612, 450, 367, 971, 971, 955, - 501, 1076, 1076, 956, 1400, 1400, 367, 367, 688, 1087, - 1083, 1084, 572, 411, 414, 623, 627, 572, 572, 367, - 367, 1400, 357, 367, 572, 1417, 1377, 1378, 317, 574, - 581, 607, 608, 318, 618, 624, 1390, 640, 641, 1027, - 576, 1403, 1403, 367, 367, 28, 474, 520, 442, 521, - 635, 1000, 1000, 1000, 1000, 527, 409, 474, 1348, 1348, - 994, 1001, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, - 1348, 1348, 633, 647, 650, 651, 652, 653, 674, 675, - 676, 730, 732, 561, 561, 258, 258, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 610, 1362, 467, - 683, 467, 876, 616, 638, 876, 467, 467, 1191, 861, - 1373, 360, 361, 1093, 456, 1373, 1373, 560, 560, 705, - 432, 560, 1373, 560, 560, 560, 560, 560, 560, 560, - 560, 1277, 975, 575, 602, 575, 1278, 1281, 976, 575, - 1282, 602, 689, 412, 480, 1384, 1384, 1384, 1384, 347, - 873, 716, 576, 861, 876, 861, 490, 619, 491, 492, - 639, 8, 857, 9, 902, 907, 989, 716, 1408, 1409, - 716, 1369, 418, 1296, 278, 899, 330, 1174, 424, 425, - 1292, 330, 330, 693, 1049, 694, 1114, 429, 430, 431, - 761, 707, 1060, 905, 433, 1102, 1104, 1107, 355, 467, - 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - 467, 419, 339, 467, 911, 467, 467, 1294, 628, 629, - 1116, 497, 960, 1181, 621, 1144, 1371, 1371, 1116, 1118, - 1297, 1298, 1011, 1284, 1046, 1151, 1179, 1152, 731, 871, - 528, 722, 901, 1142, 687, 1025, 1284, 496, 1375, 1376, - 895, 910, 898, 1113, 1117, 998, 427, 727, 1165, 1299, - 1359, 1360, 1291, 1030, 386, 1009, 1002, 0, 757, 0, - 0, 573, 1039, 1034, 654, 656, 658, 0, 0, 0, - 0, 0, 0, 0, 0, 876, 0, 0, 999, 0, - 766, 766, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1163, 914 - ); - - protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 127, 73, 66, 66, - 56, 56, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 159, 9, 107, 107, 107, 107, 159, 107, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 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, 5, 5, 5, 5, 5, 15, 48, 157, 157, - 134, 48, 48, 48, 131, 97, 48, 157, 119, 119, - 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, - 25, 5, 5, 5, 5, 5, 5, 108, 108, 120, - 120, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 26, 177, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 83, 15, 15, 83, 107, 107, - 15, 24, 24, 24, 24, 177, 177, 76, 15, 15, - 15, 179, 179, 178, 178, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 73, 73, 89, 89, 89, - 89, 73, 73, 89, 89, 89, 73, 65, 73, 65, - 83, 73, 27, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 35, 6, 73, 73, 73, 73, 86, 86, - 73, 86, 86, 86, 49, 73, 73, 73, 73, 118, - 35, 73, 43, 35, 73, 73, 9, 9, 9, 9, - 45, 76, 76, 84, 181, 118, 14, 9, 9, 73, - 84, 118, 118, 73, 191, 191, 14, 14, 118, 118, - 118, 118, 19, 59, 59, 59, 59, 19, 19, 14, - 14, 191, 188, 14, 19, 14, 187, 187, 76, 76, - 76, 76, 76, 76, 76, 76, 190, 76, 76, 103, - 14, 191, 191, 14, 14, 76, 19, 163, 13, 163, - 13, 19, 19, 19, 19, 163, 62, 19, 180, 180, - 19, 19, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 182, 182, 5, 5, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 104, 14, 23, - 64, 23, 22, 2, 2, 22, 23, 23, 158, 12, - 134, 97, 97, 115, 113, 134, 134, 165, 165, 117, - 14, 165, 134, 165, 165, 165, 165, 165, 165, 165, - 165, 79, 79, 9, 9, 9, 79, 79, 79, 9, - 79, 9, 121, 9, 9, 134, 134, 134, 134, 29, - 18, 7, 14, 12, 22, 12, 9, 9, 9, 9, - 80, 46, 7, 46, 39, 9, 92, 7, 9, 9, - 7, 134, 28, 20, 24, 37, 24, 156, 82, 82, - 169, 24, 24, 82, 110, 82, 133, 82, 82, 82, - 99, 82, 114, 9, 82, 130, 130, 130, 82, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 31, 9, 23, 41, 23, 23, 14, 17, 17, - 134, 160, 17, 17, 8, 8, 134, 134, 134, 136, - 20, 20, 96, 20, 17, 149, 149, 149, 8, 20, - 8, 8, 17, 8, 17, 17, 20, 185, 185, 185, - 17, 16, 16, 16, 16, 93, 93, 93, 152, 20, - 20, 20, 17, 50, 141, 16, 50, -1, 50, -1, - -1, 50, 50, 50, 85, 85, 85, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, 16, -1, - 24, 24, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 16, 16 - ); - - protected array $gotoBase = array( - 0, 0, -303, 0, 0, 170, 280, 471, 543, 10, - 0, 0, 136, 31, 22, -186, 111, 66, 164, 71, - 95, 0, 148, 160, 235, 191, 214, 275, 155, 176, - 0, 86, 0, 0, 0, -92, 0, 156, 0, 165, - 0, 85, -1, 286, 0, 291, -270, 0, -558, 284, - 579, 0, 0, 0, 0, 0, -33, 0, 0, 294, - 0, 0, 341, 0, 184, 261, -237, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -32, 0, 0, 37, - 172, 32, -3, -50, -167, 105, -444, 0, 0, -21, - 0, 0, 161, 274, 0, 0, 101, -318, 0, 97, - 0, 0, 0, 331, 381, 0, 0, -7, -38, 0, - 131, 0, 0, 158, 90, 162, 0, 159, 39, -100, - -83, 173, 0, 0, 0, 0, 0, 4, 0, 0, - 522, 182, 0, 127, 169, 0, 99, 0, 0, 0, - 0, -171, 0, 0, 0, 0, 0, 0, 0, 287, - 0, 0, 126, 0, 0, 0, 144, 141, 188, -255, - 93, 0, 0, -138, 0, 202, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, 0, -82, -74, 6, - 143, 292, 168, 0, 0, 270, 0, -31, 319, 0, - 332, 20, 0, 0 - ); - - protected array $gotoDefault = array( - -32768, 533, 768, 7, 769, 964, 844, 853, 597, 551, - 729, 356, 648, 439, 1367, 940, 1180, 617, 872, 1310, - 1316, 475, 875, 336, 755, 952, 923, 924, 415, 402, - 888, 413, 672, 649, 514, 908, 471, 900, 506, 903, - 470, 912, 167, 435, 530, 916, 6, 919, 579, 950, - 1004, 403, 927, 404, 700, 929, 601, 931, 932, 410, - 416, 417, 1185, 609, 645, 944, 261, 603, 945, 401, - 946, 954, 406, 408, 710, 486, 525, 519, 428, 1146, - 604, 632, 669, 464, 493, 643, 655, 642, 500, 451, - 434, 335, 988, 996, 507, 484, 1010, 358, 1018, 763, - 1193, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, - 1048, 270, 1051, 510, 1061, 26, 690, 1066, 1067, 691, - 665, 1089, 666, 692, 667, 1091, 483, 599, 1194, 482, - 1106, 1112, 472, 1115, 1356, 473, 1119, 269, 1122, 286, - 362, 385, 452, 1129, 1130, 12, 1136, 720, 721, 25, - 280, 529, 1164, 711, 1170, 279, 1173, 469, 1192, 468, - 1265, 1267, 580, 511, 1285, 321, 1288, 703, 526, 1293, - 465, 1358, 466, 554, 494, 343, 555, 1401, 314, 365, - 340, 571, 322, 366, 556, 495, 1364, 1372, 337, 34, - 1391, 1402, 614, 637 - ); - - protected array $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, 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, 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, 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, 50, 69, 69, 72, 72, - 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, - 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, - 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, - 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, - 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, - 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, - 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, - 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, - 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, - 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, - 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, - 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, - 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, - 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, - 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, - 138, 138, 138, 138, 138, 138, 144, 144, 145, 145, - 146, 146, 146, 146, 146, 147, 148, 148, 143, 143, - 139, 139, 142, 142, 150, 150, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 140, 151, 151, 153, - 152, 152, 141, 141, 114, 114, 154, 154, 156, 156, - 156, 155, 155, 62, 104, 157, 157, 56, 56, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 164, 165, 165, 166, - 158, 158, 163, 163, 167, 168, 168, 169, 170, 171, - 171, 171, 171, 19, 19, 73, 73, 73, 73, 159, - 159, 159, 159, 173, 173, 162, 162, 162, 160, 160, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 180, 180, 180, 108, 182, 182, 182, 182, 161, 161, - 161, 161, 161, 161, 161, 161, 59, 59, 176, 176, - 176, 176, 176, 183, 183, 172, 172, 172, 172, 184, - 184, 184, 184, 184, 74, 74, 66, 66, 66, 66, - 134, 134, 134, 134, 187, 186, 175, 175, 175, 175, - 175, 175, 174, 174, 174, 185, 185, 185, 185, 107, - 181, 189, 189, 188, 188, 190, 190, 190, 190, 190, - 190, 190, 190, 178, 178, 178, 178, 177, 192, 191, - 191, 191, 191, 191, 191, 191, 191, 193, 193, 193, - 193 - ); - - protected array $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, 0, - 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, - 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, - 3, 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, 1, 0, 2, 1, 3, - 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, - 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, - 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, - 2, 1, 2, 1, 1, 1, 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, 1, - 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, - 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, - 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, - 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, - 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, - 5, 6, 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, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, - 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, - 3, 3, 3, 4, 4, 1, 1, 2, 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, 3, - 5, 4, 3, 4, 4, 2, 2, 4, 2, 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, 2, - 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 0, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 5, 3, 3, 4, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, - 1, 4, 2, 2, 1, 3, 1, 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(): void { - $this->reduceCallbacks = [ - 0 => null, - 1 => static function ($self, $stackPos) { - $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); - }, - 2 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 3 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 4 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 5 => null, - 6 => null, - 7 => null, - 8 => null, - 9 => null, - 10 => null, - 11 => null, - 12 => null, - 13 => null, - 14 => null, - 15 => null, - 16 => null, - 17 => null, - 18 => null, - 19 => null, - 20 => null, - 21 => null, - 22 => null, - 23 => null, - 24 => null, - 25 => null, - 26 => null, - 27 => null, - 28 => null, - 29 => null, - 30 => null, - 31 => null, - 32 => null, - 33 => null, - 34 => null, - 35 => null, - 36 => null, - 37 => null, - 38 => null, - 39 => null, - 40 => null, - 41 => null, - 42 => null, - 43 => null, - 44 => null, - 45 => null, - 46 => null, - 47 => null, - 48 => null, - 49 => null, - 50 => null, - 51 => null, - 52 => null, - 53 => null, - 54 => null, - 55 => null, - 56 => null, - 57 => null, - 58 => null, - 59 => null, - 60 => null, - 61 => null, - 62 => null, - 63 => null, - 64 => null, - 65 => null, - 66 => null, - 67 => null, - 68 => null, - 69 => null, - 70 => null, - 71 => null, - 72 => null, - 73 => null, - 74 => null, - 75 => null, - 76 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 77 => null, - 78 => null, - 79 => null, - 80 => null, - 81 => null, - 82 => null, - 83 => null, - 84 => null, - 85 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 86 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 87 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 88 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 89 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 90 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 91 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 92 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 93 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 94 => null, - 95 => static function ($self, $stackPos) { - $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 96 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 97 => static function ($self, $stackPos) { - /* nothing */ - }, - 98 => static function ($self, $stackPos) { - /* nothing */ - }, - 99 => static function ($self, $stackPos) { - /* nothing */ - }, - 100 => static function ($self, $stackPos) { - $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 101 => null, - 102 => null, - 103 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 104 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 105 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 106 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 107 => static function ($self, $stackPos) { - $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 108 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 109 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 110 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 111 => null, - 112 => null, - 113 => null, - 114 => null, - 115 => static function ($self, $stackPos) { - $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 116 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $self->checkNamespace($self->semValue); - }, - 117 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 118 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 119 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 120 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 121 => null, - 122 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); - }, - 123 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); - $self->checkConstantAttributes($self->semValue); - }, - 124 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 125 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 126 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 127 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 128 => null, - 129 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 130 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 131 => null, - 132 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 133 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 134 => null, - 135 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 136 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 137 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 138 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 139 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 140 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 141 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 142 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; - }, - 143 => null, - 144 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 145 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 146 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 147 => null, - 148 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 149 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 150 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 151 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 152 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 153 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 154 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 155 => null, - 156 => null, - 157 => null, - 158 => static function ($self, $stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 159 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 160 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 161 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 162 => static function ($self, $stackPos) { - $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 163 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 164 => static function ($self, $stackPos) { - $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 165 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 166 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 167 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 168 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 169 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 170 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 171 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 172 => static function ($self, $stackPos) { - - $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); - - }, - 173 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 174 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 175 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 176 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 177 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 178 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 179 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); - }, - 180 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 181 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 182 => static function ($self, $stackPos) { - $self->semValue = null; /* means: no statement */ - }, - 183 => null, - 184 => static function ($self, $stackPos) { - $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); - }, - 185 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 186 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 187 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 188 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 189 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 190 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 191 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 192 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 193 => null, - 194 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 195 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 196 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 197 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 198 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 199 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 200 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 201 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 202 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 203 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 204 => null, - 205 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 206 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 207 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 208 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 209 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 210 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(7-2)); - }, - 211 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(8-3)); - }, - 212 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkInterface($self->semValue, $stackPos-(7-3)); - }, - 213 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 214 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkEnum($self->semValue, $stackPos-(8-3)); - }, - 215 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 216 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 217 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 218 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 219 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 220 => null, - 221 => null, - 222 => static function ($self, $stackPos) { - $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 223 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 224 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 225 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 226 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 227 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 228 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 229 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 230 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 231 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 232 => null, - 233 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 234 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 235 => null, - 236 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 237 => null, - 238 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 239 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 240 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 241 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 242 => null, - 243 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 244 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 245 => static function ($self, $stackPos) { - $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 246 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 247 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 248 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 249 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(5-3)]; - }, - 250 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 251 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 252 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 253 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 254 => null, - 255 => null, - 256 => static function ($self, $stackPos) { - $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 257 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 258 => null, - 259 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 260 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 261 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 262 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 263 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 264 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 265 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 266 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 267 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 268 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 269 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 270 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 271 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 272 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 273 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 274 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 275 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 276 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-2)], true); - }, - 277 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 278 => static function ($self, $stackPos) { - $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); - }, - 279 => null, - 280 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 281 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 282 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 283 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 284 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 285 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 286 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 287 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 288 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 289 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 290 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 291 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 292 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 293 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 294 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 295 => static function ($self, $stackPos) { - $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); - }, - 296 => null, - 297 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 298 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 299 => null, - 300 => null, - 301 => static function ($self, $stackPos) { - $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 302 => static function ($self, $stackPos) { - $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); - }, - 303 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 304 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 305 => null, - 306 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 307 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 308 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 309 => null, - 310 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 311 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 312 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 313 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 314 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 315 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 316 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 317 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 318 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 319 => null, - 320 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 321 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 322 => null, - 323 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 324 => null, - 325 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 326 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 327 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 328 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 329 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 330 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 331 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 332 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 333 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - }, - 334 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 335 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); - }, - 336 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 337 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 338 => static function ($self, $stackPos) { - $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 339 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 340 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 341 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 342 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 343 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); - }, - 344 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 345 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 346 => null, - 347 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 348 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 349 => null, - 350 => null, - 351 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 352 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 353 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 354 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 355 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } - }, - 356 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 357 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); - }, - 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); - $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); - $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); - $self->addPropertyNameToHooks($self->semValue); - }, - 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); - $self->checkClassConst($self->semValue, $stackPos-(5-2)); - }, - 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); - $self->checkClassConst($self->semValue, $stackPos-(6-2)); - }, - 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - $self->checkClassMethod($self->semValue, $stackPos-(10-2)); - }, - 363 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 364 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 365 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ - }, - 366 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 367 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 368 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 369 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 370 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 371 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 372 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 373 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 374 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 375 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 376 => null, - 377 => static function ($self, $stackPos) { - $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); - }, - 378 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 379 => null, - 380 => null, - 381 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 382 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 383 => null, - 384 => null, - 385 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 386 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 387 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 388 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 389 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 390 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 391 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 392 => static function ($self, $stackPos) { - $self->semValue = Modifiers::STATIC; - }, - 393 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 394 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 395 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 396 => null, - 397 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 398 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 399 => static function ($self, $stackPos) { - $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 400 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 401 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 402 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 403 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 404 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 405 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); - }, - 406 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, null); - }, - 407 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); - }, - 408 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 409 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 410 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 411 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 412 => static function ($self, $stackPos) { - $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 413 => null, - 414 => null, - 415 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 416 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 417 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 418 => null, - 419 => null, - 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - if (!$self->phpVersion->allowsAssignNewByReference()) { - $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - } - - }, - 425 => null, - 426 => null, - 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 479 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 487 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 488 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 489 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 490 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 491 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); - }, - 492 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 493 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 494 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 495 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 496 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 497 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 498 => static function ($self, $stackPos) { - $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 499 => static function ($self, $stackPos) { - $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 500 => null, - 501 => static function ($self, $stackPos) { - $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 502 => static function ($self, $stackPos) { - $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 503 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 504 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 505 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 506 => static function ($self, $stackPos) { - $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 507 => static function ($self, $stackPos) { - $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 508 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 509 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 510 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 511 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 512 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 513 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 514 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 515 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 516 => static function ($self, $stackPos) { - $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); - $self->checkClass($self->semValue[0], -1); - }, - 517 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 518 => static function ($self, $stackPos) { - list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 519 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 520 => null, - 521 => null, - 522 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 523 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 524 => null, - 525 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 526 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 527 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 528 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 530 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 531 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 532 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 533 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 534 => null, - 535 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 536 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 537 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 538 => static function ($self, $stackPos) { - $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 539 => null, - 540 => null, - 541 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 542 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 543 => null, - 544 => null, - 545 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 546 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; - }, - 547 => static function ($self, $stackPos) { - foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 548 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 549 => null, - 550 => static function ($self, $stackPos) { - $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 551 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 552 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 553 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 554 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 555 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 556 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 557 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 558 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 559 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 560 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 561 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 562 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 563 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); - }, - 564 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); - $self->createdArrays->attach($self->semValue); - }, - 565 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); - }, - 566 => static function ($self, $stackPos) { - $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); - }, - 567 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); - }, - 568 => static function ($self, $stackPos) { - $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); - }, - 569 => static function ($self, $stackPos) { - $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 570 => null, - 571 => null, - 572 => null, - 573 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 574 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); - }, - 575 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 576 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 577 => null, - 578 => null, - 579 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 580 => null, - 581 => null, - 582 => null, - 583 => null, - 584 => null, - 585 => null, - 586 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 587 => null, - 588 => null, - 589 => null, - 590 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 591 => null, - 592 => static function ($self, $stackPos) { - $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 593 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 594 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 595 => null, - 596 => null, - 597 => null, - 598 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 599 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 600 => null, - 601 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 602 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 603 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 604 => static function ($self, $stackPos) { - $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; - }, - 605 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 606 => null, - 607 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 609 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 610 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 611 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 612 => null, - 613 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 614 => null, - 615 => null, - 616 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 617 => null, - 618 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 619 => static function ($self, $stackPos) { - $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $self->postprocessList($self->semValue); - }, - 620 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); - }, - 621 => null, - 622 => static function ($self, $stackPos) { - /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ - }, - 623 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 624 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 625 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 626 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 627 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 628 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 629 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 630 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 631 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); - }, - 632 => static function ($self, $stackPos) { - /* Create an Error node now to remember the position. We'll later either report an error, - or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $self->createEmptyElemAttributes($self->tokenPos); - $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); - }, - 633 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 634 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 635 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 636 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); - }, - 637 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); - }, - 638 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 639 => null, - 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 643 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 644 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 645 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 646 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 647 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 648 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 649 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 650 => null, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Token.php b/vendor/nikic/php-parser/lib/PhpParser/Token.php deleted file mode 100644 index 6683310..0000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Token.php +++ /dev/null @@ -1,18 +0,0 @@ -pos + \strlen($this->text); - } - - /** Get 1-based end line number of the token. */ - public function getEndLine(): int { - return $this->line + \substr_count($this->text, "\n"); - } -} diff --git a/vendor/nikic/php-parser/LICENSE b/vendor/prefixed/nikic/php-parser/LICENSE similarity index 100% rename from vendor/nikic/php-parser/LICENSE rename to vendor/prefixed/nikic/php-parser/LICENSE diff --git a/vendor/nikic/php-parser/bin/php-parse b/vendor/prefixed/nikic/php-parser/bin/php-parse similarity index 65% rename from vendor/nikic/php-parser/bin/php-parse rename to vendor/prefixed/nikic/php-parser/bin/php-parse index fc44f23..ebdbc1f 100755 --- a/vendor/nikic/php-parser/bin/php-parse +++ b/vendor/prefixed/nikic/php-parser/bin/php-parse @@ -1,64 +1,54 @@ #!/usr/bin/env php -createForVersion($attributes['version']); -$dumper = new PhpParser\NodeDumper([ - 'dumpComments' => true, - 'dumpPositions' => $attributes['with-positions'], -]); -$prettyPrinter = new PhpParser\PrettyPrinter\Standard; - +$dumper = new PhpParser\NodeDumper(['dumpComments' => \true, 'dumpPositions' => $attributes['with-positions']]); +$prettyPrinter = new PhpParser\PrettyPrinter\Standard(); $traverser = new PhpParser\NodeTraverser(); -$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); - +$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver()); foreach ($files as $file) { if ($file === '-') { - $code = file_get_contents('php://stdin'); - fwrite(STDERR, "====> Stdin:\n"); - } else if (strpos($file, ' Code $code\n"); + $code = \file_get_contents('php://stdin'); + \fwrite(\STDERR, "====> Stdin:\n"); } else { - if (!file_exists($file)) { - fwrite(STDERR, "File $file does not exist.\n"); - exit(1); + if (\strpos($file, ' Code {$code}\n"); + } else { + if (!\file_exists($file)) { + \fwrite(\STDERR, "File {$file} does not exist.\n"); + exit(1); + } + $code = \file_get_contents($file); + \fwrite(\STDERR, "====> File {$file}:\n"); } - - $code = file_get_contents($file); - fwrite(STDERR, "====> File $file:\n"); } - if ($attributes['with-recovery']) { - $errorHandler = new PhpParser\ErrorHandler\Collecting; + $errorHandler = new PhpParser\ErrorHandler\Collecting(); $stmts = $parser->parse($code, $errorHandler); foreach ($errorHandler->getErrors() as $error) { $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); + \fwrite(\STDERR, $message . "\n"); } if (null === $stmts) { continue; @@ -68,44 +58,43 @@ foreach ($files as $file) { $stmts = $parser->parse($code); } catch (PhpParser\Error $error) { $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); + \fwrite(\STDERR, $message . "\n"); exit(1); } } - foreach ($operations as $operation) { if ('dump' === $operation) { - fwrite(STDERR, "==> Node dump:\n"); + \fwrite(\STDERR, "==> Node dump:\n"); echo $dumper->dump($stmts, $code), "\n"; } elseif ('pretty-print' === $operation) { - fwrite(STDERR, "==> Pretty print:\n"); + \fwrite(\STDERR, "==> Pretty print:\n"); echo $prettyPrinter->prettyPrintFile($stmts), "\n"; } elseif ('json-dump' === $operation) { - fwrite(STDERR, "==> JSON dump:\n"); - echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; + \fwrite(\STDERR, "==> JSON dump:\n"); + echo \json_encode($stmts, \JSON_PRETTY_PRINT), "\n"; } elseif ('var-dump' === $operation) { - fwrite(STDERR, "==> var_dump():\n"); - var_dump($stmts); + \fwrite(\STDERR, "==> var_dump():\n"); + \var_dump($stmts); } elseif ('resolve-names' === $operation) { - fwrite(STDERR, "==> Resolved names.\n"); + \fwrite(\STDERR, "==> Resolved names.\n"); $stmts = $traverser->traverse($stmts); } } } - -function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { +function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) +{ if ($withColumnInfo && $e->hasColumnInfo()) { return $e->getMessageWithColumnInfo($code); } else { return $e->getMessage(); } } - -function showHelp($error = '') { +function showHelp($error = '') +{ if ($error) { - fwrite(STDERR, $error . "\n\n"); + \fwrite(\STDERR, $error . "\n\n"); } - fwrite($error ? STDERR : STDOUT, <<<'OUTPUT' + \fwrite($error ? \STDERR : \STDOUT, <<<'OUTPUT' Usage: php-parse [operations] file1.php [file2.php ...] or: php-parse [operations] " false, - 'with-positions' => false, - 'with-recovery' => false, - 'version' => PhpParser\PhpVersion::getNewestSupported(), - ]; - - array_shift($args); - $parseOptions = true; + $attributes = ['with-column-info' => \false, 'with-positions' => \false, 'with-recovery' => \false, 'version' => PhpParser\PhpVersion::getNewestSupported()]; + \array_shift($args); + $parseOptions = \true; foreach ($args as $arg) { if (!$parseOptions) { $files[] = $arg; continue; } - switch ($arg) { case '--dump': case '-d': @@ -169,38 +151,37 @@ function parseArgs($args) { $operations[] = 'var-dump'; break; case '--resolve-names': - case '-N'; + case '-N': $operations[] = 'resolve-names'; break; case '--with-column-info': - case '-c'; - $attributes['with-column-info'] = true; + case '-c': + $attributes['with-column-info'] = \true; break; case '--with-positions': case '-P': - $attributes['with-positions'] = true; + $attributes['with-positions'] = \true; break; case '--with-recovery': case '-r': - $attributes['with-recovery'] = true; + $attributes['with-recovery'] = \true; break; case '--help': - case '-h'; + case '-h': showHelp(); break; case '--': - $parseOptions = false; + $parseOptions = \false; break; default: - if (preg_match('/^--version=(.*)$/', $arg, $matches)) { + if (\preg_match('/^--version=(.*)$/', $arg, $matches)) { $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { - showHelp("Invalid operation $arg."); + showHelp("Invalid operation {$arg}."); } else { $files[] = $arg; } } } - return [$operations, $files, $attributes]; } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder.php new file mode 100644 index 0000000..21bdc7c --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder.php @@ -0,0 +1,14 @@ + */ - protected array $attributes = []; + protected $attributes = []; /** @var list */ - protected array $constants = []; - + protected $constants = []; /** @var list */ - protected array $attributeGroups = []; + protected $attributeGroups = []; /** @var Identifier|Node\Name|Node\ComplexType|null */ - protected ?Node $type = null; - + protected $type; /** * Creates a class constant builder * * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value */ - public function __construct($name, $value) { + public function __construct($name, $value) + { $this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))]; } - /** * Add another constant to const group * @@ -42,56 +42,51 @@ public function __construct($name, $value) { * * @return $this The builder instance (for fluid interface) */ - public function addConst($name, $value) { + public function addConst($name, $value) + { $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value)); - return $this; } - /** * Makes the constant public. * * @return $this The builder instance (for fluid interface) */ - public function makePublic() { + public function makePublic() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - return $this; } - /** * Makes the constant protected. * * @return $this The builder instance (for fluid interface) */ - public function makeProtected() { + public function makeProtected() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - return $this; } - /** * Makes the constant private. * * @return $this The builder instance (for fluid interface) */ - public function makePrivate() { + public function makePrivate() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - return $this; } - /** * Makes the constant final. * * @return $this The builder instance (for fluid interface) */ - public function makeFinal() { + public function makeFinal() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - return $this; } - /** * Sets doc comment for the constant. * @@ -99,14 +94,11 @@ public function makeFinal() { * * @return $this The builder instance (for fluid interface) */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - + public function setDocComment($docComment) + { + $this->attributes = ['comments' => [BuilderHelpers::normalizeDocComment($docComment)]]; return $this; } - /** * Adds an attribute group. * @@ -114,12 +106,11 @@ public function setDocComment($docComment) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Sets the constant type. * @@ -127,24 +118,18 @@ public function addAttribute($attribute) { * * @return $this */ - public function setType($type) { + public function setType($type) + { $this->type = BuilderHelpers::normalizeType($type); - return $this; } - /** * Returns the built class node. * * @return Stmt\ClassConst The built constant node */ - public function getNode(): PhpParser\Node { - return new Stmt\ClassConst( - $this->constants, - $this->flags, - $this->attributes, - $this->attributeGroups, - $this->type - ); + public function getNode() : PhpParser\Node + { + return new Stmt\ClassConst($this->constants, $this->flags, $this->attributes, $this->attributeGroups, $this->type); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Class_.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Class_.php index 6f39431..ecf3b8f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Class_.php @@ -1,40 +1,49 @@ - */ - protected array $implements = []; - protected int $flags = 0; + protected $implements = []; + /** + * @var int + */ + protected $flags = 0; /** @var list */ - protected array $uses = []; + protected $uses = []; /** @var list */ - protected array $constants = []; + protected $constants = []; /** @var list */ - protected array $properties = []; + protected $properties = []; /** @var list */ - protected array $methods = []; + protected $methods = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates a class builder. * * @param string $name Name of the class */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Extends a class. * @@ -42,12 +51,11 @@ public function __construct(string $name) { * * @return $this The builder instance (for fluid interface) */ - public function extend($class) { + public function extend($class) + { $this->extends = BuilderHelpers::normalizeName($class); - return $this; } - /** * Implements one or more interfaces. * @@ -55,47 +63,43 @@ public function extend($class) { * * @return $this The builder instance (for fluid interface) */ - public function implement(...$interfaces) { + public function implement(...$interfaces) + { foreach ($interfaces as $interface) { $this->implements[] = BuilderHelpers::normalizeName($interface); } - return $this; } - /** * Makes the class abstract. * * @return $this The builder instance (for fluid interface) */ - public function makeAbstract() { + public function makeAbstract() + { $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); - return $this; } - /** * Makes the class final. * * @return $this The builder instance (for fluid interface) */ - public function makeFinal() { + public function makeFinal() + { $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); - return $this; } - /** * Makes the class readonly. * * @return $this The builder instance (for fluid interface) */ - public function makeReadonly() { + public function makeReadonly() + { $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); - return $this; } - /** * Adds a statement. * @@ -103,9 +107,9 @@ public function makeReadonly() { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { $stmt = BuilderHelpers::normalizeNode($stmt); - if ($stmt instanceof Stmt\Property) { $this->properties[] = $stmt; } elseif ($stmt instanceof Stmt\ClassMethod) { @@ -117,10 +121,8 @@ public function addStmt($stmt) { } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - return $this; } - /** * Adds an attribute group. * @@ -128,24 +130,18 @@ public function addStmt($stmt) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built class node. * * @return Stmt\Class_ The built class node */ - public function getNode(): PhpParser\Node { - return new Stmt\Class_($this->name, [ - 'flags' => $this->flags, - 'extends' => $this->extends, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); + public function getNode() : PhpParser\Node + { + return new Stmt\Class_($this->name, ['flags' => $this->flags, 'extends' => $this->extends, 'implements' => $this->implements, 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Declaration.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Declaration.php index 488b721..651e1a3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Declaration.php @@ -1,14 +1,14 @@ - */ - protected array $attributes = []; - + protected $attributes = []; /** * Adds a statement. * @@ -16,8 +16,7 @@ abstract class Declaration implements PhpParser\Builder { * * @return $this The builder instance (for fluid interface) */ - abstract public function addStmt($stmt); - + public abstract function addStmt($stmt); /** * Adds multiple statements. * @@ -25,14 +24,13 @@ abstract public function addStmt($stmt); * * @return $this The builder instance (for fluid interface) */ - public function addStmts(array $stmts) { + public function addStmts(array $stmts) + { foreach ($stmts as $stmt) { $this->addStmt($stmt); } - return $this; } - /** * Sets doc comment for the declaration. * @@ -40,11 +38,9 @@ public function addStmts(array $stmts) { * * @return $this The builder instance (for fluid interface) */ - public function setDocComment($docComment) { - $this->attributes['comments'] = [ - BuilderHelpers::normalizeDocComment($docComment) - ]; - + public function setDocComment($docComment) + { + $this->attributes['comments'] = [BuilderHelpers::normalizeDocComment($docComment)]; return $this; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php similarity index 52% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php index c766321..64c4310 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php @@ -1,34 +1,34 @@ */ - protected array $attributes = []; - + protected $attributes = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates an enum case builder. * * @param string|Identifier $name Name */ - public function __construct($name) { + public function __construct($name) + { $this->name = $name; } - /** * Sets the value. * @@ -36,12 +36,11 @@ public function __construct($name) { * * @return $this */ - public function setValue($value) { + public function setValue($value) + { $this->value = BuilderHelpers::normalizeValue($value); - return $this; } - /** * Sets doc comment for the constant. * @@ -49,14 +48,11 @@ public function setValue($value) { * * @return $this The builder instance (for fluid interface) */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - + public function setDocComment($docComment) + { + $this->attributes = ['comments' => [BuilderHelpers::normalizeDocComment($docComment)]]; return $this; } - /** * Adds an attribute group. * @@ -64,23 +60,18 @@ public function setDocComment($docComment) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built enum case node. * * @return Stmt\EnumCase The built constant node */ - public function getNode(): PhpParser\Node { - return new Stmt\EnumCase( - $this->name, - $this->value, - $this->attributeGroups, - $this->attributes - ); + public function getNode() : PhpParser\Node + { + return new Stmt\EnumCase($this->name, $this->value, $this->attributeGroups, $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Enum_.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Enum_.php index c00df03..9eb67ac 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Enum_.php @@ -1,39 +1,45 @@ - */ - protected array $implements = []; + protected $implements = []; /** @var list */ - protected array $uses = []; + protected $uses = []; /** @var list */ - protected array $enumCases = []; + protected $enumCases = []; /** @var list */ - protected array $constants = []; + protected $constants = []; /** @var list */ - protected array $methods = []; + protected $methods = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates an enum builder. * * @param string $name Name of the enum */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Sets the scalar type. * @@ -41,12 +47,11 @@ public function __construct(string $name) { * * @return $this */ - public function setScalarType($scalarType) { + public function setScalarType($scalarType) + { $this->scalarType = BuilderHelpers::normalizeType($scalarType); - return $this; } - /** * Implements one or more interfaces. * @@ -54,14 +59,13 @@ public function setScalarType($scalarType) { * * @return $this The builder instance (for fluid interface) */ - public function implement(...$interfaces) { + public function implement(...$interfaces) + { foreach ($interfaces as $interface) { $this->implements[] = BuilderHelpers::normalizeName($interface); } - return $this; } - /** * Adds a statement. * @@ -69,9 +73,9 @@ public function implement(...$interfaces) { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { $stmt = BuilderHelpers::normalizeNode($stmt); - if ($stmt instanceof Stmt\EnumCase) { $this->enumCases[] = $stmt; } elseif ($stmt instanceof Stmt\ClassMethod) { @@ -83,10 +87,8 @@ public function addStmt($stmt) { } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - return $this; } - /** * Adds an attribute group. * @@ -94,23 +96,18 @@ public function addStmt($stmt) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built class node. * * @return Stmt\Enum_ The built enum node */ - public function getNode(): PhpParser\Node { - return new Stmt\Enum_($this->name, [ - 'scalarType' => $this->scalarType, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); + public function getNode() : PhpParser\Node + { + return new Stmt\Enum_($this->name, ['scalarType' => $this->scalarType, 'implements' => $this->implements, 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php similarity index 68% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php index ff79cb6..a4d5ac6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php @@ -1,29 +1,30 @@ -returnByRef = true; - + public function makeReturnByRef() + { + $this->returnByRef = \true; return $this; } - /** * Adds a parameter. * @@ -31,18 +32,15 @@ public function makeReturnByRef() { * * @return $this The builder instance (for fluid interface) */ - public function addParam($param) { + public function addParam($param) + { $param = BuilderHelpers::normalizeNode($param); - if (!$param instanceof Node\Param) { throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType())); } - $this->params[] = $param; - return $this; } - /** * Adds multiple parameters. * @@ -50,14 +48,13 @@ public function addParam($param) { * * @return $this The builder instance (for fluid interface) */ - public function addParams(array $params) { + public function addParams(array $params) + { foreach ($params as $param) { $this->addParam($param); } - return $this; } - /** * Sets the return type for PHP 7. * @@ -65,9 +62,9 @@ public function addParams(array $params) { * * @return $this The builder instance (for fluid interface) */ - public function setReturnType($type) { + public function setReturnType($type) + { $this->returnType = BuilderHelpers::normalizeType($type); - return $this; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Function_.php similarity index 50% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Function_.php index 48f5f69..93779b4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Function_.php @@ -1,29 +1,31 @@ - */ - protected array $stmts = []; - + protected $stmts = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates a function builder. * * @param string $name Name of the function */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Adds a statement. * @@ -31,12 +33,11 @@ public function __construct(string $name) { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - return $this; } - /** * Adds an attribute group. * @@ -44,24 +45,18 @@ public function addStmt($stmt) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built function node. * * @return Stmt\Function_ The built function node */ - public function getNode(): Node { - return new Stmt\Function_($this->name, [ - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); + public function getNode() : Node + { + return new Stmt\Function_($this->name, ['byRef' => $this->returnByRef, 'params' => $this->params, 'returnType' => $this->returnType, 'stmts' => $this->stmts, 'attrGroups' => $this->attributeGroups], $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Interface_.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Interface_.php index 13dd3f7..0de1865 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Interface_.php @@ -1,33 +1,36 @@ - */ - protected array $extends = []; + protected $extends = []; /** @var list */ - protected array $constants = []; + protected $constants = []; /** @var list */ - protected array $methods = []; + protected $methods = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates an interface builder. * * @param string $name Name of the interface */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Extends one or more interfaces. * @@ -35,14 +38,13 @@ public function __construct(string $name) { * * @return $this The builder instance (for fluid interface) */ - public function extend(...$interfaces) { + public function extend(...$interfaces) + { foreach ($interfaces as $interface) { $this->extends[] = BuilderHelpers::normalizeName($interface); } - return $this; } - /** * Adds a statement. * @@ -50,9 +52,9 @@ public function extend(...$interfaces) { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { $stmt = BuilderHelpers::normalizeNode($stmt); - if ($stmt instanceof Stmt\ClassConst) { $this->constants[] = $stmt; } elseif ($stmt instanceof Stmt\ClassMethod) { @@ -62,10 +64,8 @@ public function addStmt($stmt) { } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - return $this; } - /** * Adds an attribute group. * @@ -73,22 +73,18 @@ public function addStmt($stmt) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built interface node. * * @return Stmt\Interface_ The built interface node */ - public function getNode(): PhpParser\Node { - return new Stmt\Interface_($this->name, [ - 'extends' => $this->extends, - 'stmts' => array_merge($this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); + public function getNode() : PhpParser\Node + { + return new Stmt\Interface_($this->name, ['extends' => $this->extends, 'stmts' => array_merge($this->constants, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Method.php similarity index 65% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Method.php index 8358dbe..0e4d5ac 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Method.php @@ -1,104 +1,101 @@ -|null */ - protected ?array $stmts = []; - + protected $stmts = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates a method builder. * * @param string $name Name of the method */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Makes the method public. * * @return $this The builder instance (for fluid interface) */ - public function makePublic() { + public function makePublic() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - return $this; } - /** * Makes the method protected. * * @return $this The builder instance (for fluid interface) */ - public function makeProtected() { + public function makeProtected() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - return $this; } - /** * Makes the method private. * * @return $this The builder instance (for fluid interface) */ - public function makePrivate() { + public function makePrivate() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - return $this; } - /** * Makes the method static. * * @return $this The builder instance (for fluid interface) */ - public function makeStatic() { + public function makeStatic() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); - return $this; } - /** * Makes the method abstract. * * @return $this The builder instance (for fluid interface) */ - public function makeAbstract() { + public function makeAbstract() + { if (!empty($this->stmts)) { throw new \LogicException('Cannot make method with statements abstract'); } - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); - $this->stmts = null; // abstract methods don't have statements - + $this->stmts = null; + // abstract methods don't have statements return $this; } - /** * Makes the method final. * * @return $this The builder instance (for fluid interface) */ - public function makeFinal() { + public function makeFinal() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - return $this; } - /** * Adds a statement. * @@ -106,16 +103,14 @@ public function makeFinal() { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { if (null === $this->stmts) { throw new \LogicException('Cannot add statements to an abstract method'); } - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - return $this; } - /** * Adds an attribute group. * @@ -123,25 +118,18 @@ public function addStmt($stmt) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built method node. * * @return Stmt\ClassMethod The built method node */ - public function getNode(): Node { - return new Stmt\ClassMethod($this->name, [ - 'flags' => $this->flags, - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); + public function getNode() : Node + { + return new Stmt\ClassMethod($this->name, ['flags' => $this->flags, 'byRef' => $this->returnByRef, 'params' => $this->params, 'returnType' => $this->returnType, 'stmts' => $this->stmts, 'attrGroups' => $this->attributeGroups], $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php similarity index 53% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php index 80fe6f8..ede9790 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php @@ -1,26 +1,29 @@ -name = null !== $name ? BuilderHelpers::normalizeName($name) : null; } - /** * Adds a statement. * @@ -28,18 +31,18 @@ public function __construct($name) { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - return $this; } - /** * Returns the built node. * * @return Stmt\Namespace_ The built node */ - public function getNode(): Node { + public function getNode() : Node + { return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Param.php similarity index 67% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Param.php index 324a32b..0bc965c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -1,32 +1,47 @@ - */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates a parameter builder. * * @param string $name Name of the parameter */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Sets default value for the parameter. * @@ -34,12 +49,11 @@ public function __construct(string $name) { * * @return $this The builder instance (for fluid interface) */ - public function setDefault($value) { + public function setDefault($value) + { $this->default = BuilderHelpers::normalizeValue($value); - return $this; } - /** * Sets type for the parameter. * @@ -47,103 +61,94 @@ public function setDefault($value) { * * @return $this The builder instance (for fluid interface) */ - public function setType($type) { + public function setType($type) + { $this->type = BuilderHelpers::normalizeType($type); if ($this->type == 'void') { throw new \LogicException('Parameter type cannot be void'); } - return $this; } - /** * Make the parameter accept the value by reference. * * @return $this The builder instance (for fluid interface) */ - public function makeByRef() { - $this->byRef = true; - + public function makeByRef() + { + $this->byRef = \true; return $this; } - /** * Make the parameter variadic * * @return $this The builder instance (for fluid interface) */ - public function makeVariadic() { - $this->variadic = true; - + public function makeVariadic() + { + $this->variadic = \true; return $this; } - /** * Makes the (promoted) parameter public. * * @return $this The builder instance (for fluid interface) */ - public function makePublic() { + public function makePublic() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - return $this; } - /** * Makes the (promoted) parameter protected. * * @return $this The builder instance (for fluid interface) */ - public function makeProtected() { + public function makeProtected() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - return $this; } - /** * Makes the (promoted) parameter private. * * @return $this The builder instance (for fluid interface) */ - public function makePrivate() { + public function makePrivate() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - return $this; } - /** * Makes the (promoted) parameter readonly. * * @return $this The builder instance (for fluid interface) */ - public function makeReadonly() { + public function makeReadonly() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); - return $this; } - /** * Gives the promoted property private(set) visibility. * * @return $this The builder instance (for fluid interface) */ - public function makePrivateSet() { + public function makePrivateSet() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); - return $this; } - /** * Gives the promoted property protected(set) visibility. * * @return $this The builder instance (for fluid interface) */ - public function makeProtectedSet() { + public function makeProtectedSet() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); - return $this; } - /** * Adds an attribute group. * @@ -151,21 +156,18 @@ public function makeProtectedSet() { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built parameter node. * * @return Node\Param The built parameter node */ - public function getNode(): Node { - return new Node\Param( - new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups - ); + public function getNode() : Node + { + return new Node\Param(new Node\Expr\Variable($this->name), $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Property.php similarity index 67% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Property.php index c80fe48..b980878 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -1,139 +1,137 @@ - */ - protected array $attributes = []; + protected $attributes = []; /** @var null|Identifier|Name|ComplexType */ - protected ?Node $type = null; + protected $type; /** @var list */ - protected array $attributeGroups = []; + protected $attributeGroups = []; /** @var list */ - protected array $hooks = []; - + protected $hooks = []; /** * Creates a property builder. * * @param string $name Name of the property */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Makes the property public. * * @return $this The builder instance (for fluid interface) */ - public function makePublic() { + public function makePublic() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - return $this; } - /** * Makes the property protected. * * @return $this The builder instance (for fluid interface) */ - public function makeProtected() { + public function makeProtected() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - return $this; } - /** * Makes the property private. * * @return $this The builder instance (for fluid interface) */ - public function makePrivate() { + public function makePrivate() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - return $this; } - /** * Makes the property static. * * @return $this The builder instance (for fluid interface) */ - public function makeStatic() { + public function makeStatic() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); - return $this; } - /** * Makes the property readonly. * * @return $this The builder instance (for fluid interface) */ - public function makeReadonly() { + public function makeReadonly() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); - return $this; } - /** * Makes the property abstract. Requires at least one property hook to be specified as well. * * @return $this The builder instance (for fluid interface) */ - public function makeAbstract() { + public function makeAbstract() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); - return $this; } - /** * Makes the property final. * * @return $this The builder instance (for fluid interface) */ - public function makeFinal() { + public function makeFinal() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - return $this; } - /** * Gives the property private(set) visibility. * * @return $this The builder instance (for fluid interface) */ - public function makePrivateSet() { + public function makePrivateSet() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); - return $this; } - /** * Gives the property protected(set) visibility. * * @return $this The builder instance (for fluid interface) */ - public function makeProtectedSet() { + public function makeProtectedSet() + { $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); - return $this; } - /** * Sets default value for the property. * @@ -141,12 +139,11 @@ public function makeProtectedSet() { * * @return $this The builder instance (for fluid interface) */ - public function setDefault($value) { + public function setDefault($value) + { $this->default = BuilderHelpers::normalizeValue($value); - return $this; } - /** * Sets doc comment for the property. * @@ -154,14 +151,11 @@ public function setDefault($value) { * * @return $this The builder instance (for fluid interface) */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - + public function setDocComment($docComment) + { + $this->attributes = ['comments' => [BuilderHelpers::normalizeDocComment($docComment)]]; return $this; } - /** * Sets the property type for PHP 7.4+. * @@ -169,12 +163,11 @@ public function setDocComment($docComment) { * * @return $this */ - public function setType($type) { + public function setType($type) + { $this->type = BuilderHelpers::normalizeType($type); - return $this; } - /** * Adds an attribute group. * @@ -182,42 +175,31 @@ public function setType($type) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Adds a property hook. * * @return $this The builder instance (for fluid interface) */ - public function addHook(Node\PropertyHook $hook) { + public function addHook(Node\PropertyHook $hook) + { $this->hooks[] = $hook; - return $this; } - /** * Returns the built class node. * * @return Stmt\Property The built property node */ - public function getNode(): PhpParser\Node { + public function getNode() : PhpParser\Node + { if ($this->flags & Modifiers::ABSTRACT && !$this->hooks) { throw new PhpParser\Error('Only hooked properties may be declared abstract'); } - - return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, - [ - new Node\PropertyItem($this->name, $this->default) - ], - $this->attributes, - $this->type, - $this->attributeGroups, - $this->hooks - ); + return new Stmt\Property($this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [new Node\PropertyItem($this->name, $this->default)], $this->attributes, $this->type, $this->attributeGroups, $this->hooks); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php similarity index 67% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php index cf21c82..9760917 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php @@ -1,29 +1,29 @@ -and($trait); } } - /** * Adds used trait. * @@ -31,11 +31,11 @@ public function __construct(...$traits) { * * @return $this The builder instance (for fluid interface) */ - public function and($trait) { + public function and($trait) + { $this->traits[] = BuilderHelpers::normalizeName($trait); return $this; } - /** * Adds trait adaptation. * @@ -43,23 +43,22 @@ public function and($trait) { * * @return $this The builder instance (for fluid interface) */ - public function with($adaptation) { + public function with($adaptation) + { $adaptation = BuilderHelpers::normalizeNode($adaptation); - if (!$adaptation instanceof Stmt\TraitUseAdaptation) { throw new \LogicException('Adaptation must have type TraitUseAdaptation'); } - $this->adaptations[] = $adaptation; return $this; } - /** * Returns the built node. * * @return Node The built node */ - public function getNode(): Node { + public function getNode() : Node + { return new Stmt\TraitUse($this->traits, $this->adaptations); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php similarity index 71% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php index fee0958..d2d7e2f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -1,39 +1,52 @@ -type = self::TYPE_UNDEFINED; - $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); $this->method = BuilderHelpers::normalizeIdentifier($method); } - /** * Sets alias of method. * @@ -41,49 +54,47 @@ public function __construct($trait, $method) { * * @return $this The builder instance (for fluid interface) */ - public function as($alias) { + public function as($alias) + { if ($this->type === self::TYPE_UNDEFINED) { $this->type = self::TYPE_ALIAS; } - if ($this->type !== self::TYPE_ALIAS) { throw new \LogicException('Cannot set alias for not alias adaptation buider'); } - $this->alias = BuilderHelpers::normalizeIdentifier($alias); return $this; } - /** * Sets adapted method public. * * @return $this The builder instance (for fluid interface) */ - public function makePublic() { + public function makePublic() + { $this->setModifier(Modifiers::PUBLIC); return $this; } - /** * Sets adapted method protected. * * @return $this The builder instance (for fluid interface) */ - public function makeProtected() { + public function makeProtected() + { $this->setModifier(Modifiers::PROTECTED); return $this; } - /** * Sets adapted method private. * * @return $this The builder instance (for fluid interface) */ - public function makePrivate() { + public function makePrivate() + { $this->setModifier(Modifiers::PRIVATE); return $this; } - /** * Adds overwritten traits. * @@ -91,48 +102,43 @@ public function makePrivate() { * * @return $this The builder instance (for fluid interface) */ - public function insteadof(...$traits) { + public function insteadof(...$traits) + { if ($this->type === self::TYPE_UNDEFINED) { if (is_null($this->trait)) { throw new \LogicException('Precedence adaptation must have trait'); } - $this->type = self::TYPE_PRECEDENCE; } - if ($this->type !== self::TYPE_PRECEDENCE) { throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider'); } - foreach ($traits as $trait) { $this->insteadof[] = BuilderHelpers::normalizeName($trait); } - return $this; } - - protected function setModifier(int $modifier): void { + protected function setModifier(int $modifier) : void + { if ($this->type === self::TYPE_UNDEFINED) { $this->type = self::TYPE_ALIAS; } - if ($this->type !== self::TYPE_ALIAS) { throw new \LogicException('Cannot set access modifier for not alias adaptation buider'); } - if (is_null($this->modifier)) { $this->modifier = $modifier; } else { throw new \LogicException('Multiple access type modifiers are not allowed'); } } - /** * Returns the built node. * * @return Node The built node */ - public function getNode(): Node { + public function getNode() : Node + { switch ($this->type) { case self::TYPE_ALIAS: return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Trait_.php similarity index 61% rename from vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Trait_.php index ffa1bd5..f05e219 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Trait_.php @@ -1,34 +1,37 @@ - */ - protected array $uses = []; + protected $uses = []; /** @var list */ - protected array $constants = []; + protected $constants = []; /** @var list */ - protected array $properties = []; + protected $properties = []; /** @var list */ - protected array $methods = []; + protected $methods = []; /** @var list */ - protected array $attributeGroups = []; - + protected $attributeGroups = []; /** * Creates an interface builder. * * @param string $name Name of the interface */ - public function __construct(string $name) { + public function __construct(string $name) + { $this->name = $name; } - /** * Adds a statement. * @@ -36,9 +39,9 @@ public function __construct(string $name) { * * @return $this The builder instance (for fluid interface) */ - public function addStmt($stmt) { + public function addStmt($stmt) + { $stmt = BuilderHelpers::normalizeNode($stmt); - if ($stmt instanceof Stmt\Property) { $this->properties[] = $stmt; } elseif ($stmt instanceof Stmt\ClassMethod) { @@ -50,10 +53,8 @@ public function addStmt($stmt) { } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - return $this; } - /** * Adds an attribute group. * @@ -61,23 +62,18 @@ public function addStmt($stmt) { * * @return $this The builder instance (for fluid interface) */ - public function addAttribute($attribute) { + public function addAttribute($attribute) + { $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - return $this; } - /** * Returns the built trait node. * * @return Stmt\Trait_ The built interface node */ - public function getNode(): PhpParser\Node { - return new Stmt\Trait_( - $this->name, [ - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes - ); + public function getNode() : PhpParser\Node + { + return new Stmt\Trait_($this->name, ['stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups], $this->attributes); } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Use_.php new file mode 100644 index 0000000..f5656ae --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Builder/Use_.php @@ -0,0 +1,54 @@ +name = BuilderHelpers::normalizeName($name); + $this->type = $type; + } + /** + * Sets alias for used name. + * + * @param string $alias Alias to use (last component of full name by default) + * + * @return $this The builder instance (for fluid interface) + */ + public function as(string $alias) + { + $this->alias = $alias; + return $this; + } + /** + * Returns the built node. + * + * @return Stmt\Use_ The built node + */ + public function getNode() : Node + { + return new Stmt\Use_([new Node\UseItem($this->name, $this->alias)], $this->type); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/BuilderFactory.php similarity index 70% rename from vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/BuilderFactory.php index 07642f9..c10afb3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -1,29 +1,27 @@ -args($args) - ); + public function attribute($name, array $args = []) : Node\Attribute + { + return new Node\Attribute(BuilderHelpers::normalizeName($name), $this->args($args)); } - /** * Creates a namespace builder. * @@ -31,10 +29,10 @@ public function attribute($name, array $args = []): Node\Attribute { * * @return Builder\Namespace_ The created namespace builder */ - public function namespace($name): Builder\Namespace_ { + public function namespace($name) : Builder\Namespace_ + { return new Builder\Namespace_($name); } - /** * Creates a class builder. * @@ -42,10 +40,10 @@ public function namespace($name): Builder\Namespace_ { * * @return Builder\Class_ The created class builder */ - public function class(string $name): Builder\Class_ { + public function class(string $name) : Builder\Class_ + { return new Builder\Class_($name); } - /** * Creates an interface builder. * @@ -53,10 +51,10 @@ public function class(string $name): Builder\Class_ { * * @return Builder\Interface_ The created interface builder */ - public function interface(string $name): Builder\Interface_ { + public function interface(string $name) : Builder\Interface_ + { return new Builder\Interface_($name); } - /** * Creates a trait builder. * @@ -64,10 +62,10 @@ public function interface(string $name): Builder\Interface_ { * * @return Builder\Trait_ The created trait builder */ - public function trait(string $name): Builder\Trait_ { + public function trait(string $name) : Builder\Trait_ + { return new Builder\Trait_($name); } - /** * Creates an enum builder. * @@ -75,10 +73,10 @@ public function trait(string $name): Builder\Trait_ { * * @return Builder\Enum_ The created enum builder */ - public function enum(string $name): Builder\Enum_ { + public function enum(string $name) : Builder\Enum_ + { return new Builder\Enum_($name); } - /** * Creates a trait use builder. * @@ -86,10 +84,10 @@ public function enum(string $name): Builder\Enum_ { * * @return Builder\TraitUse The created trait use builder */ - public function useTrait(...$traits): Builder\TraitUse { + public function useTrait(...$traits) : Builder\TraitUse + { return new Builder\TraitUse(...$traits); } - /** * Creates a trait use adaptation builder. * @@ -98,15 +96,14 @@ public function useTrait(...$traits): Builder\TraitUse { * * @return Builder\TraitUseAdaptation The created trait use adaptation builder */ - public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { + public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation + { if ($method === null) { $method = $trait; $trait = null; } - return new Builder\TraitUseAdaptation($trait, $method); } - /** * Creates a method builder. * @@ -114,10 +111,10 @@ public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdap * * @return Builder\Method The created method builder */ - public function method(string $name): Builder\Method { + public function method(string $name) : Builder\Method + { return new Builder\Method($name); } - /** * Creates a parameter builder. * @@ -125,10 +122,10 @@ public function method(string $name): Builder\Method { * * @return Builder\Param The created parameter builder */ - public function param(string $name): Builder\Param { + public function param(string $name) : Builder\Param + { return new Builder\Param($name); } - /** * Creates a property builder. * @@ -136,10 +133,10 @@ public function param(string $name): Builder\Param { * * @return Builder\Property The created property builder */ - public function property(string $name): Builder\Property { + public function property(string $name) : Builder\Property + { return new Builder\Property($name); } - /** * Creates a function builder. * @@ -147,10 +144,10 @@ public function property(string $name): Builder\Property { * * @return Builder\Function_ The created function builder */ - public function function(string $name): Builder\Function_ { + public function function(string $name) : Builder\Function_ + { return new Builder\Function_($name); } - /** * Creates a namespace/class use builder. * @@ -158,10 +155,10 @@ public function function(string $name): Builder\Function_ { * * @return Builder\Use_ The created use builder */ - public function use($name): Builder\Use_ { + public function use($name) : Builder\Use_ + { return new Builder\Use_($name, Use_::TYPE_NORMAL); } - /** * Creates a function use builder. * @@ -169,10 +166,10 @@ public function use($name): Builder\Use_ { * * @return Builder\Use_ The created use function builder */ - public function useFunction($name): Builder\Use_ { + public function useFunction($name) : Builder\Use_ + { return new Builder\Use_($name, Use_::TYPE_FUNCTION); } - /** * Creates a constant use builder. * @@ -180,10 +177,10 @@ public function useFunction($name): Builder\Use_ { * * @return Builder\Use_ The created use const builder */ - public function useConst($name): Builder\Use_ { + public function useConst($name) : Builder\Use_ + { return new Builder\Use_($name, Use_::TYPE_CONSTANT); } - /** * Creates a class constant builder. * @@ -192,10 +189,10 @@ public function useConst($name): Builder\Use_ { * * @return Builder\ClassConst The created use const builder */ - public function classConst($name, $value): Builder\ClassConst { + public function classConst($name, $value) : Builder\ClassConst + { return new Builder\ClassConst($name, $value); } - /** * Creates an enum case builder. * @@ -203,32 +200,31 @@ public function classConst($name, $value): Builder\ClassConst { * * @return Builder\EnumCase The created use const builder */ - public function enumCase($name): Builder\EnumCase { + public function enumCase($name) : Builder\EnumCase + { return new Builder\EnumCase($name); } - /** * Creates node a for a literal value. * * @param Expr|bool|null|int|float|string|array|\UnitEnum $value $value */ - public function val($value): Expr { + public function val($value) : Expr + { return BuilderHelpers::normalizeValue($value); } - /** * Creates variable node. * * @param string|Expr $name Name */ - public function var($name): Expr\Variable { + public function var($name) : Expr\Variable + { if (!\is_string($name) && !$name instanceof Expr) { throw new \LogicException('Variable name must be string or Expr'); } - return new Expr\Variable($name); } - /** * Normalizes an argument list. * @@ -238,10 +234,11 @@ public function var($name): Expr\Variable { * * @return list */ - public function args(array $args): array { + public function args(array $args) : array + { $normalizedArgs = []; foreach ($args as $key => $arg) { - if (!($arg instanceof Arg)) { + if (!$arg instanceof Arg) { $arg = new Arg(BuilderHelpers::normalizeValue($arg)); } if (\is_string($key)) { @@ -251,20 +248,16 @@ public function args(array $args): array { } return $normalizedArgs; } - /** * Creates a function call node. * * @param string|Name|Expr $name Function name * @param array $args Function arguments */ - public function funcCall($name, array $args = []): Expr\FuncCall { - return new Expr\FuncCall( - BuilderHelpers::normalizeNameOrExpr($name), - $this->args($args) - ); + public function funcCall($name, array $args = []) : Expr\FuncCall + { + return new Expr\FuncCall(BuilderHelpers::normalizeNameOrExpr($name), $this->args($args)); } - /** * Creates a method call node. * @@ -272,14 +265,10 @@ public function funcCall($name, array $args = []): Expr\FuncCall { * @param string|Identifier|Expr $name Method name * @param array $args Method arguments */ - public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { - return new Expr\MethodCall( - $var, - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); + public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall + { + return new Expr\MethodCall($var, BuilderHelpers::normalizeIdentifierOrExpr($name), $this->args($args)); } - /** * Creates a static method call node. * @@ -287,89 +276,77 @@ public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall * @param string|Identifier|Expr $name Method name * @param array $args Method arguments */ - public function staticCall($class, $name, array $args = []): Expr\StaticCall { - return new Expr\StaticCall( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); + public function staticCall($class, $name, array $args = []) : Expr\StaticCall + { + return new Expr\StaticCall(BuilderHelpers::normalizeNameOrExpr($class), BuilderHelpers::normalizeIdentifierOrExpr($name), $this->args($args)); } - /** * Creates an object creation node. * * @param string|Name|Expr $class Class name * @param array $args Constructor arguments */ - public function new($class, array $args = []): Expr\New_ { - return new Expr\New_( - BuilderHelpers::normalizeNameOrExpr($class), - $this->args($args) - ); + public function new($class, array $args = []) : Expr\New_ + { + return new Expr\New_(BuilderHelpers::normalizeNameOrExpr($class), $this->args($args)); } - /** * Creates a constant fetch node. * * @param string|Name $name Constant name */ - public function constFetch($name): Expr\ConstFetch { + public function constFetch($name) : Expr\ConstFetch + { return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); } - /** * Creates a property fetch node. * * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name */ - public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { + public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch + { return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); } - /** * Creates a class constant fetch node. * * @param string|Name|Expr $class Class name * @param string|Identifier|Expr $name Constant name */ - public function classConstFetch($class, $name): Expr\ClassConstFetch { - return new Expr\ClassConstFetch( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name) - ); + public function classConstFetch($class, $name) : Expr\ClassConstFetch + { + return new Expr\ClassConstFetch(BuilderHelpers::normalizeNameOrExpr($class), BuilderHelpers::normalizeIdentifierOrExpr($name)); } - /** * Creates nested Concat nodes from a list of expressions. * * @param Expr|string ...$exprs Expressions or literal strings */ - public function concat(...$exprs): Concat { + public function concat(...$exprs) : Concat + { $numExprs = count($exprs); if ($numExprs < 2) { throw new \LogicException('Expected at least two expressions'); } - $lastConcat = $this->normalizeStringExpr($exprs[0]); for ($i = 1; $i < $numExprs; $i++) { $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); } return $lastConcat; } - /** * @param string|Expr $expr */ - private function normalizeStringExpr($expr): Expr { + private function normalizeStringExpr($expr) : Expr + { if ($expr instanceof Expr) { return $expr; } - if (\is_string($expr)) { return new String_($expr); } - throw new \LogicException('Expected string or Expr'); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/BuilderHelpers.php similarity index 72% rename from vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/BuilderHelpers.php index f29a691..ed3c314 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/BuilderHelpers.php @@ -1,22 +1,23 @@ -getNode(); } - if ($node instanceof Node) { return $node; } - throw new \LogicException('Expected node or builder object'); } - /** * Normalizes a node to a statement. * @@ -45,19 +44,17 @@ public static function normalizeNode($node): Node { * * @return Stmt The normalized statement node */ - public static function normalizeStmt($node): Stmt { + public static function normalizeStmt($node) : Stmt + { $node = self::normalizeNode($node); if ($node instanceof Stmt) { return $node; } - if ($node instanceof Expr) { return new Stmt\Expression($node); } - throw new \LogicException('Expected statement or expression node'); } - /** * Normalizes strings to Identifier. * @@ -65,18 +62,16 @@ public static function normalizeStmt($node): Stmt { * * @return Identifier The normalized identifier */ - public static function normalizeIdentifier($name): Identifier { + public static function normalizeIdentifier($name) : Identifier + { if ($name instanceof Identifier) { return $name; } - if (\is_string($name)) { return new Identifier($name); } - - throw new \LogicException('Expected string or instance of Node\Identifier'); + throw new \LogicException('Expected string or instance of Node\\Identifier'); } - /** * Normalizes strings to Identifier, also allowing expressions. * @@ -84,18 +79,16 @@ public static function normalizeIdentifier($name): Identifier { * * @return Identifier|Expr The normalized identifier or expression */ - public static function normalizeIdentifierOrExpr($name) { + public static function normalizeIdentifierOrExpr($name) + { if ($name instanceof Identifier || $name instanceof Expr) { return $name; } - if (\is_string($name)) { return new Identifier($name); } - - throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr'); + throw new \LogicException('Expected string or instance of Node\\Identifier or Node\\Expr'); } - /** * Normalizes a name: Converts string names to Name nodes. * @@ -103,30 +96,25 @@ public static function normalizeIdentifierOrExpr($name) { * * @return Name The normalized name */ - public static function normalizeName($name): Name { + public static function normalizeName($name) : Name + { if ($name instanceof Name) { return $name; } - if (is_string($name)) { if (!$name) { throw new \LogicException('Name cannot be empty'); } - if ($name[0] === '\\') { return new Name\FullyQualified(substr($name, 1)); } - if (0 === strpos($name, 'namespace\\')) { return new Name\Relative(substr($name, strlen('namespace\\'))); } - return new Name($name); } - - throw new \LogicException('Name must be a string or an instance of Node\Name'); + throw new \LogicException('Name must be a string or an instance of Node\\Name'); } - /** * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. * @@ -134,20 +122,16 @@ public static function normalizeName($name): Name { * * @return Name|Expr The normalized name or expression */ - public static function normalizeNameOrExpr($name) { + public static function normalizeNameOrExpr($name) + { if ($name instanceof Expr) { return $name; } - - if (!is_string($name) && !($name instanceof Name)) { - throw new \LogicException( - 'Name must be a string or an instance of Node\Name or Node\Expr' - ); + if (!is_string($name) && !$name instanceof Name) { + throw new \LogicException('Name must be a string or an instance of Node\\Name or Node\\Expr'); } - return self::normalizeName($name); } - /** * Normalizes a type: Converts plain-text type names into proper AST representation. * @@ -158,59 +142,32 @@ public static function normalizeNameOrExpr($name) { * * @return Name|Identifier|ComplexType The normalized type */ - public static function normalizeType($type) { + public static function normalizeType($type) + { if (!is_string($type)) { - if ( - !$type instanceof Name && !$type instanceof Identifier && - !$type instanceof ComplexType - ) { - throw new \LogicException( - 'Type must be a string, or an instance of Name, Identifier or ComplexType' - ); + if (!$type instanceof Name && !$type instanceof Identifier && !$type instanceof ComplexType) { + throw new \LogicException('Type must be a string, or an instance of Name, Identifier or ComplexType'); } return $type; } - - $nullable = false; + $nullable = \false; if (strlen($type) > 0 && $type[0] === '?') { - $nullable = true; + $nullable = \true; $type = substr($type, 1); } - - $builtinTypes = [ - 'array', - 'callable', - 'bool', - 'int', - 'float', - 'string', - 'iterable', - 'void', - 'object', - 'null', - 'false', - 'mixed', - 'never', - 'true', - ]; - + $builtinTypes = ['array', 'callable', 'bool', 'int', 'float', 'string', 'iterable', 'void', 'object', 'null', 'false', 'mixed', 'never', 'true']; $lowerType = strtolower($type); if (in_array($lowerType, $builtinTypes)) { $type = new Identifier($lowerType); } else { $type = self::normalizeName($type); } - - $notNullableTypes = [ - 'void', 'mixed', 'never', - ]; + $notNullableTypes = ['void', 'mixed', 'never']; if ($nullable && in_array((string) $type, $notNullableTypes)) { throw new \LogicException(sprintf('%s type cannot be nullable', $type)); } - return $nullable ? new NullableType($type) : $type; } - /** * Normalizes a value: Converts nulls, booleans, integers, * floats, strings and arrays into their respective nodes @@ -219,63 +176,45 @@ public static function normalizeType($type) { * * @return Expr The normalized value */ - public static function normalizeValue($value): Expr { + public static function normalizeValue($value) : Expr + { if ($value instanceof Node\Expr) { return $value; } - if (is_null($value)) { - return new Expr\ConstFetch( - new Name('null') - ); + return new Expr\ConstFetch(new Name('null')); } - if (is_bool($value)) { - return new Expr\ConstFetch( - new Name($value ? 'true' : 'false') - ); + return new Expr\ConstFetch(new Name($value ? 'true' : 'false')); } - if (is_int($value)) { return new Scalar\Int_($value); } - if (is_float($value)) { return new Scalar\Float_($value); } - if (is_string($value)) { return new Scalar\String_($value); } - if (is_array($value)) { $items = []; $lastKey = -1; foreach ($value as $itemKey => $itemValue) { // for consecutive, numeric keys don't generate keys if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Node\ArrayItem( - self::normalizeValue($itemValue) - ); + $items[] = new Node\ArrayItem(self::normalizeValue($itemValue)); } else { $lastKey = null; - $items[] = new Node\ArrayItem( - self::normalizeValue($itemValue), - self::normalizeValue($itemKey) - ); + $items[] = new Node\ArrayItem(self::normalizeValue($itemValue), self::normalizeValue($itemKey)); } } - return new Expr\Array_($items); } - if ($value instanceof \UnitEnum) { return new Expr\ClassConstFetch(new FullyQualified(\get_class($value)), new Identifier($value->name)); } - throw new \LogicException('Invalid value'); } - /** * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc. * @@ -283,18 +222,16 @@ public static function normalizeValue($value): Expr { * * @return Comment\Doc The normalized doc comment */ - public static function normalizeDocComment($docComment): Comment\Doc { + public static function normalizeDocComment($docComment) : Comment\Doc + { if ($docComment instanceof Comment\Doc) { return $docComment; } - if (is_string($docComment)) { return new Comment\Doc($docComment); } - - throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); + throw new \LogicException('Doc comment must be a string or an instance of PhpParser\\Comment\\Doc'); } - /** * Normalizes a attribute: Converts attribute to the Attribute Group if needed. * @@ -302,18 +239,16 @@ public static function normalizeDocComment($docComment): Comment\Doc { * * @return Node\AttributeGroup The Attribute Group */ - public static function normalizeAttribute($attribute): Node\AttributeGroup { + public static function normalizeAttribute($attribute) : Node\AttributeGroup + { if ($attribute instanceof Node\AttributeGroup) { return $attribute; } - - if (!($attribute instanceof Node\Attribute)) { - throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); + if (!$attribute instanceof Node\Attribute) { + throw new \LogicException('Attribute must be an instance of PhpParser\\Node\\Attribute or PhpParser\\Node\\AttributeGroup'); } - return new Node\AttributeGroup([$attribute]); } - /** * Adds a modifier and returns new modifier bitmask. * @@ -322,16 +257,17 @@ public static function normalizeAttribute($attribute): Node\AttributeGroup { * * @return int New modifiers */ - public static function addModifier(int $modifiers, int $modifier): int { + public static function addModifier(int $modifiers, int $modifier) : int + { Modifiers::verifyModifier($modifiers, $modifier); return $modifiers | $modifier; } - /** * Adds a modifier and returns new modifier bitmask. * @return int New modifiers */ - public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { + public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int + { Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); return $existingModifiers | $modifierToSet; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment.php similarity index 76% rename from vendor/nikic/php-parser/lib/PhpParser/Comment.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment.php index 01b341e..6267762 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment.php @@ -1,16 +1,38 @@ -text = $text; $this->startLine = $startLine; $this->startFilePos = $startFilePos; @@ -32,81 +51,80 @@ public function __construct( $this->endFilePos = $endFilePos; $this->endTokenPos = $endTokenPos; } - /** * Gets the comment text. * * @return string The comment text (including comment delimiters like /*) */ - public function getText(): string { + public function getText() : string + { return $this->text; } - /** * Gets the line number the comment started on. * * @return int Line number (or -1 if not available) * @phpstan-return -1|positive-int */ - public function getStartLine(): int { + public function getStartLine() : int + { return $this->startLine; } - /** * Gets the file offset the comment started on. * * @return int File offset (or -1 if not available) */ - public function getStartFilePos(): int { + public function getStartFilePos() : int + { return $this->startFilePos; } - /** * Gets the token offset the comment started on. * * @return int Token offset (or -1 if not available) */ - public function getStartTokenPos(): int { + public function getStartTokenPos() : int + { return $this->startTokenPos; } - /** * Gets the line number the comment ends on. * * @return int Line number (or -1 if not available) * @phpstan-return -1|positive-int */ - public function getEndLine(): int { + public function getEndLine() : int + { return $this->endLine; } - /** * Gets the file offset the comment ends on. * * @return int File offset (or -1 if not available) */ - public function getEndFilePos(): int { + public function getEndFilePos() : int + { return $this->endFilePos; } - /** * Gets the token offset the comment ends on. * * @return int Token offset (or -1 if not available) */ - public function getEndTokenPos(): int { + public function getEndTokenPos() : int + { return $this->endTokenPos; } - /** * Gets the comment text. * * @return string The comment text (including comment delimiters like /*) */ - public function __toString(): string { + public function __toString() : string + { return $this->text; } - /** * Gets the reformatted comment text. * @@ -117,14 +135,15 @@ public function __toString(): string { * * Additionally, this normalizes CRLF newlines to LF newlines. */ - public function getReformattedText(): string { + public function getReformattedText() : string + { $text = str_replace("\r\n", "\n", $this->text); $newlinePos = strpos($text, "\n"); - if (false === $newlinePos) { + if (\false === $newlinePos) { // Single line comments don't need further processing return $text; } - if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { + if (preg_match('(^.*(?:\\n\\s+\\*.*)+$)', $text)) { // Multi line comment of the type // // /* @@ -133,9 +152,9 @@ public function getReformattedText(): string { // */ // // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $text); + return preg_replace('(^\\s+\\*)m', ' *', $text); } - if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { + if (preg_match('(^/\\*\\*?\\s*\\n)', $text) && preg_match('(\\n(\\s*)\\*/$)', $text, $matches)) { // Multi line comment of the type // // /* @@ -148,7 +167,7 @@ public function getReformattedText(): string { // start of all lines. return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); } - if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { + if (preg_match('(^/\\*\\*?\\s*(?!\\s))', $text, $matches)) { // Multi line comment of the type // // /* Some text. @@ -160,13 +179,11 @@ public function getReformattedText(): string { // lines and the length of the "/* " opening sequence. $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1)); $removeLen = $prefixLen - strlen($matches[0]); - return preg_replace('(^\s{' . $removeLen . '})m', '', $text); + return preg_replace('(^\\s{' . $removeLen . '})m', '', $text); } - // No idea how to format this comment, so simply return as is return $text; } - /** * Get length of shortest whitespace prefix (at the start of a line). * @@ -175,11 +192,12 @@ public function getReformattedText(): string { * @param string $str String to check * @return int Length in characters. Tabs count as single characters. */ - private function getShortestWhitespacePrefixLen(string $str): int { + private function getShortestWhitespacePrefixLen(string $str) : int + { $lines = explode("\n", $str); $shortestPrefixLen = \PHP_INT_MAX; foreach ($lines as $line) { - preg_match('(^\s*)', $line, $matches); + preg_match('(^\\s*)', $line, $matches); $prefixLen = strlen($matches[0]); if ($prefixLen < $shortestPrefixLen) { $shortestPrefixLen = $prefixLen; @@ -187,11 +205,11 @@ private function getShortestWhitespacePrefixLen(string $str): int { } return $shortestPrefixLen; } - /** * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} */ - public function jsonSerialize(): array { + public function jsonSerialize() : array + { // Technically not a node, but we make it look like one anyway $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; return [ diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment/Doc.php new file mode 100644 index 0000000..6e58eb0 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Comment/Doc.php @@ -0,0 +1,8 @@ +fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { - throw new ConstExprEvaluationException( - "Expression of type {$expr->getType()} cannot be evaluated" - ); + throw new ConstExprEvaluationException("Expression of type {$expr->getType()} cannot be evaluated"); }; } - /** * Silently evaluates a constant expression into a PHP value. * @@ -63,24 +60,22 @@ public function __construct(?callable $fallbackEvaluator = null) { * * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred */ - public function evaluateSilently(Expr $expr) { + public function evaluateSilently(Expr $expr) + { set_error_handler(function ($num, $str, $file, $line) { throw new \ErrorException($str, 0, $num, $file, $line); }); - try { return $this->evaluate($expr); } catch (\Throwable $e) { if (!$e instanceof ConstExprEvaluationException) { - $e = new ConstExprEvaluationException( - "An error occurred during constant expression evaluation", 0, $e); + $e = new ConstExprEvaluationException("An error occurred during constant expression evaluation", 0, $e); } throw $e; } finally { restore_error_handler(); } } - /** * Directly evaluates a constant expression into a PHP value. * @@ -98,23 +93,19 @@ public function evaluateSilently(Expr $expr) { * * @throws ConstExprEvaluationException if the expression cannot be evaluated */ - public function evaluateDirectly(Expr $expr) { + public function evaluateDirectly(Expr $expr) + { return $this->evaluate($expr); } - /** @return mixed */ - private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\Int_ - || $expr instanceof Scalar\Float_ - || $expr instanceof Scalar\String_ - ) { + private function evaluate(Expr $expr) + { + if ($expr instanceof Scalar\Int_ || $expr instanceof Scalar\Float_ || $expr instanceof Scalar\String_) { return $expr->value; } - if ($expr instanceof Expr\Array_) { return $this->evaluateArray($expr); } - // Unary operators if ($expr instanceof Expr\UnaryPlus) { return +$this->evaluate($expr->expr); @@ -128,27 +119,22 @@ private function evaluate(Expr $expr) { if ($expr instanceof Expr\BitwiseNot) { return ~$this->evaluate($expr->expr); } - if ($expr instanceof Expr\BinaryOp) { return $this->evaluateBinaryOp($expr); } - if ($expr instanceof Expr\Ternary) { return $this->evaluateTernary($expr); } - if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) { return $this->evaluate($expr->var)[$this->evaluate($expr->dim)]; } - if ($expr instanceof Expr\ConstFetch) { return $this->evaluateConstFetch($expr); } - return ($this->fallbackEvaluator)($expr); } - - private function evaluateArray(Expr\Array_ $expr): array { + private function evaluateArray(Expr\Array_ $expr) : array + { $array = []; foreach ($expr->items as $item) { if (null !== $item->key) { @@ -161,77 +147,98 @@ private function evaluateArray(Expr\Array_ $expr): array { } return $array; } - /** @return mixed */ - private function evaluateTernary(Expr\Ternary $expr) { + private function evaluateTernary(Expr\Ternary $expr) + { if (null === $expr->if) { return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); } - - return $this->evaluate($expr->cond) - ? $this->evaluate($expr->if) - : $this->evaluate($expr->else); + return $this->evaluate($expr->cond) ? $this->evaluate($expr->if) : $this->evaluate($expr->else); } - /** @return mixed */ - private function evaluateBinaryOp(Expr\BinaryOp $expr) { - if ($expr instanceof Expr\BinaryOp\Coalesce - && $expr->left instanceof Expr\ArrayDimFetch - ) { + private function evaluateBinaryOp(Expr\BinaryOp $expr) + { + if ($expr instanceof Expr\BinaryOp\Coalesce && $expr->left instanceof Expr\ArrayDimFetch) { // This needs to be special cased to respect BP_VAR_IS fetch semantics - return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] - ?? $this->evaluate($expr->right); + return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] ?? $this->evaluate($expr->right); } - // The evaluate() calls are repeated in each branch, because some of the operators are // short-circuiting and evaluating the RHS in advance may be illegal in that case $l = $expr->left; $r = $expr->right; switch ($expr->getOperatorSigil()) { - case '&': return $this->evaluate($l) & $this->evaluate($r); - case '|': return $this->evaluate($l) | $this->evaluate($r); - case '^': return $this->evaluate($l) ^ $this->evaluate($r); - case '&&': return $this->evaluate($l) && $this->evaluate($r); - case '||': return $this->evaluate($l) || $this->evaluate($r); - case '??': return $this->evaluate($l) ?? $this->evaluate($r); - case '.': return $this->evaluate($l) . $this->evaluate($r); - case '/': return $this->evaluate($l) / $this->evaluate($r); - case '==': return $this->evaluate($l) == $this->evaluate($r); - case '>': return $this->evaluate($l) > $this->evaluate($r); - case '>=': return $this->evaluate($l) >= $this->evaluate($r); - case '===': return $this->evaluate($l) === $this->evaluate($r); - case 'and': return $this->evaluate($l) and $this->evaluate($r); - case 'or': return $this->evaluate($l) or $this->evaluate($r); - case 'xor': return $this->evaluate($l) xor $this->evaluate($r); - case '-': return $this->evaluate($l) - $this->evaluate($r); - case '%': return $this->evaluate($l) % $this->evaluate($r); - case '*': return $this->evaluate($l) * $this->evaluate($r); - case '!=': return $this->evaluate($l) != $this->evaluate($r); - case '!==': return $this->evaluate($l) !== $this->evaluate($r); - case '+': return $this->evaluate($l) + $this->evaluate($r); - case '**': return $this->evaluate($l) ** $this->evaluate($r); - case '<<': return $this->evaluate($l) << $this->evaluate($r); - case '>>': return $this->evaluate($l) >> $this->evaluate($r); - case '<': return $this->evaluate($l) < $this->evaluate($r); - case '<=': return $this->evaluate($l) <= $this->evaluate($r); - case '<=>': return $this->evaluate($l) <=> $this->evaluate($r); + case '&': + return $this->evaluate($l) & $this->evaluate($r); + case '|': + return $this->evaluate($l) | $this->evaluate($r); + case '^': + return $this->evaluate($l) ^ $this->evaluate($r); + case '&&': + return $this->evaluate($l) && $this->evaluate($r); + case '||': + return $this->evaluate($l) || $this->evaluate($r); + case '??': + return $this->evaluate($l) ?? $this->evaluate($r); + case '.': + return $this->evaluate($l) . $this->evaluate($r); + case '/': + return $this->evaluate($l) / $this->evaluate($r); + case '==': + return $this->evaluate($l) == $this->evaluate($r); + case '>': + return $this->evaluate($l) > $this->evaluate($r); + case '>=': + return $this->evaluate($l) >= $this->evaluate($r); + case '===': + return $this->evaluate($l) === $this->evaluate($r); + case 'and': + return $this->evaluate($l) and $this->evaluate($r); + case 'or': + return $this->evaluate($l) or $this->evaluate($r); + case 'xor': + return $this->evaluate($l) xor $this->evaluate($r); + case '-': + return $this->evaluate($l) - $this->evaluate($r); + case '%': + return $this->evaluate($l) % $this->evaluate($r); + case '*': + return $this->evaluate($l) * $this->evaluate($r); + case '!=': + return $this->evaluate($l) != $this->evaluate($r); + case '!==': + return $this->evaluate($l) !== $this->evaluate($r); + case '+': + return $this->evaluate($l) + $this->evaluate($r); + case '**': + return $this->evaluate($l) ** $this->evaluate($r); + case '<<': + return $this->evaluate($l) << $this->evaluate($r); + case '>>': + return $this->evaluate($l) >> $this->evaluate($r); + case '<': + return $this->evaluate($l) < $this->evaluate($r); + case '<=': + return $this->evaluate($l) <= $this->evaluate($r); + case '<=>': + return $this->evaluate($l) <=> $this->evaluate($r); case '|>': $lval = $this->evaluate($l); return $this->evaluate($r)($lval); } - throw new \Exception('Should not happen'); } - /** @return mixed */ - private function evaluateConstFetch(Expr\ConstFetch $expr) { + private function evaluateConstFetch(Expr\ConstFetch $expr) + { $name = $expr->name->toLowerString(); switch ($name) { - case 'null': return null; - case 'false': return false; - case 'true': return true; + case 'null': + return null; + case 'false': + return \false; + case 'true': + return \true; } - return ($this->fallbackEvaluator)($expr); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Error.php similarity index 76% rename from vendor/nikic/php-parser/lib/PhpParser/Error.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Error.php index f81f0c4..c062bb1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Error.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Error.php @@ -1,127 +1,129 @@ - */ - protected array $attributes; - + protected $attributes; /** * Creates an Exception signifying a parse error. * * @param string $message Error message * @param array $attributes Attributes of node/token where error occurred */ - public function __construct(string $message, array $attributes = []) { + public function __construct(string $message, array $attributes = []) + { $this->rawMessage = $message; $this->attributes = $attributes; $this->updateMessage(); } - /** * Gets the error message * * @return string Error message */ - public function getRawMessage(): string { + public function getRawMessage() : string + { return $this->rawMessage; } - /** * Gets the line the error starts in. * * @return int Error start line * @phpstan-return -1|positive-int */ - public function getStartLine(): int { + public function getStartLine() : int + { return $this->attributes['startLine'] ?? -1; } - /** * Gets the line the error ends in. * * @return int Error end line * @phpstan-return -1|positive-int */ - public function getEndLine(): int { + public function getEndLine() : int + { return $this->attributes['endLine'] ?? -1; } - /** * Gets the attributes of the node/token the error occurred at. * * @return array */ - public function getAttributes(): array { + public function getAttributes() : array + { return $this->attributes; } - /** * Sets the attributes of the node/token the error occurred at. * * @param array $attributes */ - public function setAttributes(array $attributes): void { + public function setAttributes(array $attributes) : void + { $this->attributes = $attributes; $this->updateMessage(); } - /** * Sets the line of the PHP file the error occurred in. * * @param string $message Error message */ - public function setRawMessage(string $message): void { + public function setRawMessage(string $message) : void + { $this->rawMessage = $message; $this->updateMessage(); } - /** * Sets the line the error starts in. * * @param int $line Error start line */ - public function setStartLine(int $line): void { + public function setStartLine(int $line) : void + { $this->attributes['startLine'] = $line; $this->updateMessage(); } - /** * Returns whether the error has start and end column information. * * For column information enable the startFilePos and endFilePos in the lexer options. */ - public function hasColumnInfo(): bool { + public function hasColumnInfo() : bool + { return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); } - /** * Gets the start column (1-based) into the line where the error started. * * @param string $code Source code of the file */ - public function getStartColumn(string $code): int { + public function getStartColumn(string $code) : int + { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } - return $this->toColumn($code, $this->attributes['startFilePos']); } - /** * Gets the end column (1-based) into the line where the error ended. * * @param string $code Source code of the file */ - public function getEndColumn(string $code): int { + public function getEndColumn(string $code) : int + { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } - return $this->toColumn($code, $this->attributes['endFilePos']); } - /** * Formats message including line and column information. * @@ -129,14 +131,10 @@ public function getEndColumn(string $code): int { * * @return string Formatted message */ - public function getMessageWithColumnInfo(string $code): string { - return sprintf( - '%s from %d:%d to %d:%d', $this->getRawMessage(), - $this->getStartLine(), $this->getStartColumn($code), - $this->getEndLine(), $this->getEndColumn($code) - ); + public function getMessageWithColumnInfo(string $code) : string + { + return sprintf('%s from %d:%d to %d:%d', $this->getRawMessage(), $this->getStartLine(), $this->getStartColumn($code), $this->getEndLine(), $this->getEndColumn($code)); } - /** * Converts a file offset into a column. * @@ -145,25 +143,23 @@ public function getMessageWithColumnInfo(string $code): string { * * @return int 1-based column (relative to start of line) */ - private function toColumn(string $code, int $pos): int { + private function toColumn(string $code, int $pos) : int + { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { + if (\false === $lineStartPos) { $lineStartPos = -1; } - return $pos - $lineStartPos; } - /** * Updates the exception message after a change to rawMessage or rawLine. */ - protected function updateMessage(): void { + protected function updateMessage() : void + { $this->message = $this->rawMessage; - if (-1 === $this->getStartLine()) { $this->message .= ' on unknown line'; } else { diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler.php similarity index 50% rename from vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler.php index 51ad730..6003ce2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler.php @@ -1,12 +1,14 @@ -errors[] = $error; } - /** * Get collected errors. * * @return Error[] */ - public function getErrors(): array { + public function getErrors() : array + { return $this->errors; } - /** * Check whether there are any errors. */ - public function hasErrors(): bool { + public function hasErrors() : bool + { return !empty($this->errors); } - /** * Reset/clear collected errors. */ - public function clearErrors(): void { + public function clearErrors() : void + { $this->errors = []; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php new file mode 100644 index 0000000..e536df4 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php @@ -0,0 +1,19 @@ +type = $type; $this->old = $old; $this->new = $new; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/Differ.php similarity index 86% rename from vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/Differ.php index 253e175..e8d6eb1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/Differ.php @@ -1,6 +1,7 @@ -isEqual = $isEqual; } - /** * Calculate diff (edit script) from $old to $new. * @@ -32,13 +33,13 @@ public function __construct(callable $isEqual) { * * @return DiffElem[] Diff (edit script) */ - public function diff(array $old, array $new): array { + public function diff(array $old, array $new) : array + { $old = \array_values($old); $new = \array_values($new); list($trace, $x, $y) = $this->calculateTrace($old, $new); return $this->extractDiff($trace, $x, $y, $old, $new); } - /** * Calculate diff, including "replace" operations. * @@ -50,16 +51,17 @@ public function diff(array $old, array $new): array { * * @return DiffElem[] Diff (edit script), including replace operations */ - public function diffWithReplacements(array $old, array $new): array { + public function diffWithReplacements(array $old, array $new) : array + { return $this->coalesceReplacements($this->diff($old, $new)); } - /** * @param T[] $old * @param T[] $new * @return array{array>, int, int} */ - private function calculateTrace(array $old, array $new): array { + private function calculateTrace(array $old, array $new) : array + { $n = \count($old); $m = \count($new); $max = $n + $m; @@ -68,18 +70,16 @@ private function calculateTrace(array $old, array $new): array { for ($d = 0; $d <= $max; $d++) { $trace[] = $v; for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + if ($k === -$d || $k !== $d && $v[$k - 1] < $v[$k + 1]) { $x = $v[$k + 1]; } else { $x = $v[$k - 1] + 1; } - $y = $x - $k; while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { $x++; $y++; } - $v[$k] = $x; if ($x >= $n && $y >= $m) { return [$trace, $x, $y]; @@ -88,43 +88,37 @@ private function calculateTrace(array $old, array $new): array { } throw new \Exception('Should not happen'); } - /** * @param array> $trace * @param T[] $old * @param T[] $new * @return DiffElem[] */ - private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { + private function extractDiff(array $trace, int $x, int $y, array $old, array $new) : array + { $result = []; for ($d = \count($trace) - 1; $d >= 0; $d--) { $v = $trace[$d]; $k = $x - $y; - - if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + if ($k === -$d || $k !== $d && $v[$k - 1] < $v[$k + 1]) { $prevK = $k + 1; } else { $prevK = $k - 1; } - $prevX = $v[$prevK]; $prevY = $prevX - $prevK; - while ($x > $prevX && $y > $prevY) { $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); $x--; $y--; } - if ($d === 0) { break; } - while ($x > $prevX) { $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); $x--; } - while ($y > $prevY) { $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); $y--; @@ -132,14 +126,14 @@ private function extractDiff(array $trace, int $x, int $y, array $old, array $ne } return array_reverse($result); } - /** * Coalesce equal-length sequences of remove+add into a replace operation. * * @param DiffElem[] $diff * @return DiffElem[] */ - private function coalesceReplacements(array $diff): array { + private function coalesceReplacements(array $diff) : array + { $newDiff = []; $c = \count($diff); for ($i = 0; $i < $c; $i++) { @@ -148,23 +142,18 @@ private function coalesceReplacements(array $diff): array { $newDiff[] = $diff[$i]; continue; } - $j = $i; while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { $j++; } - $k = $j; while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { $k++; } - if ($j - $i === $k - $j) { $len = $j - $i; for ($n = 0; $n < $len; $n++) { - $newDiff[] = new DiffElem( - DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new - ); + $newDiff[] = new DiffElem(DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new); } } else { for (; $i < $k; $i++) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php similarity index 68% rename from vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index b30a99a..b5de53a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -1,10 +1,10 @@ - $attributes Attributes */ - public function __construct( - array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, - array $stmts, array $attributes - ) { + public function __construct(array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, array $stmts, array $attributes) + { parent::__construct($attributes); $this->attrGroups = $attrGroups; $this->flags = $flags; @@ -49,23 +47,20 @@ public function __construct( $this->implements = $implements; $this->stmts = $stmts; } - - public static function fromNewNode(Expr\New_ $newNode): self { + public static function fromNewNode(Expr\New_ $newNode) : self + { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); // We don't assert that $class->name is null here, to allow consumers to assign unique names // to anonymous classes for their own purposes. We simplify ignore the name here. - return new self( - $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, - $class->stmts, $newNode->getAttributes() - ); + return new self($class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes()); } - - public function getType(): string { + public function getType() : string + { return 'Expr_PrintableNewAnonClass'; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php similarity index 73% rename from vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php index 36022d0..7424a74 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php @@ -1,13 +1,14 @@ -= 80000) { - class TokenPolyfill extends \PhpToken { + class TokenPolyfill extends \PhpToken + { } return; } - /** * This is a polyfill for the PhpToken class introduced in PHP 8.0. We do not actually polyfill * PhpToken, because composer might end up picking a different polyfill implementation, which does @@ -15,50 +16,42 @@ class TokenPolyfill extends \PhpToken { * * @internal */ -class TokenPolyfill { +class TokenPolyfill +{ /** @var int The ID of the token. Either a T_* constant of a character code < 256. */ - public int $id; + public $id; /** @var string The textual content of the token. */ - public string $text; + public $text; /** @var int The 1-based starting line of the token (or -1 if unknown). */ - public int $line; + public $line; /** @var int The 0-based starting position of the token (or -1 if unknown). */ - public int $pos; - + public $pos; /** @var array Tokens ignored by the PHP parser. */ - private const IGNORABLE_TOKENS = [ - \T_WHITESPACE => true, - \T_COMMENT => true, - \T_DOC_COMMENT => true, - \T_OPEN_TAG => true, - ]; - + private const IGNORABLE_TOKENS = [\T_WHITESPACE => \true, \T_COMMENT => \true, \T_DOC_COMMENT => \true, \T_OPEN_TAG => \true]; /** @var array Tokens that may be part of a T_NAME_* identifier. */ - private static array $identifierTokens; - + private static $identifierTokens; /** * Create a Token with the given ID and text, as well optional line and position information. */ - final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) { + public final function __construct(int $id, string $text, int $line = -1, int $pos = -1) + { $this->id = $id; $this->text = $text; $this->line = $line; $this->pos = $pos; } - /** * Get the name of the token. For single-char tokens this will be the token character. * Otherwise it will be a T_* style name, or null if the token ID is unknown. */ - public function getTokenName(): ?string { + public function getTokenName() : ?string + { if ($this->id < 256) { return \chr($this->id); } - $name = token_name($this->id); return $name === 'UNKNOWN' ? null : $name; } - /** * Check whether the token is of the given kind. The kind may be either an integer that matches * the token ID, a string that matches the token text, or an array of integers/strings. In the @@ -66,7 +59,8 @@ public function getTokenName(): ?string { * * @param int|string|(int|string)[] $kind */ - public function is($kind): bool { + public function is($kind) : bool + { if (\is_int($kind)) { return $this->id === $kind; } @@ -77,39 +71,35 @@ public function is($kind): bool { foreach ($kind as $entry) { if (\is_int($entry)) { if ($this->id === $entry) { - return true; + return \true; } } elseif (\is_string($entry)) { if ($this->text === $entry) { - return true; + return \true; } } else { - throw new \TypeError( - 'Argument #1 ($kind) must only have elements of type string|int, ' . - gettype($entry) . ' given'); + throw new \TypeError('Argument #1 ($kind) must only have elements of type string|int, ' . gettype($entry) . ' given'); } } - return false; + return \false; } - throw new \TypeError( - 'Argument #1 ($kind) must be of type string|int|array, ' .gettype($kind) . ' given'); + throw new \TypeError('Argument #1 ($kind) must be of type string|int|array, ' . gettype($kind) . ' given'); } - /** * Check whether this token would be ignored by the PHP parser. Returns true for T_WHITESPACE, * T_COMMENT, T_DOC_COMMENT and T_OPEN_TAG, and false for everything else. */ - public function isIgnorable(): bool { + public function isIgnorable() : bool + { return isset(self::IGNORABLE_TOKENS[$this->id]); } - /** * Return the textual content of the token. */ - public function __toString(): string { + public function __toString() : string + { return $this->text; } - /** * Tokenize the given source code and return an array of tokens. * @@ -121,14 +111,13 @@ public function __toString(): string { * * @return static[] */ - public static function tokenize(string $code, int $flags = 0): array { + public static function tokenize(string $code, int $flags = 0) : array + { self::init(); - $tokens = []; $line = 1; $pos = 0; $origTokens = \token_get_all($code, $flags); - $numTokens = \count($origTokens); for ($i = 0; $i < $numTokens; $i++) { $token = $origTokens[$i]; @@ -144,16 +133,12 @@ public static function tokenize(string $code, int $flags = 0): array { } else { $id = $token[0]; $text = $token[1]; - // Emulate PHP 8.0 comment format, which does not include trailing whitespace anymore. - if ($id === \T_COMMENT && \substr($text, 0, 2) !== '/*' && - \preg_match('/(\r\n|\n|\r)$/D', $text, $matches) - ) { + if ($id === \T_COMMENT && \substr($text, 0, 2) !== '/*' && \preg_match('/(\\r\\n|\\n|\\r)$/D', $text, $matches)) { $trailingNewline = $matches[0]; $text = \substr($text, 0, -\strlen($trailingNewline)); $tokens[] = new static($id, $text, $line, $pos); $pos += \strlen($text); - if ($i + 1 < $numTokens && $origTokens[$i + 1][0] === \T_WHITESPACE) { // Move trailing newline into following T_WHITESPACE token, if it already exists. $origTokens[$i + 1][1] = $trailingNewline . $origTokens[$i + 1][1]; @@ -166,10 +151,9 @@ public static function tokenize(string $code, int $flags = 0): array { } continue; } - // Emulate PHP 8.0 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and // T_STRING into a single token. - if (($id === \T_NS_SEPARATOR || isset(self::$identifierTokens[$id]))) { + if ($id === \T_NS_SEPARATOR || isset(self::$identifierTokens[$id])) { $newText = $text; $lastWasSeparator = $id === \T_NS_SEPARATOR; for ($j = $i + 1; $j < $numTokens; $j++) { @@ -177,12 +161,12 @@ public static function tokenize(string $code, int $flags = 0): array { if (!isset(self::$identifierTokens[$origTokens[$j][0]])) { break; } - $lastWasSeparator = false; + $lastWasSeparator = \false; } else { if ($origTokens[$j][0] !== \T_NS_SEPARATOR) { break; } - $lastWasSeparator = true; + $lastWasSeparator = \true; } $newText .= $origTokens[$j][1]; } @@ -205,7 +189,6 @@ public static function tokenize(string $code, int $flags = 0): array { continue; } } - $tokens[] = new static($id, $text, $line, $pos); $line += \substr_count($text, "\n"); $pos += \strlen($text); @@ -213,25 +196,13 @@ public static function tokenize(string $code, int $flags = 0): array { } return $tokens; } - /** Initialize private static state needed by tokenize(). */ - private static function init(): void { + private static function init() : void + { if (isset(self::$identifierTokens)) { return; } - // Based on semi_reserved production. - self::$identifierTokens = \array_fill_keys([ - \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, - \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, - \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, - \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, - \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, - \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, - \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, - \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, - \T_MATCH, - ], true); + self::$identifierTokens = \array_fill_keys([\T_STRING, \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, \T_MATCH], \true); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php similarity index 80% rename from vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php index cdbe2bd..bfd01f7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php @@ -1,53 +1,50 @@ -tokens = $tokens; $this->indentMap = $this->calcIndentMap($tabWidth); } - /** * Whether the given position is immediately surrounded by parenthesis. * * @param int $startPos Start position * @param int $endPos End position */ - public function haveParens(int $startPos, int $endPos): bool { - return $this->haveTokenImmediatelyBefore($startPos, '(') - && $this->haveTokenImmediatelyAfter($endPos, ')'); + public function haveParens(int $startPos, int $endPos) : bool + { + return $this->haveTokenImmediatelyBefore($startPos, '(') && $this->haveTokenImmediatelyAfter($endPos, ')'); } - /** * Whether the given position is immediately surrounded by braces. * * @param int $startPos Start position * @param int $endPos End position */ - public function haveBraces(int $startPos, int $endPos): bool { - return ($this->haveTokenImmediatelyBefore($startPos, '{') - || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) - && $this->haveTokenImmediatelyAfter($endPos, '}'); + public function haveBraces(int $startPos, int $endPos) : bool + { + return ($this->haveTokenImmediatelyBefore($startPos, '{') || $this->haveTokenImmediatelyBefore($startPos, \T_CURLY_OPEN)) && $this->haveTokenImmediatelyAfter($endPos, '}'); } - /** * Check whether the position is directly preceded by a certain token type. * @@ -58,21 +55,21 @@ public function haveBraces(int $startPos, int $endPos): bool { * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { + public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool + { $tokens = $this->tokens; $pos--; for (; $pos >= 0; $pos--) { $token = $tokens[$pos]; if ($token->is($expectedTokenType)) { - return true; + return \true; } if (!$token->isIgnorable()) { break; } } - return false; + return \false; } - /** * Check whether the position is directly followed by a certain token type. * @@ -83,64 +80,59 @@ public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { + public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool + { $tokens = $this->tokens; $pos++; for ($c = \count($tokens); $pos < $c; $pos++) { $token = $tokens[$pos]; if ($token->is($expectedTokenType)) { - return true; + return \true; } if (!$token->isIgnorable()) { break; } } - return false; + return \false; } - /** @param int|string|(int|string)[] $skipTokenType */ - public function skipLeft(int $pos, $skipTokenType): int { + public function skipLeft(int $pos, $skipTokenType) : int + { $tokens = $this->tokens; - $pos = $this->skipLeftWhitespace($pos); if ($skipTokenType === \T_WHITESPACE) { return $pos; } - if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } $pos--; - return $this->skipLeftWhitespace($pos); } - /** @param int|string|(int|string)[] $skipTokenType */ - public function skipRight(int $pos, $skipTokenType): int { + public function skipRight(int $pos, $skipTokenType) : int + { $tokens = $this->tokens; - $pos = $this->skipRightWhitespace($pos); if ($skipTokenType === \T_WHITESPACE) { return $pos; } - if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } $pos++; - return $this->skipRightWhitespace($pos); } - /** * Return first non-whitespace token position smaller or equal to passed position. * * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipLeftWhitespace(int $pos): int { + public function skipLeftWhitespace(int $pos) : int + { $tokens = $this->tokens; for (; $pos >= 0; $pos--) { if (!$tokens[$pos]->isIgnorable()) { @@ -149,14 +141,14 @@ public function skipLeftWhitespace(int $pos): int { } return $pos; } - /** * Return first non-whitespace position greater or equal to passed position. * * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipRightWhitespace(int $pos): int { + public function skipRightWhitespace(int $pos) : int + { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { if (!$tokens[$pos]->isIgnorable()) { @@ -165,9 +157,9 @@ public function skipRightWhitespace(int $pos): int { } return $pos; } - /** @param int|string|(int|string)[] $findTokenType */ - public function findRight(int $pos, $findTokenType): int { + public function findRight(int $pos, $findTokenType) : int + { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { if ($tokens[$pos]->is($findTokenType)) { @@ -176,7 +168,6 @@ public function findRight(int $pos, $findTokenType): int { } return -1; } - /** * Whether the given position range contains a certain token type. * @@ -185,21 +176,20 @@ public function findRight(int $pos, $findTokenType): int { * @param int|string $tokenType Token type to look for * @return bool Whether the token occurs in the given range */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { + public function haveTokenInRange(int $startPos, int $endPos, $tokenType) : bool + { $tokens = $this->tokens; for ($pos = $startPos; $pos < $endPos; $pos++) { if ($tokens[$pos]->is($tokenType)) { - return true; + return \true; } } - return false; + return \false; } - - public function haveTagInRange(int $startPos, int $endPos): bool { - return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) - || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); + public function haveTagInRange(int $startPos, int $endPos) : bool + { + return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); } - /** * Get indentation before token position. * @@ -207,10 +197,10 @@ public function haveTagInRange(int $startPos, int $endPos): bool { * * @return int Indentation depth (in spaces) */ - public function getIndentationBefore(int $pos): int { + public function getIndentationBefore(int $pos) : int + { return $this->indentMap[$pos]; } - /** * Get the code corresponding to a token offset range, optionally adjusted for indentation. * @@ -220,13 +210,14 @@ public function getIndentationBefore(int $pos): int { * * @return string Code corresponding to token range, adjusted for indentation */ - public function getTokenCode(int $from, int $to, int $indent): string { + public function getTokenCode(int $from, int $to, int $indent) : string + { $tokens = $this->tokens; $result = ''; for ($pos = $from; $pos < $to; $pos++) { $token = $tokens[$pos]; $id = $token->id; - $text = $token->text; + $text = is_array($token) ? $token[1] : $token; if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { $result .= $text; } else { @@ -242,38 +233,34 @@ public function getTokenCode(int $from, int $to, int $indent): string { } return $result; } - /** * Precalculate the indentation at every token position. * * @return int[] Token position to indentation map */ - private function calcIndentMap(int $tabWidth): array { + private function calcIndentMap(int $tabWidth) : array + { $indentMap = []; $indent = 0; foreach ($this->tokens as $i => $token) { $indentMap[] = $indent; - if ($token->id === \T_WHITESPACE) { - $content = $token->text; + $content = is_array($token) ? $token[1] : $token; $newlinePos = \strrpos($content, "\n"); - if (false !== $newlinePos) { + if (\false !== $newlinePos) { $indent = $this->getIndent(\substr($content, $newlinePos + 1), $tabWidth); - } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && - $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { + } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && (is_array($this->tokens[0]) ? $this->tokens[0][1] : $this->tokens[0])[\strlen(is_array($this->tokens[0]) ? $this->tokens[0][1] : $this->tokens[0]) - 1] === "\n") { // Special case: Newline at the end of opening tag followed by whitespace. $indent = $this->getIndent($content, $tabWidth); } } } - // Add a sentinel for one past end of the file $indentMap[] = $indent; - return $indentMap; } - - private function getIndent(string $ws, int $tabWidth): int { + private function getIndent(string $ws, int $tabWidth) : int + { $spaces = \substr_count($ws, " "); $tabs = \substr_count($ws, "\t"); assert(\strlen($ws) === $spaces + $tabs); diff --git a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/JsonDecoder.php similarity index 74% rename from vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/JsonDecoder.php index 7be4142..eed124d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/JsonDecoder.php @@ -1,26 +1,27 @@ -[] Node type to reflection class map */ - private array $reflectionClassCache; - + private $reflectionClassCache; /** @return mixed */ - public function decode(string $json) { - $value = json_decode($json, true); + public function decode(string $json) + { + $value = json_decode($json, \true); if (json_last_error()) { throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg()); } - return $this->decodeRecursive($value); } - /** * @param mixed $value * @return mixed */ - private function decodeRecursive($value) { + private function decodeRecursive($value) + { if (\is_array($value)) { if (isset($value['nodeType'])) { if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') { @@ -32,77 +33,64 @@ private function decodeRecursive($value) { } return $value; } - - private function decodeArray(array $array): array { + private function decodeArray(array $array) : array + { $decodedArray = []; foreach ($array as $key => $value) { $decodedArray[$key] = $this->decodeRecursive($value); } return $decodedArray; } - - private function decodeNode(array $value): Node { + private function decodeNode(array $value) : Node + { $nodeType = $value['nodeType']; if (!\is_string($nodeType)) { throw new \RuntimeException('Node type must be a string'); } - $reflectionClass = $this->reflectionClassFromNodeType($nodeType); $node = $reflectionClass->newInstanceWithoutConstructor(); - if (isset($value['attributes'])) { if (!\is_array($value['attributes'])) { throw new \RuntimeException('Attributes must be an array'); } - $node->setAttributes($this->decodeArray($value['attributes'])); } - foreach ($value as $name => $subNode) { if ($name === 'nodeType' || $name === 'attributes') { continue; } - - $node->$name = $this->decodeRecursive($subNode); + $node->{$name} = $this->decodeRecursive($subNode); } - return $node; } - - private function decodeComment(array $value): Comment { + private function decodeComment(array $value) : Comment + { $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; if (!isset($value['text'])) { throw new \RuntimeException('Comment must have text'); } - - return new $className( - $value['text'], - $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, - $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1 - ); + return new $className($value['text'], $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1); } - /** @return \ReflectionClass */ - private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { + private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass + { if (!isset($this->reflectionClassCache[$nodeType])) { $className = $this->classNameFromNodeType($nodeType); $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); } return $this->reflectionClassCache[$nodeType]; } - /** @return class-string */ - private function classNameFromNodeType(string $nodeType): string { + private function classNameFromNodeType(string $nodeType) : string + { $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); if (class_exists($className)) { return $className; } - $className .= '_'; if (class_exists($className)) { return $className; } - - throw new \RuntimeException("Unknown node type \"$nodeType\""); + throw new \RuntimeException("Unknown node type \"{$nodeType}\""); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php similarity index 65% rename from vendor/nikic/php-parser/lib/PhpParser/Lexer.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php index 5e2ece9..c47d111 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php @@ -1,10 +1,11 @@ -postprocessTokens($tokens, $errorHandler); - - if (false !== $scream) { + if (\false !== $scream) { ini_set('xdebug.scream', $scream); } - return $tokens; } - - private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { - $chr = $token->text; - if ($chr === "\0") { + private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler) : void + { + $chr = is_array($token) ? $token[1] : $token; + if ($chr === "\x00") { // PHP cuts error message after null byte, so need special case $errorMsg = 'Unexpected null byte'; } else { - $errorMsg = sprintf( - 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) - ); + $errorMsg = sprintf('Unexpected character "%s" (ASCII %d)', $chr, ord($chr)); } - - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $token->line, - 'endLine' => $token->line, - 'startFilePos' => $token->pos, - 'endFilePos' => $token->pos, - ])); + $errorHandler->handleError(new Error($errorMsg, ['startLine' => $token->line, 'endLine' => $token->line, 'startFilePos' => $token->pos, 'endFilePos' => $token->pos])); } - - private function isUnterminatedComment(Token $token): bool { - return $token->is([\T_COMMENT, \T_DOC_COMMENT]) - && substr($token->text, 0, 2) === '/*' - && substr($token->text, -2) !== '*/'; + private function isUnterminatedComment(Token $token) : bool + { + return $token->is([\T_COMMENT, \T_DOC_COMMENT]) && substr(is_array($token) ? $token[1] : $token, 0, 2) === '/*' && substr(is_array($token) ? $token[1] : $token, -2) !== '*/'; } - /** * @param list $tokens */ - protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { + protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler) : void + { // This function reports errors (bad characters and unterminated comments) in the token // array, and performs certain canonicalizations: // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. // * Add a sentinel token with ID 0. - $numTokens = \count($tokens); if ($numTokens === 0) { // Empty input edge case: Just add the sentinel token. - $tokens[] = new Token(0, "\0", 1, 0); + $tokens[] = new Token(0, "\x00", 1, 0); return; } - for ($i = 0; $i < $numTokens; $i++) { $token = $tokens[$i]; if ($token->id === \T_BAD_CHARACTER) { $this->handleInvalidCharacter($token, $errorHandler); } - if ($token->id === \ord('&')) { $next = $i + 1; while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { $next++; } - $followedByVarOrVarArg = isset($tokens[$next]) && - $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); - $token->id = $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; + $followedByVarOrVarArg = isset($tokens[$next]) && $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); + $token->id = $followedByVarOrVarArg ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; } } - // Check for unterminated comment $lastToken = $tokens[$numTokens - 1]; if ($this->isUnterminatedComment($lastToken)) { - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $lastToken->line, - 'endLine' => $lastToken->getEndLine(), - 'startFilePos' => $lastToken->pos, - 'endFilePos' => $lastToken->getEndPos(), - ])); + $errorHandler->handleError(new Error('Unterminated comment', ['startLine' => $lastToken->line, 'endLine' => $lastToken->getEndLine(), 'startFilePos' => $lastToken->pos, 'endFilePos' => $lastToken->getEndPos()])); } - // Add sentinel token. - $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); + $tokens[] = new Token(0, "\x00", $lastToken->getEndLine(), $lastToken->getEndPos()); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index 3185e80..b98014a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -1,58 +1,48 @@ - */ - private array $emulators = []; - - private PhpVersion $targetPhpVersion; - - private PhpVersion $hostPhpVersion; - + private $emulators = []; + /** + * @var \Matomo\Dependencies\OpenApiDocs\PhpParser\PhpVersion + */ + private $targetPhpVersion; + /** + * @var \Matomo\Dependencies\OpenApiDocs\PhpParser\PhpVersion + */ + private $hostPhpVersion; /** * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. */ - public function __construct(?PhpVersion $phpVersion = null) { + public function __construct(?PhpVersion $phpVersion = null) + { $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); $this->hostPhpVersion = PhpVersion::getHostVersion(); - - $emulators = [ - new MatchTokenEmulator(), - new NullsafeTokenEmulator(), - new AttributeEmulator(), - new EnumTokenEmulator(), - new ReadonlyTokenEmulator(), - new ExplicitOctalEmulator(), - new ReadonlyFunctionTokenEmulator(), - new PropertyTokenEmulator(), - new AsymmetricVisibilityTokenEmulator(), - new PipeOperatorEmulator(), - new VoidCastEmulator(), - ]; - + $emulators = [new MatchTokenEmulator(), new NullsafeTokenEmulator(), new AttributeEmulator(), new EnumTokenEmulator(), new ReadonlyTokenEmulator(), new ExplicitOctalEmulator(), new ReadonlyFunctionTokenEmulator(), new PropertyTokenEmulator(), new AsymmetricVisibilityTokenEmulator(), new PipeOperatorEmulator(), new VoidCastEmulator()]; // 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) { @@ -64,31 +54,26 @@ public function __construct(?PhpVersion $phpVersion = null) { } } } - - public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { - $emulators = array_filter($this->emulators, function ($emulator) use ($code) { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null) : array + { + $emulators = array_filter($this->emulators, function ($emulator) use($code) { return $emulator->isEmulationNeeded($code); }); - if (empty($emulators)) { // Nothing to emulate, yay return parent::tokenize($code, $errorHandler); } - if ($errorHandler === null) { $errorHandler = new ErrorHandler\Throwing(); } - $this->patches = []; foreach ($emulators as $emulator) { $code = $emulator->preprocessCode($code, $this->patches); } - $collector = new ErrorHandler\Collecting(); $tokens = parent::tokenize($code, $collector); $this->sortPatches(); $tokens = $this->fixupTokens($tokens); - $errors = $collector->getErrors(); if (!empty($errors)) { $this->fixupErrors($errors); @@ -96,45 +81,39 @@ public function tokenize(string $code, ?ErrorHandler $errorHandler = null): arra $errorHandler->handleError($error); } } - foreach ($emulators as $emulator) { $tokens = $emulator->emulate($code, $tokens); } - return $tokens; } - - private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { - return $this->hostPhpVersion->older($emulatorPhpVersion) - && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); + private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion) : bool + { + return $this->hostPhpVersion->older($emulatorPhpVersion) && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); } - - private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { - return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) - && $this->targetPhpVersion->older($emulatorPhpVersion); + private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion) : bool + { + return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) && $this->targetPhpVersion->older($emulatorPhpVersion); } - - private function sortPatches(): void { + private function sortPatches() : void + { // Patches may be contributed by different emulators. // Make sure they are sorted by increasing patch position. usort($this->patches, function ($p1, $p2) { return $p1[0] <=> $p2[0]; }); } - /** * @param list $tokens * @return list */ - private function fixupTokens(array $tokens): array { + private function fixupTokens(array $tokens) : array + { if (\count($this->patches) === 0) { return $tokens; } - // Load first patch $patchIdx = 0; list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - // We use a manual loop over the tokens, because we modify the array on the fly $posDelta = 0; $lineDelta = 0; @@ -144,7 +123,7 @@ private function fixupTokens(array $tokens): array { $token->pos += $posDelta; $token->line += $lineDelta; $localPosDelta = 0; - $len = \strlen($token->text); + $len = \strlen(is_array($token) ? $token[1] : $token); while ($patchPos >= $pos && $patchPos < $pos + $len) { $patchTextLen = \strlen($patchText); if ($patchType === 'remove') { @@ -155,28 +134,21 @@ private function fixupTokens(array $tokens): array { $c--; } else { // Remove from token string - $token->text = substr_replace( - $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen - ); + is_array($token) ? $token[1] : $token = substr_replace(is_array($token) ? $token[1] : $token, '', $patchPos - $pos + $localPosDelta, $patchTextLen); $localPosDelta -= $patchTextLen; } $lineDelta -= \substr_count($patchText, "\n"); } elseif ($patchType === 'add') { // Insert into the token string - $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 - ); + is_array($token) ? $token[1] : $token = substr_replace(is_array($token) ? $token[1] : $token, $patchText, $patchPos - $pos + $localPosDelta, 0); $localPosDelta += $patchTextLen; $lineDelta += \substr_count($patchText, "\n"); } elseif ($patchType === 'replace') { // Replace inside the token string - $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen - ); + is_array($token) ? $token[1] : $token = substr_replace(is_array($token) ? $token[1] : $token, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen); } else { - assert(false); + assert(\false); } - // Fetch the next patch $patchIdx++; if ($patchIdx >= \count($this->patches)) { @@ -184,24 +156,21 @@ private function fixupTokens(array $tokens): array { $patchPos = \PHP_INT_MAX; break; } - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; } - $posDelta += $localPosDelta; } return $tokens; } - /** * Fixup line and position information in errors. * * @param Error[] $errors */ - private function fixupErrors(array $errors): void { + private function fixupErrors(array $errors) : void + { foreach ($errors as $error) { $attrs = $error->getAttributes(); - $posDelta = 0; $lineDelta = 0; foreach ($this->patches as $patch) { @@ -210,7 +179,6 @@ private function fixupErrors(array $errors): void { // No longer relevant break; } - if ($patchType === 'add') { $posDelta += strlen($patchText); $lineDelta += substr_count($patchText, "\n"); @@ -219,7 +187,6 @@ private function fixupErrors(array $errors): void { $lineDelta -= substr_count($patchText, "\n"); } } - $attrs['startFilePos'] += $posDelta; $attrs['endFilePos'] += $posDelta; $attrs['startLine'] += $lineDelta; diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php new file mode 100644 index 0000000..13ede98 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php @@ -0,0 +1,66 @@ + \Matomo\Dependencies\OpenApiDocs\T_PUBLIC_SET, \T_PROTECTED => \Matomo\Dependencies\OpenApiDocs\T_PROTECTED_SET, \T_PRIVATE => \Matomo\Dependencies\OpenApiDocs\T_PRIVATE_SET]; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if (isset($map[$token->id]) && $i + 3 < $c && (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]) === '(' && $tokens[$i + 2]->id === \T_STRING && \strtolower(is_array($tokens[$i + 2]) ? $tokens[$i + 2][1] : $tokens[$i + 2]) === 'set' && (is_array($tokens[$i + 3]) ? $tokens[$i + 3][1] : $tokens[$i + 3]) === ')' && $this->isKeywordContext($tokens, $i)) { + array_splice($tokens, $i, 4, [new Token($map[$token->id], (is_array($token) ? $token[1] : $token) . '(' . (is_array($tokens[$i + 2]) ? $tokens[$i + 2][1] : $tokens[$i + 2]) . ')', $token->line, $token->pos)]); + $c -= 3; + } + } + return $tokens; + } + public function reverseEmulate(string $code, array $tokens) : array + { + $reverseMap = [\Matomo\Dependencies\OpenApiDocs\T_PUBLIC_SET => \T_PUBLIC, \Matomo\Dependencies\OpenApiDocs\T_PROTECTED_SET => \T_PROTECTED, \Matomo\Dependencies\OpenApiDocs\T_PRIVATE_SET => \T_PRIVATE]; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if (isset($reverseMap[$token->id]) && \preg_match('/(public|protected|private)\\((set)\\)/i', is_array($token) ? $token[1] : $token, $matches)) { + [, $modifier, $set] = $matches; + $modifierLen = \strlen($modifier); + array_splice($tokens, $i, 1, [new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4)]); + $i += 3; + $c += 3; + } + } + return $tokens; + } + /** @param Token[] $tokens */ + protected function isKeywordContext(array $tokens, int $pos) : bool + { + $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); + if ($prevToken === null) { + return \false; + } + return $prevToken->id !== \T_OBJECT_OPERATOR && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; + } + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start) : ?Token + { + for ($i = $start - 1; $i >= 0; --$i) { + if ($tokens[$i]->id === \T_WHITESPACE) { + continue; + } + return $tokens[$i]; + } + return null; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php new file mode 100644 index 0000000..ed2a1c4 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -0,0 +1,48 @@ +line, $token->pos)]); + $c--; + continue; + } + } + return $tokens; + } + public function reverseEmulate(string $code, array $tokens) : array + { + // TODO + return $tokens; + } + public function preprocessCode(string $code, array &$patches) : string + { + $pos = 0; + while (\false !== ($pos = strpos($code, '#[', $pos))) { + // Replace #[ with %[ + $code[$pos] = '%'; + $patches[] = [$pos, 'replace', '#']; + $pos += 2; + } + return $code; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php new file mode 100644 index 0000000..15893f4 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -0,0 +1,25 @@ +id === \T_WHITESPACE && $tokens[$pos + 2]->id === \T_STRING; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php new file mode 100644 index 0000000..af17010 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -0,0 +1,42 @@ +id == \T_LNUMBER && (is_array($token) ? $token[1] : $token) === '0' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && preg_match('/[oO][0-7]+(?:_[0-7]+)*/', is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1])) { + $tokenKind = $this->resolveIntegerOrFloatToken(is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]); + array_splice($tokens, $i, 2, [new Token($tokenKind, '0' . (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]), $token->line, $token->pos)]); + $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; + } + public function reverseEmulate(string $code, array $tokens) : array + { + // Explicit octals were not legal code previously, don't bother. + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php similarity index 51% rename from vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index 066e7cd..c92e4c1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -1,60 +1,55 @@ -getKeywordString()) !== false; +getKeywordString()) !== \false; } - /** @param Token[] $tokens */ - protected function isKeywordContext(array $tokens, int $pos): bool { + protected function isKeywordContext(array $tokens, int $pos) : bool + { $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); if ($prevToken === null) { - return false; + return \false; } - return $prevToken->id !== \T_OBJECT_OPERATOR - && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; + return $prevToken->id !== \T_OBJECT_OPERATOR && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; } - - public function emulate(string $code, array $tokens): array { + public function emulate(string $code, array $tokens) : array + { $keywordString = $this->getKeywordString(); foreach ($tokens as $i => $token) { - if ($token->id === T_STRING && strtolower($token->text) === $keywordString - && $this->isKeywordContext($tokens, $i)) { + if ($token->id === \T_STRING && strtolower(is_array($token) ? $token[1] : $token) === $keywordString && $this->isKeywordContext($tokens, $i)) { $token->id = $this->getKeywordToken(); } } - return $tokens; } - /** @param Token[] $tokens */ - private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { + private function getPreviousNonSpaceToken(array $tokens, int $start) : ?Token + { for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i]->id === T_WHITESPACE) { + if ($tokens[$i]->id === \T_WHITESPACE) { continue; } - return $tokens[$i]; } - return null; } - - public function reverseEmulate(string $code, array $tokens): array { + public function reverseEmulate(string $code, array $tokens) : array + { $keywordToken = $this->getKeywordToken(); foreach ($tokens as $token) { if ($token->id === $keywordToken) { $token->id = \T_STRING; } } - return $tokens; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php new file mode 100644 index 0000000..9ce381e --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php @@ -0,0 +1,21 @@ +') !== \false; + } + public function emulate(string $code, array $tokens) : array + { + // We need to manually iterate and manage a count because we'll change + // the tokens array on the way + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ((is_array($token) ? $token[1] : $token) === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { + array_splice($tokens, $i, 2, [new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos)]); + $c--; + continue; + } + // Handle ?-> inside encapsed string. + if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) && $tokens[$i - 1]->id === \T_VARIABLE && preg_match('/^\\?->([a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*)/', is_array($token) ? $token[1] : $token, $matches)) { + $replacement = [new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3)]; + $matchLen = \strlen($matches[0]); + if ($matchLen !== \strlen(is_array($token) ? $token[1] : $token)) { + $replacement[] = new Token(\T_ENCAPSED_AND_WHITESPACE, \substr(is_array($token) ? $token[1] : $token, $matchLen), $token->line, $token->pos + $matchLen); + } + array_splice($tokens, $i, 1, $replacement); + $c += \count($replacement) - 1; + continue; + } + } + return $tokens; + } + public function reverseEmulate(string $code, array $tokens) : array + { + // ?-> was not valid code previously, don't bother. + return $tokens; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php new file mode 100644 index 0000000..bb9ae19 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php @@ -0,0 +1,42 @@ +') !== \false; + } + public function emulate(string $code, array $tokens) : array + { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ((is_array($token) ? $token[1] : $token) === '|' && isset($tokens[$i + 1]) && (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]) === '>') { + array_splice($tokens, $i, 2, [new Token(\Matomo\Dependencies\OpenApiDocs\T_PIPE, '|>', $token->line, $token->pos)]); + $c--; + } + } + return $tokens; + } + public function reverseEmulate(string $code, array $tokens) : array + { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->id === \Matomo\Dependencies\OpenApiDocs\T_PIPE) { + array_splice($tokens, $i, 1, [new Token(\ord('|'), '|', $token->line, $token->pos), new Token(\ord('>'), '>', $token->line, $token->pos + 1)]); + $i++; + $c++; + } + } + return $tokens; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php new file mode 100644 index 0000000..4de69dc --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php @@ -0,0 +1,21 @@ +id === \T_WHITESPACE && isset($tokens[$pos + 2]) && (is_array($tokens[$pos + 2]) ? $tokens[$pos + 2][1] : $tokens[$pos + 2]) === '(')); + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php new file mode 100644 index 0000000..8074a3a --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -0,0 +1,38 @@ +emulator = $emulator; + } + public function getPhpVersion() : PhpVersion + { + return $this->emulator->getPhpVersion(); + } + public function isEmulationNeeded(string $code) : bool + { + return $this->emulator->isEmulationNeeded($code); + } + public function emulate(string $code, array $tokens) : array + { + return $this->emulator->reverseEmulate($code, $tokens); + } + public function reverseEmulate(string $code, array $tokens) : array + { + return $this->emulator->emulate($code, $tokens); + } + public function preprocessCode(string $code, array &$patches) : string + { + return $code; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php new file mode 100644 index 0000000..4f57e7e --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -0,0 +1,28 @@ +text !== '(') { + if ((is_array($token) ? $token[1] : $token) !== '(') { continue; } - $numTokens = 1; $text = '('; $j = $i + 1; - if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$j]->text)) { - $text .= $tokens[$j]->text; + if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \\t]+/', is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j])) { + $text .= is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j]; $numTokens++; $j++; } - - if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower($tokens[$j]->text) !== 'void') { + if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower(is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j]) !== 'void') { continue; } - - $text .= $tokens[$j]->text; + $text .= is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j]; $numTokens++; $k = $j + 1; - if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$k]->text)) { - $text .= $tokens[$k]->text; + if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \\t]+/', is_array($tokens[$k]) ? $tokens[$k][1] : $tokens[$k])) { + $text .= is_array($tokens[$k]) ? $tokens[$k][1] : $tokens[$k]; $numTokens++; $k++; } - - if ($k >= $c || $tokens[$k]->text !== ')') { + if ($k >= $c || (is_array($tokens[$k]) ? $tokens[$k][1] : $tokens[$k]) !== ')') { continue; } - $text .= ')'; $numTokens++; - array_splice($tokens, $i, $numTokens, [ - new Token(\T_VOID_CAST, $text, $token->line, $token->pos), - ]); + array_splice($tokens, $i, $numTokens, [new Token(\Matomo\Dependencies\OpenApiDocs\T_VOID_CAST, $text, $token->line, $token->pos)]); $c -= $numTokens - 1; } return $tokens; } - - public function reverseEmulate(string $code, array $tokens): array { + public function reverseEmulate(string $code, array $tokens) : array + { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if ($token->id !== \T_VOID_CAST) { + if ($token->id !== \Matomo\Dependencies\OpenApiDocs\T_VOID_CAST) { continue; } - - if (!preg_match('/^\(([ \t]*)(void)([ \t]*)\)$/i', $token->text, $match)) { + if (!preg_match('/^\\(([ \\t]*)(void)([ \\t]*)\\)$/i', is_array($token) ? $token[1] : $token, $match)) { throw new \LogicException('Unexpected T_VOID_CAST contents'); } - $newTokens = []; $pos = $token->pos; - $newTokens[] = new Token(\ord('('), '(', $token->line, $pos); $pos++; - if ($match[1] !== '') { $newTokens[] = new Token(\T_WHITESPACE, $match[1], $token->line, $pos); $pos += \strlen($match[1]); } - $newTokens[] = new Token(\T_STRING, $match[2], $token->line, $pos); $pos += \strlen($match[2]); - if ($match[3] !== '') { $newTokens[] = new Token(\T_WHITESPACE, $match[3], $token->line, $pos); $pos += \strlen($match[3]); } - $newTokens[] = new Token(\ord(')'), ')', $token->line, $pos); - array_splice($tokens, $i, 1, $newTokens); $i += \count($newTokens) - 1; $c += \count($newTokens) - 1; diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Modifiers.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Modifiers.php new file mode 100644 index 0000000..62781a9 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Modifiers.php @@ -0,0 +1,66 @@ + 'public', self::PROTECTED => 'protected', self::PRIVATE => 'private', self::STATIC => 'static', self::ABSTRACT => 'abstract', self::FINAL => 'final', self::READONLY => 'readonly', self::PUBLIC_SET => 'public(set)', self::PROTECTED_SET => 'protected(set)', self::PRIVATE_SET => 'private(set)']; + public static function toString(int $modifier) : string + { + if (!isset(self::TO_STRING_MAP[$modifier])) { + throw new \InvalidArgumentException("Unknown modifier {$modifier}"); + } + return self::TO_STRING_MAP[$modifier]; + } + private static function isValidModifier(int $modifier) : bool + { + $isPow2 = ($modifier & $modifier - 1) == 0 && $modifier != 0; + return $isPow2 && $modifier <= self::PRIVATE_SET; + } + /** + * @internal + */ + public static function verifyClassModifier(int $a, int $b) : void + { + assert(self::isValidModifier($b)); + if (($a & $b) != 0) { + throw new Error('Multiple ' . self::toString($b) . ' modifiers are not allowed'); + } + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class'); + } + } + /** + * @internal + */ + public static function verifyModifier(int $a, int $b) : void + { + assert(self::isValidModifier($b)); + if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK || $a & Modifiers::VISIBILITY_SET_MASK && $b & Modifiers::VISIBILITY_SET_MASK) { + throw new Error('Multiple access type modifiers are not allowed'); + } + if (($a & $b) != 0) { + throw new Error('Multiple ' . self::toString($b) . ' modifiers are not allowed'); + } + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class member'); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NameContext.php similarity index 79% rename from vendor/nikic/php-parser/lib/PhpParser/NameContext.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NameContext.php index 2265ecc..a1932ba 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NameContext.php @@ -1,33 +1,30 @@ - [aliasName => originalName]] */ - protected array $aliases = []; - + protected $aliases = []; /** @var Name[][] Same as $aliases but preserving original case */ - protected array $origAliases = []; - + protected $origAliases = []; /** @var ErrorHandler Error handler */ - protected ErrorHandler $errorHandler; - + protected $errorHandler; /** * Create a name context. * * @param ErrorHandler $errorHandler Error handling used to report errors */ - public function __construct(ErrorHandler $errorHandler) { + public function __construct(ErrorHandler $errorHandler) + { $this->errorHandler = $errorHandler; } - /** * Start a new namespace. * @@ -35,15 +32,11 @@ public function __construct(ErrorHandler $errorHandler) { * * @param Name|null $namespace Null is the global namespace */ - public function startNamespace(?Name $namespace = null): void { + public function startNamespace(?Name $namespace = null) : void + { $this->namespace = $namespace; - $this->origAliases = $this->aliases = [ - Stmt\Use_::TYPE_NORMAL => [], - Stmt\Use_::TYPE_FUNCTION => [], - Stmt\Use_::TYPE_CONSTANT => [], - ]; + $this->origAliases = $this->aliases = [Stmt\Use_::TYPE_NORMAL => [], Stmt\Use_::TYPE_FUNCTION => [], Stmt\Use_::TYPE_CONSTANT => []]; } - /** * Add an alias / import. * @@ -52,44 +45,31 @@ public function startNamespace(?Name $namespace = null): void { * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * @param array $errorAttrs Attributes to use to report an error */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { + public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) : void + { // Constant names are case sensitive, everything else case insensitive if ($type === Stmt\Use_::TYPE_CONSTANT) { $aliasLookupName = $aliasName; } else { $aliasLookupName = strtolower($aliasName); } - if (isset($this->aliases[$type][$aliasLookupName])) { - $typeStringMap = [ - Stmt\Use_::TYPE_NORMAL => '', - Stmt\Use_::TYPE_FUNCTION => 'function ', - Stmt\Use_::TYPE_CONSTANT => 'const ', - ]; - - $this->errorHandler->handleError(new Error( - sprintf( - 'Cannot use %s%s as %s because the name is already in use', - $typeStringMap[$type], $name, $aliasName - ), - $errorAttrs - )); + $typeStringMap = [Stmt\Use_::TYPE_NORMAL => '', Stmt\Use_::TYPE_FUNCTION => 'function ', Stmt\Use_::TYPE_CONSTANT => 'const ']; + $this->errorHandler->handleError(new Error(sprintf('Cannot use %s%s as %s because the name is already in use', $typeStringMap[$type], $name, $aliasName), $errorAttrs)); return; } - $this->aliases[$type][$aliasLookupName] = $name; $this->origAliases[$type][$aliasName] = $name; } - /** * Get current namespace. * * @return null|Name Namespace (or null if global namespace) */ - public function getNamespace(): ?Name { + public function getNamespace() : ?Name + { return $this->namespace; } - /** * Get resolved name. * @@ -98,42 +78,34 @@ public function getNamespace(): ?Name { * * @return null|Name Resolved name, or null if static resolution is not possible */ - public function getResolvedName(Name $name, int $type): ?Name { + public function getResolvedName(Name $name, int $type) : ?Name + { // don't resolve special class names if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { if (!$name->isUnqualified()) { - $this->errorHandler->handleError(new Error( - sprintf("'\\%s' is an invalid class name", $name->toString()), - $name->getAttributes() - )); + $this->errorHandler->handleError(new Error(sprintf("'\\%s' is an invalid class name", $name->toString()), $name->getAttributes())); } return $name; } - // fully qualified names are already resolved if ($name->isFullyQualified()) { return $name; } - // Try to resolve aliases - if (null !== $resolvedName = $this->resolveAlias($name, $type)) { + if (null !== ($resolvedName = $this->resolveAlias($name, $type))) { return $resolvedName; } - if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) { if (null === $this->namespace) { // outside of a namespace unaliased unqualified is same as fully qualified return new FullyQualified($name, $name->getAttributes()); } - // Cannot resolve statically return null; } - // if no alias exists prepend current namespace return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); } - /** * Get resolved class name. * @@ -141,10 +113,10 @@ public function getResolvedName(Name $name, int $type): ?Name { * * @return Name Resolved name */ - public function getResolvedClassName(Name $name): Name { + public function getResolvedClassName(Name $name) : Name + { return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); } - /** * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). * @@ -153,27 +125,24 @@ public function getResolvedClassName(Name $name): Name { * * @return Name[] Possible representations of the name */ - public function getPossibleNames(string $name, int $type): array { + public function getPossibleNames(string $name, int $type) : array + { $lcName = strtolower($name); - if ($type === Stmt\Use_::TYPE_NORMAL) { // self, parent and static must always be unqualified if ($lcName === "self" || $lcName === "parent" || $lcName === "static") { return [new Name($name)]; } } - // Collect possible ways to write this name, starting with the fully-qualified name $possibleNames = [new FullyQualified($name)]; - - if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) { + if (null !== ($nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type))) { // Make sure there is no alias that makes the normally namespace-relative name // into something else if (null === $this->resolveAlias($nsRelativeName, $type)) { $possibleNames[] = $nsRelativeName; } } - // Check for relevant namespace use statements foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) { $lcOrig = $orig->toLowerString(); @@ -181,7 +150,6 @@ public function getPossibleNames(string $name, int $type): array { $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig))); } } - // Check for relevant type-specific use statements foreach ($this->origAliases[$type] as $alias => $orig) { if ($type === Stmt\Use_::TYPE_CONSTANT) { @@ -197,10 +165,8 @@ public function getPossibleNames(string $name, int $type): array { } } } - return $possibleNames; } - /** * Get shortest representation of this fully-qualified name. * @@ -209,9 +175,9 @@ public function getPossibleNames(string $name, int $type): array { * * @return Name Shortest representation */ - public function getShortName(string $name, int $type): Name { + public function getShortName(string $name, int $type) : Name + { $possibleNames = $this->getPossibleNames($name, $type); - // Find shortest name $shortestName = null; $shortestLength = \INF; @@ -222,13 +188,11 @@ public function getShortName(string $name, int $type): Name { $shortestLength = $length; } } - return $shortestName; } - - private function resolveAlias(Name $name, int $type): ?FullyQualified { + private function resolveAlias(Name $name, int $type) : ?FullyQualified + { $firstPart = $name->getFirst(); - if ($name->isQualified()) { // resolve aliases for qualified names, always against class alias table $checkName = strtolower($firstPart); @@ -244,16 +208,14 @@ private function resolveAlias(Name $name, int $type): ?FullyQualified { return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes()); } } - // No applicable aliases return null; } - - private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { + private function getNamespaceRelativeName(string $name, string $lcName, int $type) : ?Name + { if (null === $this->namespace) { return new Name($name); } - if ($type === Stmt\Use_::TYPE_CONSTANT) { // The constants true/false/null always resolve to the global symbols, even inside a // namespace, so they may be used without qualification @@ -261,21 +223,18 @@ private function getNamespaceRelativeName(string $name, string $lcName, int $typ return new Name($name); } } - $namespacePrefix = strtolower($this->namespace . '\\'); if (0 === strpos($lcName, $namespacePrefix)) { return new Name(substr($name, strlen($namespacePrefix))); } - return null; } - - private function normalizeConstName(string $name): string { + private function normalizeConstName(string $name) : string + { $nsSep = strrpos($name, '\\'); - if (false === $nsSep) { + if (\false === $nsSep) { return $name; } - // Constants have case-insensitive namespace and case-sensitive short-name $ns = substr($name, 0, $nsSep); $shortName = substr($name, $nsSep + 1); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node.php similarity index 79% rename from vendor/nikic/php-parser/lib/PhpParser/Node.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node.php index fd2a9b7..819957b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node.php @@ -1,23 +1,23 @@ - */ - public function getAttributes(): array; - + public function getAttributes() : array; /** * Replaces all the attributes of this node. * * @param array $attributes */ - public function setAttributes(array $attributes): void; + public function setAttributes(array $attributes) : void; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Arg.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Arg.php index 6680efa..6ecb996 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Arg.php @@ -1,19 +1,19 @@ - $attributes Additional attributes * @param Identifier|null $name Parameter name (for named parameters) */ - public function __construct( - Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], - ?Identifier $name = null - ) { + public function __construct(Expr $value, bool $byRef = \false, bool $unpack = \false, array $attributes = [], ?Identifier $name = null) + { $this->attributes = $attributes; $this->name = $name; $this->value = $value; $this->byRef = $byRef; $this->unpack = $unpack; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name', 'value', 'byRef', 'unpack']; } - - public function getType(): string { + public function getType() : string + { return 'Arg'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php similarity index 65% rename from vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php index fa1cff5..923bd9a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php @@ -1,19 +1,19 @@ - $attributes Additional attributes */ - public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { + public function __construct(Expr $value, ?Expr $key = null, bool $byRef = \false, array $attributes = [], bool $unpack = \false) + { $this->attributes = $attributes; $this->key = $key; $this->value = $value; $this->byRef = $byRef; $this->unpack = $unpack; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['key', 'value', 'byRef', 'unpack']; } - - public function getType(): string { + public function getType() : string + { return 'ArrayItem'; } } - // @deprecated compatibility alias class_alias(ArrayItem::class, Expr\ArrayItem::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Attribute.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Attribute.php index 9d89243..91db55c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Attribute.php @@ -1,33 +1,33 @@ - Attribute arguments */ - public array $args; - + public $args; /** * @param Node\Name $name Attribute name * @param list $args Attribute arguments * @param array $attributes Additional node attributes */ - public function __construct(Name $name, array $args = [], array $attributes = []) { + public function __construct(Name $name, array $args = [], array $attributes = []) + { $this->attributes = $attributes; $this->name = $name; $this->args = $args; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name', 'args']; } - - public function getType(): string { + public function getType() : string + { return 'Attribute'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php similarity index 55% rename from vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php index b9eb588..4ac12b1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php @@ -1,27 +1,28 @@ - $attributes Additional node attributes */ - public function __construct(array $attrs, array $attributes = []) { + public function __construct(array $attrs, array $attributes = []) + { $this->attributes = $attributes; $this->attrs = $attrs; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrs']; } - - public function getType(): string { + public function getType() : string + { return 'AttributeGroup'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php index e313280..54ac135 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { + public function __construct(Expr\Variable $var, bool $byRef = \false, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->byRef = $byRef; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'byRef']; } - - public function getType(): string { + public function getType() : string + { return 'ClosureUse'; } } - // @deprecated compatibility alias class_alias(ClosureUse::class, Expr\ClosureUse::class); diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ComplexType.php new file mode 100644 index 0000000..d481df4 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/ComplexType.php @@ -0,0 +1,14 @@ + $attributes Additional attributes */ - public function __construct($name, Expr $value, array $attributes = []) { + public function __construct($name, Expr $value, array $attributes = []) + { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name', 'value']; } - - public function getType(): string { + public function getType() : string + { return 'Const'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php similarity index 63% rename from vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php index 55c1fe4..5a9d4ef 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php @@ -1,16 +1,16 @@ -value pair node. * @@ -18,20 +18,20 @@ class DeclareItem extends NodeAbstract { * @param Node\Expr $value Value * @param array $attributes Additional attributes */ - public function __construct($key, Node\Expr $value, array $attributes = []) { + public function __construct($key, Node\Expr $value, array $attributes = []) + { $this->attributes = $attributes; $this->key = \is_string($key) ? new Node\Identifier($key) : $key; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['key', 'value']; } - - public function getType(): string { + public function getType() : string + { return 'DeclareItem'; } } - // @deprecated compatibility alias class_alias(DeclareItem::class, Stmt\DeclareDeclare::class); diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr.php new file mode 100644 index 0000000..4ff852a --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr.php @@ -0,0 +1,9 @@ + $attributes Additional attributes */ - public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { + public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->dim = $dim; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'dim']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_ArrayDimFetch'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php new file mode 100644 index 0000000..89950d2 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php @@ -0,0 +1,12 @@ + $attributes Additional attributes + */ + public function __construct(array $items = [], array $attributes = []) + { + $this->attributes = $attributes; + $this->items = $items; + } + public function getSubNodeNames() : array + { + return ['items']; + } + public function getType() : string + { + return 'Expr_Array'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php similarity index 66% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php index 0e98ce9..4c4f780 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -1,29 +1,25 @@ - array() : PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct(array $subNodes, array $attributes = []) { + public function __construct(array $subNodes, array $attributes = []) + { $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; + $this->static = $subNodes['static'] ?? \false; + $this->byRef = $subNodes['byRef'] ?? \false; $this->params = $subNodes['params'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->expr = $subNodes['expr']; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; } - - public function returnsByRef(): bool { + public function returnsByRef() : bool + { return $this->byRef; } - - public function getParams(): array { + public function getParams() : array + { return $this->params; } - - public function getReturnType() { + public function getReturnType() + { return $this->returnType; } - - public function getAttrGroups(): array { + public function getAttrGroups() : array + { return $this->attrGroups; } - /** * @return Node\Stmt\Return_[] */ - public function getStmts(): array { + public function getStmts() : array + { return [new Node\Stmt\Return_($this->expr)]; } - - public function getType(): string { + public function getType() : string + { return 'Expr_ArrowFunction'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php index dcbf84d..ca5001c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { + public function __construct(Expr $var, Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Assign'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php index 5209a64..88732f6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { + public function __construct(Expr $var, Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'expr']; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php new file mode 100644 index 0000000..8f333dc --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php @@ -0,0 +1,13 @@ + $attributes Additional attributes */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { + public function __construct(Expr $var, Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_AssignRef'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php similarity index 68% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php index 1b92bd4..d98b431 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Expr $left, Expr $right, array $attributes = []) { + public function __construct(Expr $left, Expr $right, array $attributes = []) + { $this->attributes = $attributes; $this->left = $left; $this->right = $right; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['left', 'right']; } - /** * Get the operator sigil for this binary operation. * * In the case there are multiple possible sigils for an operator, this method does not * necessarily return the one used in the parsed code. */ - abstract public function getOperatorSigil(): string; + public abstract function getOperatorSigil() : string; } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php new file mode 100644 index 0000000..3720c01 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php @@ -0,0 +1,17 @@ +'; + } + public function getType() : string + { + return 'Expr_BinaryOp_Greater'; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php new file mode 100644 index 0000000..b049674 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php @@ -0,0 +1,17 @@ +='; + } + public function getType() : string + { + return 'Expr_BinaryOp_GreaterOrEqual'; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php new file mode 100644 index 0000000..1d26f84 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php @@ -0,0 +1,17 @@ +'; + } + public function getType() : string + { + return 'Expr_BinaryOp_Pipe'; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php new file mode 100644 index 0000000..2969b48 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php @@ -0,0 +1,17 @@ +>'; + } + public function getType() : string + { + return 'Expr_BinaryOp_ShiftRight'; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php new file mode 100644 index 0000000..f12a1c4 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php @@ -0,0 +1,17 @@ +'; + } + public function getType() : string + { + return 'Expr_BinaryOp_Spaceship'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php index b7175a7..f545e5c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_BitwiseNot'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php index c66d233..4705ac1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_BooleanNot'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php similarity index 65% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php index 86e781c..239c3a7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php @@ -1,38 +1,38 @@ - */ - abstract public function getRawArgs(): array; - + public abstract function getRawArgs() : array; /** * Returns whether this call expression is actually a first class callable. */ - public function isFirstClassCallable(): bool { + public function isFirstClassCallable() : bool + { $rawArgs = $this->getRawArgs(); return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; } - /** * Assert that this is not a first-class callable and return only ordinary Args. * * @return Arg[] */ - public function getArgs(): array { + public function getArgs() : array + { assert(!$this->isFirstClassCallable()); return $this->getRawArgs(); } - /** * Retrieves a specific argument from the raw arguments. * @@ -40,7 +40,8 @@ public function getArgs(): array { * positional (unnamed) argument that exists at the given `$position`, * otherwise, returns `null` for first-class callables or if no match is found. */ - public function getArg(string $name, int $position): ?Arg { + public function getArg(string $name, int $position) : ?Arg + { if ($this->isFirstClassCallable()) { return null; } @@ -48,10 +49,7 @@ public function getArg(string $name, int $position): ?Arg { if ($arg->unpack) { continue; } - if ( - ($arg->name !== null && $arg->name->toString() === $name) - || ($arg->name === null && $i === $position) - ) { + if ($arg->name !== null && $arg->name->toString() === $name || $arg->name === null && $i === $position) { return $arg; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php index c2751de..b82f928 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php @@ -1,25 +1,26 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php new file mode 100644 index 0000000..e21aec3 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php @@ -0,0 +1,13 @@ + $attributes Additional attributes */ - public function __construct(Node $class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) + { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['class', 'name']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_ClassConstFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php index d85bc9a..470a519 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Clone'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php similarity index 67% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php index 0680446..b47fdbf 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -1,28 +1,28 @@ - array(): PHP attributes groups * @param array $attributes Additional attributes */ - public function __construct(array $subNodes = [], array $attributes = []) { + public function __construct(array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; + $this->static = $subNodes['static'] ?? \false; + $this->byRef = $subNodes['byRef'] ?? \false; $this->params = $subNodes['params'] ?? []; $this->uses = $subNodes['uses'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; } - - public function returnsByRef(): bool { + public function returnsByRef() : bool + { return $this->byRef; } - - public function getParams(): array { + public function getParams() : array + { return $this->params; } - - public function getReturnType() { + public function getReturnType() + { return $this->returnType; } - /** @return Node\Stmt[] */ - public function getStmts(): array { + public function getStmts() : array + { return $this->stmts; } - - public function getAttrGroups(): array { + public function getAttrGroups() : array + { return $this->attrGroups; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Closure'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php new file mode 100644 index 0000000..0ccf967 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php @@ -0,0 +1,12 @@ + $attributes Additional attributes */ - public function __construct(Name $name, array $attributes = []) { + public function __construct(Name $name, array $attributes = []) + { $this->attributes = $attributes; $this->name = $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_ConstFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php index d2f3050..9cd2ff2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Empty'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php similarity index 59% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php index 43010ac..5186926 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php @@ -1,30 +1,32 @@ - $attributes Additional attributes */ - public function __construct(array $attributes = []) { + public function __construct(array $attributes = []) + { $this->attributes = $attributes; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return []; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Error'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php index 32625a2..dddf3e6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_ErrorSuppress'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php index 5120b1b..7d98c7c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Eval'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php index cf00246..43d1385 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php @@ -1,33 +1,33 @@ - $attributes Additional attributes */ - public function __construct(?Expr $expr = null, array $attributes = []) { + public function __construct(?Expr $expr = null, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Exit'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php similarity index 59% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php index 0b85840..bf09fc4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -1,16 +1,16 @@ - Arguments */ - public array $args; - + public $args; /** * Constructs a function call node. * @@ -18,21 +18,22 @@ class FuncCall extends CallLike { * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct(Node $name, array $args = [], array $attributes = []) { + public function __construct(Node $name, array $args = [], array $attributes = []) + { $this->attributes = $attributes; $this->name = $name; $this->args = $args; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name', 'args']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_FuncCall'; } - - public function getRawArgs(): array { + public function getRawArgs() : array + { return $this->args; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php similarity index 59% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php index e1187b1..a5491b0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php @@ -1,20 +1,19 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, int $type, array $attributes = []) { + public function __construct(Expr $expr, int $type, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; $this->type = $type; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr', 'type']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Include'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php similarity index 54% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php index a2783cb..474b8dc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php @@ -1,17 +1,17 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, Node $class, array $attributes = []) { + public function __construct(Expr $expr, Node $class, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; $this->class = $class; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr', 'class']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Instanceof'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php index 4f80fff..9ae8486 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(array $vars, array $attributes = []) { + public function __construct(array $vars, array $attributes = []) + { $this->attributes = $attributes; $this->vars = $vars; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['vars']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Isset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php similarity index 52% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php index 496b7b3..dee63d4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php @@ -1,34 +1,36 @@ - $attributes Additional attributes */ - public function __construct(array $items, array $attributes = []) { + public function __construct(array $items, array $attributes = []) + { $this->attributes = $attributes; $this->items = $items; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['items']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_List'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php similarity index 53% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php index cd028a2..3e761ad 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php @@ -1,32 +1,33 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { + public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->arms = $arms; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'arms']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Match'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php similarity index 54% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php index 2703c75..cf7fbdd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -1,21 +1,21 @@ - Arguments */ - public array $args; - + public $args; /** * Constructs a function call node. * @@ -24,22 +24,23 @@ class MethodCall extends CallLike { * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { + public function __construct(Expr $var, $name, array $args = [], array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'name', 'args']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_MethodCall'; } - - public function getRawArgs(): array { + public function getRawArgs() : array + { return $this->args; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php similarity index 54% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php index eedaaa1..a998c7e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -1,18 +1,18 @@ - Arguments */ - public array $args; - + public $args; /** * Constructs a function call node. * @@ -20,21 +20,22 @@ class New_ extends CallLike { * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct(Node $class, array $args = [], array $attributes = []) { + public function __construct(Node $class, array $args = [], array $attributes = []) + { $this->attributes = $attributes; $this->class = $class; $this->args = $args; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['class', 'args']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_New'; } - - public function getRawArgs(): array { + public function getRawArgs() : array + { return $this->args; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php similarity index 55% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index a151f71..0a64f87 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -1,21 +1,21 @@ - Arguments */ - public array $args; - + public $args; /** * Constructs a nullsafe method call node. * @@ -24,22 +24,23 @@ class NullsafeMethodCall extends CallLike { * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { + public function __construct(Expr $var, $name, array $args = [], array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'name', 'args']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_NullsafeMethodCall'; } - - public function getRawArgs(): array { + public function getRawArgs() : array + { return $this->args; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 6f73a16..40182d0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -1,17 +1,17 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, $name, array $attributes = []) { + public function __construct(Expr $var, $name, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'name']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_NullsafePropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php index 3dca8fd..ed3bac2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, array $attributes = []) { + public function __construct(Expr $var, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_PostDec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php index bc990c3..a16955a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, array $attributes = []) { + public function __construct(Expr $var, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_PostInc'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php index 2f16873..67f0968 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, array $attributes = []) { + public function __construct(Expr $var, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_PreDec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php index fd455f5..35cced0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, array $attributes = []) { + public function __construct(Expr $var, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_PreInc'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php index 6057476..e73e15f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Print'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php index 8c416a8..fe90e64 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -1,17 +1,17 @@ - $attributes Additional attributes */ - public function __construct(Expr $var, $name, array $attributes = []) { + public function __construct(Expr $var, $name, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'name']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_PropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php index e400351..2d24a41 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php @@ -1,30 +1,31 @@ - $attributes Additional attributes */ - public function __construct(array $parts, array $attributes = []) { + public function __construct(array $parts, array $attributes = []) + { $this->attributes = $attributes; $this->parts = $parts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['parts']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_ShellExec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php similarity index 54% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php index 707f34b..5a1f347 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -1,21 +1,21 @@ - Arguments */ - public array $args; - + public $args; /** * Constructs a static method call node. * @@ -24,22 +24,23 @@ class StaticCall extends CallLike { * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct(Node $class, $name, array $args = [], array $attributes = []) { + public function __construct(Node $class, $name, array $args = [], array $attributes = []) + { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['class', 'name', 'args']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_StaticCall'; } - - public function getRawArgs(): array { + public function getRawArgs() : array + { return $this->args; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php similarity index 55% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index 4836a65..c005dbc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -1,18 +1,18 @@ - $attributes Additional attributes */ - public function __construct(Node $class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) + { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['class', 'name']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_StaticPropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php index d4837e6..73dfdd0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php @@ -1,17 +1,17 @@ - $attributes Additional attributes */ - public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { + public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->if = $if; $this->else = $else; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'if', 'else']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Ternary'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php index ee49f83..bdbf8e2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $expr, array $attributes = []) { + public function __construct(Node\Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Throw'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php index cd06f74..5a2f7cc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_UnaryMinus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php index 1b44f7b..ed5a729 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_UnaryPlus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php similarity index 51% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php index bab7492..75d17b4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct($name, array $attributes = []) { + public function __construct($name, array $attributes = []) + { $this->attributes = $attributes; $this->name = $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Variable'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php index 5cff88f..2625e6c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Expr $expr, array $attributes = []) { + public function __construct(Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_YieldFrom'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php similarity index 61% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php index bd81e69..ffe6800 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { + public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) + { $this->attributes = $attributes; $this->key = $key; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['key', 'value']; } - - public function getType(): string { + public function getType() : string + { return 'Expr_Yield'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php similarity index 55% rename from vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php index 58f653a..6b9bdd3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php @@ -1,40 +1,37 @@ - */ - private static array $specialClassNames = [ - 'self' => true, - 'parent' => true, - 'static' => true, - ]; - + private static $specialClassNames = ['self' => \true, 'parent' => \true, 'static' => \true]; /** * Constructs an identifier node. * * @param string $name Identifier as string * @param array $attributes Additional attributes */ - public function __construct(string $name, array $attributes = []) { + public function __construct(string $name, array $attributes = []) + { if ($name === '') { throw new \InvalidArgumentException('Identifier name cannot be empty'); } - $this->attributes = $attributes; $this->name = $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name']; } - /** * Get identifier as string. * * @psalm-return non-empty-string * @return string Identifier as string. */ - public function toString(): string { + public function toString() : string + { return $this->name; } - /** * Get lowercased identifier as string. * * @psalm-return non-empty-string&lowercase-string * @return string Lowercased identifier as string */ - public function toLowerString(): string { + public function toLowerString() : string + { return strtolower($this->name); } - /** * Checks whether the identifier is a special class name (self, parent or static). * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName(): bool { + public function isSpecialClassName() : bool + { return isset(self::$specialClassNames[strtolower($this->name)]); } - /** * Get identifier as string. * * @psalm-return non-empty-string * @return string Identifier as string */ - public function __toString(): string { + public function __toString() : string + { return $this->name; } - - public function getType(): string { + public function getType() : string + { return 'Identifier'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php similarity index 63% rename from vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php index 576dac4..0447927 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php @@ -1,32 +1,32 @@ - $attributes Additional attributes */ - public function __construct(string $value, array $attributes = []) { + public function __construct(string $value, array $attributes = []) + { $this->attributes = $attributes; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['value']; } - - public function getType(): string { + public function getType() : string + { return 'InterpolatedStringPart'; } } - // @deprecated compatibility alias class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php index 3b39cf1..cfe55cf 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php @@ -1,27 +1,29 @@ - $attributes Additional attributes */ - public function __construct(array $types, array $attributes = []) { + public function __construct(array $types, array $attributes = []) + { $this->attributes = $attributes; $this->types = $types; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['types']; } - - public function getType(): string { + public function getType() : string + { return 'IntersectionType'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/MatchArm.php new file mode 100644 index 0000000..5ed4f19 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/MatchArm.php @@ -0,0 +1,33 @@ + */ + public $conds; + /** + * @var \Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Expr + */ + public $body; + /** + * @param null|list $conds + */ + public function __construct(?array $conds, Node\Expr $body, array $attributes = []) + { + $this->conds = $conds; + $this->body = $body; + $this->attributes = $attributes; + } + public function getSubNodeNames() : array + { + return ['conds', 'body']; + } + public function getType() : string + { + return 'MatchArm'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name.php similarity index 80% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Name.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name.php index 932080b..1a2a6f7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name.php @@ -1,108 +1,103 @@ - */ - private static array $specialClassNames = [ - 'self' => true, - 'parent' => true, - 'static' => true, - ]; - + private static $specialClassNames = ['self' => \true, 'parent' => \true, 'static' => \true]; /** * Constructs a name node. * * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) * @param array $attributes Additional attributes */ - final public function __construct($name, array $attributes = []) { + public final function __construct($name, array $attributes = []) + { $this->attributes = $attributes; $this->name = self::prepareName($name); } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name']; } - /** * Get parts of name (split by the namespace separator). * * @psalm-return non-empty-list * @return string[] Parts of name */ - public function getParts(): array { + public function getParts() : array + { return \explode('\\', $this->name); } - /** * Gets the first part of the name, i.e. everything before the first namespace separator. * * @return string First part of the name */ - public function getFirst(): string { - if (false !== $pos = \strpos($this->name, '\\')) { + public function getFirst() : string + { + if (\false !== ($pos = \strpos($this->name, '\\'))) { return \substr($this->name, 0, $pos); } return $this->name; } - /** * Gets the last part of the name, i.e. everything after the last namespace separator. * * @return string Last part of the name */ - public function getLast(): string { - if (false !== $pos = \strrpos($this->name, '\\')) { + public function getLast() : string + { + if (\false !== ($pos = \strrpos($this->name, '\\'))) { return \substr($this->name, $pos + 1); } return $this->name; } - /** * Checks whether the name is unqualified. (E.g. Name) * * @return bool Whether the name is unqualified */ - public function isUnqualified(): bool { - return false === \strpos($this->name, '\\'); + public function isUnqualified() : bool + { + return \false === \strpos($this->name, '\\'); } - /** * Checks whether the name is qualified. (E.g. Name\Name) * * @return bool Whether the name is qualified */ - public function isQualified(): bool { - return false !== \strpos($this->name, '\\'); + public function isQualified() : bool + { + return \false !== \strpos($this->name, '\\'); } - /** * Checks whether the name is fully qualified. (E.g. \Name) * * @return bool Whether the name is fully qualified */ - public function isFullyQualified(): bool { - return false; + public function isFullyQualified() : bool + { + return \false; } - /** * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) * * @return bool Whether the name is relative */ - public function isRelative(): bool { - return false; + public function isRelative() : bool + { + return \false; } - /** * Returns a string representation of the name itself, without taking the name type into * account (e.g., not including a leading backslash for fully qualified names). @@ -110,10 +105,10 @@ public function isRelative(): bool { * @psalm-return non-empty-string * @return string String representation */ - public function toString(): string { + public function toString() : string + { return $this->name; } - /** * Returns a string representation of the name as it would occur in code (e.g., including * leading backslash for fully qualified names. @@ -121,10 +116,10 @@ public function toString(): string { * @psalm-return non-empty-string * @return string String representation */ - public function toCodeString(): string { + public function toCodeString() : string + { return $this->toString(); } - /** * Returns lowercased string representation of the name, without taking the name type into * account (e.g., no leading backslash for fully qualified names). @@ -132,19 +127,19 @@ public function toCodeString(): string { * @psalm-return non-empty-string&lowercase-string * @return string Lowercased string representation */ - public function toLowerString(): string { + public function toLowerString() : string + { return strtolower($this->name); } - /** * Checks whether the identifier is a special class name (self, parent or static). * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName(): bool { + public function isSpecialClassName() : bool + { return isset(self::$specialClassNames[strtolower($this->name)]); } - /** * Returns a string representation of the name by imploding the namespace parts with the * namespace separator. @@ -152,10 +147,10 @@ public function isSpecialClassName(): bool { * @psalm-return non-empty-string * @return string String representation */ - public function __toString(): string { + public function __toString() : string + { return $this->name; } - /** * Gets a slice of a name (similar to array_slice). * @@ -172,23 +167,21 @@ public function __toString(): string { * * @return static|null Sliced name */ - public function slice(int $offset, ?int $length = null) { + public function slice(int $offset, ?int $length = null) + { if ($offset === 1 && $length === null) { // Short-circuit the common case. - if (false !== $pos = \strpos($this->name, '\\')) { + if (\false !== ($pos = \strpos($this->name, '\\'))) { return new static(\substr($this->name, $pos + 1)); } return null; } - $parts = \explode('\\', $this->name); $numParts = \count($parts); - $realOffset = $offset < 0 ? $offset + $numParts : $offset; if ($realOffset < 0 || $realOffset > $numParts) { throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); } - if (null === $length) { $realLength = $numParts - $realOffset; } else { @@ -197,15 +190,12 @@ public function slice(int $offset, ?int $length = null) { throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); } } - if ($realLength === 0) { // Empty slice is represented as null return null; } - return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); } - /** * Concatenate two names, yielding a new Name instance. * @@ -223,7 +213,8 @@ public function slice(int $offset, ?int $length = null) { * * @return static|null Concatenated name */ - public static function concat($name1, $name2, array $attributes = []) { + public static function concat($name1, $name2, array $attributes = []) + { if (null === $name1 && null === $name2) { return null; } @@ -233,12 +224,9 @@ public static function concat($name1, $name2, array $attributes = []) { if (null === $name2) { return new static($name1, $attributes); } else { - return new static( - self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes - ); + return new static(self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes); } } - /** * Prepares a (string, array or Name node) name for use in name changing methods by converting * it to a string. @@ -248,31 +236,27 @@ public static function concat($name1, $name2, array $attributes = []) { * @psalm-return non-empty-string * @return string Prepared name */ - private static function prepareName($name): string { + private static function prepareName($name) : string + { if (\is_string($name)) { if ('' === $name) { throw new \InvalidArgumentException('Name cannot be empty'); } - return $name; } if (\is_array($name)) { if (empty($name)) { throw new \InvalidArgumentException('Name cannot be empty'); } - return implode('\\', $name); } if ($name instanceof self) { return $name->name; } - - throw new \InvalidArgumentException( - 'Expected string, array of parts or Name instance' - ); + throw new \InvalidArgumentException('Expected string, array of parts or Name instance'); } - - public function getType(): string { + public function getType() : string + { return 'Name'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php similarity index 55% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php index 2118378..0dfe3f4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php @@ -1,49 +1,52 @@ -toString(); } - - public function getType(): string { + public function getType() : string + { return 'Name_FullyQualified'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php index 0226a4e..2fcb68e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php @@ -1,49 +1,52 @@ -toString(); } - - public function getType(): string { + public function getType() : string + { return 'Name_Relative'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/NullableType.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/NullableType.php index b99acd1..5c21305 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/NullableType.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(Node $type, array $attributes = []) { + public function __construct(Node $type, array $attributes = []) + { $this->attributes = $attributes; $this->type = $type; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['type']; } - - public function getType(): string { + public function getType() : string + { return 'NullableType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Param.php similarity index 67% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Param.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Param.php index 57d15b7..91fe94a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -1,29 +1,29 @@ - $attrGroups PHP attribute groups * @param PropertyHook[] $hooks Property hooks for promoted properties */ - public function __construct( - Expr $var, ?Expr $default = null, ?Node $type = null, - bool $byRef = false, bool $variadic = false, - array $attributes = [], - int $flags = 0, - array $attrGroups = [], - array $hooks = [] - ) { + public function __construct(Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = \false, bool $variadic = \false, array $attributes = [], int $flags = 0, array $attrGroups = [], array $hooks = []) + { $this->attributes = $attributes; $this->type = $type; $this->byRef = $byRef; @@ -55,65 +49,63 @@ public function __construct( $this->attrGroups = $attrGroups; $this->hooks = $hooks; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default', 'hooks']; } - - public function getType(): string { + public function getType() : string + { return 'Param'; } - /** * Whether this parameter uses constructor property promotion. */ - public function isPromoted(): bool { + public function isPromoted() : bool + { return $this->flags !== 0 || $this->hooks !== []; } - - public function isPublic(): bool { + public function isPublic() : bool + { $public = (bool) ($this->flags & Modifiers::PUBLIC); if ($public) { - return true; + return \true; } - - if ($this->hooks === []) { - return false; + if (!$this->isPromoted()) { + return \false; } - return ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } - - public function isProtected(): bool { + public function isProtected() : bool + { return (bool) ($this->flags & Modifiers::PROTECTED); } - - public function isPrivate(): bool { + public function isPrivate() : bool + { return (bool) ($this->flags & Modifiers::PRIVATE); } - - public function isReadonly(): bool { + public function isReadonly() : bool + { return (bool) ($this->flags & Modifiers::READONLY); } - /** * Whether the promoted property has explicit public(set) visibility. */ - public function isPublicSet(): bool { + public function isPublicSet() : bool + { return (bool) ($this->flags & Modifiers::PUBLIC_SET); } - /** * Whether the promoted property has explicit protected(set) visibility. */ - public function isProtectedSet(): bool { + public function isProtectedSet() : bool + { return (bool) ($this->flags & Modifiers::PROTECTED_SET); } - /** * Whether the promoted property has explicit private(set) visibility. */ - public function isPrivateSet(): bool { + public function isPrivateSet() : bool + { return (bool) ($this->flags & Modifiers::PRIVATE_SET); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php index 349b9ce..ae6ae7a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php @@ -1,29 +1,29 @@ - array(): PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, $body, array $subNodes = [], array $attributes = []) { + public function __construct($name, $body, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->body = $body; $this->flags = $subNodes['flags'] ?? 0; - $this->byRef = $subNodes['byRef'] ?? false; + $this->byRef = $subNodes['byRef'] ?? \false; $this->params = $subNodes['params'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function returnsByRef(): bool { + public function returnsByRef() : bool + { return $this->byRef; } - - public function getParams(): array { + public function getParams() : array + { return $this->params; } - - public function getReturnType() { + public function getReturnType() + { return null; } - /** * Whether the property hook is final. */ - public function isFinal(): bool { + public function isFinal() : bool + { return (bool) ($this->flags & Modifiers::FINAL); } - - public function getStmts(): ?array { + public function getStmts() : ?array + { if ($this->body instanceof Expr) { $name = $this->name->toLowerString(); if ($name === 'get') { @@ -78,10 +79,8 @@ public function getStmts(): ?array { } if ($name === 'set') { if (!$this->hasAttribute('propertyName')) { - throw new \LogicException( - 'Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); + throw new \LogicException('Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); } - $propName = $this->getAttribute('propertyName'); $prop = new PropertyFetch(new Variable('this'), (string) $propName); return [new Expression(new Assign($prop, $this->body))]; @@ -90,16 +89,16 @@ public function getStmts(): ?array { } return $this->body; } - - public function getAttrGroups(): array { + public function getAttrGroups() : array + { return $this->attrGroups; } - - public function getType(): string { + public function getType() : string + { return 'PropertyHook'; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'body']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php index 101611e..2ebe821 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php @@ -1,16 +1,16 @@ - $attributes Additional attributes */ - public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { + public function __construct($name, ?Node\Expr $default = null, array $attributes = []) + { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; $this->default = $default; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name', 'default']; } - - public function getType(): string { + public function getType() : string + { return 'PropertyItem'; } } - // @deprecated compatibility alias class_alias(PropertyItem::class, Stmt\PropertyProperty::class); diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar.php new file mode 100644 index 0000000..a6a6ecd --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar.php @@ -0,0 +1,8 @@ + $attributes Additional attributes */ - public function __construct(float $value, array $attributes = []) { + public function __construct(float $value, array $attributes = []) + { $this->attributes = $attributes; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['value']; } - /** * @param mixed[] $attributes */ - public static function fromString(string $str, array $attributes = []): Float_ { + public static function fromString(string $str, array $attributes = []) : Float_ + { $attributes['rawValue'] = $str; $float = self::parse($str); - return new Float_($float, $attributes); } - /** * @internal * @@ -42,37 +41,33 @@ public static function fromString(string $str, array $attributes = []): Float_ { * * @return float The parsed number */ - public static function parse(string $str): float { + public static function parse(string $str) : float + { $str = str_replace('_', '', $str); - // Check whether this is one of the special integer notations. if ('0' === $str[0]) { // hex if ('x' === $str[1] || 'X' === $str[1]) { return hexdec($str); } - // bin if ('b' === $str[1] || 'B' === $str[1]) { return bindec($str); } - // oct, but only if the string does not contain any of '.eE'. - if (false === strpbrk($str, '.eE')) { + if (\false === strpbrk($str, '.eE')) { // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit // (8 or 9) so that only the digits before that are used. return octdec(substr($str, 0, strcspn($str, '89'))); } } - // dec return (float) $str; } - - public function getType(): string { + public function getType() : string + { return 'Scalar_Float'; } } - // @deprecated compatibility alias class_alias(Float_::class, DNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php similarity index 83% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php index bcc257a..9ceaf3e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php @@ -1,35 +1,34 @@ - $attributes Additional attributes */ - public function __construct(int $value, array $attributes = []) { + public function __construct(int $value, array $attributes = []) + { $this->attributes = $attributes; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['value']; } - /** * Constructs an Int node from a string number literal. * @@ -39,44 +38,37 @@ public function getSubNodeNames(): array { * * @return Int_ The constructed LNumber, including kind attribute */ - public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ { + public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = \false) : Int_ + { $attributes['rawValue'] = $str; - $str = str_replace('_', '', $str); - if ('0' !== $str[0] || '0' === $str) { $attributes['kind'] = Int_::KIND_DEC; return new Int_((int) $str, $attributes); } - if ('x' === $str[1] || 'X' === $str[1]) { $attributes['kind'] = Int_::KIND_HEX; return new Int_(hexdec($str), $attributes); } - if ('b' === $str[1] || 'B' === $str[1]) { $attributes['kind'] = Int_::KIND_BIN; return new Int_(bindec($str), $attributes); } - if (!$allowInvalidOctal && strpbrk($str, '89')) { throw new 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'] = Int_::KIND_OCT; return new Int_(intval($str, 8), $attributes); } - - public function getType(): string { + public function getType() : string + { return 'Scalar_Int'; } } - // @deprecated compatibility alias class_alias(Int_::class, LNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php index 9336dfe..41c177e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -1,34 +1,34 @@ - $attributes Additional attributes */ - public function __construct(array $parts, array $attributes = []) { + public function __construct(array $parts, array $attributes = []) + { $this->attributes = $attributes; $this->parts = $parts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['parts']; } - - public function getType(): string { + public function getType() : string + { return 'Scalar_InterpolatedString'; } } - // @deprecated compatibility alias class_alias(InterpolatedString::class, Encapsed::class); diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php new file mode 100644 index 0000000..43931b6 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -0,0 +1,12 @@ + $attributes Additional attributes + */ + public function __construct(array $attributes = []) + { + $this->attributes = $attributes; + } + public function getSubNodeNames() : array + { + return []; + } + /** + * Get name of magic constant. + * + * @return string Name of magic constant + */ + public abstract function getName() : string; +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php new file mode 100644 index 0000000..3cc9aae --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php @@ -0,0 +1,17 @@ + Escaped character to its decoded value */ + protected static $replacements = ['\\' => '\\', '$' => '$', 'n' => "\n", 'r' => "\r", 't' => "\t", 'f' => "\f", 'v' => "\v", 'e' => "\x1b"]; + /** + * Constructs a string scalar node. + * + * @param string $value Value of the string + * @param array $attributes Additional attributes + */ + public function __construct(string $value, array $attributes = []) + { + $this->attributes = $attributes; + $this->value = $value; + } + public function getSubNodeNames() : array + { + return ['value']; + } + /** + * @param array $attributes + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + */ + public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = \true) : self + { + $attributes['kind'] = $str[0] === "'" || $str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B') ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED; + $attributes['rawValue'] = $str; + $string = self::parse($str, $parseUnicodeEscape); + return new self($string, $attributes); + } + /** + * @internal + * + * Parses a string token. + * + * @param string $str String token content + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + * + * @return string The parsed string + */ + public static function parse(string $str, bool $parseUnicodeEscape = \true) : string + { + $bLength = 0; + if ('b' === $str[0] || 'B' === $str[0]) { + $bLength = 1; + } + if ('\'' === $str[$bLength]) { + return str_replace(['\\\\', '\\\''], ['\\', '\''], substr($str, $bLength + 1, -1)); + } else { + return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape); + } + } + /** + * @internal + * + * Parses escape sequences in strings (all string types apart from single quoted). + * + * @param string $str String without quotes + * @param null|string $quote Quote type + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + * + * @return string String with escape sequences parsed + */ + public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = \true) : string + { + if (null !== $quote) { + $str = str_replace('\\' . $quote, $quote, $str); + } + $extra = ''; + if ($parseUnicodeEscape) { + $extra = '|u\\{([0-9a-fA-F]+)\\}'; + } + return preg_replace_callback('~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', function ($matches) { + $str = $matches[1]; + if (isset(self::$replacements[$str])) { + return self::$replacements[$str]; + } + if ('x' === $str[0] || 'X' === $str[0]) { + return chr(hexdec(substr($str, 1))); + } + if ('u' === $str[0]) { + $dec = hexdec($matches[2]); + // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. + return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); + } else { + return chr(octdec($str)); + } + }, $str); + } + /** + * Converts a Unicode code point to its UTF-8 encoded representation. + * + * @param int $num Code point + * + * @return string UTF-8 representation of code point + */ + private static function codePointToUtf8(int $num) : string + { + if ($num <= 0x7f) { + return chr($num); + } + if ($num <= 0x7ff) { + return chr(($num >> 6) + 0xc0) . chr(($num & 0x3f) + 0x80); + } + if ($num <= 0xffff) { + return chr(($num >> 12) + 0xe0) . chr(($num >> 6 & 0x3f) + 0x80) . chr(($num & 0x3f) + 0x80); + } + if ($num <= 0x1fffff) { + return chr(($num >> 18) + 0xf0) . chr(($num >> 12 & 0x3f) + 0x80) . chr(($num >> 6 & 0x3f) + 0x80) . chr(($num & 0x3f) + 0x80); + } + throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); + } + public function getType() : string + { + return 'Scalar_String'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/StaticVar.php similarity index 54% rename from vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/StaticVar.php index 517c0ed..c31ca43 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/StaticVar.php @@ -1,16 +1,16 @@ - $attributes Additional attributes */ - public function __construct( - Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] - ) { + public function __construct(Expr\Variable $var, ?Node\Expr $default = null, array $attributes = []) + { $this->attributes = $attributes; $this->var = $var; $this->default = $default; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['var', 'default']; } - - public function getType(): string { + public function getType() : string + { return 'StaticVar'; } } - // @deprecated compatibility alias class_alias(StaticVar::class, Stmt\StaticVar::class); diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt.php new file mode 100644 index 0000000..b169888 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt.php @@ -0,0 +1,9 @@ + $attributes Additional attributes */ - public function __construct(array $stmts, array $attributes = []) { + public function __construct(array $stmts, array $attributes = []) + { $this->attributes = $attributes; $this->stmts = $stmts; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Block'; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['stmts']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php index d2bcc5e..e408ced 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(?Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) + { $this->attributes = $attributes; $this->num = $num; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['num']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Break'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php index a06ca18..8e489ec 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { + public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Case'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php index e8d39c9..ea5eea4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @@ -1,18 +1,18 @@ - $attributes Additional attributes */ - public function __construct( - array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] - ) { + public function __construct(array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->types = $types; $this->var = $var; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['types', 'var', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Catch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php similarity index 61% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php index 9bdce1f..921cce3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php @@ -1,20 +1,20 @@ - $attrGroups PHP attribute groups * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration */ - public function __construct( - array $consts, - int $flags = 0, - array $attributes = [], - array $attrGroups = [], - ?Node $type = null - ) { + public function __construct(array $consts, int $flags = 0, array $attributes = [], array $attrGroups = [], ?Node $type = null) + { $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; $this->type = $type; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'type', 'consts']; } - /** * Whether constant is explicitly or implicitly public. */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + public function isPublic() : bool + { + return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } - /** * Whether constant is protected. */ - public function isProtected(): bool { + public function isProtected() : bool + { return (bool) ($this->flags & Modifiers::PROTECTED); } - /** * Whether constant is private. */ - public function isPrivate(): bool { + public function isPrivate() : bool + { return (bool) ($this->flags & Modifiers::PRIVATE); } - /** * Whether constant is final. */ - public function isFinal(): bool { + public function isFinal() : bool + { return (bool) ($this->flags & Modifiers::FINAL); } - - public function getType(): string { + public function getType() : string + { return 'Stmt_ClassConst'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php similarity index 78% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php index e652177..251e42f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php @@ -1,25 +1,25 @@ - */ - public function getTraitUses(): array { + public function getTraitUses() : array + { $traitUses = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof TraitUse) { @@ -28,11 +28,11 @@ public function getTraitUses(): array { } return $traitUses; } - /** * @return list */ - public function getConstants(): array { + public function getConstants() : array + { $constants = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassConst) { @@ -41,11 +41,11 @@ public function getConstants(): array { } return $constants; } - /** * @return list */ - public function getProperties(): array { + public function getProperties() : array + { $properties = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { @@ -54,7 +54,6 @@ public function getProperties(): array { } return $properties; } - /** * Gets property with the given name defined directly in this class/interface/trait. * @@ -62,7 +61,8 @@ public function getProperties(): array { * * @return Property|null Property node or null if the property does not exist */ - public function getProperty(string $name): ?Property { + public function getProperty(string $name) : ?Property + { foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { foreach ($stmt->props as $prop) { @@ -74,13 +74,13 @@ public function getProperty(string $name): ?Property { } return null; } - /** * Gets all methods defined directly in this class/interface/trait * * @return list */ - public function getMethods(): array { + public function getMethods() : array + { $methods = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod) { @@ -89,7 +89,6 @@ public function getMethods(): array { } return $methods; } - /** * Gets method with the given name defined directly in this class/interface/trait. * @@ -97,7 +96,8 @@ public function getMethods(): array { * * @return ClassMethod|null Method node or null if the method does not exist */ - public function getMethod(string $name): ?ClassMethod { + public function getMethod(string $name) : ?ClassMethod + { $lowerName = strtolower($name); foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php index 59c0519..d7c9d6b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -1,48 +1,29 @@ - */ - private static array $magicNames = [ - '__construct' => true, - '__destruct' => true, - '__call' => true, - '__callstatic' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - '__unset' => true, - '__sleep' => true, - '__wakeup' => true, - '__tostring' => true, - '__set_state' => true, - '__clone' => true, - '__invoke' => true, - '__debuginfo' => true, - '__serialize' => true, - '__unserialize' => true, - ]; - + private static $magicNames = ['__construct' => \true, '__destruct' => \true, '__call' => \true, '__callstatic' => \true, '__get' => \true, '__set' => \true, '__isset' => \true, '__unset' => \true, '__sleep' => \true, '__wakeup' => \true, '__tostring' => \true, '__set_state' => \true, '__clone' => \true, '__invoke' => \true, '__debuginfo' => \true, '__serialize' => \true, '__unserialize' => \true]; /** * Constructs a class method node. * @@ -63,92 +44,92 @@ class ClassMethod extends Node\Stmt implements FunctionLike { * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, array $subNodes = [], array $attributes = []) { + public function __construct($name, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->byRef = $subNodes['byRef'] ?? false; + $this->byRef = $subNodes['byRef'] ?? \false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - - public function returnsByRef(): bool { + public function returnsByRef() : bool + { return $this->byRef; } - - public function getParams(): array { + public function getParams() : array + { return $this->params; } - - public function getReturnType() { + public function getReturnType() + { return $this->returnType; } - - public function getStmts(): ?array { + public function getStmts() : ?array + { return $this->stmts; } - - public function getAttrGroups(): array { + public function getAttrGroups() : array + { return $this->attrGroups; } - /** * Whether the method is explicitly or implicitly public. */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + public function isPublic() : bool + { + return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } - /** * Whether the method is protected. */ - public function isProtected(): bool { + public function isProtected() : bool + { return (bool) ($this->flags & Modifiers::PROTECTED); } - /** * Whether the method is private. */ - public function isPrivate(): bool { + public function isPrivate() : bool + { return (bool) ($this->flags & Modifiers::PRIVATE); } - /** * Whether the method is abstract. */ - public function isAbstract(): bool { + public function isAbstract() : bool + { return (bool) ($this->flags & Modifiers::ABSTRACT); } - /** * Whether the method is final. */ - public function isFinal(): bool { + public function isFinal() : bool + { return (bool) ($this->flags & Modifiers::FINAL); } - /** * Whether the method is static. */ - public function isStatic(): bool { + public function isStatic() : bool + { return (bool) ($this->flags & Modifiers::STATIC); } - /** * Whether the method is magic. */ - public function isMagic(): bool { + public function isMagic() : bool + { return isset(self::$magicNames[$this->name->toLowerString()]); } - - public function getType(): string { + public function getType() : string + { return 'Stmt_ClassMethod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php similarity index 71% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php index 3f492b7..ce12181 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -1,36 +1,35 @@ - array(): PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, array $subNodes = [], array $attributes = []) { + public function __construct($name, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; @@ -58,37 +58,37 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; } - /** * Whether the class is explicitly abstract. */ - public function isAbstract(): bool { + public function isAbstract() : bool + { return (bool) ($this->flags & Modifiers::ABSTRACT); } - /** * Whether the class is final. */ - public function isFinal(): bool { + public function isFinal() : bool + { return (bool) ($this->flags & Modifiers::FINAL); } - - public function isReadonly(): bool { + public function isReadonly() : bool + { return (bool) ($this->flags & Modifiers::READONLY); } - /** * Whether the class is anonymous. */ - public function isAnonymous(): bool { + public function isAnonymous() : bool + { return null === $this->name; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Class'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php index c54d678..1876269 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes * @param list $attrGroups PHP attribute groups */ - public function __construct( - array $consts, - array $attributes = [], - array $attrGroups = [] - ) { + public function __construct(array $consts, array $attributes = [], array $attrGroups = []) + { $this->attributes = $attributes; $this->attrGroups = $attrGroups; $this->consts = $consts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'consts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Const'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php index 54e979d..4008f53 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(?Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) + { $this->attributes = $attributes; $this->num = $num; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['num']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Continue'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php new file mode 100644 index 0000000..6adf191 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -0,0 +1,13 @@ + $attributes Additional attributes */ - public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { + public function __construct(array $declares, ?array $stmts = null, array $attributes = []) + { $this->attributes = $attributes; $this->declares = $declares; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['declares', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Declare'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php index 6124442..e9b36f8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { + public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['stmts', 'cond']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Do'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php index 4d42452..1357496 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(array $exprs, array $attributes = []) { + public function __construct(array $exprs, array $attributes = []) + { $this->attributes = $attributes; $this->exprs = $exprs; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['exprs']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Echo'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php index b26d59c..a816c79 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { + public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_ElseIf'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php index 3d2b066..19a45f2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(array $stmts = [], array $attributes = []) { + public function __construct(array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Else'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php index c071a0a..0386141 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php @@ -1,36 +1,37 @@ - $attrGroups PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { + public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) + { parent::__construct($attributes); $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->expr = $expr; $this->attrGroups = $attrGroups; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'name', 'expr']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_EnumCase'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php similarity index 78% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php index 7eea6a6..9742955 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php @@ -1,15 +1,15 @@ - array() : PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, array $subNodes = [], array $attributes = []) { + public function __construct($name, array $subNodes = [], array $attributes = []) + { $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->scalarType = $subNodes['scalarType'] ?? null; $this->implements = $subNodes['implements'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; - parent::__construct($attributes); } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Enum'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php index 89751fa..5d078fa 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php @@ -1,32 +1,33 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $expr, array $attributes = []) { + public function __construct(Node\Expr $expr, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Expression'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php index 69ecf25..ce4075f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(array $stmts = [], array $attributes = []) { + public function __construct(array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Finally'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php similarity index 75% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php index 6f2fbb9..37ce3ad 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php @@ -1,19 +1,19 @@ - array(): Statements * @param array $attributes Additional attributes */ - public function __construct(array $subNodes = [], array $attributes = []) { + public function __construct(array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->init = $subNodes['init'] ?? []; $this->cond = $subNodes['cond'] ?? []; $this->loop = $subNodes['loop'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['init', 'cond', 'loop', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_For'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php similarity index 72% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php index c5d9a8b..7bb1827 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php @@ -1,21 +1,21 @@ - array(): Statements * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { + public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; $this->keyVar = $subNodes['keyVar'] ?? null; - $this->byRef = $subNodes['byRef'] ?? false; + $this->byRef = $subNodes['byRef'] ?? \false; $this->valueVar = $valueVar; $this->stmts = $subNodes['stmts'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Foreach'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php similarity index 69% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php index 2111bab..c5129d4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -1,27 +1,26 @@ - array(): PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, array $subNodes = [], array $attributes = []) { + public function __construct($name, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; - $this->byRef = $subNodes['byRef'] ?? false; + $this->byRef = $subNodes['byRef'] ?? \false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - - public function returnsByRef(): bool { + public function returnsByRef() : bool + { return $this->byRef; } - - public function getParams(): array { + public function getParams() : array + { return $this->params; } - - public function getReturnType() { + public function getReturnType() + { return $this->returnType; } - - public function getAttrGroups(): array { + public function getAttrGroups() : array + { return $this->attrGroups; } - /** @return Node\Stmt[] */ - public function getStmts(): array { + public function getStmts() : array + { return $this->stmts; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Function'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php index d3ab12f..c188f2f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(array $vars, array $attributes = []) { + public function __construct(array $vars, array $attributes = []) + { $this->attributes = $attributes; $this->vars = $vars; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['vars']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Global'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php similarity index 50% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php index 26a0d01..6c2415b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php @@ -1,30 +1,31 @@ - $attributes Additional attributes */ - public function __construct($name, array $attributes = []) { + public function __construct($name, array $attributes = []) + { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Goto'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php similarity index 57% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php index 0ec8e9d..ba15cdf 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php @@ -1,21 +1,21 @@ - $attributes Additional attributes */ - public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { + public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) + { $this->attributes = $attributes; $this->type = $type; $this->prefix = $prefix; $this->uses = $uses; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['type', 'prefix', 'uses']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_GroupUse'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php similarity index 61% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php index 665bacd..9e9081d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(string $remaining, array $attributes = []) { + public function __construct(string $remaining, array $attributes = []) + { $this->attributes = $attributes; $this->remaining = $remaining; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['remaining']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_HaltCompiler'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php similarity index 73% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php index 544390f..b2e2970 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php @@ -1,19 +1,19 @@ - null : Else clause * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { + public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $subNodes['stmts'] ?? []; $this->elseifs = $subNodes['elseifs'] ?? []; $this->else = $subNodes['else'] ?? null; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'stmts', 'elseifs', 'else']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_If'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php similarity index 56% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php index 0515d02..29cade7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(string $value, array $attributes = []) { + public function __construct(string $value, array $attributes = []) + { $this->attributes = $attributes; $this->value = $value; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['value']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_InlineHTML'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php similarity index 76% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php index 9359064..d7b8967 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -1,13 +1,13 @@ - array(): PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, array $subNodes = [], array $attributes = []) { + public function __construct($name, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->extends = $subNodes['extends'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'name', 'extends', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Interface'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php new file mode 100644 index 0000000..4acc3c2 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php @@ -0,0 +1,31 @@ + $attributes Additional attributes + */ + public function __construct($name, array $attributes = []) + { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Identifier($name) : $name; + } + public function getSubNodeNames() : array + { + return ['name']; + } + public function getType() : string + { + return 'Stmt_Label'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php similarity index 66% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php index f5b59ad..bbbbff4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @@ -1,19 +1,18 @@ - $attributes Additional attributes */ - public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { + public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['name', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Namespace'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php new file mode 100644 index 0000000..aefcc49 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php @@ -0,0 +1,18 @@ +attributes = $attributes; $this->flags = $flags; $this->props = $props; @@ -39,83 +40,82 @@ public function __construct(int $flags, array $props, array $attributes = [], ?N $this->attrGroups = $attrGroups; $this->hooks = $hooks; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'flags', 'type', 'props', 'hooks']; } - /** * Whether the property is explicitly or implicitly public. */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + public function isPublic() : bool + { + return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } - /** * Whether the property is protected. */ - public function isProtected(): bool { + public function isProtected() : bool + { return (bool) ($this->flags & Modifiers::PROTECTED); } - /** * Whether the property is private. */ - public function isPrivate(): bool { + public function isPrivate() : bool + { return (bool) ($this->flags & Modifiers::PRIVATE); } - /** * Whether the property is static. */ - public function isStatic(): bool { + public function isStatic() : bool + { return (bool) ($this->flags & Modifiers::STATIC); } - /** * Whether the property is readonly. */ - public function isReadonly(): bool { + public function isReadonly() : bool + { return (bool) ($this->flags & Modifiers::READONLY); } - /** * Whether the property is abstract. */ - public function isAbstract(): bool { + public function isAbstract() : bool + { return (bool) ($this->flags & Modifiers::ABSTRACT); } - /** * Whether the property is final. */ - public function isFinal(): bool { + public function isFinal() : bool + { return (bool) ($this->flags & Modifiers::FINAL); } - /** * Whether the property has explicit public(set) visibility. */ - public function isPublicSet(): bool { + public function isPublicSet() : bool + { return (bool) ($this->flags & Modifiers::PUBLIC_SET); } - /** * Whether the property has explicit protected(set) visibility. */ - public function isProtectedSet(): bool { + public function isProtectedSet() : bool + { return (bool) ($this->flags & Modifiers::PROTECTED_SET); } - /** * Whether the property has explicit private(set) visibility. */ - public function isPrivateSet(): bool { + public function isPrivateSet() : bool + { return (bool) ($this->flags & Modifiers::PRIVATE_SET); } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Property'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php new file mode 100644 index 0000000..afe848a --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -0,0 +1,13 @@ + $attributes Additional attributes */ - public function __construct(?Node\Expr $expr = null, array $attributes = []) { + public function __construct(?Node\Expr $expr = null, array $attributes = []) + { $this->attributes = $attributes; $this->expr = $expr; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['expr']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Return'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php new file mode 100644 index 0000000..31886bc --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @@ -0,0 +1,12 @@ + $attributes Additional attributes */ - public function __construct(array $vars, array $attributes = []) { + public function __construct(array $vars, array $attributes = []) + { $this->attributes = $attributes; $this->vars = $vars; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['vars']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Static'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php index 21e5efa..ed2154f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { + public function __construct(Node\Expr $cond, array $cases, array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->cases = $cases; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'cases']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Switch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php similarity index 61% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php index 7705a57..f716c14 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(array $traits, array $adaptations = [], array $attributes = []) { + public function __construct(array $traits, array $adaptations = [], array $attributes = []) + { $this->attributes = $attributes; $this->traits = $traits; $this->adaptations = $adaptations; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['traits', 'adaptations']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_TraitUse'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php new file mode 100644 index 0000000..9b7a76d --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -0,0 +1,13 @@ + $attributes Additional attributes */ - public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { + public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) + { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; $this->newModifier = $newModifier; $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['trait', 'method', 'newModifier', 'newName']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_TraitUseAdaptation_Alias'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php similarity index 65% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 7bc4083..c3ee235 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -1,13 +1,13 @@ - $attributes Additional attributes */ - public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { + public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) + { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; $this->insteadof = $insteadof; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['trait', 'method', 'insteadof']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_TraitUseAdaptation_Precedence'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php similarity index 73% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php index 5f2b330..a48192d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php @@ -1,10 +1,11 @@ - array(): PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, array $subNodes = [], array $attributes = []) { + public function __construct($name, array $subNodes = [], array $attributes = []) + { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['attrGroups', 'name', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Trait'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php index 6414c46..251ac74 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php @@ -1,17 +1,17 @@ - $attributes Additional attributes */ - public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { + public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) + { $this->attributes = $attributes; $this->stmts = $stmts; $this->catches = $catches; $this->finally = $finally; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['stmts', 'catches', 'finally']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_TryCatch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php index c211beb..91b4446 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php @@ -1,29 +1,30 @@ - $attributes Additional attributes */ - public function __construct(array $vars, array $attributes = []) { + public function __construct(array $vars, array $attributes = []) + { $this->attributes = $attributes; $this->vars = $vars; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['vars']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Unset'; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php new file mode 100644 index 0000000..003aecf --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php @@ -0,0 +1,13 @@ + $attributes Additional attributes */ - public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { + public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) + { $this->attributes = $attributes; $this->type = $type; $this->uses = $uses; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['type', 'uses']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_Use'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php index 2f7aed2..ef6fbe1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php @@ -1,15 +1,15 @@ - $attributes Additional attributes */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { + public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) + { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['cond', 'stmts']; } - - public function getType(): string { + public function getType() : string + { return 'Stmt_While'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/UnionType.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/UnionType.php index bad88d2..9d1cd6e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/UnionType.php @@ -1,27 +1,29 @@ - $attributes Additional attributes */ - public function __construct(array $types, array $attributes = []) { + public function __construct(array $types, array $attributes = []) + { $this->attributes = $attributes; $this->types = $types; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['types']; } - - public function getType(): string { + public function getType() : string + { return 'UnionType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/UseItem.php similarity index 68% rename from vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/UseItem.php index a7d9fc4..38beb1a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/UseItem.php @@ -1,21 +1,21 @@ - $attributes Additional attributes */ - public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { + public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) + { $this->attributes = $attributes; $this->type = $type; $this->name = $name; $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return ['type', 'name', 'alias']; } - /** * Get alias. If not explicitly given this is the last component of the used name. */ - public function getAlias(): Identifier { + public function getAlias() : Identifier + { if (null !== $this->alias) { return $this->alias; } - return new Identifier($this->name->getLast()); } - - public function getType(): string { + public function getType() : string + { return 'UseItem'; } } - // @deprecated compatibility alias class_alias(UseItem::class, Stmt\UseUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php similarity index 66% rename from vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php index 9baa6fe..4e510f2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php @@ -1,6 +1,7 @@ - $attributes Additional attributes */ - public function __construct(array $attributes = []) { + public function __construct(array $attributes = []) + { $this->attributes = $attributes; } - - public function getType(): string { + public function getType() : string + { return 'VariadicPlaceholder'; } - - public function getSubNodeNames(): array { + public function getSubNodeNames() : array + { return []; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeAbstract.php similarity index 79% rename from vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeAbstract.php index a6a50ae..ad2d4df 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -1,30 +1,31 @@ - Attributes */ - protected array $attributes; - + protected $attributes; /** * Creates a Node. * * @param array $attributes Array of attributes */ - public function __construct(array $attributes = []) { + public function __construct(array $attributes = []) + { $this->attributes = $attributes; } - /** * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) * @phpstan-return -1|positive-int */ - public function getLine(): int { + public function getLine() : int + { return $this->attributes['startLine'] ?? -1; } - /** * Gets line the node started in. * @@ -33,10 +34,10 @@ public function getLine(): int { * @return int Start line (or -1 if not available) * @phpstan-return -1|positive-int */ - public function getStartLine(): int { + public function getStartLine() : int + { return $this->attributes['startLine'] ?? -1; } - /** * Gets the line the node ended in. * @@ -45,10 +46,10 @@ public function getStartLine(): int { * @return int End line (or -1 if not available) * @phpstan-return -1|positive-int */ - public function getEndLine(): int { + public function getEndLine() : int + { return $this->attributes['endLine'] ?? -1; } - /** * Gets the token offset of the first token that is part of this node. * @@ -58,10 +59,10 @@ public function getEndLine(): int { * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos(): int { + public function getStartTokenPos() : int + { return $this->attributes['startTokenPos'] ?? -1; } - /** * Gets the token offset of the last token that is part of this node. * @@ -71,10 +72,10 @@ public function getStartTokenPos(): int { * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos(): int { + public function getEndTokenPos() : int + { return $this->attributes['endTokenPos'] ?? -1; } - /** * Gets the file offset of the first character that is part of this node. * @@ -82,10 +83,10 @@ public function getEndTokenPos(): int { * * @return int File start position (or -1 if not available) */ - public function getStartFilePos(): int { + public function getStartFilePos() : int + { return $this->attributes['startFilePos'] ?? -1; } - /** * Gets the file offset of the last character that is part of this node. * @@ -93,10 +94,10 @@ public function getStartFilePos(): int { * * @return int File end position (or -1 if not available) */ - public function getEndFilePos(): int { + public function getEndFilePos() : int + { return $this->attributes['endFilePos'] ?? -1; } - /** * Gets all comments directly preceding this node. * @@ -104,16 +105,17 @@ public function getEndFilePos(): int { * * @return Comment[] */ - public function getComments(): array { + public function getComments() : array + { return $this->attributes['comments'] ?? []; } - /** * Gets the doc comment of the node. * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment(): ?Comment\Doc { + public function getDocComment() : ?Comment\Doc + { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { $comment = $comments[$i]; @@ -121,10 +123,8 @@ public function getDocComment(): ?Comment\Doc { return $comment; } } - return null; } - /** * Sets the doc comment of the node. * @@ -132,7 +132,8 @@ public function getDocComment(): ?Comment\Doc { * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment): void { + public function setDocComment(Comment\Doc $docComment) : void + { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { if ($comments[$i] instanceof Comment\Doc) { @@ -142,40 +143,38 @@ public function setDocComment(Comment\Doc $docComment): void { return; } } - // Append new doc comment. $comments[] = $docComment; $this->setAttribute('comments', $comments); } - - public function setAttribute(string $key, $value): void { + public function setAttribute(string $key, $value) : void + { $this->attributes[$key] = $value; } - - public function hasAttribute(string $key): bool { + public function hasAttribute(string $key) : bool + { return array_key_exists($key, $this->attributes); } - - public function getAttribute(string $key, $default = null) { + public function getAttribute(string $key, $default = null) + { if (array_key_exists($key, $this->attributes)) { return $this->attributes[$key]; } - return $default; } - - public function getAttributes(): array { + public function getAttributes() : array + { return $this->attributes; } - - public function setAttributes(array $attributes): void { + public function setAttributes(array $attributes) : void + { $this->attributes = $attributes; } - /** * @return array */ - public function jsonSerialize(): array { + public function jsonSerialize() : array + { return ['nodeType' => $this->getType()] + get_object_vars($this); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeDumper.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeDumper.php index 7d62d03..5b3c4db 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeDumper.php @@ -1,35 +1,44 @@ - true, - 'startLine' => true, - 'endLine' => true, - 'startFilePos' => true, - 'endFilePos' => true, - 'startTokenPos' => true, - 'endTokenPos' => true, - ]; +declare (strict_types=1); +namespace Matomo\Dependencies\OpenApiDocs\PhpParser; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Expr\Array_; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Expr\Include_; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Expr\List_; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Scalar\Int_; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Scalar\InterpolatedString; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Scalar\String_; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Stmt\GroupUse; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\Stmt\Use_; +use Matomo\Dependencies\OpenApiDocs\PhpParser\Node\UseItem; +class NodeDumper +{ + /** + * @var bool + */ + private $dumpComments; + /** + * @var bool + */ + private $dumpPositions; + /** + * @var bool + */ + private $dumpOtherAttributes; + /** + * @var string|null + */ + private $code; + /** + * @var string + */ + private $res; + /** + * @var string + */ + private $nl; + private const IGNORE_ATTRIBUTES = ['comments' => \true, 'startLine' => \true, 'endLine' => \true, 'startFilePos' => \true, 'endFilePos' => \true, 'startTokenPos' => \true, 'endTokenPos' => \true]; /** * Constructs a NodeDumper. * @@ -41,12 +50,12 @@ class NodeDumper { * * @param array $options Options (see description) */ - public function __construct(array $options = []) { + public function __construct(array $options = []) + { $this->dumpComments = !empty($options['dumpComments']); $this->dumpPositions = !empty($options['dumpPositions']); $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); } - /** * Dumps a node or array. * @@ -57,30 +66,29 @@ public function __construct(array $options = []) { * * @return string Dumped value */ - public function dump($node, ?string $code = null): string { + public function dump($node, ?string $code = null) : string + { $this->code = $code; $this->res = ''; $this->nl = "\n"; - $this->dumpRecursive($node, false); + $this->dumpRecursive($node, \false); return $this->res; } - /** @param mixed $node */ - protected function dumpRecursive($node, bool $indent = true): void { + protected function dumpRecursive($node, bool $indent = \true) : void + { if ($indent) { $this->nl .= " "; } if ($node instanceof Node) { $this->res .= $node->getType(); - if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { + if ($this->dumpPositions && null !== ($p = $this->dumpPosition($node))) { $this->res .= $p; } $this->res .= '('; - foreach ($node->getSubNodeNames() as $key) { - $this->res .= "$this->nl " . $key . ': '; - - $value = $node->$key; + $this->res .= "{$this->nl} " . $key . ': '; + $value = $node->{$key}; if (\is_int($value)) { if ('flags' === $key || 'newModifier' === $key) { $this->res .= $this->dumpFlags($value); @@ -90,27 +98,23 @@ protected function dumpRecursive($node, bool $indent = true): void { $this->res .= $this->dumpIncludeType($value); continue; } - if ('type' === $key - && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { + if ('type' === $key && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { $this->res .= $this->dumpUseType($value); continue; } } $this->dumpRecursive($value); } - - if ($this->dumpComments && $comments = $node->getComments()) { - $this->res .= "$this->nl comments: "; + if ($this->dumpComments && ($comments = $node->getComments())) { + $this->res .= "{$this->nl} comments: "; $this->dumpRecursive($comments); } - if ($this->dumpOtherAttributes) { foreach ($node->getAttributes() as $key => $value) { if (isset(self::IGNORE_ATTRIBUTES[$key])) { continue; } - - $this->res .= "$this->nl $key: "; + $this->res .= "{$this->nl} {$key}: "; if (\is_int($value)) { if ('kind' === $key) { if ($node instanceof Int_) { @@ -134,14 +138,14 @@ protected function dumpRecursive($node, bool $indent = true): void { $this->dumpRecursive($value); } } - $this->res .= "$this->nl)"; + $this->res .= "{$this->nl})"; } elseif (\is_array($node)) { $this->res .= 'array('; foreach ($node as $key => $value) { - $this->res .= "$this->nl " . $key . ': '; + $this->res .= "{$this->nl} " . $key . ': '; $this->dumpRecursive($value); } - $this->res .= "$this->nl)"; + $this->res .= "{$this->nl})"; } elseif ($node instanceof Comment) { $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); } elseif (\is_string($node)) { @@ -150,9 +154,9 @@ protected function dumpRecursive($node, bool $indent = true): void { $this->res .= $node; } elseif (null === $node) { $this->res .= 'null'; - } elseif (false === $node) { + } elseif (\false === $node) { $this->res .= 'false'; - } elseif (true === $node) { + } elseif (\true === $node) { $this->res .= 'true'; } else { throw new \InvalidArgumentException('Can only dump nodes and arrays.'); @@ -161,8 +165,8 @@ protected function dumpRecursive($node, bool $indent = true): void { $this->nl = \substr($this->nl, 0, -4); } } - - protected function dumpFlags(int $flags): string { + protected function dumpFlags(int $flags) : string + { $strs = []; if ($flags & Modifiers::PUBLIC) { $strs[] = 'PUBLIC'; @@ -194,72 +198,44 @@ protected function dumpFlags(int $flags): string { if ($flags & Modifiers::PRIVATE_SET) { $strs[] = 'PRIVATE_SET'; } - if ($strs) { return implode(' | ', $strs) . ' (' . $flags . ')'; } else { return (string) $flags; } } - /** @param array $map */ - private function dumpEnum(int $value, array $map): string { + private function dumpEnum(int $value, array $map) : string + { if (!isset($map[$value])) { return (string) $value; } return $map[$value] . ' (' . $value . ')'; } - - private function dumpIncludeType(int $type): string { - return $this->dumpEnum($type, [ - Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', - Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', - Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', - Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]); + private function dumpIncludeType(int $type) : string + { + return $this->dumpEnum($type, [Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE']); } - - private function dumpUseType(int $type): string { - return $this->dumpEnum($type, [ - Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - Use_::TYPE_NORMAL => 'TYPE_NORMAL', - Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', - Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', - ]); + private function dumpUseType(int $type) : string + { + return $this->dumpEnum($type, [Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', Use_::TYPE_NORMAL => 'TYPE_NORMAL', Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', Use_::TYPE_CONSTANT => 'TYPE_CONSTANT']); } - - private function dumpIntKind(int $kind): string { - return $this->dumpEnum($kind, [ - Int_::KIND_BIN => 'KIND_BIN', - Int_::KIND_OCT => 'KIND_OCT', - Int_::KIND_DEC => 'KIND_DEC', - Int_::KIND_HEX => 'KIND_HEX', - ]); + private function dumpIntKind(int $kind) : string + { + return $this->dumpEnum($kind, [Int_::KIND_BIN => 'KIND_BIN', Int_::KIND_OCT => 'KIND_OCT', Int_::KIND_DEC => 'KIND_DEC', Int_::KIND_HEX => 'KIND_HEX']); } - - private function dumpStringKind(int $kind): string { - return $this->dumpEnum($kind, [ - String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', - String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', - String_::KIND_HEREDOC => 'KIND_HEREDOC', - String_::KIND_NOWDOC => 'KIND_NOWDOC', - ]); + private function dumpStringKind(int $kind) : string + { + return $this->dumpEnum($kind, [String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', String_::KIND_HEREDOC => 'KIND_HEREDOC', String_::KIND_NOWDOC => 'KIND_NOWDOC']); } - - private function dumpArrayKind(int $kind): string { - return $this->dumpEnum($kind, [ - Array_::KIND_LONG => 'KIND_LONG', - Array_::KIND_SHORT => 'KIND_SHORT', - ]); + private function dumpArrayKind(int $kind) : string + { + return $this->dumpEnum($kind, [Array_::KIND_LONG => 'KIND_LONG', Array_::KIND_SHORT => 'KIND_SHORT']); } - - private function dumpListKind(int $kind): string { - return $this->dumpEnum($kind, [ - List_::KIND_LIST => 'KIND_LIST', - List_::KIND_ARRAY => 'KIND_ARRAY', - ]); + private function dumpListKind(int $kind) : string + { + return $this->dumpEnum($kind, [List_::KIND_LIST => 'KIND_LIST', List_::KIND_ARRAY => 'KIND_ARRAY']); } - /** * Dump node position, if possible. * @@ -267,33 +243,29 @@ private function dumpListKind(int $kind): string { * * @return string|null Dump of position, or null if position information not available */ - protected function dumpPosition(Node $node): ?string { + protected function dumpPosition(Node $node) : ?string + { if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { return null; } - $start = $node->getStartLine(); $end = $node->getEndLine(); - if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') - && null !== $this->code - ) { + if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') && null !== $this->code) { $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos()); $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos()); } - return "[$start - $end]"; + return "[{$start} - {$end}]"; } - // Copied from Error class - private function toColumn(string $code, int $pos): int { + private function toColumn(string $code, int $pos) : int + { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { + if (\false === $lineStartPos) { $lineStartPos = -1; } - return $pos - $lineStartPos; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeFinder.php similarity index 74% rename from vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeFinder.php index 96c8452..780fa23 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeFinder.php @@ -1,11 +1,12 @@ -traverse($nodes); - return $visitor->getFoundNodes(); } - /** * Find all nodes that are instances of a certain class. - * @template TNode as Node * * @param Node|Node[] $nodes Single node or array of nodes to search in @@ -41,12 +37,12 @@ public function find($nodes, callable $filter): array { * * @return TNode[] Found nodes (all instances of $class) */ - public function findInstanceOf($nodes, string $class): array { - return $this->find($nodes, function ($node) use ($class) { + public function findInstanceOf($nodes, string $class) : array + { + return $this->find($nodes, function ($node) use($class) { return $node instanceof $class; }); } - /** * Find first node satisfying a filter callback. * @@ -55,23 +51,19 @@ public function findInstanceOf($nodes, string $class): array { * * @return null|Node Found node (or null if none found) */ - public function findFirst($nodes, callable $filter): ?Node { + public function findFirst($nodes, callable $filter) : ?Node + { if ($nodes === []) { return null; } - if (!is_array($nodes)) { $nodes = [$nodes]; } - $visitor = new FirstFindingVisitor($filter); - $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); - return $visitor->getFoundNode(); } - /** * Find first node that is an instance of a certain class. * @@ -82,8 +74,9 @@ public function findFirst($nodes, callable $filter): ?Node { * * @return null|TNode Found node, which is an instance of $class (or null if none found) */ - public function findFirstInstanceOf($nodes, string $class): ?Node { - return $this->findFirst($nodes, function ($node) use ($class) { + public function findFirstInstanceOf($nodes, string $class) : ?Node + { + return $this->findFirst($nodes, function ($node) use($class) { return $node instanceof $class; }); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeTraverser.php similarity index 68% rename from vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeTraverser.php index bb3d6dd..783cf72 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeTraverser.php @@ -1,62 +1,58 @@ - Visitors */ - protected array $visitors = []; - + protected $visitors = []; /** @var bool Whether traversal should be stopped */ - protected bool $stopTraversal; - + protected $stopTraversal; /** * Create a traverser with the given visitors. * * @param NodeVisitor ...$visitors Node visitors */ - public function __construct(NodeVisitor ...$visitors) { + public function __construct(NodeVisitor ...$visitors) + { $this->visitors = $visitors; } - /** * Adds a visitor. * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor): void { + public function addVisitor(NodeVisitor $visitor) : void + { $this->visitors[] = $visitor; } - /** * Removes an added visitor. */ - public function removeVisitor(NodeVisitor $visitor): void { + public function removeVisitor(NodeVisitor $visitor) : void + { $index = array_search($visitor, $this->visitors); - if ($index !== false) { + if ($index !== \false) { array_splice($this->visitors, $index, 1, []); } } - /** * Traverses an array of nodes using the registered visitors. * @@ -64,113 +60,94 @@ public function removeVisitor(NodeVisitor $visitor): void { * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes): array { - $this->stopTraversal = false; - + public function traverse(array $nodes) : array + { + $this->stopTraversal = \false; foreach ($this->visitors as $visitor) { - if (null !== $return = $visitor->beforeTraverse($nodes)) { + if (null !== ($return = $visitor->beforeTraverse($nodes))) { $nodes = $return; } } - $nodes = $this->traverseArray($nodes); - for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { $visitor = $this->visitors[$i]; - if (null !== $return = $visitor->afterTraverse($nodes)) { + if (null !== ($return = $visitor->afterTraverse($nodes))) { $nodes = $return; } } - return $nodes; } - /** * Recursively traverse a node. * * @param Node $node Node to traverse. */ - protected function traverseNode(Node $node): void { + protected function traverseNode(Node $node) : void + { foreach ($node->getSubNodeNames() as $name) { - $subNode = $node->$name; - + $subNode = $node->{$name}; if (\is_array($subNode)) { - $node->$name = $this->traverseArray($subNode); + $node->{$name} = $this->traverseArray($subNode); if ($this->stopTraversal) { break; } - continue; } - if (!$subNode instanceof Node) { continue; } - - $traverseChildren = true; + $traverseChildren = \true; $visitorIndex = -1; - foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($subNode); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; + $subNode = $node->{$name} = $return; } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; + $traverseChildren = \false; } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; + $traverseChildren = \false; break; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; + $this->stopTraversal = \true; break 2; } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; + $node->{$name} = null; continue 2; } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); + throw new \LogicException('enterNode() returned invalid value of type ' . gettype($return)); } } } - if ($traverseChildren) { $this->traverseNode($subNode); if ($this->stopTraversal) { break; } } - for (; $visitorIndex >= 0; --$visitorIndex) { $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($subNode); - if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; + $subNode = $node->{$name} = $return; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; + $this->stopTraversal = \true; break 2; } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; + $node->{$name} = null; break; } elseif (\is_array($return)) { - throw new \LogicException( - 'leaveNode() may only return an array ' . - 'if the parent structure is an array' - ); + throw new \LogicException('leaveNode() may only return an array ' . 'if the parent structure is an array'); } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); + throw new \LogicException('leaveNode() returned invalid value of type ' . gettype($return)); } } } } } - /** * Recursively traverse array (usually of nodes). * @@ -178,9 +155,9 @@ protected function traverseNode(Node $node): void { * * @return array Result of traversal (may be original array or changed one) */ - protected function traverseArray(array $nodes): array { + protected function traverseArray(array $nodes) : array + { $doNodes = []; - foreach ($nodes as $i => $node) { if (!$node instanceof Node) { if (\is_array($node)) { @@ -188,10 +165,8 @@ protected function traverseArray(array $nodes): array { } continue; } - - $traverseChildren = true; + $traverseChildren = \true; $visitorIndex = -1; - foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($node); if (null !== $return) { @@ -205,35 +180,29 @@ protected function traverseArray(array $nodes): array { $doNodes[] = [$i, []]; continue 2; } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; + $traverseChildren = \false; } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; + $traverseChildren = \false; break; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; + $this->stopTraversal = \true; break 2; } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); + throw new \LogicException('REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); + throw new \LogicException('enterNode() returned invalid value of type ' . gettype($return)); } } } - if ($traverseChildren) { $this->traverseNode($node); if ($this->stopTraversal) { break; } } - for (; $visitorIndex >= 0; --$visitorIndex) { $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($node); - if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); @@ -245,43 +214,30 @@ protected function traverseArray(array $nodes): array { $doNodes[] = [$i, []]; break; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; + $this->stopTraversal = \true; break 2; } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); + throw new \LogicException('REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); + throw new \LogicException('leaveNode() returned invalid value of type ' . gettype($return)); } } } } - if (!empty($doNodes)) { while (list($i, $replace) = array_pop($doNodes)) { array_splice($nodes, $i, 1, $replace); } } - return $nodes; } - - private function ensureReplacementReasonable(Node $old, Node $new): void { + private function ensureReplacementReasonable(Node $old, Node $new) : void + { if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { - throw new \LogicException( - "Trying to replace statement ({$old->getType()}) " . - "with expression ({$new->getType()}). Are you missing a " . - "Stmt_Expression wrapper?" - ); + throw new \LogicException("Trying to replace statement ({$old->getType()}) " . "with expression ({$new->getType()}). Are you missing a " . "Stmt_Expression wrapper?"); } - if ($old instanceof Node\Expr && $new instanceof Node\Stmt) { - throw new \LogicException( - "Trying to replace expression ({$old->getType()}) " . - "with statement ({$new->getType()})" - ); + throw new \LogicException("Trying to replace expression ({$old->getType()}) " . "with statement ({$new->getType()})"); } } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php similarity index 53% rename from vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php index c3992b3..4452428 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php @@ -1,20 +1,20 @@ -setAttribute('origNode', $origNode); + return $node; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php similarity index 63% rename from vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php index 5e2aed3..f556d29 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php @@ -1,28 +1,28 @@ - Token positions of comments */ - private array $commentPositions = []; - + private $commentPositions = []; /** * Create a comment annotation visitor. * * @param Token[] $tokens Token array */ - public function __construct(array $tokens) { + public function __construct(array $tokens) + { $this->tokens = $tokens; - // Collect positions of comments. We use this to avoid traversing parts of the AST where // there are no comments. foreach ($tokens as $i => $token) { @@ -31,14 +31,13 @@ public function __construct(array $tokens) { } } } - - public function enterNode(Node $node) { + public function enterNode(Node $node) + { $nextCommentPos = current($this->commentPositions); - if ($nextCommentPos === false) { + if ($nextCommentPos === \false) { // No more comments. return self::STOP_TRAVERSAL; } - $oldPos = $this->pos; $this->pos = $pos = $node->getStartTokenPos(); if ($nextCommentPos > $oldPos && $nextCommentPos < $pos) { @@ -46,15 +45,11 @@ public function enterNode(Node $node) { while (--$pos >= $oldPos) { $token = $this->tokens[$pos]; if ($token->id === \T_DOC_COMMENT) { - $comments[] = new Comment\Doc( - $token->text, $token->line, $token->pos, $pos, - $token->getEndLine(), $token->getEndPos() - 1, $pos); + $comments[] = new Comment\Doc(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $pos, $token->getEndLine(), $token->getEndPos() - 1, $pos); continue; } if ($token->id === \T_COMMENT) { - $comments[] = new Comment( - $token->text, $token->line, $token->pos, $pos, - $token->getEndLine(), $token->getEndPos() - 1, $pos); + $comments[] = new Comment(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $pos, $token->getEndLine(), $token->getEndPos() - 1, $pos); continue; } if ($token->id !== \T_WHITESPACE) { @@ -64,19 +59,16 @@ public function enterNode(Node $node) { if (!empty($comments)) { $node->setAttribute('comments', array_reverse($comments)); } - do { $nextCommentPos = next($this->commentPositions); - } while ($nextCommentPos !== false && $nextCommentPos < $this->pos); + } while ($nextCommentPos !== \false && $nextCommentPos < $this->pos); } - $endPos = $node->getEndTokenPos(); if ($nextCommentPos > $endPos) { // Skip children if there are no comments located inside this node. $this->pos = $endPos; return self::DONT_TRAVERSE_CHILDREN; } - return null; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php similarity index 61% rename from vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php index 65a1bd3..84b4c60 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -1,24 +1,24 @@ - Found nodes */ - protected array $foundNodes; - - public function __construct(callable $filterCallback) { + protected $foundNodes; + public function __construct(callable $filterCallback) + { $this->filterCallback = $filterCallback; } - /** * Get found nodes satisfying the filter callback. * @@ -26,22 +26,21 @@ public function __construct(callable $filterCallback) { * * @return list Found nodes */ - public function getFoundNodes(): array { + public function getFoundNodes() : array + { return $this->foundNodes; } - - public function beforeTraverse(array $nodes): ?array { + public function beforeTraverse(array $nodes) : ?array + { $this->foundNodes = []; - return null; } - - public function enterNode(Node $node) { + public function enterNode(Node $node) + { $filterCallback = $this->filterCallback; if ($filterCallback($node)) { $this->foundNodes[] = $node; } - return null; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php similarity index 58% rename from vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 05deed5..f50af01 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -1,25 +1,25 @@ -filterCallback = $filterCallback; } - /** * Get found node satisfying the filter callback. * @@ -27,23 +27,22 @@ public function __construct(callable $filterCallback) { * * @return null|Node Found node (or null if not found) */ - public function getFoundNode(): ?Node { + public function getFoundNode() : ?Node + { return $this->foundNode; } - - public function beforeTraverse(array $nodes): ?array { + public function beforeTraverse(array $nodes) : ?array + { $this->foundNode = null; - return null; } - - public function enterNode(Node $node) { + public function enterNode(Node $node) + { $filterCallback = $this->filterCallback; if ($filterCallback($node)) { $this->foundNode = $node; return NodeVisitor::STOP_TRAVERSAL; } - return null; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php similarity index 79% rename from vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index e0066f2..aa8e29f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -1,26 +1,24 @@ -nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); - $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; - $this->replaceNodes = $options['replaceNodes'] ?? true; + $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? \false; + $this->replaceNodes = $options['replaceNodes'] ?? \true; } - /** * Get name resolution context. */ - public function getNameContext(): NameContext { + public function getNameContext() : NameContext + { return $this->nameContext; } - - public function beforeTraverse(array $nodes): ?array { + public function beforeTraverse(array $nodes) : ?array + { $this->nameContext->startNamespace(); return null; } - - public function enterNode(Node $node) { + public function enterNode(Node $node) + { if ($node instanceof Stmt\Namespace_) { $this->nameContext->startNamespace($node->name); } elseif ($node instanceof Stmt\Use_) { @@ -67,11 +66,9 @@ public function enterNode(Node $node) { if (null !== $node->extends) { $node->extends = $this->resolveClassName($node->extends); } - foreach ($node->implements as &$interface) { $interface = $this->resolveClassName($interface); } - $this->resolveAttrGroups($node); if (null !== $node->name) { $this->addNamespacedName($node); @@ -82,14 +79,12 @@ public function enterNode(Node $node) { foreach ($node->extends as &$interface) { $interface = $this->resolveClassName($interface); } - $this->resolveAttrGroups($node); $this->addNamespacedName($node); } elseif ($node instanceof Stmt\Enum_) { foreach ($node->implements as &$interface) { $interface = $this->resolveClassName($interface); } - $this->resolveAttrGroups($node); $this->addNamespacedName($node); } elseif ($node instanceof Stmt\Trait_) { @@ -99,10 +94,7 @@ public function enterNode(Node $node) { $this->resolveSignature($node); $this->resolveAttrGroups($node); $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\ClassMethod - || $node instanceof Expr\Closure - || $node instanceof Expr\ArrowFunction - ) { + } elseif ($node instanceof Stmt\ClassMethod || $node instanceof Expr\Closure || $node instanceof Expr\ArrowFunction) { $this->resolveSignature($node); $this->resolveAttrGroups($node); } elseif ($node instanceof Stmt\Property) { @@ -128,12 +120,7 @@ public function enterNode(Node $node) { $this->resolveAttrGroups($node); } elseif ($node instanceof Stmt\EnumCase) { $this->resolveAttrGroups($node); - } elseif ($node instanceof Expr\StaticCall - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\ClassConstFetch - || $node instanceof Expr\New_ - || $node instanceof Expr\Instanceof_ - ) { + } elseif ($node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch || $node instanceof Expr\ClassConstFetch || $node instanceof Expr\New_ || $node instanceof Expr\Instanceof_) { if ($node->class instanceof Name) { $node->class = $this->resolveClassName($node->class); } @@ -151,12 +138,10 @@ public function enterNode(Node $node) { foreach ($node->traits as &$trait) { $trait = $this->resolveClassName($trait); } - foreach ($node->adaptations as $adaptation) { if (null !== $adaptation->trait) { $adaptation->trait = $this->resolveClassName($adaptation->trait); } - if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) { foreach ($adaptation->insteadof as &$insteadof) { $insteadof = $this->resolveClassName($insteadof); @@ -164,37 +149,33 @@ public function enterNode(Node $node) { } } } - return null; } - /** @param Stmt\Use_::TYPE_* $type */ - private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { + private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null) : void + { // Add prefix for group uses $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; // Type is determined either by individual element or whole use declaration $type |= $use->type; - - $this->nameContext->addAlias( - $name, (string) $use->getAlias(), $type, $use->getAttributes() - ); + $this->nameContext->addAlias($name, (string) $use->getAlias(), $type, $use->getAttributes()); } - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ - private function resolveSignature($node): void { + private function resolveSignature($node) : void + { foreach ($node->params as $param) { $param->type = $this->resolveType($param->type); $this->resolveAttrGroups($param); } $node->returnType = $this->resolveType($node->returnType); } - /** * @template T of Node\Identifier|Name|Node\ComplexType|null * @param T $node * @return T */ - private function resolveType(?Node $node): ?Node { + private function resolveType(?Node $node) : ?Node + { if ($node instanceof Name) { return $this->resolveClassName($node); } @@ -210,7 +191,6 @@ private function resolveType(?Node $node): ?Node { } return $node; } - /** * Resolve name, according to name resolver options. * @@ -219,47 +199,42 @@ private function resolveType(?Node $node): ?Node { * * @return Name Resolved name, or original name with attribute */ - protected function resolveName(Name $name, int $type): Name { + protected function resolveName(Name $name, int $type) : Name + { if (!$this->replaceNodes) { $resolvedName = $this->nameContext->getResolvedName($name, $type); if (null !== $resolvedName) { $name->setAttribute('resolvedName', $resolvedName); } else { - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); + $name->setAttribute('namespacedName', FullyQualified::concat($this->nameContext->getNamespace(), $name, $name->getAttributes())); } return $name; } - if ($this->preserveOriginalNames) { // Save the original name $originalName = $name; $name = clone $originalName; $name->setAttribute('originalName', $originalName); } - $resolvedName = $this->nameContext->getResolvedName($name, $type); if (null !== $resolvedName) { return $resolvedName; } - // unqualified names inside a namespace cannot be resolved at compile-time // add the namespaced version of the name as an attribute - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); + $name->setAttribute('namespacedName', FullyQualified::concat($this->nameContext->getNamespace(), $name, $name->getAttributes())); return $name; } - - protected function resolveClassName(Name $name): Name { + protected function resolveClassName(Name $name) : Name + { return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); } - - protected function addNamespacedName(Node $node): void { - $node->namespacedName = Name::concat( - $this->nameContext->getNamespace(), (string) $node->name); + protected function addNamespacedName(Node $node) : void + { + $node->namespacedName = Name::concat($this->nameContext->getNamespace(), (string) $node->name); } - - protected function resolveAttrGroups(Node $node): void { + protected function resolveAttrGroups(Node $node) : void + { foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $attr) { $attr->name = $this->resolveClassName($attr->name); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php similarity index 72% rename from vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index 70e051e..27ba018 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -1,10 +1,10 @@ -$weakReferences=true attribute names are prefixed by "weak_", e.g. "weak_parent". */ -final class NodeConnectingVisitor extends NodeVisitorAbstract { +final class NodeConnectingVisitor extends NodeVisitorAbstract +{ /** * @var Node[] */ - private array $stack = []; - + private $stack = []; /** * @var ?Node */ private $previous; - - private bool $weakReferences; - - public function __construct(bool $weakReferences = false) { + /** + * @var bool + */ + private $weakReferences; + public function __construct(bool $weakReferences = \false) + { $this->weakReferences = $weakReferences; } - - public function beforeTraverse(array $nodes) { - $this->stack = []; + public function beforeTraverse(array $nodes) + { + $this->stack = []; $this->previous = null; } - - public function enterNode(Node $node) { + public function enterNode(Node $node) + { if (!empty($this->stack)) { $parent = $this->stack[count($this->stack) - 1]; if ($this->weakReferences) { @@ -47,11 +49,8 @@ public function enterNode(Node $node) { $node->setAttribute('parent', $parent); } } - if ($this->previous !== null) { - if ( - $this->weakReferences - ) { + if ($this->weakReferences) { if ($this->previous->getAttribute('weak_parent') === $node->getAttribute('weak_parent')) { $node->setAttribute('weak_previous', \WeakReference::create($this->previous)); $this->previous->setAttribute('weak_next', \WeakReference::create($node)); @@ -61,13 +60,11 @@ public function enterNode(Node $node) { $this->previous->setAttribute('next', $node); } } - $this->stack[] = $node; } - - public function leaveNode(Node $node) { + public function leaveNode(Node $node) + { $this->previous = $node; - array_pop($this->stack); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php similarity index 60% rename from vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index abf6e37..58871e3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -1,13 +1,12 @@ -$weakReferences=true the attribute name is "weak_parent" instead. */ -final class ParentConnectingVisitor extends NodeVisitorAbstract { +final class ParentConnectingVisitor extends NodeVisitorAbstract +{ /** * @var Node[] */ - private array $stack = []; - - private bool $weakReferences; - - public function __construct(bool $weakReferences = false) { + private $stack = []; + /** + * @var bool + */ + private $weakReferences; + public function __construct(bool $weakReferences = \false) + { $this->weakReferences = $weakReferences; } - - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes) + { $this->stack = []; } - - public function enterNode(Node $node) { + public function enterNode(Node $node) + { if (!empty($this->stack)) { $parent = $this->stack[count($this->stack) - 1]; if ($this->weakReferences) { @@ -41,11 +43,10 @@ public function enterNode(Node $node) { $node->setAttribute('parent', $parent); } } - $this->stack[] = $node; } - - public function leaveNode(Node $node) { + public function leaveNode(Node $node) + { array_pop($this->stack); } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php new file mode 100644 index 0000000..091ecfa --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php @@ -0,0 +1,27 @@ +'", "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_PUBLIC_SET", "T_PROTECTED_SET", "T_PRIVATE_SET", "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_PROPERTY_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", "';'", "']'", "'('", "')'", "'{'", "'}'", "'`'", "'\"'", "'\$'"); + /** + * @var mixed[] + */ + protected $tokenToSymbol = array(0, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 57, 171, 173, 172, 56, 173, 173, 166, 167, 54, 51, 9, 52, 53, 55, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 32, 164, 45, 17, 47, 31, 69, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 71, 173, 165, 37, 173, 170, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 168, 36, 169, 59, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, 41, 42, 43, 44, 46, 48, 49, 50, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 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, 159, 160, 161, 162, 163); + /** + * @var mixed[] + */ + protected $action = array(133, 134, 135, 575, 136, 137, 1049, 766, 767, 768, 138, 41, 850, -341, 495, 1390, -32766, -32766, -32766, 1008, 841, 1145, 1146, 1147, 1141, 1140, 1139, 1148, 1142, 1143, 1144, -32766, -32766, -32766, -195, 760, 759, -32766, -194, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, 0, -32766, 3, 4, 769, 1145, 1146, 1147, 1141, 1140, 1139, 1148, 1142, 1143, 1144, 388, 389, 448, 272, 53, 391, 773, 774, 775, 776, 433, 5, 434, 571, 337, 39, 254, 29, 298, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, 577, -382, 306, -382, 794, 795, 578, 579, 244, 818, 816, 817, 829, 813, 814, 1313, 38, 580, 581, 812, 582, 583, 584, 585, 1325, 586, 587, 481, 482, -628, 496, 1009, 815, 588, 589, 140, 139, -628, 133, 134, 135, 575, 136, 137, 1085, 766, 767, 768, 138, 41, -32766, -341, 1046, 1041, 1040, 1039, 1045, 1042, 1043, 1044, -32766, -32766, -32766, -32767, -32767, -32767, -32767, 106, 107, 108, 109, 110, -195, 760, 759, 1058, -194, -32766, -32766, -32766, 149, -32766, 852, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 936, 303, 257, 769, -32766, -32766, -32766, 850, -32766, 297, -32766, -32766, -32766, -32766, -32766, 1371, 1355, 272, 53, 391, 773, 774, 775, 776, -625, -32766, 434, -32766, -32766, -32766, -32766, 730, -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, 577, -579, -275, 317, 794, 795, 578, 579, -577, 818, 816, 817, 829, 813, 814, 957, 926, 580, 581, 812, 582, 583, 584, 585, 144, 586, 587, 841, 336, -32766, -32766, -32766, 815, 588, 589, -628, 139, -628, 133, 134, 135, 575, 136, 137, 1082, 766, 767, 768, 138, 41, -32766, 1375, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 1374, 629, 388, 389, -32766, -32766, -32766, -32766, -32766, -579, -579, 1081, 433, 321, 760, 759, -577, -577, -32766, 1293, -32766, -32766, 111, 112, 113, -579, 282, 843, 851, 623, 1400, 936, -577, 1401, 769, 333, 938, -585, 114, -579, 725, 294, 298, 1119, -584, 349, -577, 752, 272, 53, 391, 773, 774, 775, 776, 145, 86, 434, 306, 336, 336, -625, 731, -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, 577, -576, 850, -578, 794, 795, 578, 579, 845, 818, 816, 817, 829, 813, 814, 727, 926, 580, 581, 812, 582, 583, 584, 585, 740, 586, 587, 243, 1055, -32766, -32766, -85, 815, 588, 589, 878, 152, 879, 133, 134, 135, 575, 136, 137, 1087, 766, 767, 768, 138, 41, 350, 961, 960, 1058, 1058, 1058, -32766, -32766, -32766, 841, -32766, 131, 977, 978, 400, 1055, 10, 979, -576, -576, -578, -578, 378, 760, 759, 936, 973, 290, 297, 297, -32766, 846, 936, 154, -576, 79, -578, 382, 849, 936, 1058, 336, 878, 769, 879, 938, -583, -85, -576, 725, -578, 959, 108, 109, 110, 1058, 732, 272, 53, 391, 773, 774, 775, 776, 290, 155, 434, 470, 471, 472, 735, 760, 759, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, 577, 926, 434, 847, 794, 795, 578, 579, 926, 818, 816, 817, 829, 813, 814, 926, 398, 580, 581, 812, 582, 583, 584, 585, 452, 586, 587, 157, 87, 88, 89, 453, 815, 588, 589, 454, 152, 790, 761, 762, 763, 764, 765, 158, 766, 767, 768, 803, 804, 40, 27, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 1134, 282, 1055, 455, -32766, 994, 1288, 1287, 1289, 725, 390, 389, 938, 114, 856, 1120, 725, 769, 159, 938, 433, 672, 23, 725, 1118, 691, 692, 1058, -32766, 153, 416, 770, 771, 772, 773, 774, 775, 776, -78, -619, 839, -619, -581, 386, 387, 392, 393, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 828, 807, 808, 809, 810, 798, 799, 800, 827, 801, 802, 787, 788, 789, 791, 792, 793, 832, 833, 834, 835, 836, 837, 838, 161, 663, 664, 794, 795, 796, 797, 36, 818, 816, 817, 829, 813, 814, -58, -57, 805, 811, 812, 819, 820, 822, 821, -87, 823, 824, -581, -581, 128, 129, 141, 815, 826, 825, 54, 55, 56, 57, 527, 58, 59, 142, -110, 148, 162, 60, 61, -110, 62, -110, 936, 163, 164, 165, 313, 166, -581, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 1293, -84, 953, -78, -73, -72, -71, -70, -69, -68, -67, -66, -65, 742, -46, 63, 64, -18, -575, 1286, 146, 65, 51, 66, 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, 281, 31, 273, 47, 450, 528, 291, -357, 741, 1319, 1320, 529, 744, 850, 935, 151, 295, 1317, 45, 22, 530, 1284, 531, -309, 532, -305, 533, 286, 936, 534, 535, 287, 926, 292, 48, 49, 456, 385, 384, 293, 50, 536, 342, 296, 282, 1057, 376, 348, 850, 299, 300, -575, -575, 1279, 114, 307, 308, 701, 538, 539, 540, 150, 841, -32766, 1288, 1287, 1289, -575, 850, 294, 542, 543, 1402, 1305, 1306, 1307, 1308, 1310, 1302, 1303, 305, -575, 716, -110, -110, 130, 1309, 1304, -110, 593, 1288, 1287, 1289, 306, 13, 673, 75, -110, 1152, 678, 331, 332, 336, -154, -154, -154, -32766, 718, 694, -4, 936, 938, 926, 314, 478, 725, 506, 1324, -154, 705, -154, 679, -154, 695, -154, 974, 1326, -541, 306, 312, 311, 79, 849, 661, 383, 43, 320, 336, 37, 1252, 0, 0, 52, 0, 0, 977, 978, 0, 760, 759, 537, -32766, 0, 0, 0, 706, 0, 0, 912, 973, -110, -110, -110, 35, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, -531, 11, 707, 708, 31, 274, 30, 380, 955, 599, -613, 306, 627, 0, 938, 0, 850, 926, 725, -154, 1317, 1288, 1287, 1289, 44, -612, 749, 290, 750, 1194, 1196, 869, 309, 310, 917, 1018, 995, 1002, 992, 383, -575, 446, 1003, 915, 990, 1123, 304, 1126, 381, 1127, 977, 978, 1124, 1125, 1131, 537, 1279, 1314, 861, 330, 760, 759, 132, 541, 973, -110, -110, -110, 1341, 1359, 1393, 1293, 666, 542, 543, -611, 1305, 1306, 1307, 1308, 1310, 1302, 1303, -585, -584, -583, -582, 21, -525, 1309, 1304, 1, 32, 760, 759, 33, 938, -32766, -278, 77, 725, -4, -16, 1286, 332, 336, 42, -575, -575, 46, -32766, -32766, -32766, 76, -32766, 80, -32766, 81, -32766, 82, 83, -32766, 84, -575, 85, 147, -32766, -32766, -32766, 156, -32766, 160, -32766, -32766, 249, 379, 1286, -575, -32766, 430, 31, 273, 338, -32766, -32766, -32766, 365, -32766, 366, -32766, -32766, -32766, 850, 850, -32766, 367, 1317, 368, 369, -32766, -32766, -32766, 370, 371, 372, -32766, -32766, 373, 374, 375, 377, -32766, 430, 447, 570, 31, 274, -276, -275, 15, 16, 78, 17, -32766, 18, 20, 414, 850, -110, -110, 497, 1317, 1279, -110, 498, 505, 508, 509, 510, 511, 515, 516, -110, 517, 525, 604, 711, 1088, 1084, 1234, 543, -32766, 1305, 1306, 1307, 1308, 1310, 1302, 1303, 1315, 1086, 1083, -50, 1064, 1274, 1309, 1304, 1279, 1060, -280, -102, 14, 19, 306, 24, 77, 79, 415, 303, 413, 332, 336, 336, 618, 624, 543, 652, 1305, 1306, 1307, 1308, 1310, 1302, 1303, 717, 143, 1238, 1292, 1235, 1372, 1309, 1304, 726, 729, 733, -32766, 734, 736, 737, 738, 77, 1286, 419, 739, 743, 332, 336, 728, -32766, -32766, -32766, 746, -32766, 913, -32766, 1397, -32766, 1399, 872, -32766, 871, 967, 1010, 1398, -32766, -32766, -32766, 966, -32766, 964, -32766, -32766, 965, 968, 1286, 1267, -32766, 430, 946, 956, 944, -32766, -32766, -32766, 1000, -32766, 1001, -32766, -32766, -32766, 650, 1396, -32766, 1353, 1342, 1360, 1369, -32766, -32766, -32766, 1318, -32766, 336, -32766, -32766, 936, 0, 1286, 0, -32766, 430, 0, 0, 0, -32766, -32766, -32766, 0, -32766, 0, -32766, -32766, -32766, 0, 0, -32766, 0, 0, 936, 0, -32766, -32766, -32766, 0, -32766, 0, -32766, -32766, 0, 0, 1286, 0, -32766, 430, 0, 0, 0, -32766, -32766, -32766, 0, -32766, 0, -32766, -32766, -32766, 0, 0, -32766, 0, 0, 0, 501, -32766, -32766, -32766, 0, -32766, 0, -32766, -32766, 0, 0, 1286, 606, -32766, 430, 0, 0, 0, -32766, -32766, -32766, 0, -32766, 0, -32766, -32766, -32766, 926, 0, -32766, 2, 0, 0, 0, -32766, -32766, -32766, 0, 0, 0, -32766, -32766, 0, -253, -253, -253, -32766, 430, 0, 383, 926, 0, 0, 0, 0, 0, 0, 0, -32766, 0, 977, 978, 0, 0, 0, 537, -252, -252, -252, 0, 0, 0, 383, 912, 973, -110, -110, -110, 0, 0, 0, 0, 0, 977, 978, 0, 0, 0, 537, 0, 0, 0, 0, 0, 0, 0, 912, 973, -110, -110, -110, -32766, 0, 0, 0, 0, 938, 1286, 0, 0, 725, -253, 0, 0, -32766, -32766, -32766, 0, -32766, 0, -32766, 0, -32766, 0, 0, -32766, 0, 0, 0, 938, -32766, -32766, -32766, 725, -252, 0, -32766, -32766, 0, 0, 0, 0, -32766, 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32766); + /** + * @var mixed[] + */ + protected $actionCheck = array(3, 4, 5, 6, 7, 8, 1, 10, 11, 12, 13, 14, 83, 9, 32, 86, 10, 11, 12, 32, 81, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 10, 11, 12, 9, 38, 39, 31, 9, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 0, 31, 9, 9, 58, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 107, 108, 109, 72, 73, 74, 75, 76, 77, 78, 117, 9, 81, 86, 71, 152, 153, 9, 31, 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, 107, 163, 109, 127, 128, 129, 130, 15, 132, 133, 134, 135, 136, 137, 1, 9, 140, 141, 142, 143, 144, 145, 146, 151, 148, 149, 138, 139, 1, 168, 164, 155, 156, 157, 9, 159, 9, 3, 4, 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, 117, 167, 119, 120, 121, 122, 123, 124, 125, 126, 10, 11, 12, 45, 46, 47, 48, 49, 50, 51, 52, 53, 167, 38, 39, 142, 167, 10, 11, 12, 9, 31, 1, 33, 34, 35, 36, 37, 38, 39, 1, 167, 9, 58, 10, 11, 12, 83, 31, 166, 33, 34, 35, 36, 37, 1, 1, 72, 73, 74, 75, 76, 77, 78, 1, 31, 81, 33, 34, 35, 36, 32, 9, 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, 71, 167, 9, 127, 128, 129, 130, 71, 132, 133, 134, 135, 136, 137, 1, 85, 140, 141, 142, 143, 144, 145, 146, 168, 148, 149, 81, 172, 10, 11, 12, 155, 156, 157, 165, 159, 167, 3, 4, 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, 31, 1, 33, 34, 35, 10, 10, 11, 12, 9, 52, 107, 108, 10, 11, 12, 10, 11, 138, 139, 1, 117, 9, 38, 39, 138, 139, 31, 1, 33, 34, 54, 55, 56, 154, 58, 81, 164, 1, 81, 1, 154, 84, 58, 9, 164, 166, 70, 168, 168, 31, 31, 164, 166, 9, 168, 168, 72, 73, 74, 75, 76, 77, 78, 168, 168, 81, 163, 172, 172, 165, 32, 167, 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, 71, 83, 71, 127, 128, 129, 130, 161, 132, 133, 134, 135, 136, 137, 168, 85, 140, 141, 142, 143, 144, 145, 146, 168, 148, 149, 98, 117, 117, 117, 32, 155, 156, 157, 107, 159, 109, 3, 4, 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, 9, 73, 74, 142, 142, 142, 10, 11, 12, 81, 141, 15, 118, 119, 107, 117, 109, 123, 138, 139, 138, 139, 9, 38, 39, 1, 132, 166, 166, 166, 117, 81, 1, 15, 154, 166, 154, 9, 160, 1, 142, 172, 107, 58, 109, 164, 166, 98, 168, 168, 168, 123, 51, 52, 53, 142, 32, 72, 73, 74, 75, 76, 77, 78, 166, 15, 81, 133, 134, 135, 32, 38, 39, 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, 85, 81, 161, 127, 128, 129, 130, 85, 132, 133, 134, 135, 136, 137, 85, 9, 140, 141, 142, 143, 144, 145, 146, 9, 148, 149, 15, 10, 11, 12, 9, 155, 156, 157, 9, 159, 3, 4, 5, 6, 7, 8, 15, 10, 11, 12, 13, 14, 31, 102, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 127, 58, 117, 9, 117, 164, 160, 161, 162, 168, 107, 108, 164, 70, 9, 169, 168, 58, 15, 164, 117, 76, 77, 168, 1, 76, 77, 142, 141, 102, 103, 72, 73, 74, 75, 76, 77, 78, 17, 165, 81, 167, 71, 107, 108, 107, 108, 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, 15, 112, 113, 127, 128, 129, 130, 15, 132, 133, 134, 135, 136, 137, 17, 17, 140, 141, 142, 143, 144, 145, 146, 32, 148, 149, 138, 139, 17, 17, 17, 155, 156, 157, 2, 3, 4, 5, 6, 7, 8, 17, 102, 17, 17, 13, 14, 107, 16, 109, 1, 17, 17, 17, 114, 17, 168, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 1, 32, 39, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 51, 52, 32, 71, 81, 32, 57, 71, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 32, 71, 72, 73, 74, 75, 32, 169, 32, 79, 80, 81, 32, 83, 32, 32, 38, 87, 88, 89, 90, 117, 92, 36, 94, 36, 96, 36, 1, 99, 100, 36, 85, 36, 104, 105, 106, 107, 108, 36, 110, 111, 36, 38, 58, 141, 116, 117, 83, 38, 38, 138, 139, 123, 70, 138, 139, 78, 128, 129, 130, 71, 81, 86, 160, 161, 162, 154, 83, 31, 140, 141, 84, 143, 144, 145, 146, 147, 148, 149, 150, 168, 81, 118, 119, 168, 156, 157, 123, 90, 160, 161, 162, 163, 98, 91, 166, 132, 83, 97, 170, 171, 172, 76, 77, 78, 141, 93, 95, 0, 1, 164, 85, 115, 98, 168, 98, 151, 91, 81, 93, 101, 95, 101, 97, 132, 151, 154, 163, 137, 136, 166, 160, 114, 107, 164, 136, 172, 168, 170, -1, -1, 71, -1, -1, 118, 119, -1, 38, 39, 123, 141, -1, -1, -1, 117, -1, -1, 131, 132, 133, 134, 135, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 154, 154, 141, 142, 71, 72, 154, 154, 159, 158, 166, 163, 158, -1, 164, -1, 83, 85, 168, 169, 87, 160, 161, 162, 164, 166, 164, 166, 164, 60, 61, 164, 138, 139, 164, 164, 164, 164, 164, 107, 71, 109, 164, 164, 164, 164, 114, 164, 154, 164, 118, 119, 164, 164, 164, 123, 123, 165, 165, 168, 38, 39, 168, 131, 132, 133, 134, 135, 165, 165, 165, 1, 165, 140, 141, 166, 143, 144, 145, 146, 147, 148, 149, 166, 166, 166, 166, 155, 166, 156, 157, 166, 166, 38, 39, 166, 164, 75, 167, 166, 168, 169, 32, 81, 171, 172, 166, 138, 139, 166, 88, 89, 90, 166, 92, 166, 94, 166, 96, 166, 166, 99, 166, 154, 166, 166, 104, 105, 106, 166, 75, 166, 110, 111, 166, 168, 81, 168, 116, 117, 71, 72, 166, 88, 89, 90, 166, 92, 166, 94, 128, 96, 83, 83, 99, 166, 87, 166, 166, 104, 105, 106, 166, 166, 166, 110, 111, 166, 166, 166, 166, 116, 117, 166, 166, 71, 72, 167, 167, 167, 167, 159, 167, 128, 167, 167, 167, 83, 118, 119, 167, 87, 123, 123, 167, 167, 167, 167, 167, 167, 167, 167, 132, 167, 167, 167, 167, 167, 167, 167, 141, 141, 143, 144, 145, 146, 147, 148, 149, 167, 167, 167, 32, 167, 167, 156, 157, 123, 167, 167, 167, 167, 167, 163, 167, 166, 166, 169, 167, 167, 171, 172, 172, 167, 167, 141, 167, 143, 144, 145, 146, 147, 148, 149, 167, 32, 167, 167, 167, 167, 156, 157, 168, 168, 168, 75, 168, 168, 168, 168, 166, 81, 169, 168, 168, 171, 172, 168, 88, 89, 90, 169, 92, 169, 94, 169, 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, 106, 169, 75, 169, 110, 111, 169, 169, 81, 169, 116, 117, 169, 169, 169, 88, 89, 90, 169, 92, 169, 94, 128, 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, 106, 171, 75, 172, 110, 111, 1, -1, 81, -1, 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, -1, -1, 99, -1, -1, 1, -1, 104, 105, 106, -1, 75, -1, 110, 111, -1, -1, 81, -1, 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, -1, -1, 99, -1, -1, -1, 103, 104, 105, 106, -1, 75, -1, 110, 111, -1, -1, 81, 82, 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, 85, -1, 99, 166, -1, -1, -1, 104, 105, 106, -1, -1, -1, 110, 111, -1, 101, 102, 103, 116, 117, -1, 107, 85, -1, -1, -1, -1, -1, -1, -1, 128, -1, 118, 119, -1, -1, -1, 123, 101, 102, 103, -1, -1, -1, 107, 131, 132, 133, 134, 135, -1, -1, -1, -1, -1, 118, 119, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, 75, -1, -1, -1, -1, 164, 81, -1, -1, 168, 169, -1, -1, 88, 89, 90, -1, 92, -1, 94, -1, 96, -1, -1, 99, -1, -1, -1, 164, 104, 105, 106, 168, 169, -1, 110, 111, -1, -1, -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 128); + /** + * @var mixed[] + */ + protected $actionBase = array(0, 155, -3, 313, 471, 471, 881, 963, 1365, 1388, 892, 134, 515, -61, 367, 524, 524, 801, 524, 209, 510, 283, 517, 517, 517, 920, 855, 628, 628, 855, 628, 1053, 1053, 1053, 1053, 1086, 1086, 1320, 1320, 1353, 1254, 1221, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 201, -13, 44, 365, 744, 1102, 1120, 1107, 1121, 1096, 1095, 1103, 1108, 1122, 1183, 1185, 837, 1186, 1187, 1182, 1188, 1110, 938, 1098, 1118, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 323, 482, 334, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 964, 964, 21, 21, 21, 324, 1135, 1100, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 297, 204, 1000, 187, 170, 170, 6, 6, 6, 6, 6, 692, 53, 1101, 819, 819, 138, 138, 138, 138, 542, 14, 347, 355, -41, 348, 232, 384, 384, 487, 487, 554, 554, 349, 349, 554, 554, 554, 399, 399, 399, 399, 208, 215, 366, 364, -7, 864, 224, 224, 224, 224, 864, 864, 864, 864, 829, 1190, 864, 1011, 1027, 864, 864, 368, 767, 767, 925, 305, 305, 305, 767, 421, -71, -71, 421, 380, -71, 225, 286, 556, 847, 572, 543, 556, 640, 771, 233, 148, 826, 605, 826, 1094, 831, 831, 802, 792, 921, 1140, 1123, 874, 1176, 876, 1178, 420, 9, 791, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1191, 519, 1094, 436, 1191, 1191, 1191, 519, 519, 519, 519, 519, 519, 519, 519, 805, 519, 519, 641, 436, 614, 618, 436, 860, 519, 877, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, -18, 201, 201, -13, 292, 292, 201, 216, 5, 292, 292, 292, 292, 201, 201, 201, 201, 605, 840, 882, 607, 435, 885, 29, 840, 840, 840, 4, 113, 25, 841, 843, 393, 835, 835, 835, 869, 956, 956, 835, 839, 835, 869, 835, 835, 956, 956, 879, 956, 146, 609, 373, 514, 616, 956, 272, 835, 835, 835, 835, 854, 956, 45, 68, 620, 835, 203, 191, 835, 835, 854, 848, 828, 846, 956, 956, 956, 854, 499, 846, 846, 846, 893, 895, 873, 822, 363, 341, 674, 127, 783, 822, 822, 835, 601, 873, 822, 873, 822, 880, 822, 822, 822, 873, 822, 839, 477, 822, 779, 786, 663, 74, 822, 51, 978, 980, 743, 982, 971, 984, 1038, 985, 987, 1125, 953, 999, 974, 989, 1039, 960, 957, 836, 763, 764, 878, 827, 951, 838, 838, 838, 948, 949, 838, 838, 838, 838, 838, 838, 838, 838, 763, 923, 884, 853, 1013, 765, 776, 1069, 820, 1145, 823, 1011, 978, 987, 789, 974, 989, 960, 957, 800, 799, 797, 798, 796, 795, 793, 794, 808, 1071, 1072, 990, 825, 778, 1049, 1020, 1143, 922, 1022, 1023, 1050, 1073, 898, 1083, 1147, 844, 1149, 1150, 924, 1028, 1126, 838, 940, 875, 934, 1027, 950, 763, 935, 1084, 1085, 1043, 824, 1054, 1058, 998, 870, 842, 936, 1152, 1029, 1032, 1033, 1127, 1129, 891, 1044, 962, 1059, 872, 1099, 1060, 1061, 1062, 1063, 1130, 1153, 1131, 890, 1132, 901, 858, 1041, 856, 1154, 504, 851, 857, 866, 1035, 536, 1007, 1136, 1134, 1155, 1064, 1065, 1067, 1159, 1161, 994, 902, 1046, 867, 1048, 1042, 903, 904, 606, 865, 1087, 845, 849, 859, 622, 672, 1164, 1165, 1167, 996, 830, 833, 905, 909, 1088, 832, 1092, 1170, 737, 910, 1171, 1070, 787, 788, 690, 750, 749, 790, 868, 1137, 883, 852, 850, 1034, 788, 834, 911, 1172, 912, 914, 916, 1068, 919, 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, 0, 784, 784, 784, 784, 784, 784, 784, 784, 784, 628, 628, 628, 628, 784, 784, 784, 784, 784, 784, 784, 628, 784, 784, 784, 628, 628, 0, 0, 628, 0, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 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, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 758, 758, 612, 612, 612, 612, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 612, 612, 0, 612, 612, 612, 612, 612, 612, 612, 612, 879, 758, 758, 758, 758, 305, 305, 305, 305, -96, -96, 758, 758, 380, 758, 380, 758, 758, 305, 305, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 0, 0, 0, 436, -71, 758, 839, 839, 839, 839, 758, 758, 758, 758, -71, -71, 758, 414, 414, 758, 758, 0, 0, 0, 0, 0, 0, 0, 0, 436, 0, 0, 436, 0, 0, 839, 839, 758, 380, 879, 328, 758, 0, 0, 0, 0, 436, 839, 436, 519, -71, -71, 519, 519, 292, 201, 328, 596, 596, 596, 596, 0, 0, 605, 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, 839, 0, 879, 0, 839, 839, 839, 0, 0, 0, 0, 0, 0, 0, 0, 956, 0, 0, 0, 0, 0, 0, 0, 839, 0, 956, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 839, 0, 0, 0, 0, 0, 0, 0, 0, 0, 838, 870, 0, 0, 870, 0, 838, 838, 838, 0, 0, 0, 865, 832); + /** + * @var mixed[] + */ + protected $actionDefault = array(3, 32767, 32767, 32767, 102, 102, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 100, 32767, 631, 631, 631, 631, 32767, 32767, 257, 102, 32767, 32767, 500, 415, 415, 415, 32767, 32767, 32767, 573, 573, 573, 573, 573, 17, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 500, 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, 36, 7, 8, 10, 11, 49, 338, 100, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 102, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 624, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 403, 494, 504, 482, 483, 485, 486, 414, 574, 630, 344, 627, 342, 413, 146, 354, 343, 245, 261, 505, 262, 506, 509, 510, 218, 400, 150, 151, 446, 501, 448, 499, 503, 447, 420, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 418, 419, 502, 32767, 32767, 479, 478, 477, 444, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 102, 32767, 445, 449, 417, 452, 450, 451, 468, 469, 466, 467, 470, 32767, 323, 32767, 32767, 32767, 471, 472, 473, 474, 381, 379, 32767, 32767, 111, 323, 111, 32767, 32767, 459, 460, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 517, 567, 476, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 102, 32767, 32767, 32767, 100, 569, 441, 443, 537, 454, 455, 453, 421, 32767, 542, 32767, 102, 32767, 544, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 568, 32767, 575, 575, 32767, 530, 100, 196, 32767, 543, 196, 196, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 638, 530, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 32767, 196, 110, 32767, 32767, 32767, 100, 196, 196, 196, 196, 196, 196, 196, 196, 545, 196, 196, 191, 32767, 271, 273, 102, 592, 196, 547, 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, 530, 464, 139, 32767, 532, 139, 575, 456, 457, 458, 575, 575, 575, 319, 296, 32767, 32767, 32767, 32767, 32767, 545, 545, 100, 100, 100, 100, 32767, 32767, 32767, 32767, 111, 516, 99, 99, 99, 99, 99, 103, 101, 32767, 32767, 32767, 32767, 226, 32767, 101, 101, 99, 32767, 101, 101, 32767, 32767, 226, 228, 215, 230, 32767, 596, 597, 226, 101, 230, 230, 230, 250, 250, 519, 325, 101, 99, 101, 101, 198, 325, 325, 32767, 101, 519, 325, 519, 325, 200, 325, 325, 325, 519, 325, 32767, 101, 325, 217, 403, 99, 99, 325, 32767, 32767, 32767, 532, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 225, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 562, 32767, 580, 594, 462, 463, 465, 579, 577, 487, 488, 489, 490, 491, 492, 493, 496, 626, 32767, 536, 32767, 32767, 32767, 353, 32767, 636, 32767, 32767, 32767, 9, 74, 525, 42, 43, 51, 57, 551, 552, 553, 554, 548, 549, 555, 550, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 637, 32767, 575, 32767, 32767, 32767, 32767, 461, 557, 602, 32767, 32767, 576, 629, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 139, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 562, 32767, 137, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 558, 32767, 32767, 32767, 575, 32767, 32767, 32767, 32767, 321, 318, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 575, 32767, 32767, 32767, 32767, 32767, 298, 32767, 315, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 399, 532, 301, 303, 304, 32767, 32767, 32767, 32767, 375, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 153, 153, 3, 3, 356, 153, 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, 250, 153, 367, 153); + /** + * @var mixed[] + */ + protected $goto = array(202, 169, 202, 202, 202, 1056, 842, 712, 359, 670, 671, 598, 688, 689, 690, 748, 653, 655, 591, 929, 675, 930, 1090, 721, 699, 702, 1028, 710, 719, 1024, 171, 171, 171, 171, 226, 203, 199, 199, 181, 183, 221, 199, 199, 199, 199, 199, 1180, 200, 200, 200, 200, 200, 1180, 193, 194, 195, 196, 197, 198, 223, 221, 224, 550, 551, 431, 552, 555, 556, 557, 558, 559, 560, 561, 562, 172, 173, 174, 201, 175, 176, 177, 170, 178, 179, 180, 182, 220, 222, 225, 245, 248, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 275, 276, 277, 278, 288, 289, 326, 327, 328, 437, 438, 439, 613, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 184, 242, 185, 194, 195, 196, 197, 198, 223, 204, 205, 206, 207, 246, 186, 187, 208, 188, 209, 205, 189, 247, 204, 168, 210, 211, 190, 212, 213, 214, 191, 215, 216, 192, 217, 218, 219, 285, 283, 285, 285, 870, 1089, 1091, 1094, 615, 255, 255, 255, 255, 255, 441, 677, 614, 1130, 884, 867, 436, 329, 323, 324, 345, 608, 440, 346, 442, 654, 724, 492, 521, 715, 896, 1128, 993, 883, 494, 253, 253, 253, 253, 250, 256, 489, 1361, 1362, 1386, 1386, 925, 920, 921, 934, 876, 922, 873, 923, 924, 874, 877, 363, 928, 881, 480, 480, 868, 880, 1386, 848, 474, 363, 363, 480, 1117, 1112, 1113, 1114, 1229, 351, 362, 362, 362, 362, 1389, 1389, 429, 363, 363, 1017, 902, 363, 989, 1403, 747, 360, 361, 566, 1026, 1021, 1056, 1285, 1285, 1285, 569, 352, 351, 363, 363, 605, 1056, 1285, 848, 1056, 848, 1056, 1056, 1137, 1138, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 357, 1261, 962, 637, 674, 1285, 1262, 1265, 963, 1266, 1285, 1285, 1285, 1285, 1376, 435, 1285, 628, 402, 1285, 1285, 1368, 1368, 1368, 1368, 1347, 574, 567, 1062, 1061, 1059, 1059, 958, 958, 697, 970, 1014, 942, 1051, 1067, 1068, 943, 565, 565, 565, 603, 513, 522, 514, 863, 676, 863, 565, 709, 520, 1176, 318, 567, 574, 600, 601, 319, 611, 617, 844, 633, 634, 1080, 8, 709, 9, 449, 709, 28, 1065, 1066, 467, 335, 316, 569, 698, 987, 987, 987, 987, 1363, 1364, 467, 639, 639, 981, 988, 609, 631, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1335, 1335, 863, 469, 682, 469, 1335, 1335, 1335, 1335, 1335, 1335, 1335, 1335, 1335, 1335, 347, 258, 258, 626, 640, 643, 644, 645, 646, 667, 668, 669, 723, 632, 460, 860, 460, 460, 460, 1358, 1358, 1358, 553, 553, 1278, 985, 420, 720, 553, 1358, 553, 553, 553, 553, 553, 553, 553, 553, 451, 889, 568, 595, 568, 647, 649, 651, 568, 976, 595, 411, 405, 473, 886, 1276, 1370, 1370, 1370, 1370, 909, 866, 909, 909, 1036, 483, 612, 484, 485, 751, 563, 563, 563, 563, 894, 619, 1101, 1394, 1395, 412, 1332, 1332, 898, 490, 1151, 1354, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 279, 1105, 334, 334, 334, 998, 892, 0, 1280, 1047, 0, 0, 863, 0, 0, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 0, 0, 460, 1103, 554, 554, 0, 1356, 1356, 1103, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 621, 622, 417, 418, 947, 1166, 0, 686, 0, 687, 0, 422, 423, 424, 0, 700, 1033, 0, 425, 1281, 1282, 0, 1268, 355, 888, 0, 680, 1012, 858, 0, 0, 0, 882, 443, 0, 1268, 0, 897, 885, 1100, 1104, 0, 0, 0, 1275, 0, 443, 0, 1283, 1344, 1345, 996, 0, 0, 1063, 1063, 0, 0, 0, 681, 1074, 1070, 1071, 404, 407, 616, 620, 0, 0, 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1149, 901, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1031, 1031); + /** + * @var mixed[] + */ + protected $gotoCheck = array(42, 42, 42, 42, 42, 73, 6, 73, 97, 86, 86, 48, 86, 86, 86, 48, 48, 48, 127, 65, 48, 65, 131, 9, 48, 48, 48, 48, 48, 48, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 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, 130, 130, 130, 134, 5, 5, 5, 5, 5, 66, 66, 8, 8, 35, 26, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 8, 84, 8, 8, 35, 8, 49, 35, 84, 5, 5, 5, 5, 5, 5, 185, 185, 185, 191, 191, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 157, 157, 27, 15, 191, 12, 159, 14, 14, 157, 15, 15, 15, 15, 159, 177, 24, 24, 24, 24, 191, 191, 43, 14, 14, 50, 45, 14, 50, 14, 50, 97, 97, 50, 50, 50, 73, 73, 73, 73, 14, 177, 177, 14, 14, 181, 73, 73, 12, 73, 12, 73, 73, 148, 148, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 188, 79, 79, 56, 56, 73, 79, 79, 79, 79, 73, 73, 73, 73, 190, 13, 73, 13, 62, 73, 73, 9, 9, 9, 9, 14, 76, 76, 119, 119, 89, 89, 9, 9, 89, 89, 103, 73, 89, 89, 89, 73, 19, 19, 19, 104, 163, 14, 163, 22, 64, 22, 19, 7, 163, 158, 76, 76, 76, 76, 76, 76, 76, 76, 7, 76, 76, 115, 46, 7, 46, 113, 7, 76, 120, 120, 19, 178, 178, 14, 117, 19, 19, 19, 19, 187, 187, 19, 108, 108, 19, 19, 2, 2, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 179, 179, 22, 83, 121, 83, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 29, 5, 5, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 80, 23, 18, 23, 23, 23, 134, 134, 134, 165, 165, 14, 93, 93, 93, 165, 134, 165, 165, 165, 165, 165, 165, 165, 165, 83, 39, 9, 9, 9, 85, 85, 85, 9, 92, 9, 28, 9, 9, 37, 169, 134, 134, 134, 134, 25, 25, 25, 25, 110, 9, 9, 9, 9, 99, 107, 107, 107, 107, 9, 107, 133, 9, 9, 31, 180, 180, 41, 160, 151, 134, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 24, 136, 24, 24, 24, 96, 9, -1, 20, 114, -1, -1, 22, -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, -1, 23, 134, 182, 182, -1, 134, 134, 134, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 17, 17, 82, 82, 17, 17, -1, 82, -1, 82, -1, 82, 82, 82, -1, 82, 17, -1, 82, 20, 20, -1, 20, 82, 17, -1, 17, 17, 20, -1, -1, -1, 17, 118, -1, 20, -1, 16, 16, 16, 16, -1, -1, -1, 17, -1, 118, -1, 20, 20, 20, 16, -1, -1, 118, 118, -1, -1, -1, 118, 118, 118, 118, 59, 59, 59, 59, -1, -1, -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, -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, 107, 107); + /** + * @var mixed[] + */ + protected $gotoBase = array(0, 0, -339, 0, 0, 174, -7, 339, 171, 10, 0, 0, -69, -36, -78, -186, 130, 81, 114, 66, 117, 0, 62, 160, 240, 468, 178, 225, 118, 112, 0, 45, 0, 0, 0, -195, 0, 119, 0, 122, 0, 44, -1, 226, 0, 227, -387, 0, -715, 182, 241, 0, 0, 0, 0, 0, 256, 0, 0, 570, 0, 0, 269, 0, 102, 3, -63, 0, 0, 0, 0, 0, 0, -5, 0, 0, -31, 0, 0, -120, 110, 53, 54, 120, -286, -33, -724, 0, 0, 40, 0, 0, 124, 129, 0, 0, 61, -488, 0, 67, 0, 0, 0, 294, 295, 0, 0, 453, 141, 0, 100, 0, 0, 83, -3, 82, 0, 86, 318, 38, 78, 107, 0, 0, 0, 0, 0, 16, 0, 0, 168, 20, 0, 108, 163, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 43, 0, 0, 0, 0, 0, 193, 101, -38, 46, 0, 0, -166, 0, 195, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, -60, 42, 157, 251, 243, 297, 0, 0, -97, 0, 1, 263, 0, 276, -101, 0, 0); + /** + * @var mixed[] + */ + protected $gotoDefault = array(-32768, 526, 755, 7, 756, 951, 831, 840, 590, 544, 722, 356, 641, 432, 1352, 927, 1165, 610, 859, 1294, 1300, 468, 862, 340, 745, 939, 910, 911, 408, 395, 875, 406, 665, 642, 507, 895, 464, 887, 499, 890, 463, 899, 167, 428, 524, 903, 6, 906, 572, 937, 991, 396, 914, 397, 693, 916, 594, 918, 919, 403, 409, 410, 1170, 602, 638, 931, 261, 596, 932, 394, 933, 941, 399, 401, 703, 479, 518, 512, 421, 1132, 597, 625, 662, 457, 486, 636, 648, 635, 493, 444, 426, 339, 975, 983, 500, 477, 997, 358, 1005, 753, 1178, 656, 502, 1013, 657, 1020, 1023, 545, 546, 491, 1035, 271, 1038, 503, 1048, 26, 683, 1053, 1054, 684, 658, 1076, 659, 685, 660, 1078, 476, 592, 1179, 475, 1093, 1099, 465, 1102, 1340, 466, 1106, 270, 1109, 284, 427, 445, 1115, 1116, 12, 1122, 713, 714, 25, 280, 523, 1150, 704, -32768, -32768, -32768, -32768, 462, 1177, 461, 1249, 1251, 573, 504, 1269, 301, 1272, 696, 519, 1277, 458, 1343, 459, 547, 487, 325, 548, 1387, 315, 343, 322, 564, 302, 344, 549, 488, 1349, 1357, 341, 34, 1377, 1388, 607, 630); + /** + * @var mixed[] + */ + 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, 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, 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, 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, 50, 69, 69, 72, 72, 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, 138, 138, 138, 138, 138, 143, 143, 144, 144, 145, 145, 145, 145, 145, 146, 147, 147, 142, 142, 139, 139, 141, 141, 149, 149, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 140, 150, 150, 152, 151, 151, 153, 153, 114, 154, 154, 156, 156, 156, 155, 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, 191, 191, 191, 191, 191, 191, 193, 193, 193, 193); + /** + * @var mixed[] + */ + 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, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 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, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, 1, 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, 1, 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, 6, 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, 1, 1, 1, 2, 1, 3, 1, 1, 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, 4, 1, 1, 2, 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, 2, 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 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() : void + { + $this->reduceCallbacks = [0 => null, 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos - (1 - 1)]); + }, 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (2 - 2)] !== null) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + } + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 3 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos); + if ($nop !== null) { + $self->semStack[$stackPos - (1 - 1)][] = $nop; + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 5 => null, 6 => null, 7 => null, 8 => null, 9 => null, 10 => null, 11 => null, 12 => null, 13 => null, 14 => null, 15 => null, 16 => null, 17 => null, 18 => null, 19 => null, 20 => null, 21 => null, 22 => null, 23 => null, 24 => null, 25 => null, 26 => null, 27 => null, 28 => null, 29 => null, 30 => null, 31 => null, 32 => null, 33 => null, 34 => null, 35 => null, 36 => null, 37 => null, 38 => null, 39 => null, 40 => null, 41 => null, 42 => null, 43 => null, 44 => null, 45 => null, 46 => null, 47 => null, 48 => null, 49 => null, 50 => null, 51 => null, 52 => null, 53 => null, 54 => null, 55 => null, 56 => null, 57 => null, 58 => null, 59 => null, 60 => null, 61 => null, 62 => null, 63 => null, 64 => null, 65 => null, 66 => null, 67 => null, 68 => null, 69 => null, 70 => null, 71 => null, 72 => null, 73 => null, 74 => null, 75 => null, 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]))); + } + }, 77 => null, 78 => null, 79 => null, 80 => null, 81 => null, 82 => null, 83 => null, 84 => null, 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 94 => null, 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 97 => static function ($self, $stackPos) { + /* nothing */ + }, 98 => static function ($self, $stackPos) { + /* nothing */ + }, 99 => static function ($self, $stackPos) { + /* nothing */ + }, 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]))); + }, 101 => null, 102 => null, 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos - (1 - 1)], [], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos - (4 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 110 => static function ($self, $stackPos) { + $self->semValue = []; + }, 111 => null, 112 => null, 113 => null, 114 => null, 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos - (3 - 2)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); + }, 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos - (5 - 2)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos - (3 - 2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 121 => null, 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), []); + }, 123 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (4 - 1)]); + $self->checkConstantAttributes($self->semValue); + }, 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; + }, 125 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; + }, 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos - (8 - 3)], $self->semStack[$stackPos - (8 - 6)], $self->semStack[$stackPos - (8 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 127 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos - (7 - 2)], $self->semStack[$stackPos - (7 - 5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 128 => null, 129 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 130 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 131 => null, 132 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 133 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 134 => null, 135 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 136 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (1 - 1)); + }, 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (3 - 3)); + }, 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (1 - 1)); + }, 140 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (3 - 3)); + }, 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + $self->semValue->type = Stmt\Use_::TYPE_NORMAL; + }, 142 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue->type = $self->semStack[$stackPos - (2 - 1)]; + }, 143 => null, 144 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 145 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 146 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 147 => null, 148 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 149 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos - (3 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos - (3 - 1)])), $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 151 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos - (3 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos - (3 - 1)])), $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 152 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (2 - 2)] !== null) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + } + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 153 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 154 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos); + if ($nop !== null) { + $self->semStack[$stackPos - (1 - 1)][] = $nop; + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 155 => null, 156 => null, 157 => null, 158 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos - (7 - 3)], ['stmts' => $self->semStack[$stackPos - (7 - 5)], 'elseifs' => $self->semStack[$stackPos - (7 - 6)], 'else' => $self->semStack[$stackPos - (7 - 7)]], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos - (10 - 3)], ['stmts' => $self->semStack[$stackPos - (10 - 6)], 'elseifs' => $self->semStack[$stackPos - (10 - 7)], 'else' => $self->semStack[$stackPos - (10 - 8)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + }, 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos - (7 - 5)], $self->semStack[$stackPos - (7 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos - (9 - 3)], 'cond' => $self->semStack[$stackPos - (9 - 5)], 'loop' => $self->semStack[$stackPos - (9 - 7)], 'stmts' => $self->semStack[$stackPos - (9 - 9)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 171 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 172 => static function ($self, $stackPos) { + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos - (1 - 1))); + }, 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos - (5 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos - (7 - 5)][1], 'stmts' => $self->semStack[$stackPos - (7 - 7)]], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos - (9 - 3)], $self->semStack[$stackPos - (9 - 7)][0], ['keyVar' => $self->semStack[$stackPos - (9 - 5)], 'byRef' => $self->semStack[$stackPos - (9 - 7)][1], 'stmts' => $self->semStack[$stackPos - (9 - 9)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos - (6 - 3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (6 - 4)], $self->tokenEndStack[$stackPos - (6 - 4)])), ['stmts' => $self->semStack[$stackPos - (6 - 6)]], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + }, 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos - (6 - 3)], $self->semStack[$stackPos - (6 - 5)], $self->semStack[$stackPos - (6 - 6)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkTryCatch($self->semValue); + }, 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 181 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 182 => static function ($self, $stackPos) { + $self->semValue = null; + /* means: no statement */ + }, 183 => null, 184 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]); + }, 185 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (1 - 1)] instanceof Stmt\Block) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]->stmts; + } else { + if ($self->semStack[$stackPos - (1 - 1)] === null) { + $self->semValue = []; + } else { + $self->semValue = [$self->semStack[$stackPos - (1 - 1)]]; + } + } + }, 186 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 187 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 188 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 189 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 190 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos - (8 - 3)], $self->semStack[$stackPos - (8 - 4)], $self->semStack[$stackPos - (8 - 7)], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 191 => static function ($self, $stackPos) { + $self->semValue = null; + }, 192 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 193 => null, 194 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 195 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 196 => static function ($self, $stackPos) { + $self->semValue = \false; + }, 197 => static function ($self, $stackPos) { + $self->semValue = \true; + }, 198 => static function ($self, $stackPos) { + $self->semValue = \false; + }, 199 => static function ($self, $stackPos) { + $self->semValue = \true; + }, 200 => static function ($self, $stackPos) { + $self->semValue = \false; + }, 201 => static function ($self, $stackPos) { + $self->semValue = \true; + }, 202 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 203 => static function ($self, $stackPos) { + $self->semValue = []; + }, 204 => null, 205 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 206 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 207 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos - (8 - 3)], ['byRef' => $self->semStack[$stackPos - (8 - 2)], 'params' => $self->semStack[$stackPos - (8 - 5)], 'returnType' => $self->semStack[$stackPos - (8 - 7)], 'stmts' => $self->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos - (9 - 4)], ['byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 6)], 'returnType' => $self->semStack[$stackPos - (9 - 8)], 'stmts' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => $self->semStack[$stackPos - (9 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos - (7 - 2)], ['type' => $self->semStack[$stackPos - (7 - 1)], 'extends' => $self->semStack[$stackPos - (7 - 3)], 'implements' => $self->semStack[$stackPos - (7 - 4)], 'stmts' => $self->semStack[$stackPos - (7 - 6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos - (7 - 2)); + }, 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos - (8 - 3)], ['type' => $self->semStack[$stackPos - (8 - 2)], 'extends' => $self->semStack[$stackPos - (8 - 4)], 'implements' => $self->semStack[$stackPos - (8 - 5)], 'stmts' => $self->semStack[$stackPos - (8 - 7)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos - (8 - 3)); + }, 212 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos - (7 - 3)], ['extends' => $self->semStack[$stackPos - (7 - 4)], 'stmts' => $self->semStack[$stackPos - (7 - 6)], 'attrGroups' => $self->semStack[$stackPos - (7 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos - (7 - 3)); + }, 213 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos - (6 - 3)], ['stmts' => $self->semStack[$stackPos - (6 - 5)], 'attrGroups' => $self->semStack[$stackPos - (6 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + }, 214 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos - (8 - 3)], ['scalarType' => $self->semStack[$stackPos - (8 - 4)], 'implements' => $self->semStack[$stackPos - (8 - 5)], 'stmts' => $self->semStack[$stackPos - (8 - 7)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos - (8 - 3)); + }, 215 => static function ($self, $stackPos) { + $self->semValue = null; + }, 216 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 217 => static function ($self, $stackPos) { + $self->semValue = null; + }, 218 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 219 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 220 => null, 221 => null, 222 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 223 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, 224 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, 225 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, 226 => static function ($self, $stackPos) { + $self->semValue = null; + }, 227 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 228 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 229 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 230 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 231 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 232 => null, 233 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 234 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 235 => null, 236 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 237 => null, 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 239 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (1 - 1)] instanceof Stmt\Block) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]->stmts; + } else { + if ($self->semStack[$stackPos - (1 - 1)] === null) { + $self->semValue = []; + } else { + $self->semValue = [$self->semStack[$stackPos - (1 - 1)]]; + } + } + }, 240 => static function ($self, $stackPos) { + $self->semValue = null; + }, 241 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 242 => null, 243 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 244 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 245 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 247 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 3)]; + }, 248 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 249 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (5 - 3)]; + }, 250 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 251 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 252 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos - (4 - 2)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 253 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 254 => null, 255 => null, 256 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 6)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 257 => static function ($self, $stackPos) { + $self->semValue = []; + }, 258 => null, 259 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 260 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 261 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 262 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 263 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 264 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 265 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 268 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 269 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 270 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos - (6 - 3)], $self->semStack[$stackPos - (6 - 6)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + $self->fixupAlternativeElse($self->semValue); + }, 271 => static function ($self, $stackPos) { + $self->semValue = null; + }, 272 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 273 => static function ($self, $stackPos) { + $self->semValue = null; + }, 274 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->fixupAlternativeElse($self->semValue); + }, 275 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)], \false); + }, 276 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (2 - 2)], \true); + }, 277 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)], \false); + }, 278 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos - (1 - 1)]), \false); + }, 279 => null, 280 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 281 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 282 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 283 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 284 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, 286 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, 287 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, 288 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, 289 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, 290 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, 291 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, 292 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, 293 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos - (7 - 6)], null, $self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 4)], $self->semStack[$stackPos - (7 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (7 - 2)], $self->semStack[$stackPos - (7 - 1)], $self->semStack[$stackPos - (7 - 7)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos - (9 - 6)], $self->semStack[$stackPos - (9 - 8)], $self->semStack[$stackPos - (9 - 3)], $self->semStack[$stackPos - (9 - 4)], $self->semStack[$stackPos - (9 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (9 - 2)], $self->semStack[$stackPos - (9 - 1)], $self->semStack[$stackPos - (9 - 9)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, 295 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos - (6 - 3)], $self->semStack[$stackPos - (6 - 4)], $self->semStack[$stackPos - (6 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (6 - 2)], $self->semStack[$stackPos - (6 - 1)]); + }, 296 => null, 297 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 298 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 299 => null, 300 => null, 301 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 302 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos - (1 - 1)]); + }, 303 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 304 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 305 => null, 306 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 307 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 308 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 309 => null, 310 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 311 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 312 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 313 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 314 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 315 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 316 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 317 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 318 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 319 => null, 320 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 321 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 322 => null, 323 => static function ($self, $stackPos) { + $self->semValue = null; + }, 324 => null, 325 => static function ($self, $stackPos) { + $self->semValue = null; + }, 326 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 327 => static function ($self, $stackPos) { + $self->semValue = null; + }, 328 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 329 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 330 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 2)]); + }, 331 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 332 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 333 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos - (4 - 2)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]))); + }, 334 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 2)]); + }, 335 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos - (3 - 1)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos - (3 - 1)])), $self->semStack[$stackPos - (3 - 3)]); + }, 336 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 337 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 338 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 339 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 340 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 341 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (2 - 2)], \true, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 342 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (2 - 2)], \false, \true, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 343 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (3 - 3)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (3 - 1)]); + }, 344 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (1 - 1)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 345 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 346 => null, 347 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 348 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 349 => null, 350 => null, 351 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 352 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 353 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos - (1 - 1)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 354 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 355 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (2 - 2)] !== null) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + } else { + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + } + }, 356 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 357 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos); + if ($nop !== null) { + $self->semStack[$stackPos - (1 - 1)][] = $nop; + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos - (5 - 2)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 1)]); + }, 359 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos - (5 - 4)], $self->semStack[$stackPos - (5 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (5 - 1)]); + $self->checkClassConst($self->semValue, $stackPos - (5 - 2)); + }, 360 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos - (6 - 5)], $self->semStack[$stackPos - (6 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (6 - 1)], $self->semStack[$stackPos - (6 - 4)]); + $self->checkClassConst($self->semValue, $stackPos - (6 - 2)); + }, 361 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos - (10 - 5)], ['type' => $self->semStack[$stackPos - (10 - 2)], 'byRef' => $self->semStack[$stackPos - (10 - 4)], 'params' => $self->semStack[$stackPos - (10 - 7)], 'returnType' => $self->semStack[$stackPos - (10 - 9)], 'stmts' => $self->semStack[$stackPos - (10 - 10)], 'attrGroups' => $self->semStack[$stackPos - (10 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos - (10 - 2)); + }, 362 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 363 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 4)], $self->semStack[$stackPos - (5 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 364 => static function ($self, $stackPos) { + $self->semValue = null; + /* will be skipped */ + }, 365 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 366 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 367 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 368 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 369 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 370 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (5 - 1)][0], $self->semStack[$stackPos - (5 - 1)][1], $self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 371 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], $self->semStack[$stackPos - (4 - 3)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 372 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], null, $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 373 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], null, $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 374 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 375 => null, 376 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos - (1 - 1)]); + }, 377 => static function ($self, $stackPos) { + $self->semValue = null; + }, 378 => null, 379 => null, 380 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 381 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 382 => null, 383 => null, 384 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 385 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, 386 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, 387 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, 388 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, 389 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, 390 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, 391 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; + }, 392 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, 393 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, 394 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, 395 => null, 396 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 397 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 398 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 399 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos - (1 - 1)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 400 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 401 => static function ($self, $stackPos) { + $self->semValue = []; + }, 402 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 403 => static function ($self, $stackPos) { + $self->semValue = []; + }, 404 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos - (5 - 4)], $self->semStack[$stackPos - (5 - 5)], ['flags' => $self->semStack[$stackPos - (5 - 2)], 'byRef' => $self->semStack[$stackPos - (5 - 3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos - (5 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, null); + }, 405 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos - (8 - 4)], $self->semStack[$stackPos - (8 - 8)], ['flags' => $self->semStack[$stackPos - (8 - 2)], 'byRef' => $self->semStack[$stackPos - (8 - 3)], 'params' => $self->semStack[$stackPos - (8 - 6)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, $stackPos - (8 - 5)); + }, 406 => static function ($self, $stackPos) { + $self->semValue = null; + }, 407 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 408 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 409 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 410 => static function ($self, $stackPos) { + $self->checkPropertyHookModifiers($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 411 => null, 412 => null, 413 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 414 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 415 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 416 => null, 417 => null, 418 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 419 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos - (3 - 1)]), $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]))); + } + }, 423 => null, 424 => null, 425 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos - (2 - 1)])), $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 426 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 447 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 459 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 465 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 467 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 476 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos - (5 - 1)], $self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos - (4 - 1)], null, $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 479 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 483 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 485 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 486 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 487 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 488 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 489 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 490 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 491 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 492 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 495 => static function ($self, $stackPos) { + $self->semValue = $self->createExitExpr($self->semStack[$stackPos - (2 - 1)], $stackPos - (2 - 1), $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 497 => null, 498 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 499 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 500 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 501 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos - (2 - 2)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 502 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos - (4 - 4)], $self->semStack[$stackPos - (4 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 503 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 504 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 505 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \false, 'byRef' => $self->semStack[$stackPos - (8 - 2)], 'params' => $self->semStack[$stackPos - (8 - 4)], 'returnType' => $self->semStack[$stackPos - (8 - 6)], 'expr' => $self->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \true, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'returnType' => $self->semStack[$stackPos - (9 - 7)], 'expr' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 507 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \false, 'byRef' => $self->semStack[$stackPos - (8 - 2)], 'params' => $self->semStack[$stackPos - (8 - 4)], 'uses' => $self->semStack[$stackPos - (8 - 6)], 'returnType' => $self->semStack[$stackPos - (8 - 7)], 'stmts' => $self->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 508 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \true, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'uses' => $self->semStack[$stackPos - (9 - 7)], 'returnType' => $self->semStack[$stackPos - (9 - 8)], 'stmts' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 509 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \false, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'returnType' => $self->semStack[$stackPos - (9 - 7)], 'expr' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => $self->semStack[$stackPos - (9 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 510 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \true, 'byRef' => $self->semStack[$stackPos - (10 - 4)], 'params' => $self->semStack[$stackPos - (10 - 6)], 'returnType' => $self->semStack[$stackPos - (10 - 8)], 'expr' => $self->semStack[$stackPos - (10 - 10)], 'attrGroups' => $self->semStack[$stackPos - (10 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + }, 511 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \false, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'uses' => $self->semStack[$stackPos - (9 - 7)], 'returnType' => $self->semStack[$stackPos - (9 - 8)], 'stmts' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => $self->semStack[$stackPos - (9 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 512 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \true, 'byRef' => $self->semStack[$stackPos - (10 - 4)], 'params' => $self->semStack[$stackPos - (10 - 6)], 'uses' => $self->semStack[$stackPos - (10 - 8)], 'returnType' => $self->semStack[$stackPos - (10 - 9)], 'stmts' => $self->semStack[$stackPos - (10 - 10)], 'attrGroups' => $self->semStack[$stackPos - (10 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + }, 513 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos - (8 - 2)], 'extends' => $self->semStack[$stackPos - (8 - 4)], 'implements' => $self->semStack[$stackPos - (8 - 5)], 'stmts' => $self->semStack[$stackPos - (8 - 7)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos - (8 - 3)]); + $self->checkClass($self->semValue[0], -1); + }, 514 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 515 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 516 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos - (2 - 2)], [], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 517 => null, 518 => null, 519 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 520 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 3)]; + }, 521 => null, 522 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 523 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 524 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos - (2 - 2)], $self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 525 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 526 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 527 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 528 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 529 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 530 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 531 => null, 532 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 533 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 534 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 535 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos - (1 - 1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 536 => null, 537 => null, 538 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 539 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 540 => null, 541 => null, 542 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 543 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + foreach ($self->semValue as $s) { + if ($s instanceof Node\InterpolatedStringPart) { + $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); + } + } + }, 544 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos - (1 - 1)] as $s) { + if ($s instanceof Node\InterpolatedStringPart) { + $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); + } + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 545 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 546 => null, 547 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 548 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 549 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 550 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 551 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 552 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 553 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 554 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 555 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 556 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 557 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 558 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos - (5 - 1)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 559 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos - (3 - 1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (3 - 3)], $self->tokenEndStack[$stackPos - (3 - 3)])), $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 560 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos - (3 - 2)], $attrs); + }, 561 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos - (4 - 3)], $attrs); + $self->createdArrays->offsetSet($self->semValue); + }, 562 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + $self->createdArrays->offsetSet($self->semValue); + }, 563 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); + }, 564 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos - (3 - 2)] as $s) { + if ($s instanceof Node\InterpolatedStringPart) { + $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); + } + } + $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos - (3 - 2)], $attrs); + }, 565 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); + }, 566 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 567 => null, 568 => null, 569 => null, 570 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 3)], $self->tokenEndStack[$stackPos - (3 - 3)]), \true); + }, 571 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos - (2 - 1)], '', $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 2)], $self->tokenEndStack[$stackPos - (2 - 2)]), \true); + }, 572 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 3)], $self->tokenEndStack[$stackPos - (3 - 3)]), \true); + }, 573 => static function ($self, $stackPos) { + $self->semValue = null; + }, 574 => null, 575 => null, 576 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 577 => null, 578 => null, 579 => null, 580 => null, 581 => null, 582 => null, 583 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 584 => null, 585 => null, 586 => null, 587 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 588 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 589 => null, 590 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 591 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 592 => static function ($self, $stackPos) { + $self->semValue = null; + }, 593 => null, 594 => null, 595 => null, 596 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 597 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 598 => null, 599 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 600 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 601 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 602 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos - (1 - 1)]->name; + $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])) : $var; + }, 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 604 => null, 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 606 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 611 => null, 612 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 613 => null, 614 => null, 615 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 616 => null, 617 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 618 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); + }, 619 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + $end = count($self->semValue) - 1; + if ($self->semValue[$end]->value instanceof Expr\Error) { + array_pop($self->semValue); + } + }, 620 => null, 621 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ + }, 622 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 623 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 624 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (1 - 1)], null, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 625 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (2 - 2)], null, \true, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 626 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (1 - 1)], null, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 627 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (3 - 3)], $self->semStack[$stackPos - (3 - 1)], \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 628 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (4 - 4)], $self->semStack[$stackPos - (4 - 1)], \true, $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 629 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (3 - 3)], $self->semStack[$stackPos - (3 - 1)], \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 630 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (2 - 2)], null, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]), \true); + }, 631 => static function ($self, $stackPos) { + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, \false, $attrs); + }, 632 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 633 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 634 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 635 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)]); + }, 636 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['rawValue'] = $self->semStack[$stackPos - (1 - 1)]; + $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos - (1 - 1)], $attrs); + }, 637 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 638 => null, 639 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 640 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 641 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 642 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 643 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 644 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (6 - 2)], $self->semStack[$stackPos - (6 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + }, 645 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 646 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 647 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 648 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 649 => null]; + } +} diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Parser/Php8.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Parser/Php8.php new file mode 100644 index 0000000..fc0abca --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Parser/Php8.php @@ -0,0 +1,1386 @@ +'", "T_IS_GREATER_OR_EQUAL", "T_PIPE", "'.'", "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_PUBLIC_SET", "T_PROTECTED_SET", "T_PRIVATE_SET", "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_PROPERTY_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", "';'", "']'", "'('", "')'", "'{'", "'}'", "'`'", "'\"'", "'\$'"); + /** + * @var mixed[] + */ + protected $tokenToSymbol = array(0, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 58, 172, 174, 173, 57, 174, 174, 167, 168, 55, 53, 9, 54, 50, 56, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 32, 165, 45, 17, 47, 31, 70, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 72, 174, 166, 37, 174, 171, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 169, 36, 170, 60, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, 41, 42, 43, 44, 46, 48, 49, 51, 52, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 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, 159, 160, 161, 162, 163, 164); + /** + * @var mixed[] + */ + protected $action = array(132, 133, 134, 582, 135, 136, 162, 779, 780, 781, 137, 41, 863, -32766, 970, 1404, -584, 974, 973, 1302, 0, 395, 396, 455, 246, 854, -32766, -32766, -32766, -32766, -32766, 440, -32766, 27, -32766, 773, 772, -32766, -32766, -32766, -32766, 508, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 131, -32766, -32766, -32766, -32766, 437, 782, 859, 1148, -32766, 949, -32766, -32766, -32766, -32766, -32766, -32766, 972, 1385, 300, 271, 53, 398, 786, 787, 788, 789, 305, 865, 441, -341, 39, 254, -584, -584, -195, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, 1062, -194, 856, 807, 808, 585, 586, 3, 831, 829, 830, 842, 826, 827, 4, 860, 587, 588, 825, 589, 590, 591, 592, 939, 593, 594, 5, 854, -32766, -32766, -32766, 828, 595, 596, -32766, 138, 764, 132, 133, 134, 582, 135, 136, 1098, 779, 780, 781, 137, 41, -32766, -32766, -32766, -32766, -32766, -32766, -275, 1302, 613, 153, 1071, 749, 990, 991, -32766, -32766, -32766, 992, -32766, 891, -32766, 892, -32766, 773, 772, -32766, 986, 1309, 397, 396, -32766, -32766, -32766, 858, 299, 630, -32766, -32766, 440, 502, 736, -32766, -32766, 437, 782, -32767, -32767, -32767, -32767, 106, 107, 108, 109, 951, -32766, 1021, 29, 734, 271, 53, 398, 786, 787, 788, 789, 144, 1071, 441, -341, 332, 38, 864, 862, -195, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, 863, -194, 139, 807, 808, 585, 586, 323, 831, 829, 830, 842, 826, 827, 1370, 148, 587, 588, 825, 589, 590, 591, 592, 245, 593, 594, 395, 396, -32766, -32766, -32766, 828, 595, 596, -85, 138, 440, 132, 133, 134, 582, 135, 136, 1095, 779, 780, 781, 137, 41, -32766, -32766, -32766, -32766, -32766, 51, 578, 1302, 257, -32766, 636, 107, 108, 109, -32766, -32766, -32766, 503, -32766, 316, -32766, -32766, -32766, 773, 772, -32766, -383, 166, -383, 1022, -32766, -32766, -32766, 305, 79, 1133, -32766, -32766, 1414, 762, 332, 1415, -32766, 437, 782, -32766, 1071, 110, 111, 112, 113, 114, -85, 283, -32766, 477, 478, 479, 271, 53, 398, 786, 787, 788, 789, 115, 407, 441, 10, -32766, 299, 1341, 306, 307, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, 320, 1068, -582, 807, 808, 585, 586, 1389, 831, 829, 830, 842, 826, 827, 329, 1388, 587, 588, 825, 589, 590, 591, 592, 86, 593, 594, 1071, 332, -32766, -32766, -32766, 828, 595, 596, 349, 151, -581, 132, 133, 134, 582, 135, 136, 1100, 779, 780, 781, 137, 41, -32766, 290, -32766, -32766, -32766, -32766, -32766, -32766, -32766, -32767, -32767, -32767, -32767, -32767, -32766, -32766, -32766, 891, 1175, 892, -582, -582, 754, 773, 772, 1159, 1160, 1161, 1155, 1154, 1153, 1162, 1156, 1157, 1158, -32766, -582, -32766, -32766, -32766, -32766, -32766, -32766, -32766, 782, -32766, -32766, -32766, -588, -78, -32766, -32766, -32766, 350, -581, -581, -32766, -32766, 271, 53, 398, 786, 787, 788, 789, 383, -32766, 441, -32766, -32766, -581, -32766, 773, 772, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, -620, 1068, -620, 807, 808, 585, 586, 389, 831, 829, 830, 842, 826, 827, 441, 405, 587, 588, 825, 589, 590, 591, 592, 333, 593, 594, 1071, 87, 88, 89, 459, 828, 595, 596, 460, 151, 803, 774, 775, 776, 777, 778, 854, 779, 780, 781, 816, 817, 40, 461, 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, 462, 283, 1329, 1159, 1160, 1161, 1155, 1154, 1153, 1162, 1156, 1157, 1158, 115, 869, 488, 489, 782, 1304, 1303, 1305, 108, 109, 1132, 154, -32766, -32766, 1134, 679, 23, 156, 783, 784, 785, 786, 787, 788, 789, 698, 699, 852, 152, 423, -580, 393, 394, 157, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 841, 820, 821, 822, 823, 811, 812, 813, 840, 814, 815, 800, 801, 802, 804, 805, 806, 845, 846, 847, 848, 849, 850, 851, 1094, -578, 863, 807, 808, 809, 810, -58, 831, 829, 830, 842, 826, 827, 399, 400, 818, 824, 825, 832, 833, 835, 834, 294, 836, 837, 158, -580, -580, 160, 294, 828, 839, 838, 54, 55, 56, 57, 534, 58, 59, 36, -110, -580, -57, 60, 61, -110, 62, -110, 670, 671, 129, 130, 312, -587, 140, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -578, -578, 141, 147, 949, 161, 712, -87, 163, 164, 165, -84, 949, -78, -73, -72, -578, 63, 64, 143, -309, -71, 65, 332, 66, 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, 739, 31, 276, 47, 457, 535, -357, 713, 740, 1335, 1336, 536, -70, 863, 1068, -69, -68, 1333, 45, 22, 537, 949, 538, -67, 539, -66, 540, 52, -65, 541, 542, 714, 715, -46, 48, 49, 463, 392, 391, 1071, 50, 543, -18, 145, 281, 1302, 381, 348, 291, 750, 1304, 1303, 1305, 1295, 939, 753, 290, 948, 545, 546, 547, 150, 939, 290, -305, 295, 288, 289, 292, 293, 549, 550, 338, 1321, 1322, 1323, 1324, 1326, 1318, 1319, 304, 1300, 296, 301, 302, 283, 1325, 1320, 773, 772, 1304, 1303, 1305, 305, 308, 309, 75, -154, -154, -154, 327, 328, 332, 966, 854, 1070, 939, 149, 115, 1416, 388, 680, -154, 708, -154, 725, -154, 13, -154, 668, 723, 313, 31, 277, 1304, 1303, 1305, 863, 390, -32766, 600, 1166, 987, 951, 863, 310, 701, 734, 1333, 990, 991, 951, -32766, 686, 544, 734, 949, 685, 606, 1340, 485, 513, 925, 986, -110, -110, -110, 35, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 702, 949, 634, 1295, 773, 772, 741, -579, 305, -614, 1334, 0, 0, 0, 951, 311, 949, 0, 734, -154, 549, 550, 319, 1321, 1322, 1323, 1324, 1326, 1318, 1319, 1209, 1211, 744, 0, 1342, 0, 1325, 1320, -544, -534, 0, -578, -32766, -4, 949, 11, 77, 751, 1302, 30, 387, 328, 332, 862, 43, -32766, -32766, -32766, -613, -32766, 939, -32766, 968, -32766, 44, 759, -32766, 1330, 773, 772, 760, -32766, -32766, -32766, -579, -579, 882, -32766, -32766, 930, 1031, 1008, 1015, -32766, 437, 1005, 939, 1016, 928, 1003, -579, 1137, 1140, 1141, 1138, -32766, 1177, 1139, 1145, 37, 874, 939, -586, 1357, 1374, 1407, -32766, 673, -578, -578, -612, -588, 1302, -587, -586, -585, 31, 276, -528, -32766, -32766, -32766, 1, -32766, -578, -32766, 78, -32766, 863, 939, -32766, 32, 1333, -278, 33, -32766, -32766, -32766, 42, 1007, 46, -32766, -32766, 734, 76, 80, 81, -32766, 437, 82, 83, 390, 84, 453, 31, 277, 85, 146, 303, -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1295, 734, 1333, 334, 369, 370, 371, 548, 986, -110, -110, -110, 951, 372, 326, 373, 734, 374, 550, 375, 1321, 1322, 1323, 1324, 1326, 1318, 1319, 376, 377, 422, 378, 21, -50, 1325, 1320, 379, 382, 454, 1295, 577, 951, 380, 384, 77, 734, -4, -276, -275, 328, 332, 15, 16, 17, 18, 20, 363, 550, 421, 1321, 1322, 1323, 1324, 1326, 1318, 1319, 142, 504, 505, 512, 515, 516, 1325, 1320, 949, 517, 518, -32766, 522, 523, 524, 531, 77, 1302, 611, 718, 1101, 328, 332, 1097, -32766, -32766, -32766, 1250, -32766, 1331, -32766, 949, -32766, 1099, 1096, -32766, 1077, 1290, 1309, 1073, -32766, -32766, -32766, -280, -32766, -102, -32766, -32766, 14, 19, 1302, 24, -32766, 437, 323, 420, 625, -32766, -32766, -32766, 631, -32766, 659, -32766, -32766, -32766, 724, 1254, -32766, -16, 1308, 1251, 1386, -32766, -32766, -32766, 735, -32766, 738, -32766, -32766, 742, 743, 1302, 745, -32766, 437, 746, 747, 748, -32766, -32766, -32766, 939, -32766, 300, -32766, -32766, -32766, 752, 1309, -32766, 764, 737, 332, 765, -32766, -32766, -32766, -253, -253, -253, -32766, -32766, 426, 390, 939, 756, -32766, 437, 926, 863, 1411, 1413, 885, 884, 990, 991, 980, 1023, -32766, 544, -252, -252, -252, 1412, 979, 977, 390, 925, 986, -110, -110, -110, 978, 981, 1283, 959, 969, 990, 991, 957, 1176, 1172, 544, 1126, -110, -110, 1013, 1014, 657, -110, 925, 986, -110, -110, -110, 1410, 2, 1368, -110, 1268, 951, 1383, 0, 0, 734, -253, 0, -32766, 0, 0, -32766, 863, 1059, 1054, 1053, 1052, 1058, 1055, 1056, 1057, 0, 0, 0, 951, 0, 0, 0, 734, -252, 305, 0, 0, 79, 0, 0, 1071, 0, 0, 332, 0, 0, 0, 0, 0, 0, 0, -110, -110, 0, 0, 0, -110, 0, 0, 0, 0, 0, 0, 0, 299, -110, 0, 0, 0, 0, 0, 0, 0, 0, -32766, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 79, 0, 0, 0, 0, 0, 332); + /** + * @var mixed[] + */ + protected $actionCheck = array(3, 4, 5, 6, 7, 8, 17, 10, 11, 12, 13, 14, 84, 76, 1, 87, 72, 74, 75, 82, 0, 108, 109, 110, 15, 82, 89, 90, 91, 10, 93, 118, 95, 103, 97, 38, 39, 100, 10, 11, 12, 104, 105, 106, 107, 10, 11, 12, 111, 112, 15, 10, 11, 12, 117, 118, 59, 82, 128, 31, 1, 33, 34, 35, 36, 37, 129, 124, 1, 31, 73, 74, 75, 76, 77, 78, 79, 164, 1, 82, 9, 153, 154, 139, 140, 9, 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, 1, 9, 82, 128, 129, 130, 131, 9, 133, 134, 135, 136, 137, 138, 9, 162, 141, 142, 143, 144, 145, 146, 147, 86, 149, 150, 9, 82, 10, 11, 12, 156, 157, 158, 118, 160, 169, 3, 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, 76, 33, 34, 35, 36, 168, 82, 83, 15, 143, 169, 119, 120, 89, 90, 91, 124, 93, 108, 95, 110, 97, 38, 39, 100, 133, 1, 108, 109, 105, 106, 107, 162, 167, 1, 111, 112, 118, 32, 169, 118, 117, 118, 59, 45, 46, 47, 48, 49, 50, 51, 52, 165, 129, 32, 9, 169, 73, 74, 75, 76, 77, 78, 79, 169, 143, 82, 168, 173, 9, 165, 161, 168, 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, 84, 168, 9, 128, 129, 130, 131, 168, 133, 134, 135, 136, 137, 138, 1, 9, 141, 142, 143, 144, 145, 146, 147, 99, 149, 150, 108, 109, 10, 11, 12, 156, 157, 158, 32, 160, 118, 3, 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, 76, 33, 34, 35, 72, 87, 82, 9, 142, 54, 50, 51, 52, 89, 90, 91, 169, 93, 9, 95, 118, 97, 38, 39, 100, 108, 15, 110, 165, 105, 106, 107, 164, 167, 165, 111, 112, 82, 169, 173, 85, 117, 118, 59, 118, 143, 53, 54, 55, 56, 57, 99, 59, 129, 134, 135, 136, 73, 74, 75, 76, 77, 78, 79, 71, 108, 82, 110, 142, 167, 152, 139, 140, 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, 9, 118, 72, 128, 129, 130, 131, 1, 133, 134, 135, 136, 137, 138, 9, 9, 141, 142, 143, 144, 145, 146, 147, 169, 149, 150, 143, 173, 10, 11, 12, 156, 157, 158, 9, 160, 72, 3, 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, 167, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 10, 11, 12, 108, 165, 110, 139, 140, 169, 38, 39, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 31, 155, 33, 34, 35, 36, 37, 38, 39, 59, 10, 11, 12, 167, 17, 10, 11, 12, 9, 139, 140, 10, 11, 73, 74, 75, 76, 77, 78, 79, 9, 31, 82, 33, 34, 155, 31, 38, 39, 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, 166, 118, 168, 128, 129, 130, 131, 9, 133, 134, 135, 136, 137, 138, 82, 9, 141, 142, 143, 144, 145, 146, 147, 72, 149, 150, 143, 10, 11, 12, 9, 156, 157, 158, 9, 160, 3, 4, 5, 6, 7, 8, 82, 10, 11, 12, 13, 14, 31, 9, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 9, 59, 1, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 71, 9, 139, 140, 59, 161, 162, 163, 51, 52, 1, 15, 53, 54, 170, 77, 78, 15, 73, 74, 75, 76, 77, 78, 79, 77, 78, 82, 103, 104, 72, 108, 109, 15, 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, 1, 72, 84, 128, 129, 130, 131, 17, 133, 134, 135, 136, 137, 138, 108, 109, 141, 142, 143, 144, 145, 146, 147, 31, 149, 150, 15, 139, 140, 15, 31, 156, 157, 158, 2, 3, 4, 5, 6, 7, 8, 15, 103, 155, 17, 13, 14, 108, 16, 110, 113, 114, 17, 17, 115, 167, 17, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 139, 140, 17, 17, 1, 17, 82, 32, 17, 17, 17, 32, 1, 32, 32, 32, 155, 53, 54, 169, 36, 32, 58, 173, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 32, 72, 73, 74, 75, 76, 170, 118, 32, 80, 81, 82, 32, 84, 118, 32, 32, 88, 89, 90, 91, 1, 93, 32, 95, 32, 97, 72, 32, 100, 101, 142, 143, 32, 105, 106, 107, 108, 109, 143, 111, 112, 32, 32, 32, 82, 117, 118, 32, 32, 161, 162, 163, 124, 86, 32, 167, 32, 129, 130, 131, 32, 86, 167, 36, 38, 36, 36, 36, 36, 141, 142, 36, 144, 145, 146, 147, 148, 149, 150, 151, 118, 38, 38, 38, 59, 157, 158, 38, 39, 161, 162, 163, 164, 139, 140, 167, 77, 78, 79, 171, 172, 173, 39, 82, 142, 86, 72, 71, 85, 155, 92, 92, 79, 94, 94, 96, 99, 98, 115, 82, 116, 72, 73, 161, 162, 163, 84, 108, 87, 91, 84, 133, 165, 84, 137, 96, 169, 88, 119, 120, 165, 142, 102, 124, 169, 1, 98, 159, 152, 99, 99, 132, 133, 134, 135, 136, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 102, 1, 159, 124, 38, 39, 32, 72, 164, 167, 172, -1, -1, -1, 165, 138, 1, -1, 169, 170, 141, 142, 137, 144, 145, 146, 147, 148, 149, 150, 61, 62, 32, -1, 152, -1, 157, 158, 155, 155, -1, 72, 76, 0, 1, 155, 167, 32, 82, 155, 155, 172, 173, 161, 165, 89, 90, 91, 167, 93, 86, 95, 160, 97, 165, 165, 100, 166, 38, 39, 165, 105, 106, 107, 139, 140, 165, 111, 112, 165, 165, 165, 165, 117, 118, 165, 86, 165, 165, 165, 155, 165, 165, 165, 165, 129, 165, 165, 165, 169, 166, 86, 167, 166, 166, 166, 76, 166, 139, 140, 167, 167, 82, 167, 167, 167, 72, 73, 167, 89, 90, 91, 167, 93, 155, 95, 160, 97, 84, 86, 100, 167, 88, 168, 167, 105, 106, 107, 167, 165, 167, 111, 112, 169, 167, 167, 167, 117, 118, 167, 167, 108, 167, 110, 72, 73, 167, 167, 115, 129, 167, 167, 119, 120, 167, 165, 84, 124, 124, 169, 88, 167, 167, 167, 167, 132, 133, 134, 135, 136, 165, 167, 169, 167, 169, 167, 142, 167, 144, 145, 146, 147, 148, 149, 150, 167, 167, 170, 167, 156, 32, 157, 158, 167, 167, 167, 124, 167, 165, 167, 169, 167, 169, 170, 168, 168, 172, 173, 168, 168, 168, 168, 168, 168, 142, 168, 144, 145, 146, 147, 148, 149, 150, 32, 168, 168, 168, 168, 168, 157, 158, 1, 168, 168, 76, 168, 168, 168, 168, 167, 82, 168, 168, 168, 172, 173, 168, 89, 90, 91, 168, 93, 168, 95, 1, 97, 168, 168, 100, 168, 168, 1, 168, 105, 106, 107, 168, 76, 168, 111, 112, 168, 168, 82, 168, 117, 118, 168, 168, 168, 89, 90, 91, 168, 93, 168, 95, 129, 97, 168, 168, 100, 32, 168, 168, 168, 105, 106, 107, 169, 76, 169, 111, 112, 169, 169, 82, 169, 117, 118, 169, 169, 169, 89, 90, 91, 86, 93, 31, 95, 129, 97, 169, 1, 100, 169, 169, 173, 169, 105, 106, 107, 102, 103, 104, 111, 112, 170, 108, 86, 170, 117, 118, 170, 84, 170, 170, 170, 170, 119, 120, 170, 170, 129, 124, 102, 103, 104, 170, 170, 170, 108, 132, 133, 134, 135, 136, 170, 170, 170, 170, 170, 119, 120, 170, 170, 170, 124, 170, 119, 120, 170, 170, 170, 124, 132, 133, 134, 135, 136, 170, 167, 170, 133, 171, 165, 170, -1, -1, 169, 170, -1, 142, -1, -1, 118, 84, 120, 121, 122, 123, 124, 125, 126, 127, -1, -1, -1, 165, -1, -1, -1, 169, 170, 164, -1, -1, 167, -1, -1, 143, -1, -1, 173, -1, -1, -1, -1, -1, -1, -1, 119, 120, -1, -1, -1, 124, -1, -1, -1, -1, -1, -1, -1, 167, 133, -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, -1, -1, 167, -1, -1, -1, -1, -1, 173); + /** + * @var mixed[] + */ + protected $actionBase = array(0, 156, -3, 315, 474, 474, 880, 1074, 1271, 1294, 749, 675, 531, 559, 836, 1031, 1031, 1046, 1031, 828, 1005, 42, 59, 59, 59, 963, 898, 632, 632, 898, 632, 997, 997, 997, 997, 1061, 1061, -63, -63, 96, 1232, 1199, 255, 255, 255, 255, 255, 1265, 255, 255, 255, 255, 255, 1265, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 77, 194, 120, 205, 1197, 783, 1150, 1163, 1152, 1166, 1145, 1144, 1151, 1156, 1167, 1261, 1263, 889, 1254, 1267, 1158, 972, 1147, 1162, 962, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 19, 35, 535, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 529, 529, 529, 910, 910, 524, 299, 1113, 1075, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 140, 28, 1000, 493, 493, 458, 458, 458, 458, 458, 696, 1328, 1301, 171, 171, 171, 171, 1363, 1363, -70, 523, 248, 756, 291, 197, -87, 644, 38, 199, 323, 323, 482, 482, 233, 233, 482, 482, 482, 324, 324, 94, 94, 94, 94, 82, 249, 860, 67, 67, 67, 67, 860, 860, 860, 860, 913, 869, 860, 1036, 1049, 860, 860, 370, 645, 966, 646, 646, 398, -72, -72, 398, 64, -72, 294, 286, 257, 859, 91, 433, 257, 1073, 404, 686, 686, 815, 686, 686, 686, 923, 610, 923, 1141, 902, 902, 861, 807, 964, 1198, 1168, 901, 1252, 929, 1253, 1200, 342, 251, -56, 263, 550, 806, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1195, 523, 1141, -25, 1247, 1249, 1195, 1195, 1195, 523, 523, 523, 523, 523, 523, 523, 523, 870, 523, 523, 694, -25, 625, 635, -25, 896, 523, 915, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 178, 77, 77, 194, 13, 13, 77, 200, 121, 13, 13, 13, -11, 13, 77, 77, 77, 610, 886, 849, 663, 283, 874, 114, 886, 886, 886, 71, 9, 76, 809, 888, 288, 882, 882, 882, 907, 986, 986, 882, 903, 882, 907, 882, 882, 986, 986, 875, 986, 274, 620, 465, 597, 624, 986, 340, 882, 882, 882, 882, 916, 986, 127, 139, 639, 882, 329, 287, 882, 882, 916, 858, 876, 908, 986, 986, 986, 916, 545, 908, 908, 908, 931, 936, 864, 872, 445, 431, 679, 232, 924, 872, 872, 882, 605, 864, 872, 864, 872, 933, 872, 872, 872, 864, 872, 903, 533, 872, 813, 665, 218, 872, 882, 20, 1008, 1009, 800, 1010, 1002, 1013, 1069, 1014, 1016, 1171, 982, 1028, 1004, 1020, 1071, 998, 995, 885, 792, 793, 921, 914, 979, 897, 897, 897, 975, 977, 897, 897, 897, 897, 897, 897, 897, 897, 792, 932, 926, 899, 1037, 796, 810, 1114, 857, 1214, 1264, 1036, 1008, 1016, 804, 1004, 1020, 998, 995, 856, 853, 844, 851, 843, 840, 808, 814, 871, 1116, 1119, 1021, 920, 811, 1085, 1038, 1211, 1044, 1045, 1047, 1088, 1123, 942, 1125, 1216, 895, 1217, 1218, 965, 1051, 1173, 897, 974, 873, 968, 1049, 978, 792, 969, 1129, 1130, 1081, 961, 1097, 1098, 1072, 911, 884, 970, 1219, 1059, 1060, 1062, 1176, 1177, 930, 1082, 996, 1099, 912, 1058, 1100, 1101, 1105, 1106, 1179, 1222, 1182, 922, 1183, 945, 879, 1077, 909, 1223, 165, 892, 893, 906, 1068, 683, 1035, 1184, 1208, 1229, 1108, 1109, 1110, 1230, 1231, 1024, 946, 1083, 900, 1084, 1078, 947, 948, 689, 905, 1132, 890, 891, 904, 705, 768, 1238, 1239, 1240, 1025, 877, 894, 951, 953, 1133, 887, 1135, 1241, 771, 954, 1242, 1115, 816, 817, 521, 784, 747, 818, 881, 1194, 925, 865, 878, 1067, 817, 883, 955, 1245, 957, 958, 959, 1111, 960, 1086, 1246, 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, 0, 0, 0, 0, 0, 789, 789, 789, 789, 789, 789, 789, 789, 789, 632, 632, 632, 632, 789, 789, 789, 789, 789, 789, 789, 632, 789, 789, 789, 632, 632, 0, 0, 632, 0, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 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, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 823, 823, 616, 616, 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, 616, 616, 0, 616, 616, 616, 616, 616, 616, 616, 875, 823, 823, 324, 324, 324, 324, 823, 823, 396, 396, 396, 823, 324, 823, 64, 324, 823, 64, 823, 823, 823, 823, 823, 823, 823, 823, 823, 0, 0, 823, 823, 823, 823, -25, -72, 823, 903, 903, 903, 903, 823, 823, 823, 823, -72, -72, 823, -57, -57, 823, 823, 0, 0, 0, 324, 324, -25, 0, 0, -25, 0, 0, 903, 903, 823, 64, 875, 446, 823, 342, 0, 0, 0, 0, 0, 0, 0, -25, 903, -25, 523, -72, -72, 523, 523, 13, 77, 446, 612, 612, 612, 612, 77, 0, 0, 0, 0, 0, 610, 875, 875, 875, 875, 875, 875, 875, 875, 875, 875, 875, 875, 903, 0, 875, 0, 875, 875, 903, 903, 903, 0, 0, 0, 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, 0, 0, 0, 903, 0, 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 903, 0, 0, 0, 0, 0, 0, 0, 0, 0, 897, 911, 0, 0, 911, 0, 897, 897, 897, 0, 0, 0, 905, 887); + /** + * @var mixed[] + */ + protected $actionDefault = array(3, 32767, 32767, 32767, 102, 102, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 100, 32767, 632, 632, 632, 632, 32767, 32767, 257, 102, 32767, 32767, 503, 417, 417, 417, 32767, 32767, 32767, 576, 576, 576, 576, 576, 17, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 503, 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, 36, 7, 8, 10, 11, 49, 338, 100, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 102, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 404, 625, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 497, 507, 485, 486, 488, 489, 416, 577, 631, 344, 628, 342, 415, 146, 354, 343, 245, 261, 508, 262, 509, 512, 513, 218, 401, 150, 151, 448, 504, 450, 502, 506, 449, 422, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 420, 421, 505, 482, 481, 480, 32767, 32767, 446, 447, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 102, 32767, 451, 454, 419, 452, 453, 470, 471, 468, 469, 472, 32767, 323, 32767, 473, 474, 475, 476, 32767, 32767, 382, 196, 380, 32767, 477, 32767, 111, 455, 323, 111, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 461, 462, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 102, 32767, 32767, 32767, 100, 520, 570, 479, 456, 457, 32767, 545, 32767, 102, 32767, 547, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 572, 443, 445, 540, 626, 423, 629, 32767, 533, 100, 196, 32767, 546, 196, 196, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 571, 32767, 639, 533, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 32767, 196, 110, 32767, 110, 110, 32767, 32767, 100, 196, 196, 196, 196, 196, 196, 196, 196, 548, 196, 196, 191, 32767, 271, 273, 102, 594, 196, 550, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 404, 32767, 32767, 32767, 32767, 533, 466, 139, 32767, 535, 139, 578, 458, 459, 460, 578, 578, 578, 319, 296, 32767, 32767, 32767, 32767, 32767, 548, 548, 100, 100, 100, 100, 32767, 32767, 32767, 32767, 111, 519, 99, 99, 99, 99, 99, 103, 101, 32767, 32767, 32767, 32767, 226, 32767, 101, 101, 99, 32767, 101, 101, 32767, 32767, 226, 228, 215, 230, 32767, 598, 599, 226, 101, 230, 230, 230, 250, 250, 522, 325, 101, 99, 101, 101, 198, 325, 325, 32767, 101, 522, 325, 522, 325, 200, 325, 325, 325, 522, 325, 32767, 101, 325, 217, 99, 99, 325, 32767, 32767, 32767, 32767, 535, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 225, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 565, 32767, 583, 596, 464, 465, 467, 582, 580, 490, 491, 492, 493, 494, 495, 496, 499, 627, 32767, 539, 32767, 32767, 32767, 353, 32767, 637, 32767, 32767, 32767, 9, 74, 528, 42, 43, 51, 57, 554, 555, 556, 557, 551, 552, 558, 553, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 638, 32767, 578, 32767, 32767, 32767, 32767, 463, 560, 604, 32767, 32767, 579, 630, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 139, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 565, 32767, 137, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 561, 32767, 32767, 32767, 578, 32767, 32767, 32767, 32767, 321, 318, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 578, 32767, 32767, 32767, 32767, 32767, 298, 32767, 315, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 400, 535, 301, 303, 304, 32767, 32767, 32767, 32767, 376, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 153, 153, 3, 3, 356, 153, 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, 250, 153, 368, 153, 402, 402, 411); + /** + * @var mixed[] + */ + protected $goto = array(201, 169, 201, 201, 201, 1069, 598, 719, 448, 684, 644, 681, 443, 345, 341, 342, 344, 615, 447, 346, 449, 661, 481, 728, 570, 570, 570, 570, 1245, 626, 172, 172, 172, 172, 225, 202, 198, 198, 182, 184, 220, 198, 198, 198, 198, 198, 1195, 199, 199, 199, 199, 199, 1195, 192, 193, 194, 195, 196, 197, 222, 220, 223, 557, 558, 438, 559, 562, 563, 564, 565, 566, 567, 568, 569, 173, 174, 175, 200, 176, 177, 178, 170, 179, 180, 181, 183, 219, 221, 224, 242, 247, 248, 259, 260, 262, 263, 264, 265, 266, 267, 268, 272, 273, 274, 275, 282, 285, 297, 298, 324, 325, 444, 445, 446, 620, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 193, 194, 195, 196, 197, 222, 203, 204, 205, 206, 243, 185, 186, 207, 187, 208, 204, 188, 244, 203, 168, 209, 210, 189, 211, 212, 213, 190, 214, 215, 171, 216, 217, 218, 191, 287, 284, 287, 287, 883, 255, 255, 255, 255, 255, 1125, 605, 487, 487, 622, 758, 660, 662, 1103, 359, 682, 487, 1075, 1074, 706, 709, 1041, 717, 726, 1037, 733, 922, 879, 922, 922, 253, 253, 253, 253, 250, 256, 646, 646, 1078, 1079, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 880, 351, 938, 933, 934, 947, 889, 935, 886, 936, 937, 887, 890, 476, 941, 894, 476, 1044, 1044, 893, 364, 364, 364, 364, 352, 351, 532, 1131, 1127, 1128, 1351, 1351, 331, 315, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1069, 1301, 1072, 1072, 704, 983, 1301, 1301, 1064, 1080, 1081, 1069, 942, 1301, 943, 458, 1069, 881, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 897, 855, 1069, 1069, 1069, 1069, 677, 678, 1301, 695, 696, 697, 1006, 1301, 1301, 1301, 1301, 450, 909, 1301, 436, 896, 1301, 1301, 1382, 1382, 1382, 1382, 915, 581, 574, 499, 612, 450, 367, 971, 971, 955, 501, 1076, 1076, 956, 1400, 1400, 367, 367, 688, 1087, 1083, 1084, 572, 411, 414, 623, 627, 572, 572, 367, 367, 1400, 357, 367, 572, 1417, 1377, 1378, 317, 574, 581, 607, 608, 318, 618, 624, 1390, 640, 641, 1027, 576, 1403, 1403, 367, 367, 28, 474, 520, 442, 521, 635, 1000, 1000, 1000, 1000, 527, 409, 474, 1348, 1348, 994, 1001, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 633, 647, 650, 651, 652, 653, 674, 675, 676, 730, 732, 561, 561, 258, 258, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 610, 1362, 467, 683, 467, 876, 616, 638, 876, 467, 467, 1191, 861, 1373, 360, 361, 1093, 456, 1373, 1373, 560, 560, 705, 432, 560, 1373, 560, 560, 560, 560, 560, 560, 560, 560, 1277, 975, 575, 602, 575, 1278, 1281, 976, 575, 1282, 602, 689, 412, 480, 1384, 1384, 1384, 1384, 347, 873, 716, 576, 861, 876, 861, 490, 619, 491, 492, 639, 8, 857, 9, 902, 907, 989, 716, 1408, 1409, 716, 1369, 418, 1296, 278, 899, 330, 1174, 424, 425, 1292, 330, 330, 693, 1049, 694, 1114, 429, 430, 431, 761, 707, 1060, 905, 433, 1102, 1104, 1107, 355, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 419, 339, 467, 911, 467, 467, 1294, 628, 629, 1116, 497, 960, 1181, 621, 1144, 1371, 1371, 1116, 1118, 1297, 1298, 1011, 1284, 1046, 1151, 1179, 1152, 731, 871, 528, 722, 901, 1142, 687, 1025, 1284, 496, 1375, 1376, 895, 910, 898, 1113, 1117, 998, 427, 727, 1165, 1299, 1359, 1360, 1291, 1030, 386, 1009, 1002, 0, 757, 0, 0, 573, 1039, 1034, 654, 656, 658, 0, 0, 0, 0, 0, 0, 0, 0, 876, 0, 0, 999, 0, 766, 766, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 914); + /** + * @var mixed[] + */ + protected $gotoCheck = array(42, 42, 42, 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 159, 9, 107, 107, 107, 107, 159, 107, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 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, 5, 5, 5, 5, 5, 15, 48, 157, 157, 134, 48, 48, 48, 131, 97, 48, 157, 119, 119, 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 108, 108, 120, 120, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 26, 177, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 83, 15, 15, 83, 107, 107, 15, 24, 24, 24, 24, 177, 177, 76, 15, 15, 15, 179, 179, 178, 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 73, 73, 89, 89, 89, 89, 73, 73, 89, 89, 89, 73, 65, 73, 65, 83, 73, 27, 73, 73, 73, 73, 73, 73, 73, 73, 73, 35, 6, 73, 73, 73, 73, 86, 86, 73, 86, 86, 86, 49, 73, 73, 73, 73, 118, 35, 73, 43, 35, 73, 73, 9, 9, 9, 9, 45, 76, 76, 84, 181, 118, 14, 9, 9, 73, 84, 118, 118, 73, 191, 191, 14, 14, 118, 118, 118, 118, 19, 59, 59, 59, 59, 19, 19, 14, 14, 191, 188, 14, 19, 14, 187, 187, 76, 76, 76, 76, 76, 76, 76, 76, 190, 76, 76, 103, 14, 191, 191, 14, 14, 76, 19, 163, 13, 163, 13, 19, 19, 19, 19, 163, 62, 19, 180, 180, 19, 19, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 182, 182, 5, 5, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 104, 14, 23, 64, 23, 22, 2, 2, 22, 23, 23, 158, 12, 134, 97, 97, 115, 113, 134, 134, 165, 165, 117, 14, 165, 134, 165, 165, 165, 165, 165, 165, 165, 165, 79, 79, 9, 9, 9, 79, 79, 79, 9, 79, 9, 121, 9, 9, 134, 134, 134, 134, 29, 18, 7, 14, 12, 22, 12, 9, 9, 9, 9, 80, 46, 7, 46, 39, 9, 92, 7, 9, 9, 7, 134, 28, 20, 24, 37, 24, 156, 82, 82, 169, 24, 24, 82, 110, 82, 133, 82, 82, 82, 99, 82, 114, 9, 82, 130, 130, 130, 82, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 31, 9, 23, 41, 23, 23, 14, 17, 17, 134, 160, 17, 17, 8, 8, 134, 134, 134, 136, 20, 20, 96, 20, 17, 149, 149, 149, 8, 20, 8, 8, 17, 8, 17, 17, 20, 185, 185, 185, 17, 16, 16, 16, 16, 93, 93, 93, 152, 20, 20, 20, 17, 50, 141, 16, 50, -1, 50, -1, -1, 50, 50, 50, 85, 85, 85, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, 16, -1, 24, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, 16); + /** + * @var mixed[] + */ + protected $gotoBase = array(0, 0, -303, 0, 0, 170, 280, 471, 543, 10, 0, 0, 136, 31, 22, -186, 111, 66, 164, 71, 95, 0, 148, 160, 235, 191, 214, 275, 155, 176, 0, 86, 0, 0, 0, -92, 0, 156, 0, 165, 0, 85, -1, 286, 0, 291, -270, 0, -558, 284, 579, 0, 0, 0, 0, 0, -33, 0, 0, 294, 0, 0, 341, 0, 184, 261, -237, 0, 0, 0, 0, 0, 0, -5, 0, 0, -32, 0, 0, 37, 172, 32, -3, -50, -167, 105, -444, 0, 0, -21, 0, 0, 161, 274, 0, 0, 101, -318, 0, 97, 0, 0, 0, 331, 381, 0, 0, -7, -38, 0, 131, 0, 0, 158, 90, 162, 0, 159, 39, -100, -83, 173, 0, 0, 0, 0, 0, 4, 0, 0, 522, 182, 0, 127, 169, 0, 99, 0, 0, 0, 0, -171, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 126, 0, 0, 0, 144, 141, 188, -255, 93, 0, 0, -138, 0, 202, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, -82, -74, 6, 143, 292, 168, 0, 0, 270, 0, -31, 319, 0, 332, 20, 0, 0); + /** + * @var mixed[] + */ + protected $gotoDefault = array(-32768, 533, 768, 7, 769, 964, 844, 853, 597, 551, 729, 356, 648, 439, 1367, 940, 1180, 617, 872, 1310, 1316, 475, 875, 336, 755, 952, 923, 924, 415, 402, 888, 413, 672, 649, 514, 908, 471, 900, 506, 903, 470, 912, 167, 435, 530, 916, 6, 919, 579, 950, 1004, 403, 927, 404, 700, 929, 601, 931, 932, 410, 416, 417, 1185, 609, 645, 944, 261, 603, 945, 401, 946, 954, 406, 408, 710, 486, 525, 519, 428, 1146, 604, 632, 669, 464, 493, 643, 655, 642, 500, 451, 434, 335, 988, 996, 507, 484, 1010, 358, 1018, 763, 1193, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, 1048, 270, 1051, 510, 1061, 26, 690, 1066, 1067, 691, 665, 1089, 666, 692, 667, 1091, 483, 599, 1194, 482, 1106, 1112, 472, 1115, 1356, 473, 1119, 269, 1122, 286, 362, 385, 452, 1129, 1130, 12, 1136, 720, 721, 25, 280, 529, 1164, 711, 1170, 279, 1173, 469, 1192, 468, 1265, 1267, 580, 511, 1285, 321, 1288, 703, 526, 1293, 465, 1358, 466, 554, 494, 343, 555, 1401, 314, 365, 340, 571, 322, 366, 556, 495, 1364, 1372, 337, 34, 1391, 1402, 614, 637); + /** + * @var mixed[] + */ + 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, 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, 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, 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, 50, 69, 69, 72, 72, 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, 138, 138, 138, 138, 138, 138, 144, 144, 145, 145, 146, 146, 146, 146, 146, 147, 148, 148, 143, 143, 139, 139, 142, 142, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 140, 151, 151, 153, 152, 152, 141, 141, 114, 114, 154, 154, 156, 156, 156, 155, 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, 191, 191, 191, 191, 191, 191, 193, 193, 193, 193); + /** + * @var mixed[] + */ + 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, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 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, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, 1, 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, 1, 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, 5, 6, 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, 1, 1, 1, 2, 1, 3, 1, 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, 4, 1, 1, 2, 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, 3, 5, 4, 3, 4, 4, 2, 2, 4, 2, 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, 2, 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, 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() : void + { + $this->reduceCallbacks = [0 => null, 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos - (1 - 1)]); + }, 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (2 - 2)] !== null) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + } + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 3 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos); + if ($nop !== null) { + $self->semStack[$stackPos - (1 - 1)][] = $nop; + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 5 => null, 6 => null, 7 => null, 8 => null, 9 => null, 10 => null, 11 => null, 12 => null, 13 => null, 14 => null, 15 => null, 16 => null, 17 => null, 18 => null, 19 => null, 20 => null, 21 => null, 22 => null, 23 => null, 24 => null, 25 => null, 26 => null, 27 => null, 28 => null, 29 => null, 30 => null, 31 => null, 32 => null, 33 => null, 34 => null, 35 => null, 36 => null, 37 => null, 38 => null, 39 => null, 40 => null, 41 => null, 42 => null, 43 => null, 44 => null, 45 => null, 46 => null, 47 => null, 48 => null, 49 => null, 50 => null, 51 => null, 52 => null, 53 => null, 54 => null, 55 => null, 56 => null, 57 => null, 58 => null, 59 => null, 60 => null, 61 => null, 62 => null, 63 => null, 64 => null, 65 => null, 66 => null, 67 => null, 68 => null, 69 => null, 70 => null, 71 => null, 72 => null, 73 => null, 74 => null, 75 => null, 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]))); + } + }, 77 => null, 78 => null, 79 => null, 80 => null, 81 => null, 82 => null, 83 => null, 84 => null, 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 94 => null, 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 97 => static function ($self, $stackPos) { + /* nothing */ + }, 98 => static function ($self, $stackPos) { + /* nothing */ + }, 99 => static function ($self, $stackPos) { + /* nothing */ + }, 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]))); + }, 101 => null, 102 => null, 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos - (1 - 1)], [], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos - (4 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 110 => static function ($self, $stackPos) { + $self->semValue = []; + }, 111 => null, 112 => null, 113 => null, 114 => null, 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos - (3 - 2)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); + }, 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos - (5 - 2)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos - (3 - 2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 121 => null, 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), []); + }, 123 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (4 - 1)]); + $self->checkConstantAttributes($self->semValue); + }, 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; + }, 125 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; + }, 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos - (8 - 3)], $self->semStack[$stackPos - (8 - 6)], $self->semStack[$stackPos - (8 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 127 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos - (7 - 2)], $self->semStack[$stackPos - (7 - 5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 128 => null, 129 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 130 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 131 => null, 132 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 133 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 134 => null, 135 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 136 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (1 - 1)); + }, 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (3 - 3)); + }, 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (1 - 1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (1 - 1)); + }, 140 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkUseUse($self->semValue, $stackPos - (3 - 3)); + }, 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + $self->semValue->type = Stmt\Use_::TYPE_NORMAL; + }, 142 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue->type = $self->semStack[$stackPos - (2 - 1)]; + }, 143 => null, 144 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 145 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 146 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 147 => null, 148 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 149 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos - (3 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos - (3 - 1)])), $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 151 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos - (3 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos - (3 - 1)])), $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 152 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (2 - 2)] !== null) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + } + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 153 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 154 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos); + if ($nop !== null) { + $self->semStack[$stackPos - (1 - 1)][] = $nop; + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 155 => null, 156 => null, 157 => null, 158 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos - (7 - 3)], ['stmts' => $self->semStack[$stackPos - (7 - 5)], 'elseifs' => $self->semStack[$stackPos - (7 - 6)], 'else' => $self->semStack[$stackPos - (7 - 7)]], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos - (10 - 3)], ['stmts' => $self->semStack[$stackPos - (10 - 6)], 'elseifs' => $self->semStack[$stackPos - (10 - 7)], 'else' => $self->semStack[$stackPos - (10 - 8)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + }, 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos - (7 - 5)], $self->semStack[$stackPos - (7 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos - (9 - 3)], 'cond' => $self->semStack[$stackPos - (9 - 5)], 'loop' => $self->semStack[$stackPos - (9 - 7)], 'stmts' => $self->semStack[$stackPos - (9 - 9)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 171 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 172 => static function ($self, $stackPos) { + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos - (1 - 1))); + }, 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos - (5 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos - (7 - 5)][1], 'stmts' => $self->semStack[$stackPos - (7 - 7)]], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos - (9 - 3)], $self->semStack[$stackPos - (9 - 7)][0], ['keyVar' => $self->semStack[$stackPos - (9 - 5)], 'byRef' => $self->semStack[$stackPos - (9 - 7)][1], 'stmts' => $self->semStack[$stackPos - (9 - 9)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos - (6 - 3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (6 - 4)], $self->tokenEndStack[$stackPos - (6 - 4)])), ['stmts' => $self->semStack[$stackPos - (6 - 6)]], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + }, 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos - (6 - 3)], $self->semStack[$stackPos - (6 - 5)], $self->semStack[$stackPos - (6 - 6)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkTryCatch($self->semValue); + }, 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 181 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 182 => static function ($self, $stackPos) { + $self->semValue = null; + /* means: no statement */ + }, 183 => null, 184 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]); + }, 185 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (1 - 1)] instanceof Stmt\Block) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]->stmts; + } else { + if ($self->semStack[$stackPos - (1 - 1)] === null) { + $self->semValue = []; + } else { + $self->semValue = [$self->semStack[$stackPos - (1 - 1)]]; + } + } + }, 186 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 187 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 188 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 189 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 190 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos - (8 - 3)], $self->semStack[$stackPos - (8 - 4)], $self->semStack[$stackPos - (8 - 7)], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 191 => static function ($self, $stackPos) { + $self->semValue = null; + }, 192 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 193 => null, 194 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 195 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 196 => static function ($self, $stackPos) { + $self->semValue = \false; + }, 197 => static function ($self, $stackPos) { + $self->semValue = \true; + }, 198 => static function ($self, $stackPos) { + $self->semValue = \false; + }, 199 => static function ($self, $stackPos) { + $self->semValue = \true; + }, 200 => static function ($self, $stackPos) { + $self->semValue = \false; + }, 201 => static function ($self, $stackPos) { + $self->semValue = \true; + }, 202 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 203 => static function ($self, $stackPos) { + $self->semValue = []; + }, 204 => null, 205 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 206 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 207 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos - (8 - 3)], ['byRef' => $self->semStack[$stackPos - (8 - 2)], 'params' => $self->semStack[$stackPos - (8 - 5)], 'returnType' => $self->semStack[$stackPos - (8 - 7)], 'stmts' => $self->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos - (9 - 4)], ['byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 6)], 'returnType' => $self->semStack[$stackPos - (9 - 8)], 'stmts' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => $self->semStack[$stackPos - (9 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos - (7 - 2)], ['type' => $self->semStack[$stackPos - (7 - 1)], 'extends' => $self->semStack[$stackPos - (7 - 3)], 'implements' => $self->semStack[$stackPos - (7 - 4)], 'stmts' => $self->semStack[$stackPos - (7 - 6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos - (7 - 2)); + }, 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos - (8 - 3)], ['type' => $self->semStack[$stackPos - (8 - 2)], 'extends' => $self->semStack[$stackPos - (8 - 4)], 'implements' => $self->semStack[$stackPos - (8 - 5)], 'stmts' => $self->semStack[$stackPos - (8 - 7)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos - (8 - 3)); + }, 212 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos - (7 - 3)], ['extends' => $self->semStack[$stackPos - (7 - 4)], 'stmts' => $self->semStack[$stackPos - (7 - 6)], 'attrGroups' => $self->semStack[$stackPos - (7 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos - (7 - 3)); + }, 213 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos - (6 - 3)], ['stmts' => $self->semStack[$stackPos - (6 - 5)], 'attrGroups' => $self->semStack[$stackPos - (6 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + }, 214 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos - (8 - 3)], ['scalarType' => $self->semStack[$stackPos - (8 - 4)], 'implements' => $self->semStack[$stackPos - (8 - 5)], 'stmts' => $self->semStack[$stackPos - (8 - 7)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos - (8 - 3)); + }, 215 => static function ($self, $stackPos) { + $self->semValue = null; + }, 216 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 217 => static function ($self, $stackPos) { + $self->semValue = null; + }, 218 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 219 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 220 => null, 221 => null, 222 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 223 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, 224 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, 225 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, 226 => static function ($self, $stackPos) { + $self->semValue = null; + }, 227 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 228 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 229 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 230 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 231 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 232 => null, 233 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 234 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 235 => null, 236 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 237 => null, 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 239 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (1 - 1)] instanceof Stmt\Block) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]->stmts; + } else { + if ($self->semStack[$stackPos - (1 - 1)] === null) { + $self->semValue = []; + } else { + $self->semValue = [$self->semStack[$stackPos - (1 - 1)]]; + } + } + }, 240 => static function ($self, $stackPos) { + $self->semValue = null; + }, 241 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 242 => null, 243 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 244 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 245 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 247 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 3)]; + }, 248 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 249 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (5 - 3)]; + }, 250 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 251 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 252 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos - (4 - 2)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 253 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 254 => null, 255 => null, 256 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 6)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos])); + }, 257 => static function ($self, $stackPos) { + $self->semValue = []; + }, 258 => null, 259 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 260 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 261 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 262 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 263 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 264 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 265 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 268 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 269 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 270 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos - (6 - 3)], $self->semStack[$stackPos - (6 - 6)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + $self->fixupAlternativeElse($self->semValue); + }, 271 => static function ($self, $stackPos) { + $self->semValue = null; + }, 272 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 273 => static function ($self, $stackPos) { + $self->semValue = null; + }, 274 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->fixupAlternativeElse($self->semValue); + }, 275 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)], \false); + }, 276 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (2 - 2)], \true); + }, 277 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)], \false); + }, 278 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos - (1 - 1)]), \false); + }, 279 => null, 280 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 281 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 282 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 283 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 284 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, 286 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, 287 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, 288 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, 289 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, 290 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, 291 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, 292 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, 293 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos - (7 - 6)], null, $self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 4)], $self->semStack[$stackPos - (7 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (7 - 2)], $self->semStack[$stackPos - (7 - 1)], $self->semStack[$stackPos - (7 - 7)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos - (9 - 6)], $self->semStack[$stackPos - (9 - 8)], $self->semStack[$stackPos - (9 - 3)], $self->semStack[$stackPos - (9 - 4)], $self->semStack[$stackPos - (9 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (9 - 2)], $self->semStack[$stackPos - (9 - 1)], $self->semStack[$stackPos - (9 - 9)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, 295 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos - (6 - 3)], $self->semStack[$stackPos - (6 - 4)], $self->semStack[$stackPos - (6 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (6 - 2)], $self->semStack[$stackPos - (6 - 1)]); + }, 296 => null, 297 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 298 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 299 => null, 300 => null, 301 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 302 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos - (1 - 1)]); + }, 303 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 304 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 305 => null, 306 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 307 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 308 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 309 => null, 310 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 311 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 312 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 313 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 314 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 315 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 316 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 317 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 318 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 319 => null, 320 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 321 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 322 => null, 323 => static function ($self, $stackPos) { + $self->semValue = null; + }, 324 => null, 325 => static function ($self, $stackPos) { + $self->semValue = null; + }, 326 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (2 - 2)]; + }, 327 => static function ($self, $stackPos) { + $self->semValue = null; + }, 328 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 329 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 330 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 2)]); + }, 331 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 332 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 2)]; + }, 333 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos - (4 - 2)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]))); + }, 334 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 2)]); + }, 335 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos - (3 - 1)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos - (3 - 1)])), $self->semStack[$stackPos - (3 - 3)]); + }, 336 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 337 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 338 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 339 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 340 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 341 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (2 - 2)], \true, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 342 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (2 - 2)], \false, \true, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 343 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (3 - 3)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (3 - 1)]); + }, 344 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos - (1 - 1)], \false, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 345 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 346 => null, 347 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 348 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 349 => null, 350 => null, 351 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 352 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 353 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos - (1 - 1)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 354 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 355 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos - (2 - 2)] !== null) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + } else { + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + } + }, 356 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 357 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos); + if ($nop !== null) { + $self->semStack[$stackPos - (1 - 1)][] = $nop; + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos - (5 - 2)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 1)]); + }, 359 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos - (7 - 2)], $self->semStack[$stackPos - (7 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (7 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (7 - 3)], $self->semStack[$stackPos - (7 - 1)], $self->semStack[$stackPos - (7 - 6)]); + $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos - (7 - 5)); + $self->checkEmptyPropertyHookList($self->semStack[$stackPos - (7 - 6)], $stackPos - (7 - 5)); + $self->addPropertyNameToHooks($self->semValue); + }, 360 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos - (5 - 4)], $self->semStack[$stackPos - (5 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (5 - 1)]); + $self->checkClassConst($self->semValue, $stackPos - (5 - 2)); + }, 361 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos - (6 - 5)], $self->semStack[$stackPos - (6 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos - (6 - 1)], $self->semStack[$stackPos - (6 - 4)]); + $self->checkClassConst($self->semValue, $stackPos - (6 - 2)); + }, 362 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos - (10 - 5)], ['type' => $self->semStack[$stackPos - (10 - 2)], 'byRef' => $self->semStack[$stackPos - (10 - 4)], 'params' => $self->semStack[$stackPos - (10 - 7)], 'returnType' => $self->semStack[$stackPos - (10 - 9)], 'stmts' => $self->semStack[$stackPos - (10 - 10)], 'attrGroups' => $self->semStack[$stackPos - (10 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos - (10 - 2)); + }, 363 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 364 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 4)], $self->semStack[$stackPos - (5 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 365 => static function ($self, $stackPos) { + $self->semValue = null; + /* will be skipped */ + }, 366 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 367 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 368 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 369 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 370 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 371 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (5 - 1)][0], $self->semStack[$stackPos - (5 - 1)][1], $self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 372 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], $self->semStack[$stackPos - (4 - 3)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 373 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], null, $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 374 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos - (4 - 1)][0], $self->semStack[$stackPos - (4 - 1)][1], null, $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 375 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)]); + }, 376 => null, 377 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos - (1 - 1)]); + }, 378 => static function ($self, $stackPos) { + $self->semValue = null; + }, 379 => null, 380 => null, 381 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 382 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 383 => null, 384 => null, 385 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 386 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, 387 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, 388 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, 389 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, 390 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, 391 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, 392 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; + }, 393 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, 394 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, 395 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, 396 => null, 397 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 398 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 399 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 400 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos - (1 - 1)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 401 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 402 => static function ($self, $stackPos) { + $self->semValue = []; + }, 403 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 404 => static function ($self, $stackPos) { + $self->semValue = []; + }, 405 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + $self->checkEmptyPropertyHookList($self->semStack[$stackPos - (3 - 2)], $stackPos - (3 - 1)); + }, 406 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos - (5 - 4)], $self->semStack[$stackPos - (5 - 5)], ['flags' => $self->semStack[$stackPos - (5 - 2)], 'byRef' => $self->semStack[$stackPos - (5 - 3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos - (5 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, null); + }, 407 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos - (8 - 4)], $self->semStack[$stackPos - (8 - 8)], ['flags' => $self->semStack[$stackPos - (8 - 2)], 'byRef' => $self->semStack[$stackPos - (8 - 3)], 'params' => $self->semStack[$stackPos - (8 - 6)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, $stackPos - (8 - 5)); + }, 408 => static function ($self, $stackPos) { + $self->semValue = null; + }, 409 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 410 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 411 => static function ($self, $stackPos) { + $self->semValue = 0; + }, 412 => static function ($self, $stackPos) { + $self->checkPropertyHookModifiers($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $stackPos - (2 - 2)); + $self->semValue = $self->semStack[$stackPos - (2 - 1)] | $self->semStack[$stackPos - (2 - 2)]; + }, 413 => null, 414 => null, 415 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 416 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 417 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 418 => null, 419 => null, 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos - (3 - 1)]), $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 423 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 424 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]))); + } + }, 425 => null, 426 => null, 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos - (2 - 1)])), $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 447 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 459 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 465 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 467 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 476 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 479 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos - (5 - 1)], $self->semStack[$stackPos - (5 - 3)], $self->semStack[$stackPos - (5 - 5)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos - (4 - 1)], null, $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 483 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 485 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 486 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 487 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 488 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 489 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos - (2 - 2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 490 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 491 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 492 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 495 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos - (2 - 1)]); + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos - (2 - 2)], $attrs); + }, 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 497 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 498 => static function ($self, $stackPos) { + $self->semValue = $self->createExitExpr($self->semStack[$stackPos - (2 - 1)], $stackPos - (2 - 1), $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 499 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 500 => null, 501 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 502 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 503 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 504 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos - (2 - 2)], null, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 505 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos - (4 - 4)], $self->semStack[$stackPos - (4 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 507 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 508 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \false, 'byRef' => $self->semStack[$stackPos - (8 - 2)], 'params' => $self->semStack[$stackPos - (8 - 4)], 'returnType' => $self->semStack[$stackPos - (8 - 6)], 'expr' => $self->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 509 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \true, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'returnType' => $self->semStack[$stackPos - (9 - 7)], 'expr' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 510 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \false, 'byRef' => $self->semStack[$stackPos - (8 - 2)], 'params' => $self->semStack[$stackPos - (8 - 4)], 'uses' => $self->semStack[$stackPos - (8 - 6)], 'returnType' => $self->semStack[$stackPos - (8 - 7)], 'stmts' => $self->semStack[$stackPos - (8 - 8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])); + }, 511 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \true, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'uses' => $self->semStack[$stackPos - (9 - 7)], 'returnType' => $self->semStack[$stackPos - (9 - 8)], 'stmts' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 512 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \false, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'returnType' => $self->semStack[$stackPos - (9 - 7)], 'expr' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => $self->semStack[$stackPos - (9 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 513 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => \true, 'byRef' => $self->semStack[$stackPos - (10 - 4)], 'params' => $self->semStack[$stackPos - (10 - 6)], 'returnType' => $self->semStack[$stackPos - (10 - 8)], 'expr' => $self->semStack[$stackPos - (10 - 10)], 'attrGroups' => $self->semStack[$stackPos - (10 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + }, 514 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \false, 'byRef' => $self->semStack[$stackPos - (9 - 3)], 'params' => $self->semStack[$stackPos - (9 - 5)], 'uses' => $self->semStack[$stackPos - (9 - 7)], 'returnType' => $self->semStack[$stackPos - (9 - 8)], 'stmts' => $self->semStack[$stackPos - (9 - 9)], 'attrGroups' => $self->semStack[$stackPos - (9 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (9 - 1)], $self->tokenEndStack[$stackPos])); + }, 515 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => \true, 'byRef' => $self->semStack[$stackPos - (10 - 4)], 'params' => $self->semStack[$stackPos - (10 - 6)], 'uses' => $self->semStack[$stackPos - (10 - 8)], 'returnType' => $self->semStack[$stackPos - (10 - 9)], 'stmts' => $self->semStack[$stackPos - (10 - 10)], 'attrGroups' => $self->semStack[$stackPos - (10 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (10 - 1)], $self->tokenEndStack[$stackPos])); + }, 516 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos - (8 - 2)], 'extends' => $self->semStack[$stackPos - (8 - 4)], 'implements' => $self->semStack[$stackPos - (8 - 5)], 'stmts' => $self->semStack[$stackPos - (8 - 7)], 'attrGroups' => $self->semStack[$stackPos - (8 - 1)]], $self->getAttributes($self->tokenStartStack[$stackPos - (8 - 1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos - (8 - 3)]); + $self->checkClass($self->semValue[0], -1); + }, 517 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 518 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 519 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos - (2 - 2)], [], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 520 => null, 521 => null, 522 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 523 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (4 - 3)]; + }, 524 => null, 525 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 526 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 527 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos - (2 - 2)], $self->semStack[$stackPos - (2 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 528 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 529 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 530 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 531 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 532 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 533 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 534 => null, 535 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 536 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 537 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos - (1 - 1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 538 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos - (1 - 1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 539 => null, 540 => null, 541 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 542 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 543 => null, 544 => null, 545 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 546 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + foreach ($self->semValue as $s) { + if ($s instanceof Node\InterpolatedStringPart) { + $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); + } + } + }, 547 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos - (1 - 1)] as $s) { + if ($s instanceof Node\InterpolatedStringPart) { + $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); + } + } + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + }, 548 => static function ($self, $stackPos) { + $self->semValue = array(); + }, 549 => null, 550 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 551 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 552 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 553 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 554 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 555 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 556 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 557 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 558 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 559 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 560 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 561 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos - (5 - 1)], $self->semStack[$stackPos - (5 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (5 - 1)], $self->tokenEndStack[$stackPos])); + }, 562 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos - (3 - 1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (3 - 3)], $self->tokenEndStack[$stackPos - (3 - 3)])), $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 563 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos - (3 - 2)], $attrs); + }, 564 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos - (4 - 3)], $attrs); + $self->createdArrays->offsetSet($self->semValue); + }, 565 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + $self->createdArrays->offsetSet($self->semValue); + }, 566 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); + }, 567 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos - (3 - 2)] as $s) { + if ($s instanceof Node\InterpolatedStringPart) { + $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); + } + } + $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos - (3 - 2)], $attrs); + }, 568 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); + }, 569 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 570 => null, 571 => null, 572 => null, 573 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 3)], $self->tokenEndStack[$stackPos - (3 - 3)]), \true); + }, 574 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos - (2 - 1)], '', $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 2)], $self->tokenEndStack[$stackPos - (2 - 2)]), \true); + }, 575 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 2)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 3)], $self->tokenEndStack[$stackPos - (3 - 3)]), \true); + }, 576 => static function ($self, $stackPos) { + $self->semValue = null; + }, 577 => null, 578 => null, 579 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 580 => null, 581 => null, 582 => null, 583 => null, 584 => null, 585 => null, 586 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 587 => null, 588 => null, 589 => null, 590 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 591 => null, 592 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 593 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->semStack[$stackPos - (4 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 594 => static function ($self, $stackPos) { + $self->semValue = null; + }, 595 => null, 596 => null, 597 => null, 598 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 599 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 600 => null, 601 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 602 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 604 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos - (1 - 1)]->name; + $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])) : $var; + }, 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 606 => null, 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 611 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 612 => null, 613 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 614 => null, 615 => null, 616 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 617 => null, 618 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + $self->errorState = 2; + }, 619 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); + }, 620 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (1 - 1)]; + $end = count($self->semValue) - 1; + if ($self->semValue[$end]->value instanceof Expr\Error) { + array_pop($self->semValue); + } + }, 621 => null, 622 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ + }, 623 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (3 - 1)][] = $self->semStack[$stackPos - (3 - 3)]; + $self->semValue = $self->semStack[$stackPos - (3 - 1)]; + }, 624 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 625 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (1 - 1)], null, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 626 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (2 - 2)], null, \true, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 627 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (1 - 1)], null, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 628 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (3 - 3)], $self->semStack[$stackPos - (3 - 1)], \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 629 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (4 - 4)], $self->semStack[$stackPos - (4 - 1)], \true, $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 630 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (3 - 3)], $self->semStack[$stackPos - (3 - 1)], \false, $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 631 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos - (2 - 2)], null, \false, $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos]), \true); + }, 632 => static function ($self, $stackPos) { + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, \false, $attrs); + }, 633 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 634 => static function ($self, $stackPos) { + $self->semStack[$stackPos - (2 - 1)][] = $self->semStack[$stackPos - (2 - 2)]; + $self->semValue = $self->semStack[$stackPos - (2 - 1)]; + }, 635 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (1 - 1)]); + }, 636 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos - (2 - 1)], $self->semStack[$stackPos - (2 - 2)]); + }, 637 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos]); + $attrs['rawValue'] = $self->semStack[$stackPos - (1 - 1)]; + $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos - (1 - 1)], $attrs); + }, 638 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 639 => null, 640 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (4 - 1)], $self->semStack[$stackPos - (4 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (4 - 1)], $self->tokenEndStack[$stackPos])); + }, 641 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 642 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos - (3 - 1)], $self->semStack[$stackPos - (3 - 3)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 643 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 644 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos - (3 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (3 - 1)], $self->tokenEndStack[$stackPos])); + }, 645 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos - (6 - 2)], $self->semStack[$stackPos - (6 - 4)], $self->getAttributes($self->tokenStartStack[$stackPos - (6 - 1)], $self->tokenEndStack[$stackPos])); + }, 646 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos - (3 - 2)]; + }, 647 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 648 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos - (1 - 1)], $self->getAttributes($self->tokenStartStack[$stackPos - (1 - 1)], $self->tokenEndStack[$stackPos])); + }, 649 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos - (2 - 2)], $self->getAttributes($self->tokenStartStack[$stackPos - (2 - 1)], $self->tokenEndStack[$stackPos])); + }, 650 => null]; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php similarity index 68% rename from vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php index cf643ee..c85b236 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -1,147 +1,134 @@ - Map of PHP token IDs to drop */ - protected array $dropTokens; + protected $dropTokens; /** @var int[] Map of external symbols (static::T_*) to internal symbols */ - protected array $tokenToSymbol; + protected $tokenToSymbol; /** @var string[] Map of symbols to their names */ - protected array $symbolToName; + protected $symbolToName; /** @var array Names of the production rules (only necessary for debugging) */ - protected array $productions; - + protected $productions; /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected array $actionBase; + protected $actionBase; /** @var int[] Table of actions. Indexed according to $actionBase comment. */ - protected array $action; + protected $action; /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected array $actionCheck; + protected $actionCheck; /** @var int[] Map of states to their default action */ - protected array $actionDefault; + protected $actionDefault; /** @var callable[] Semantic action callbacks */ - protected array $reduceCallbacks; - + protected $reduceCallbacks; /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ - protected array $gotoBase; + protected $gotoBase; /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ - protected array $goto; + protected $goto; /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ - protected array $gotoCheck; + protected $gotoCheck; /** @var int[] Map of non-terminals to the default state to goto after their reduction */ - protected array $gotoDefault; - + protected $gotoDefault; /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for * determining the state to goto after reduction. */ - protected array $ruleToNonTerminal; + protected $ruleToNonTerminal; /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to * be popped from the stack(s) on reduction. */ - protected array $ruleToLength; - + protected $ruleToLength; /* * The following members are part of the parser state: */ - /** @var mixed Temporary value containing the result of last semantic action (reduction) */ protected $semValue; /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ - protected array $semStack; + protected $semStack; /** @var int[] Token start position stack */ - protected array $tokenStartStack; + protected $tokenStartStack; /** @var int[] Token end position stack */ - protected array $tokenEndStack; - + protected $tokenEndStack; /** @var ErrorHandler Error handler */ - protected ErrorHandler $errorHandler; + protected $errorHandler; /** @var int Error state, used to avoid error floods */ - protected int $errorState; - + protected $errorState; /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ - protected ?\SplObjectStorage $createdArrays; - + protected $createdArrays; /** @var Token[] Tokens for the current parse */ - protected array $tokens; + protected $tokens; /** @var int Current position in token array */ - protected int $tokenPos; - + protected $tokenPos; /** * Initialize $reduceCallbacks map. */ - abstract protected function initReduceCallbacks(): void; - + protected abstract function initReduceCallbacks() : void; /** * Creates a parser instance. * @@ -155,17 +142,14 @@ abstract protected function initReduceCallbacks(): void; * errors in older versions and interpreting type hints as a name or identifier depending * on version. */ - public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { + public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) + { $this->lexer = $lexer; $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); - $this->initReduceCallbacks(); $this->phpTokenToSymbol = $this->createTokenMap(); - $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true - ); + $this->dropTokens = array_fill_keys([\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], \true); } - /** * Parses PHP code into a node tree. * @@ -179,25 +163,22 @@ public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { + public function parse(string $code, ?ErrorHandler $errorHandler = null) : ?array + { $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); $this->createdArrays = new \SplObjectStorage(); - $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); $result = $this->doParse(); - // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, // because we don't know a priori whether a given array expression will be used in a destructuring context // or not. foreach ($this->createdArrays as $node) { foreach ($node->items as $item) { if ($item->value instanceof Expr\Error) { - $this->errorHandler->handleError( - new Error('Cannot use empty array elements in arrays', $item->getAttributes())); + $this->errorHandler->handleError(new Error('Cannot use empty array elements in arrays', $item->getAttributes())); } } } - // Clear out some of the interior state, so we don't hold onto unnecessary // memory between uses of the parser $this->tokenStartStack = []; @@ -205,45 +186,36 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array $this->semStack = []; $this->semValue = null; $this->createdArrays = null; - if ($result !== null) { $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); $traverser->traverse($result); } - return $result; } - - public function getTokens(): array { + public function getTokens() : array + { return $this->tokens; } - /** @return Stmt[]|null */ - protected function doParse(): ?array { + protected function doParse() : ?array + { // We start off with no lookahead-token $symbol = self::SYMBOL_NONE; $tokenValue = null; $this->tokenPos = -1; - // Keep stack of start and end attributes $this->tokenStartStack = []; $this->tokenEndStack = [0]; - // Start off in the initial state and keep a stack of previous states $state = 0; $stateStack = [$state]; - // Semantic value stack (contains values of tokens and semantic action results) $this->semStack = []; - // Current position in the stack(s) $stackPos = 0; - $this->errorState = 0; - for (;;) { //$this->traceNewState($state, $symbol); - if ($this->actionBase[$state] === 0) { $rule = $this->actionDefault[$state]; } else { @@ -252,26 +224,16 @@ protected function doParse(): ?array { $token = $this->tokens[++$this->tokenPos]; $tokenId = $token->id; } while (isset($this->dropTokens[$tokenId])); - // Map the lexer token id to the internally used symbols. - $tokenValue = $token->text; + $tokenValue = is_array($token) ? $token[1] : $token; if (!isset($this->phpTokenToSymbol[$tokenId])) { - throw new \RangeException(sprintf( - 'The lexer returned an invalid token (id=%d, value=%s)', - $tokenId, $tokenValue - )); + throw new \RangeException(sprintf('The lexer returned an invalid token (id=%d, value=%s)', $tokenId, $tokenValue)); } $symbol = $this->phpTokenToSymbol[$tokenId]; - //$this->traceRead($symbol); } - $idx = $this->actionBase[$state] + $symbol; - if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) - && ($action = $this->action[$idx]) !== $this->defaultAction) { + if (($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol || $state < $this->YY2TBLSTATE && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) && ($action = $this->action[$idx]) !== $this->defaultAction) { /* * >= numNonLeafStates: shift and reduce * > 0: shift @@ -282,22 +244,18 @@ protected function doParse(): ?array { if ($action > 0) { /* shift */ //$this->traceShift($symbol); - ++$stackPos; $stateStack[$stackPos] = $state = $action; $this->semStack[$stackPos] = $tokenValue; $this->tokenStartStack[$stackPos] = $this->tokenPos; $this->tokenEndStack[$stackPos] = $this->tokenPos; $symbol = self::SYMBOL_NONE; - if ($this->errorState) { --$this->errorState; } - if ($action < $this->numNonLeafStates) { continue; } - /* $yyn >= numNonLeafStates means shift-and-reduce */ $rule = $action - $this->numNonLeafStates; } else { @@ -307,7 +265,6 @@ protected function doParse(): ?array { $rule = $this->actionDefault[$state]; } } - for (;;) { if ($rule === 0) { /* accept */ @@ -317,7 +274,6 @@ protected function doParse(): ?array { if ($rule !== $this->unexpectedTokenRule) { /* reduce */ //$this->traceReduce($rule); - $ruleLength = $this->ruleToLength[$rule]; try { $callback = $this->reduceCallbacks[$rule]; @@ -330,12 +286,10 @@ protected function doParse(): ?array { if (-1 === $e->getStartLine()) { $e->setStartLine($this->tokens[$this->tokenPos]->line); } - $this->emitError($e); // Can't recover from this type of error return null; } - /* Goto - shift nonterminal */ $lastTokenEnd = $this->tokenEndStack[$stackPos]; $stackPos -= $ruleLength; @@ -346,9 +300,8 @@ protected function doParse(): ?array { } else { $state = $this->gotoDefault[$nonTerminal]; } - ++$stackPos; - $stateStack[$stackPos] = $state; + $stateStack[$stackPos] = $state; $this->semStack[$stackPos] = $this->semValue; $this->tokenEndStack[$stackPos] = $lastTokenEnd; if ($ruleLength === 0) { @@ -361,20 +314,14 @@ protected function doParse(): ?array { case 0: $msg = $this->getErrorMessage($symbol, $state); $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); - // Break missing intentionally - // no break + // Break missing intentionally + // no break case 1: case 2: $this->errorState = 3; - // Pop until error-expecting state uncovered - while (!( - (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this + while (!(($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol || $state < $this->YY2TBLSTATE && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) || ($action = $this->action[$idx]) === $this->defaultAction) { + // Not totally sure about this if ($stackPos <= 0) { // Could not recover from error return null; @@ -382,43 +329,36 @@ protected function doParse(): ?array { $state = $stateStack[--$stackPos]; //$this->tracePop($state); } - //$this->traceShift($this->errorSymbol); ++$stackPos; $stateStack[$stackPos] = $state = $action; - // We treat the error symbol as being empty, so we reset the end attributes // to the end attributes of the last non-error symbol $this->tokenStartStack[$stackPos] = $this->tokenPos; $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; break; - case 3: if ($symbol === 0) { // Reached EOF without recovering from error return null; } - //$this->traceDiscard($symbol); $symbol = self::SYMBOL_NONE; break 2; } } - if ($state < $this->numNonLeafStates) { break; } - /* >= numNonLeafStates means shift-and-reduce */ $rule = $state - $this->numNonLeafStates; } } } - - protected function emitError(Error $error): void { + protected function emitError(Error $error) : void + { $this->errorHandler->handleError($error); } - /** * Format error message including expected tokens. * @@ -427,15 +367,14 @@ protected function emitError(Error $error): void { * * @return string Formatted error message */ - protected function getErrorMessage(int $symbol, int $state): string { + protected function getErrorMessage(int $symbol, int $state) : string + { $expectedString = ''; if ($expected = $this->getExpectedTokens($state)) { $expectedString = ', expecting ' . implode(' or ', $expected); } - return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; } - /** * Get limited number of expected tokens in given state. * @@ -443,34 +382,24 @@ protected function getErrorMessage(int $symbol, int $state): string { * * @return string[] Expected tokens. If too many, an empty array is returned. */ - protected function getExpectedTokens(int $state): array { + protected function getExpectedTokens(int $state) : array + { $expected = []; - $base = $this->actionBase[$state]; foreach ($this->symbolToName as $symbol => $name) { $idx = $base + $symbol; - if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - || $state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - ) { - if ($this->action[$idx] !== $this->unexpectedTokenRule - && $this->action[$idx] !== $this->defaultAction - && $symbol !== $this->errorSymbol - ) { + if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol || $state < $this->YY2TBLSTATE && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) { + if ($this->action[$idx] !== $this->unexpectedTokenRule && $this->action[$idx] !== $this->defaultAction && $symbol !== $this->errorSymbol) { if (count($expected) === 4) { /* Too many expected tokens */ return []; } - $expected[] = $name; } } } - return $expected; } - /** * Get attributes for a node with the given start and end token positions. * @@ -478,88 +407,71 @@ protected function getExpectedTokens(int $state): array { * @param int $tokenEndPos Token position the node ends at * @return array Attributes */ - protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { + protected function getAttributes(int $tokenStartPos, int $tokenEndPos) : array + { $startToken = $this->tokens[$tokenStartPos]; $afterEndToken = $this->tokens[$tokenEndPos + 1]; - return [ - 'startLine' => $startToken->line, - 'startTokenPos' => $tokenStartPos, - 'startFilePos' => $startToken->pos, - 'endLine' => $afterEndToken->line, - 'endTokenPos' => $tokenEndPos, - 'endFilePos' => $afterEndToken->pos - 1, - ]; + return ['startLine' => $startToken->line, 'startTokenPos' => $tokenStartPos, 'startFilePos' => $startToken->pos, 'endLine' => $afterEndToken->line, 'endTokenPos' => $tokenEndPos, 'endFilePos' => $afterEndToken->pos - 1]; } - /** * Get attributes for a single token at the given token position. * * @return array Attributes */ - protected function getAttributesForToken(int $tokenPos): array { + protected function getAttributesForToken(int $tokenPos) : array + { if ($tokenPos < \count($this->tokens) - 1) { return $this->getAttributes($tokenPos, $tokenPos); } - // Get attributes for the sentinel token. $token = $this->tokens[$tokenPos]; - return [ - 'startLine' => $token->line, - 'startTokenPos' => $tokenPos, - 'startFilePos' => $token->pos, - 'endLine' => $token->line, - 'endTokenPos' => $tokenPos, - 'endFilePos' => $token->pos, - ]; + return ['startLine' => $token->line, 'startTokenPos' => $tokenPos, 'startFilePos' => $token->pos, 'endLine' => $token->line, 'endTokenPos' => $tokenPos, 'endFilePos' => $token->pos]; } - /* * Tracing functions used for debugging the parser. */ - /* protected function traceNewState($state, $symbol): void { echo '% State ' . $state . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; } - + protected function traceRead($symbol): void { echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; } - + protected function traceShift($symbol): void { echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; } - + protected function traceAccept(): void { echo "% Accepted.\n"; } - + protected function traceReduce($n): void { echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; } - + protected function tracePop($state): void { echo '% Recovering, uncovered state ' . $state . "\n"; } - + protected function traceDiscard($symbol): void { echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; } */ - /* * Helper functions invoked by semantic actions */ - /** * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. * * @param Node\Stmt[] $stmts * @return Node\Stmt[] */ - protected function handleNamespaces(array $stmts): array { - $hasErrored = false; + protected function handleNamespaces(array $stmts) : array + { + $hasErrored = \false; $style = $this->getNamespacingStyle($stmts); if (null === $style) { // not namespaced, nothing to do @@ -567,23 +479,21 @@ protected function handleNamespaces(array $stmts): array { } if ('brace' === $style) { // For braced namespaces we only have to check that there are no invalid statements between the namespaces - $afterFirstNamespace = false; + $afterFirstNamespace = \false; foreach ($stmts as $stmt) { if ($stmt instanceof Node\Stmt\Namespace_) { - $afterFirstNamespace = true; - } elseif (!$stmt instanceof Node\Stmt\HaltCompiler - && !$stmt instanceof Node\Stmt\Nop - && $afterFirstNamespace && !$hasErrored) { - $this->emitError(new Error( - 'No code may exist outside of namespace {}', $stmt->getAttributes())); - $hasErrored = true; // Avoid one error for every statement + $afterFirstNamespace = \true; + } elseif (!$stmt instanceof Node\Stmt\HaltCompiler && !$stmt instanceof Node\Stmt\Nop && $afterFirstNamespace && !$hasErrored) { + $this->emitError(new Error('No code may exist outside of namespace {}', $stmt->getAttributes())); + $hasErrored = \true; + // Avoid one error for every statement } } return $stmts; } else { // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts $resultStmts = []; - $targetStmts = &$resultStmts; + $targetStmts =& $resultStmts; $lastNs = null; foreach ($stmts as $stmt) { if ($stmt instanceof Node\Stmt\Namespace_) { @@ -592,12 +502,12 @@ protected function handleNamespaces(array $stmts): array { } if ($stmt->stmts === null) { $stmt->stmts = []; - $targetStmts = &$stmt->stmts; + $targetStmts =& $stmt->stmts; $resultStmts[] = $stmt; } else { // This handles the invalid case of mixed style namespaces $resultStmts[] = $stmt; - $targetStmts = &$resultStmts; + $targetStmts =& $resultStmts; } $lastNs = $stmt; } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { @@ -613,14 +523,13 @@ protected function handleNamespaces(array $stmts): array { return $resultStmts; } } - - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { + private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) : void + { // We moved the statements into the namespace node, as such the end of the namespace node // needs to be extended to the end of the statements. if (empty($stmt->stmts)) { return; } - // We only move the builtin end attributes here. This is the best we can do with the // knowledge we have. $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; @@ -631,9 +540,9 @@ private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { } } } - /** @return array */ - private function getNamespaceErrorAttributes(Namespace_ $node): array { + private function getNamespaceErrorAttributes(Namespace_ $node) : array + { $attrs = $node->getAttributes(); // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. if (isset($attrs['startLine'])) { @@ -647,7 +556,6 @@ private function getNamespaceErrorAttributes(Namespace_ $node): array { } return $attrs; } - /** * Determine namespacing style (semicolon or brace) * @@ -655,63 +563,50 @@ private function getNamespaceErrorAttributes(Namespace_ $node): array { * * @return null|string One of "semicolon", "brace" or null (no namespaces) */ - private function getNamespacingStyle(array $stmts): ?string { + private function getNamespacingStyle(array $stmts) : ?string + { $style = null; - $hasNotAllowedStmts = false; + $hasNotAllowedStmts = \false; foreach ($stmts as $i => $stmt) { if ($stmt instanceof Node\Stmt\Namespace_) { $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; if (null === $style) { $style = $currentStyle; if ($hasNotAllowedStmts) { - $this->emitError(new Error( - 'Namespace declaration statement has to be the very first statement in the script', - $this->getNamespaceErrorAttributes($stmt) - )); + $this->emitError(new Error('Namespace declaration statement has to be the very first statement in the script', $this->getNamespaceErrorAttributes($stmt))); } } elseif ($style !== $currentStyle) { - $this->emitError(new Error( - 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', - $this->getNamespaceErrorAttributes($stmt) - )); + $this->emitError(new Error('Cannot mix bracketed namespace declarations with unbracketed namespace declarations', $this->getNamespaceErrorAttributes($stmt))); // Treat like semicolon style for namespace normalization return 'semicolon'; } continue; } - /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ - if ($stmt instanceof Node\Stmt\Declare_ - || $stmt instanceof Node\Stmt\HaltCompiler - || $stmt instanceof Node\Stmt\Nop) { + if ($stmt instanceof Node\Stmt\Declare_ || $stmt instanceof Node\Stmt\HaltCompiler || $stmt instanceof Node\Stmt\Nop) { continue; } - /* There may be a hashbang line at the very start of the file */ - if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { + if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\\A#!.*\\r?\\n\\z/', $stmt->value)) { continue; } - /* Everything else if forbidden before namespace declarations */ - $hasNotAllowedStmts = true; + $hasNotAllowedStmts = \true; } return $style; } - /** @return Name|Identifier */ - protected function handleBuiltinTypes(Name $name) { + protected function handleBuiltinTypes(Name $name) + { if (!$name->isUnqualified()) { return $name; } - $lowerName = $name->toLowerString(); if (!$this->phpVersion->supportsBuiltinType($lowerName)) { return $name; } - return new Node\Identifier($lowerName, $name->getAttributes()); } - /** * Get combined start and end attributes at a stack location * @@ -719,25 +614,48 @@ protected function handleBuiltinTypes(Name $name) { * * @return array Combined start and end attributes */ - protected function getAttributesAt(int $stackPos): array { + protected function getAttributesAt(int $stackPos) : array + { return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); } - - protected function getFloatCastKind(string $cast): int { + protected function getFloatCastKind(string $cast) : int + { $cast = strtolower($cast); - if (strpos($cast, 'float') !== false) { + if (strpos($cast, 'float') !== \false) { return Double::KIND_FLOAT; } - - if (strpos($cast, 'real') !== false) { + if (strpos($cast, 'real') !== \false) { return Double::KIND_REAL; } - return Double::KIND_DOUBLE; } - + protected function getIntCastKind(string $cast) : int + { + $cast = strtolower($cast); + if (strpos($cast, 'integer') !== \false) { + return Expr\Cast\Int_::KIND_INTEGER; + } + return Expr\Cast\Int_::KIND_INT; + } + protected function getBoolCastKind(string $cast) : int + { + $cast = strtolower($cast); + if (strpos($cast, 'boolean') !== \false) { + return Expr\Cast\Bool_::KIND_BOOLEAN; + } + return Expr\Cast\Bool_::KIND_BOOL; + } + protected function getStringCastKind(string $cast) : int + { + $cast = strtolower($cast); + if (strpos($cast, 'binary') !== \false) { + return Expr\Cast\String_::KIND_BINARY; + } + return Expr\Cast\String_::KIND_STRING; + } /** @param array $attributes */ - protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { + protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = \false) : Int_ + { try { return Int_::fromString($str, $attributes, $allowInvalidOctal); } catch (Error $error) { @@ -746,7 +664,6 @@ protected function parseLNumber(string $str, array $attributes, bool $allowInval return new Int_(0, $attributes); } } - /** * Parse a T_NUM_STRING token into either an integer or string node. * @@ -755,128 +672,88 @@ protected function parseLNumber(string $str, array $attributes, bool $allowInval * * @return Int_|String_ Integer or string node. */ - protected function parseNumString(string $str, array $attributes) { + protected function parseNumString(string $str, array $attributes) + { if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { return new String_($str, $attributes); } - $num = +$str; if (!is_int($num)) { return new String_($str, $attributes); } - return new Int_($num, $attributes); } - /** @param array $attributes */ - protected function stripIndentation( - string $string, int $indentLen, string $indentChar, - bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ): string { + protected function stripIndentation(string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes) : string + { if ($indentLen === 0) { return $string; } - - $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; - $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; - $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; - return preg_replace_callback( - $regex, - function ($matches) use ($indentLen, $indentChar, $attributes) { - $prefix = substr($matches[1], 0, $indentLen); - if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', $attributes - )); - } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { - $this->emitError(new Error( - 'Invalid body indentation level ' . - '(expecting an indentation level of at least ' . $indentLen . ')', - $attributes - )); - } - return substr($matches[0], strlen($prefix)); - }, - $string - ); + $start = $newlineAtStart ? '(?:(?<=\\n)|\\A)' : '(?<=\\n)'; + $end = $newlineAtEnd ? '(?:(?=[\\r\\n])|\\z)' : '(?=[\\r\\n])'; + $regex = '/' . $start . '([ \\t]*)(' . $end . ')?/'; + return preg_replace_callback($regex, function ($matches) use($indentLen, $indentChar, $attributes) { + $prefix = substr($matches[1], 0, $indentLen); + if (\false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { + $this->emitError(new Error('Invalid indentation - tabs and spaces cannot be mixed', $attributes)); + } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { + $this->emitError(new Error('Invalid body indentation level ' . '(expecting an indentation level of at least ' . $indentLen . ')', $attributes)); + } + return substr($matches[0], strlen($prefix)); + }, $string); } - /** * @param string|(Expr|InterpolatedStringPart)[] $contents * @param array $attributes * @param array $endTokenAttributes */ - protected function parseDocString( - string $startToken, $contents, string $endToken, - array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ): Expr { - $kind = strpos($startToken, "'") === false - ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; - - $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; + protected function parseDocString(string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape) : Expr + { + $kind = strpos($startToken, "'") === \false ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; + $regex = '/\\A[bB]?<<<[ \\t]*[\'"]?([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)[\'"]?(?:\\r\\n|\\n|\\r)\\z/'; $result = preg_match($regex, $startToken, $matches); assert($result === 1); $label = $matches[1]; - - $result = preg_match('/\A[ \t]*/', $endToken, $matches); + $result = preg_match('/\\A[ \\t]*/', $endToken, $matches); assert($result === 1); $indentation = $matches[0]; - $attributes['kind'] = $kind; $attributes['docLabel'] = $label; $attributes['docIndentation'] = $indentation; - - $indentHasSpaces = false !== strpos($indentation, " "); - $indentHasTabs = false !== strpos($indentation, "\t"); + $indentHasSpaces = \false !== strpos($indentation, " "); + $indentHasTabs = \false !== strpos($indentation, "\t"); if ($indentHasSpaces && $indentHasTabs) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', - $endTokenAttributes - )); - + $this->emitError(new Error('Invalid indentation - tabs and spaces cannot be mixed', $endTokenAttributes)); // Proceed processing as if this doc string is not indented $indentation = ''; } - $indentLen = \strlen($indentation); $indentChar = $indentHasSpaces ? " " : "\t"; - if (\is_string($contents)) { if ($contents === '') { $attributes['rawValue'] = $contents; return new String_('', $attributes); } - - $contents = $this->stripIndentation( - $contents, $indentLen, $indentChar, true, true, $attributes - ); - $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); + $contents = $this->stripIndentation($contents, $indentLen, $indentChar, \true, \true, $attributes); + $contents = preg_replace('~(\\r\\n|\\n|\\r)\\z~', '', $contents); $attributes['rawValue'] = $contents; - if ($kind === String_::KIND_HEREDOC) { $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); } - return new String_($contents, $attributes); } else { assert(count($contents) > 0); if (!$contents[0] instanceof Node\InterpolatedStringPart) { // If there is no leading encapsed string part, pretend there is an empty one - $this->stripIndentation( - '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() - ); + $this->stripIndentation('', $indentLen, $indentChar, \true, \false, $contents[0]->getAttributes()); } - $newContents = []; foreach ($contents as $i => $part) { if ($part instanceof Node\InterpolatedStringPart) { $isLast = $i === \count($contents) - 1; - $part->value = $this->stripIndentation( - $part->value, $indentLen, $indentChar, - $i === 0, $isLast, $part->getAttributes() - ); + $part->value = $this->stripIndentation($part->value, $indentLen, $indentChar, $i === 0, $isLast, $part->getAttributes()); if ($isLast) { - $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); + $part->value = preg_replace('~(\\r\\n|\\n|\\r)\\z~', '', $part->value); } $part->setAttribute('rawValue', $part->value); $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); @@ -889,109 +766,92 @@ protected function parseDocString( return new InterpolatedString($newContents, $attributes); } } - - protected function createCommentFromToken(Token $token, int $tokenPos): Comment { + protected function createCommentFromToken(Token $token, int $tokenPos) : Comment + { assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); - return \T_DOC_COMMENT === $token->id - ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, - $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) - : new Comment($token->text, $token->line, $token->pos, $tokenPos, - $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); + return \T_DOC_COMMENT === $token->id ? new Comment\Doc(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $tokenPos, $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) : new Comment(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $tokenPos, $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); } - /** * Get last comment before the given token position, if any */ - protected function getCommentBeforeToken(int $tokenPos): ?Comment { + protected function getCommentBeforeToken(int $tokenPos) : ?Comment + { while (--$tokenPos >= 0) { $token = $this->tokens[$tokenPos]; if (!isset($this->dropTokens[$token->id])) { break; } - if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { return $this->createCommentFromToken($token, $tokenPos); } } return null; } - /** * Create a zero-length nop to capture preceding comments, if any. */ - protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { + protected function maybeCreateZeroLengthNop(int $tokenPos) : ?Nop + { $comment = $this->getCommentBeforeToken($tokenPos); if ($comment === null) { return null; } - $commentEndLine = $comment->getEndLine(); $commentEndFilePos = $comment->getEndFilePos(); $commentEndTokenPos = $comment->getEndTokenPos(); - $attributes = [ - 'startLine' => $commentEndLine, - 'endLine' => $commentEndLine, - 'startFilePos' => $commentEndFilePos + 1, - 'endFilePos' => $commentEndFilePos, - 'startTokenPos' => $commentEndTokenPos + 1, - 'endTokenPos' => $commentEndTokenPos, - ]; + $attributes = ['startLine' => $commentEndLine, 'endLine' => $commentEndLine, 'startFilePos' => $commentEndFilePos + 1, 'endFilePos' => $commentEndFilePos, 'startTokenPos' => $commentEndTokenPos + 1, 'endTokenPos' => $commentEndTokenPos]; return new Nop($attributes); } - - protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { + protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos) : ?Nop + { if ($this->getCommentBeforeToken($tokenStartPos) === null) { return null; } return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); } - - protected function handleHaltCompiler(): string { + protected function handleHaltCompiler() : string + { // Prevent the lexer from returning any further tokens. $nextToken = $this->tokens[$this->tokenPos + 1]; $this->tokenPos = \count($this->tokens) - 2; - // Return text after __halt_compiler. - return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; + return $nextToken->id === \T_INLINE_HTML ? is_array($nextToken) ? $nextToken[1] : $nextToken : ''; } - - protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { + protected function inlineHtmlHasLeadingNewline(int $stackPos) : bool + { $tokenPos = $this->tokenStartStack[$stackPos]; $token = $this->tokens[$tokenPos]; assert($token->id == \T_INLINE_HTML); if ($tokenPos > 0) { $prevToken = $this->tokens[$tokenPos - 1]; assert($prevToken->id == \T_CLOSE_TAG); - return false !== strpos($prevToken->text, "\n") - || false !== strpos($prevToken->text, "\r"); + return \false !== strpos(is_array($prevToken) ? $prevToken[1] : $prevToken, "\n") || \false !== strpos(is_array($prevToken) ? $prevToken[1] : $prevToken, "\r"); } - return true; + return \true; } - /** * @return array */ - protected function createEmptyElemAttributes(int $tokenPos): array { + protected function createEmptyElemAttributes(int $tokenPos) : array + { return $this->getAttributesForToken($tokenPos); } - - protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { - $this->createdArrays->detach($node); + protected function fixupArrayDestructuring(Array_ $node) : Expr\List_ + { + $this->createdArrays->offsetUnset($node); return new Expr\List_(array_map(function (Node\ArrayItem $item) { if ($item->value instanceof Expr\Error) { // We used Error as a placeholder for empty elements, which are legal for destructuring. return null; } if ($item->value instanceof Array_) { - return new Node\ArrayItem( - $this->fixupArrayDestructuring($item->value), - $item->key, $item->byRef, $item->getAttributes()); + return new Node\ArrayItem($this->fixupArrayDestructuring($item->value), $item->key, $item->byRef, $item->getAttributes()); } return $item; }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); } - - protected function postprocessList(Expr\List_ $node): void { + protected function postprocessList(Expr\List_ $node) : void + { foreach ($node->items as $i => $item) { if ($item->value instanceof Expr\Error) { // We used Error as a placeholder for empty elements, which are legal for destructuring. @@ -999,9 +859,9 @@ protected function postprocessList(Expr\List_ $node): void { } } } - /** @param ElseIf_|Else_ $node */ - protected function fixupAlternativeElse($node): void { + protected function fixupAlternativeElse($node) : void + { // Make sure a trailing nop statement carrying comments is part of the node. $numStmts = \count($node->stmts); if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { @@ -1017,8 +877,8 @@ protected function fixupAlternativeElse($node): void { } } } - - protected function checkClassModifier(int $a, int $b, int $modifierPos): void { + protected function checkClassModifier(int $a, int $b, int $modifierPos) : void + { try { Modifiers::verifyClassModifier($a, $b); } catch (Error $error) { @@ -1026,8 +886,8 @@ protected function checkClassModifier(int $a, int $b, int $modifierPos): void { $this->emitError($error); } } - - protected function checkModifier(int $a, int $b, int $modifierPos): void { + protected function checkModifier(int $a, int $b, int $modifierPos) : void + { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { Modifiers::verifyModifier($a, $b); @@ -1036,184 +896,140 @@ protected function checkModifier(int $a, int $b, int $modifierPos): void { $this->emitError($error); } } - - protected function checkParam(Param $node): void { + protected function checkParam(Param $node) : void + { if ($node->variadic && null !== $node->default) { - $this->emitError(new Error( - 'Variadic parameter cannot have a default value', - $node->default->getAttributes() - )); + $this->emitError(new Error('Variadic parameter cannot have a default value', $node->default->getAttributes())); } } - - protected function checkTryCatch(TryCatch $node): void { + protected function checkTryCatch(TryCatch $node) : void + { if (empty($node->catches) && null === $node->finally) { - $this->emitError(new Error( - 'Cannot use try without catch or finally', $node->getAttributes() - )); + $this->emitError(new Error('Cannot use try without catch or finally', $node->getAttributes())); } } - - protected function checkNamespace(Namespace_ $node): void { + protected function checkNamespace(Namespace_ $node) : void + { if (null !== $node->stmts) { foreach ($node->stmts as $stmt) { if ($stmt instanceof Namespace_) { - $this->emitError(new Error( - 'Namespace declarations cannot be nested', $stmt->getAttributes() - )); + $this->emitError(new Error('Namespace declarations cannot be nested', $stmt->getAttributes())); } } } } - - private function checkClassName(?Identifier $name, int $namePos): void { + private function checkClassName(?Identifier $name, int $namePos) : void + { if (null !== $name && $name->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $name), - $this->getAttributesAt($namePos) - )); + $this->emitError(new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $name), $this->getAttributesAt($namePos))); } } - /** @param Name[] $interfaces */ - private function checkImplementedInterfaces(array $interfaces): void { + private function checkImplementedInterfaces(array $interfaces) : void + { foreach ($interfaces as $interface) { if ($interface->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), - $interface->getAttributes() - )); + $this->emitError(new Error(sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), $interface->getAttributes())); } } } - - protected function checkClass(Class_ $node, int $namePos): void { + protected function checkClass(Class_ $node, int $namePos) : void + { $this->checkClassName($node->name, $namePos); - if ($node->extends && $node->extends->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), - $node->extends->getAttributes() - )); + $this->emitError(new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), $node->extends->getAttributes())); } - $this->checkImplementedInterfaces($node->implements); } - - protected function checkInterface(Interface_ $node, int $namePos): void { + protected function checkInterface(Interface_ $node, int $namePos) : void + { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->extends); } - - protected function checkEnum(Enum_ $node, int $namePos): void { + protected function checkEnum(Enum_ $node, int $namePos) : void + { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->implements); } - - protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { + protected function checkClassMethod(ClassMethod $node, int $modifierPos) : void + { if ($node->flags & Modifiers::STATIC) { switch ($node->name->toLowerString()) { case '__construct': - $this->emitError(new Error( - sprintf('Constructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); + $this->emitError(new Error(sprintf('Constructor %s() cannot be static', $node->name), $this->getAttributesAt($modifierPos))); break; case '__destruct': - $this->emitError(new Error( - sprintf('Destructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); + $this->emitError(new Error(sprintf('Destructor %s() cannot be static', $node->name), $this->getAttributesAt($modifierPos))); break; case '__clone': - $this->emitError(new Error( - sprintf('Clone method %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); + $this->emitError(new Error(sprintf('Clone method %s() cannot be static', $node->name), $this->getAttributesAt($modifierPos))); break; } } - if ($node->flags & Modifiers::READONLY) { - $this->emitError(new Error( - sprintf('Method %s() cannot be readonly', $node->name), - $this->getAttributesAt($modifierPos))); + $this->emitError(new Error(sprintf('Method %s() cannot be readonly', $node->name), $this->getAttributesAt($modifierPos))); } } - - protected function checkClassConst(ClassConst $node, int $modifierPos): void { + protected function checkClassConst(ClassConst $node, int $modifierPos) : void + { foreach ([Modifiers::STATIC, Modifiers::ABSTRACT, Modifiers::READONLY] as $modifier) { if ($node->flags & $modifier) { - $this->emitError(new Error( - "Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier", - $this->getAttributesAt($modifierPos))); + $this->emitError(new Error("Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier", $this->getAttributesAt($modifierPos))); } } } - - protected function checkUseUse(UseItem $node, int $namePos): void { + protected function checkUseUse(UseItem $node, int $namePos) : void + { if ($node->alias && $node->alias->isSpecialClassName()) { - $this->emitError(new Error( - sprintf( - 'Cannot use %s as %s because \'%2$s\' is a special class name', - $node->name, $node->alias - ), - $this->getAttributesAt($namePos) - )); + $this->emitError(new Error(sprintf('Cannot use %s as %s because \'%2$s\' is a special class name', $node->name, $node->alias), $this->getAttributesAt($namePos))); } } - - protected function checkPropertyHooksForMultiProperty(Property $property, int $hookPos): void { + protected function checkPropertyHooksForMultiProperty(Property $property, int $hookPos) : void + { if (count($property->props) > 1) { - $this->emitError(new Error( - 'Cannot use hooks when declaring multiple properties', $this->getAttributesAt($hookPos))); + $this->emitError(new Error('Cannot use hooks when declaring multiple properties', $this->getAttributesAt($hookPos))); } } - /** @param PropertyHook[] $hooks */ - protected function checkEmptyPropertyHookList(array $hooks, int $hookPos): void { + protected function checkEmptyPropertyHookList(array $hooks, int $hookPos) : void + { if (empty($hooks)) { - $this->emitError(new Error( - 'Property hook list cannot be empty', $this->getAttributesAt($hookPos))); + $this->emitError(new Error('Property hook list cannot be empty', $this->getAttributesAt($hookPos))); } } - - protected function checkPropertyHook(PropertyHook $hook, ?int $paramListPos): void { + protected function checkPropertyHook(PropertyHook $hook, ?int $paramListPos) : void + { $name = $hook->name->toLowerString(); if ($name !== 'get' && $name !== 'set') { - $this->emitError(new Error( - 'Unknown hook "' . $hook->name . '", expected "get" or "set"', - $hook->name->getAttributes())); + $this->emitError(new Error('Unknown hook "' . $hook->name . '", expected "get" or "set"', $hook->name->getAttributes())); } if ($name === 'get' && $paramListPos !== null) { - $this->emitError(new Error( - 'get hook must not have a parameter list', $this->getAttributesAt($paramListPos))); + $this->emitError(new Error('get hook must not have a parameter list', $this->getAttributesAt($paramListPos))); } } - - protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): void { + protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos) : void + { try { Modifiers::verifyModifier($a, $b); } catch (Error $error) { $error->setAttributes($this->getAttributesAt($modifierPos)); $this->emitError($error); } - if ($b != Modifiers::FINAL) { - $this->emitError(new Error( - 'Cannot use the ' . Modifiers::toString($b) . ' modifier on a property hook', - $this->getAttributesAt($modifierPos))); + $this->emitError(new Error('Cannot use the ' . Modifiers::toString($b) . ' modifier on a property hook', $this->getAttributesAt($modifierPos))); } } - - protected function checkConstantAttributes(Const_ $node): void { + protected function checkConstantAttributes(Const_ $node) : void + { if ($node->attrGroups !== [] && count($node->consts) > 1) { - $this->emitError(new Error( - 'Cannot use attributes on multiple constants at once', $node->getAttributes())); + $this->emitError(new Error('Cannot use attributes on multiple constants at once', $node->getAttributes())); } } - /** * @param Property|Param $node */ - protected function addPropertyNameToHooks(Node $node): void { + protected function addPropertyNameToHooks(Node $node) : void + { if ($node instanceof Property) { $name = $node->props[0]->name->toString(); } else { @@ -1223,25 +1039,24 @@ protected function addPropertyNameToHooks(Node $node): void { $hook->setAttribute('propertyName', $name); } } - /** @param array $args */ - private function isSimpleExit(array $args): bool { + private function isSimpleExit(array $args) : bool + { if (\count($args) === 0) { - return true; + return \true; } if (\count($args) === 1) { $arg = $args[0]; - return $arg instanceof Arg && $arg->name === null && - $arg->byRef === false && $arg->unpack === false; + return $arg instanceof Arg && $arg->name === null && $arg->byRef === \false && $arg->unpack === \false; } - return false; + return \false; } - /** * @param array $args * @param array $attrs */ - protected function createExitExpr(string $name, int $namePos, array $args, array $attrs): Expr { + protected function createExitExpr(string $name, int $namePos, array $args, array $attrs) : Expr + { if ($this->isSimpleExit($args)) { // Create Exit node for backwards compatibility. $attrs['kind'] = strtolower($name) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; @@ -1249,7 +1064,6 @@ protected function createExitExpr(string $name, int $namePos, array $args, array } return new Expr\FuncCall(new Name($name, $this->getAttributesAt($namePos)), $args, $attrs); } - /** * Creates the token map. * @@ -1259,25 +1073,22 @@ protected function createExitExpr(string $name, int $namePos, array $args, array * * @return array The token map */ - protected function createTokenMap(): array { + protected function createTokenMap() : array + { $tokenMap = []; - // Single-char tokens use an identity mapping. for ($i = 0; $i < 256; ++$i) { $tokenMap[$i] = $i; } - foreach ($this->symbolToName as $name) { if ($name[0] === 'T') { $tokenMap[\constant($name)] = constant(static::class . '::' . $name); } } - // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO $tokenMap[\T_OPEN_TAG_WITH_ECHO] = static::T_ECHO; // T_CLOSE_TAG is equivalent to ';' $tokenMap[\T_CLOSE_TAG] = ord(';'); - // We have created a map from PHP token IDs to external symbol IDs. // Now map them to the internal symbol ID. $fullTokenMap = []; @@ -1288,7 +1099,6 @@ protected function createTokenMap(): array { } $fullTokenMap[$phpToken] = $intSymbol; } - return $fullTokenMap; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserFactory.php similarity index 72% rename from vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserFactory.php index 3a7586e..79c1fed 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserFactory.php @@ -1,17 +1,19 @@ -isHostVersion()) { $lexer = new Lexer(); } else { @@ -22,21 +24,21 @@ public function createForVersion(PhpVersion $version): Parser { } return new Php7($lexer, $version); } - /** * Create a parser targeting the newest version supported by this library. Code for older * versions will be accepted if there have been no relevant backwards-compatibility breaks in * PHP. */ - public function createForNewestSupportedVersion(): Parser { + public function createForNewestSupportedVersion() : Parser + { return $this->createForVersion(PhpVersion::getNewestSupported()); } - /** * Create a parser targeting the host PHP version, that is the PHP version we're currently * running on. This parser will not use any token emulation. */ - public function createForHostVersion(): Parser { + public function createForHostVersion() : Parser + { return $this->createForVersion(PhpVersion::getHostVersion()); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/PhpVersion.php similarity index 62% rename from vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/PhpVersion.php index 077d7cd..dfb11dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/PhpVersion.php @@ -1,171 +1,157 @@ - 50100, - 'callable' => 50400, - 'bool' => 70000, - 'int' => 70000, - 'float' => 70000, - 'string' => 70000, - 'iterable' => 70100, - 'void' => 70100, - 'object' => 70200, - 'null' => 80000, - 'false' => 80000, - 'mixed' => 80000, - 'never' => 80100, - 'true' => 80200, - ]; - - private function __construct(int $id) { + private const BUILTIN_TYPE_VERSIONS = ['array' => 50100, 'callable' => 50400, 'bool' => 70000, 'int' => 70000, 'float' => 70000, 'string' => 70000, 'iterable' => 70100, 'void' => 70100, 'object' => 70200, 'null' => 80000, 'false' => 80000, 'mixed' => 80000, 'never' => 80100, 'true' => 80200]; + private function __construct(int $id) + { $this->id = $id; } - /** * Create a PhpVersion object from major and minor version components. */ - public static function fromComponents(int $major, int $minor): self { + public static function fromComponents(int $major, int $minor) : self + { return new self($major * 10000 + $minor * 100); } - /** * Get the newest PHP version supported by this library. Support for this version may be partial, * if it is still under development. */ - public static function getNewestSupported(): self { + public static function getNewestSupported() : self + { return self::fromComponents(8, 5); } - /** * Get the host PHP version, that is the PHP version we're currently running on. */ - public static function getHostVersion(): self { + public static function getHostVersion() : self + { return self::fromComponents(\PHP_MAJOR_VERSION, \PHP_MINOR_VERSION); } - /** * Parse the version from a string like "8.1". */ - public static function fromString(string $version): self { - if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { - throw new \LogicException("Invalid PHP version \"$version\""); + public static function fromString(string $version) : self + { + if (!preg_match('/^(\\d+)\\.(\\d+)/', $version, $matches)) { + throw new \LogicException("Invalid PHP version \"{$version}\""); } return self::fromComponents((int) $matches[1], (int) $matches[2]); } - /** * Check whether two versions are the same. */ - public function equals(PhpVersion $other): bool { + public function equals(PhpVersion $other) : bool + { return $this->id === $other->id; } - /** * Check whether this version is greater than or equal to the argument. */ - public function newerOrEqual(PhpVersion $other): bool { + public function newerOrEqual(PhpVersion $other) : bool + { return $this->id >= $other->id; } - /** * Check whether this version is older than the argument. */ - public function older(PhpVersion $other): bool { + public function older(PhpVersion $other) : bool + { return $this->id < $other->id; } - /** * Check whether this is the host PHP version. */ - public function isHostVersion(): bool { + public function isHostVersion() : bool + { return $this->equals(self::getHostVersion()); } - /** * Check whether this PHP version supports the given builtin type. Type name must be lowercase. */ - public function supportsBuiltinType(string $type): bool { + public function supportsBuiltinType(string $type) : bool + { $minVersion = self::BUILTIN_TYPE_VERSIONS[$type] ?? null; return $minVersion !== null && $this->id >= $minVersion; } - /** * Whether this version supports [] array literals. */ - public function supportsShortArraySyntax(): bool { + public function supportsShortArraySyntax() : bool + { return $this->id >= 50400; } - /** * Whether this version supports [] for destructuring. */ - public function supportsShortArrayDestructuring(): bool { + public function supportsShortArrayDestructuring() : bool + { return $this->id >= 70100; } - /** * Whether this version supports flexible heredoc/nowdoc. */ - public function supportsFlexibleHeredoc(): bool { + public function supportsFlexibleHeredoc() : bool + { return $this->id >= 70300; } - /** * Whether this version supports trailing commas in parameter lists. */ - public function supportsTrailingCommaInParamList(): bool { + public function supportsTrailingCommaInParamList() : bool + { return $this->id >= 80000; } - /** * Whether this version allows "$var =& new Obj". */ - public function allowsAssignNewByReference(): bool { + public function allowsAssignNewByReference() : bool + { return $this->id < 70000; } - /** * Whether this version allows invalid octals like "08". */ - public function allowsInvalidOctals(): bool { + public function allowsInvalidOctals() : bool + { return $this->id < 70000; } - /** * Whether this version allows DEL (\x7f) to occur in identifiers. */ - public function allowsDelInIdentifiers(): bool { + public function allowsDelInIdentifiers() : bool + { return $this->id < 70100; } - /** * Whether this version supports yield in expression context without parentheses. */ - public function supportsYieldWithoutParentheses(): bool { + public function supportsYieldWithoutParentheses() : bool + { return $this->id >= 70000; } - /** * Whether this version supports unicode escape sequences in strings. */ - public function supportsUnicodeEscapes(): bool { + public function supportsUnicodeEscapes() : bool + { return $this->id >= 70000; } - /* * Whether this version supports attributes. */ - public function supportsAttributes(): bool { + public function supportsAttributes() : bool + { return $this->id >= 80000; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/PrettyPrinter.php similarity index 78% rename from vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/PrettyPrinter.php index 892c686..f00ad3e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/PrettyPrinter.php @@ -1,10 +1,11 @@ -pAttrGroups($node->attrGroups, $this->phpVersion->supportsAttributes()) - . $this->pModifiers($node->flags) - . ($node->type ? $this->p($node->type) . ' ' : '') - . ($node->byRef ? '&' : '') - . ($node->variadic ? '...' : '') - . $this->p($node->var) - . ($node->default ? ' = ' . $this->p($node->default) : '') - . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ''); + protected function pParam(Node\Param $node) : string + { + return $this->pAttrGroups($node->attrGroups, $this->phpVersion->supportsAttributes()) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') . ($node->byRef ? '&' : '') . ($node->variadic ? '...' : '') . $this->p($node->var) . ($node->default ? ' = ' . $this->p($node->default) : '') . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ''); } - - protected function pArg(Node\Arg $node): string { - return ($node->name ? $node->name->toString() . ': ' : '') - . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') - . $this->p($node->value); + protected function pArg(Node\Arg $node) : string + { + return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { + protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) : string + { return '...'; } - - protected function pConst(Node\Const_ $node): string { + protected function pConst(Node\Const_ $node) : string + { return $node->name . ' = ' . $this->p($node->value); } - - protected function pNullableType(Node\NullableType $node): string { + protected function pNullableType(Node\NullableType $node) : string + { return '?' . $this->p($node->type); } - - protected function pUnionType(Node\UnionType $node): string { + protected function pUnionType(Node\UnionType $node) : string + { $types = []; foreach ($node->types as $typeNode) { if ($typeNode instanceof Node\IntersectionType) { - $types[] = '('. $this->p($typeNode) . ')'; + $types[] = '(' . $this->p($typeNode) . ')'; continue; } $types[] = $this->p($typeNode); } return implode('|', $types); } - - protected function pIntersectionType(Node\IntersectionType $node): string { + protected function pIntersectionType(Node\IntersectionType $node) : string + { return $this->pImplode($node->types, '&'); } - - protected function pIdentifier(Node\Identifier $node): string { + protected function pIdentifier(Node\Identifier $node) : string + { return $node->name; } - - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { + protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) : string + { return '$' . $node->name; } - - protected function pAttribute(Node\Attribute $node): string { - return $this->p($node->name) - . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); + protected function pAttribute(Node\Attribute $node) : string + { + return $this->p($node->name) . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); } - - protected function pAttributeGroup(Node\AttributeGroup $node): string { + protected function pAttributeGroup(Node\AttributeGroup $node) : string + { return '#[' . $this->pCommaSeparated($node->attrs) . ']'; } - // Names - - protected function pName(Name $node): string { + protected function pName(Name $node) : string + { return $node->name; } - - protected function pName_FullyQualified(Name\FullyQualified $node): string { + protected function pName_FullyQualified(Name\FullyQualified $node) : string + { return '\\' . $node->name; } - - protected function pName_Relative(Name\Relative $node): string { + protected function pName_Relative(Name\Relative $node) : string + { return 'namespace\\' . $node->name; } - // Magic Constants - - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { + protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) : string + { return '__CLASS__'; } - - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { + protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) : string + { return '__DIR__'; } - - protected function pScalar_MagicConst_File(MagicConst\File $node): string { + protected function pScalar_MagicConst_File(MagicConst\File $node) : string + { return '__FILE__'; } - - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { + protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) : string + { return '__FUNCTION__'; } - - protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { + protected function pScalar_MagicConst_Line(MagicConst\Line $node) : string + { return '__LINE__'; } - - protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { + protected function pScalar_MagicConst_Method(MagicConst\Method $node) : string + { return '__METHOD__'; } - - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { + protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) : string + { return '__NAMESPACE__'; } - - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { + protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) : string + { return '__TRAIT__'; } - - protected function pScalar_MagicConst_Property(MagicConst\Property $node): string { + protected function pScalar_MagicConst_Property(MagicConst\Property $node) : string + { return '__PROPERTY__'; } - // Scalars - - private function indentString(string $str): string { + private function indentString(string $str) : string + { return str_replace("\n", $this->nl, $str); } - - protected function pScalar_String(Scalar\String_ $node): string { + protected function pScalar_String(Scalar\String_ $node) : string + { $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); switch ($kind) { case Scalar\String_::KIND_NOWDOC: @@ -145,17 +133,16 @@ protected function pScalar_String(Scalar\String_ $node): string { $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); $nl = $shouldIdent ? $this->nl : $this->newline; if ($node->value === '') { - return "<<<'$label'$nl$label{$this->docStringEndToken}"; + return "<<<'{$label}'{$nl}{$label}{$this->docStringEndToken}"; } - // Make sure trailing \r is not combined with following \n into CRLF. if ($node->value[strlen($node->value) - 1] !== "\r") { $value = $shouldIdent ? $this->indentString($node->value) : $node->value; - return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; + return "<<<'{$label}'{$nl}{$value}{$nl}{$label}{$this->docStringEndToken}"; } } - /* break missing intentionally */ - // no break + /* break missing intentionally */ + // no break case Scalar\String_::KIND_SINGLE_QUOTED: return $this->pSingleQuotedString($node->value); case Scalar\String_::KIND_HEREDOC: @@ -164,50 +151,42 @@ protected function pScalar_String(Scalar\String_ $node): string { if ($label && !$this->containsEndLabel($escaped, $label)) { $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; if ($escaped === '') { - return "<<<$label$nl$label{$this->docStringEndToken}"; + return "<<<{$label}{$nl}{$label}{$this->docStringEndToken}"; } - - return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; + return "<<<{$label}{$nl}{$escaped}{$nl}{$label}{$this->docStringEndToken}"; } - /* break missing intentionally */ - // no break + /* break missing intentionally */ + // no break case Scalar\String_::KIND_DOUBLE_QUOTED: return '"' . $this->escapeString($node->value, '"') . '"'; } throw new \Exception('Invalid string kind'); } - - protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { + protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node) : string + { if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; - if (count($node->parts) === 1 - && $node->parts[0] instanceof Node\InterpolatedStringPart - && $node->parts[0]->value === '' - ) { - return "<<<$label$nl$label{$this->docStringEndToken}"; + if (count($node->parts) === 1 && $node->parts[0] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '') { + return "<<<{$label}{$nl}{$label}{$this->docStringEndToken}"; } - - return "<<<$label$nl" . $this->pEncapsList($node->parts, null) - . "$nl$label{$this->docStringEndToken}"; + return "<<<{$label}{$nl}" . $this->pEncapsList($node->parts, null) . "{$nl}{$label}{$this->docStringEndToken}"; } } return '"' . $this->pEncapsList($node->parts, '"') . '"'; } - - protected function pScalar_Int(Scalar\Int_ $node): string { + protected function pScalar_Int(Scalar\Int_ $node) : string + { if ($node->value === -\PHP_INT_MAX - 1) { // PHP_INT_MIN cannot be represented as a literal, // because the sign is not part of the literal return '(-' . \PHP_INT_MAX . '-1)'; } - $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); if (Scalar\Int_::KIND_DEC === $kind) { return (string) $node->value; } - if ($node->value < 0) { $sign = '-'; $str = (string) -$node->value; @@ -225,8 +204,8 @@ protected function pScalar_Int(Scalar\Int_ $node): string { } throw new \Exception('Invalid number kind'); } - - protected function pScalar_Float(Scalar\Float_ $node): string { + protected function pScalar_Float(Scalar\Float_ $node) : string + { if (!is_finite($node->value)) { if ($node->value === \INF) { return '1.0E+1000'; @@ -234,261 +213,251 @@ protected function pScalar_Float(Scalar\Float_ $node): string { if ($node->value === -\INF) { return '-1.0E+1000'; } else { - return '\NAN'; + return '\\NAN'; } } - // Try to find a short full-precision representation $stringValue = sprintf('%.16G', $node->value); if ($node->value !== (float) $stringValue) { $stringValue = sprintf('%.17G', $node->value); } - // %G is locale dependent and there exists no locale-independent alternative. We don't want // mess with switching locales here, so let's assume that a comma is the only non-standard // decimal separator we may encounter... $stringValue = str_replace(',', '.', $stringValue); - // ensure that number is really printed as float return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; } - // Assignments - - protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); } - // Binary expressions - - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_BinaryOp_Pipe(BinaryOp\Pipe $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BinaryOp_Pipe(BinaryOp\Pipe $node, int $precedence, int $lhsPrecedence) : string + { return $this->pInfixOp(BinaryOp\Pipe::class, $node->left, ' |> ', $node->right, $precedence, $lhsPrecedence); } - - protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPostfixOp( - Expr\Instanceof_::class, $node->expr, - ' instanceof ' . $this->pNewOperand($node->class), - $precedence, $lhsPrecedence); + protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence) : string + { + return $this->pPostfixOp(Expr\Instanceof_::class, $node->expr, ' instanceof ' . $this->pNewOperand($node->class), $precedence, $lhsPrecedence); } - // Unary expressions - - protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_PreInc(Expr\PreInc $node): string { + protected function pExpr_PreInc(Expr\PreInc $node) : string + { return '++' . $this->p($node->var); } - - protected function pExpr_PreDec(Expr\PreDec $node): string { + protected function pExpr_PreDec(Expr\PreDec $node) : string + { return '--' . $this->p($node->var); } - - protected function pExpr_PostInc(Expr\PostInc $node): string { + protected function pExpr_PostInc(Expr\PostInc $node) : string + { return $this->p($node->var) . '++'; } - - protected function pExpr_PostDec(Expr\PostDec $node): string { + protected function pExpr_PostDec(Expr\PostDec $node) : string + { return $this->p($node->var) . '--'; } - - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); } - // Casts - - protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence) : string + { $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); if ($kind === Cast\Double::KIND_DOUBLE) { $cast = '(double)'; @@ -500,120 +469,100 @@ protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lh } return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Cast_Void(Cast\Void_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Cast_Void(Cast\Void_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Cast\Void_::class, '(void) ', $node->expr, $precedence, $lhsPrecedence); } - // Function calls and similar constructs - - protected function pExpr_FuncCall(Expr\FuncCall $node): string { - return $this->pCallLhs($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; + protected function pExpr_FuncCall(Expr\FuncCall $node) : string + { + return $this->pCallLhs($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - - protected function pExpr_MethodCall(Expr\MethodCall $node): string { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; + protected function pExpr_MethodCall(Expr\MethodCall $node) : string + { + return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; + protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) : string + { + return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - - protected function pExpr_StaticCall(Expr\StaticCall $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::' - . ($node->name instanceof Expr - ? ($node->name instanceof Expr\Variable - ? $this->p($node->name) - : '{' . $this->p($node->name) . '}') - : $node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; + protected function pExpr_StaticCall(Expr\StaticCall $node) : string + { + return $this->pStaticDereferenceLhs($node->class) . '::' . ($node->name instanceof Expr ? $node->name instanceof Expr\Variable ? $this->p($node->name) : '{' . $this->p($node->name) . '}' : $node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - - protected function pExpr_Empty(Expr\Empty_ $node): string { + protected function pExpr_Empty(Expr\Empty_ $node) : string + { return 'empty(' . $this->p($node->expr) . ')'; } - - protected function pExpr_Isset(Expr\Isset_ $node): string { + protected function pExpr_Isset(Expr\Isset_ $node) : string + { return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; } - - protected function pExpr_Eval(Expr\Eval_ $node): string { + protected function pExpr_Eval(Expr\Eval_ $node) : string + { return 'eval(' . $this->p($node->expr) . ')'; } - - protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { - static $map = [ - Expr\Include_::TYPE_INCLUDE => 'include', - Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', - Expr\Include_::TYPE_REQUIRE => 'require', - Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', - ]; - + protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence) : string + { + static $map = [Expr\Include_::TYPE_INCLUDE => 'include', Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', Expr\Include_::TYPE_REQUIRE => 'require', Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once']; return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_List(Expr\List_ $node): string { - $syntax = $node->getAttribute('kind', - $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); + protected function pExpr_List(Expr\List_ $node) : string + { + $syntax = $node->getAttribute('kind', $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); if ($syntax === Expr\List_::KIND_ARRAY) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + return '[' . $this->pMaybeMultiline($node->items, \true) . ']'; } else { - return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; + return 'list(' . $this->pMaybeMultiline($node->items, \true) . ')'; } } - // Other - - protected function pExpr_Error(Expr\Error $node): string { + protected function pExpr_Error(Expr\Error $node) : string + { throw new \LogicException('Cannot pretty-print AST with Error nodes'); } - - protected function pExpr_Variable(Expr\Variable $node): string { + protected function pExpr_Variable(Expr\Variable $node) : string + { if ($node->name instanceof Expr) { return '${' . $this->p($node->name) . '}'; } else { return '$' . $node->name; } } - - protected function pExpr_Array(Expr\Array_ $node): string { - $syntax = $node->getAttribute('kind', - $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); + protected function pExpr_Array(Expr\Array_ $node) : string + { + $syntax = $node->getAttribute('kind', $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); if ($syntax === Expr\Array_::KIND_SHORT) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + return '[' . $this->pMaybeMultiline($node->items, \true) . ']'; } else { - return 'array(' . $this->pMaybeMultiline($node->items, true) . ')'; + return 'array(' . $this->pMaybeMultiline($node->items, \true) . ')'; } } - - protected function pKey(?Node $node): string { + protected function pKey(?Node $node) : string + { if ($node === null) { return ''; } - // => is not really an operator and does not typically participate in precedence resolution. // However, there is an exception if yield expressions with keys are involved: // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that @@ -623,61 +572,48 @@ protected function pKey(?Node $node): string { $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; } - - protected function pArrayItem(Node\ArrayItem $node): string { - return $this->pKey($node->key) - . ($node->byRef ? '&' : '') - . ($node->unpack ? '...' : '') - . $this->p($node->value); + protected function pArrayItem(Node\ArrayItem $node) : string + { + return $this->pKey($node->key) . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { - return $this->pDereferenceLhs($node->var) - . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; + protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) : string + { + return $this->pDereferenceLhs($node->var) . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; } - - protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { + protected function pExpr_ConstFetch(Expr\ConstFetch $node) : string + { return $this->p($node->name); } - - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { + protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) : string + { return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); } - - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { + protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) : string + { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); } - - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { + protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) : string + { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); } - - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { + protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) : string + { return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); } - - protected function pExpr_ShellExec(Expr\ShellExec $node): string { + protected function pExpr_ShellExec(Expr\ShellExec $node) : string + { return '`' . $this->pEncapsList($node->parts, '`') . '`'; } - - protected function pExpr_Closure(Expr\Closure $node): string { - return $this->pAttrGroups($node->attrGroups, true) - . $this->pStatic($node->static) - . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pParams($node->params) . ')' - . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pExpr_Closure(Expr\Closure $node) : string + { + return $this->pAttrGroups($node->attrGroups, \true) . $this->pStatic($node->static) . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pParams($node->params) . ')' . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pExpr_Match(Expr\Match_ $node): string { - return 'match (' . $this->p($node->cond) . ') {' - . $this->pCommaSeparatedMultiline($node->arms, true) - . $this->nl - . '}'; + protected function pExpr_Match(Expr\Match_ $node) : string + { + return 'match (' . $this->p($node->cond) . ') {' . $this->pCommaSeparatedMultiline($node->arms, \true) . $this->nl . '}'; } - - protected function pMatchArm(Node\MatchArm $node): string { + protected function pMatchArm(Node\MatchArm $node) : string + { $result = ''; if ($node->conds) { for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { @@ -689,56 +625,43 @@ protected function pMatchArm(Node\MatchArm $node): string { } return $result . $this->p($node->body); } - - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp( - Expr\ArrowFunction::class, - $this->pAttrGroups($node->attrGroups, true) - . $this->pStatic($node->static) - . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pParams($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ', - $node->expr, $precedence, $lhsPrecedence); + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence) : string + { + return $this->pPrefixOp(Expr\ArrowFunction::class, $this->pAttrGroups($node->attrGroups, \true) . $this->pStatic($node->static) . 'fn' . ($node->byRef ? '&' : '') . '(' . $this->pParams($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' => ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pClosureUse(Node\ClosureUse $node): string { + protected function pClosureUse(Node\ClosureUse $node) : string + { return ($node->byRef ? '&' : '') . $this->p($node->var); } - - protected function pExpr_New(Expr\New_ $node): string { + protected function pExpr_New(Expr\New_ $node) : string + { if ($node->class instanceof Stmt\Class_) { $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; return 'new ' . $this->pClassCommon($node->class, $args); } - return 'new ' . $this->pNewOperand($node->class) - . '(' . $this->pMaybeMultiline($node->args) . ')'; + return 'new ' . $this->pNewOperand($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - - protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence) : string + { // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. // this is okay because the part between ? and : never needs parentheses. - return $this->pInfixOp(Expr\Ternary::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, - $precedence, $lhsPrecedence - ); + return $this->pInfixOp(Expr\Ternary::class, $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, $precedence, $lhsPrecedence); } - - protected function pExpr_Exit(Expr\Exit_ $node): string { + protected function pExpr_Exit(Expr\Exit_ $node) : string + { $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); - return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') - . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); + return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); } - - protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence) : string + { return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); } - - protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { + protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence) : string + { if ($node->value === null) { $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; @@ -746,309 +669,224 @@ protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrece if (!$this->phpVersion->supportsYieldWithoutParentheses()) { return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; } - return $this->pPrefixOp( - Expr\Yield_::class, 'yield ' . $this->pKey($node->key), - $node->value, $precedence, $lhsPrecedence); + return $this->pPrefixOp(Expr\Yield_::class, 'yield ' . $this->pKey($node->key), $node->value, $precedence, $lhsPrecedence); } } - // Declarations - - protected function pStmt_Namespace(Stmt\Namespace_ $node): string { + protected function pStmt_Namespace(Stmt\Namespace_ $node) : string + { if ($this->canUseSemicolonNamespaces) { - return 'namespace ' . $this->p($node->name) . ';' - . $this->nl . $this->pStmts($node->stmts, false); + return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, \false); } else { - return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; + return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } } - - protected function pStmt_Use(Stmt\Use_ $node): string { - return 'use ' . $this->pUseType($node->type) - . $this->pCommaSeparated($node->uses) . ';'; + protected function pStmt_Use(Stmt\Use_ $node) : string + { + return 'use ' . $this->pUseType($node->type) . $this->pCommaSeparated($node->uses) . ';'; } - - protected function pStmt_GroupUse(Stmt\GroupUse $node): string { - return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) - . '\{' . $this->pCommaSeparated($node->uses) . '};'; + protected function pStmt_GroupUse(Stmt\GroupUse $node) : string + { + return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) . '\\{' . $this->pCommaSeparated($node->uses) . '};'; } - - protected function pUseItem(Node\UseItem $node): string { - return $this->pUseType($node->type) . $this->p($node->name) - . (null !== $node->alias ? ' as ' . $node->alias : ''); + protected function pUseItem(Node\UseItem $node) : string + { + return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : ''); } - - protected function pUseType(int $type): string { - return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' - : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); + protected function pUseType(int $type) : string + { + return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); } - - protected function pStmt_Interface(Stmt\Interface_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'interface ' . $node->name - . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_Interface(Stmt\Interface_ $node) : string + { + return $this->pAttrGroups($node->attrGroups) . 'interface ' . $node->name . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Enum(Stmt\Enum_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'enum ' . $node->name - . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_Enum(Stmt\Enum_ $node) : string + { + return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Class(Stmt\Class_ $node): string { + protected function pStmt_Class(Stmt\Class_ $node) : string + { return $this->pClassCommon($node, ' ' . $node->name); } - - protected function pStmt_Trait(Stmt\Trait_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'trait ' . $node->name - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_Trait(Stmt\Trait_ $node) : string + { + return $this->pAttrGroups($node->attrGroups) . 'trait ' . $node->name . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_EnumCase(Stmt\EnumCase $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'case ' . $node->name - . ($node->expr ? ' = ' . $this->p($node->expr) : '') - . ';'; + protected function pStmt_EnumCase(Stmt\EnumCase $node) : string + { + return $this->pAttrGroups($node->attrGroups) . 'case ' . $node->name . ($node->expr ? ' = ' . $this->p($node->expr) : '') . ';'; } - - protected function pStmt_TraitUse(Stmt\TraitUse $node): string { - return 'use ' . $this->pCommaSeparated($node->traits) - . (empty($node->adaptations) - ? ';' - : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); + protected function pStmt_TraitUse(Stmt\TraitUse $node) : string + { + return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) ? ';' : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); } - - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { - return $this->p($node->trait) . '::' . $node->method - . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; + protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) : string + { + return $this->p($node->trait) . '::' . $node->method . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; } - - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { - return (null !== $node->trait ? $this->p($node->trait) . '::' : '') - . $node->method . ' as' - . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') - . ';'; + protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) : string + { + return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') . (null !== $node->newName ? ' ' . $node->newName : '') . ';'; } - - protected function pStmt_Property(Stmt\Property $node): string { - return $this->pAttrGroups($node->attrGroups) - . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) - . ($node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->props) - . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ';'); + protected function pStmt_Property(Stmt\Property $node) : string + { + return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->props) . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ';'); } - - protected function pPropertyItem(Node\PropertyItem $node): string { - return '$' . $node->name - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); + protected function pPropertyItem(Node\PropertyItem $node) : string + { + return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - - protected function pPropertyHook(Node\PropertyHook $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . ($node->byRef ? '&' : '') . $node->name - . ($node->params ? '(' . $this->pParams($node->params) . ')' : '') - . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}' - : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';'); + protected function pPropertyHook(Node\PropertyHook $node) : string + { + return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . ($node->byRef ? '&' : '') . $node->name . ($node->params ? '(' . $this->pParams($node->params) . ')' : '') . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}' : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';'); } - - protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pParams($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . (null !== $node->stmts - ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' - : ';'); + protected function pStmt_ClassMethod(Stmt\ClassMethod $node) : string + { + return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pParams($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - - protected function pStmt_ClassConst(Stmt\ClassConst $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'const ' - . (null !== $node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->consts) . ';'; + protected function pStmt_ClassConst(Stmt\ClassConst $node) : string + { + return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'const ' . (null !== $node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->consts) . ';'; } - - protected function pStmt_Function(Stmt\Function_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pParams($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_Function(Stmt\Function_ $node) : string + { + return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pParams($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Const(Stmt\Const_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'const ' - . $this->pCommaSeparated($node->consts) . ';'; + protected function pStmt_Const(Stmt\Const_ $node) : string + { + return $this->pAttrGroups($node->attrGroups) . 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - - protected function pStmt_Declare(Stmt\Declare_ $node): string { - return 'declare (' . $this->pCommaSeparated($node->declares) . ')' - . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); + protected function pStmt_Declare(Stmt\Declare_ $node) : string + { + return 'declare (' . $this->pCommaSeparated($node->declares) . ')' . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - - protected function pDeclareItem(Node\DeclareItem $node): string { + protected function pDeclareItem(Node\DeclareItem $node) : string + { return $node->key . '=' . $this->p($node->value); } - // Control flow - - protected function pStmt_If(Stmt\If_ $node): string { - return 'if (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') - . (null !== $node->else ? ' ' . $this->p($node->else) : ''); + protected function pStmt_If(Stmt\If_ $node) : string + { + return 'if (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') . (null !== $node->else ? ' ' . $this->p($node->else) : ''); } - - protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { - return 'elseif (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_ElseIf(Stmt\ElseIf_ $node) : string + { + return 'elseif (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Else(Stmt\Else_ $node): string { + protected function pStmt_Else(Stmt\Else_ $node) : string + { if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { // Print as "else if" rather than "else { if }" return 'else ' . $this->p($node->stmts[0]); } return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_For(Stmt\For_ $node): string { - return 'for (' - . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') - . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') - . $this->pCommaSeparated($node->loop) - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_For(Stmt\For_ $node) : string + { + return 'for (' . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') . $this->pCommaSeparated($node->loop) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Foreach(Stmt\Foreach_ $node): string { - return 'foreach (' . $this->p($node->expr) . ' as ' - . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') - . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_Foreach(Stmt\Foreach_ $node) : string + { + return 'foreach (' . $this->p($node->expr) . ' as ' . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_While(Stmt\While_ $node): string { - return 'while (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_While(Stmt\While_ $node) : string + { + return 'while (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Do(Stmt\Do_ $node): string { - return 'do {' . $this->pStmts($node->stmts) . $this->nl - . '} while (' . $this->p($node->cond) . ');'; + protected function pStmt_Do(Stmt\Do_ $node) : string + { + return 'do {' . $this->pStmts($node->stmts) . $this->nl . '} while (' . $this->p($node->cond) . ');'; } - - protected function pStmt_Switch(Stmt\Switch_ $node): string { - return 'switch (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->cases) . $this->nl . '}'; + protected function pStmt_Switch(Stmt\Switch_ $node) : string + { + return 'switch (' . $this->p($node->cond) . ') {' . $this->pStmts($node->cases) . $this->nl . '}'; } - - protected function pStmt_Case(Stmt\Case_ $node): string { - return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' - . $this->pStmts($node->stmts); + protected function pStmt_Case(Stmt\Case_ $node) : string + { + return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' . $this->pStmts($node->stmts); } - - protected function pStmt_TryCatch(Stmt\TryCatch $node): string { - return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') - . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); + protected function pStmt_TryCatch(Stmt\TryCatch $node) : string + { + return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); } - - protected function pStmt_Catch(Stmt\Catch_ $node): string { - return 'catch (' . $this->pImplode($node->types, '|') - . ($node->var !== null ? ' ' . $this->p($node->var) : '') - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pStmt_Catch(Stmt\Catch_ $node) : string + { + return 'catch (' . $this->pImplode($node->types, '|') . ($node->var !== null ? ' ' . $this->p($node->var) : '') . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Finally(Stmt\Finally_ $node): string { + protected function pStmt_Finally(Stmt\Finally_ $node) : string + { return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pStmt_Break(Stmt\Break_ $node): string { + protected function pStmt_Break(Stmt\Break_ $node) : string + { return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - - protected function pStmt_Continue(Stmt\Continue_ $node): string { + protected function pStmt_Continue(Stmt\Continue_ $node) : string + { return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - - protected function pStmt_Return(Stmt\Return_ $node): string { + protected function pStmt_Return(Stmt\Return_ $node) : string + { return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; } - - protected function pStmt_Label(Stmt\Label $node): string { + protected function pStmt_Label(Stmt\Label $node) : string + { return $node->name . ':'; } - - protected function pStmt_Goto(Stmt\Goto_ $node): string { + protected function pStmt_Goto(Stmt\Goto_ $node) : string + { return 'goto ' . $node->name . ';'; } - // Other - - protected function pStmt_Expression(Stmt\Expression $node): string { + protected function pStmt_Expression(Stmt\Expression $node) : string + { return $this->p($node->expr) . ';'; } - - protected function pStmt_Echo(Stmt\Echo_ $node): string { + protected function pStmt_Echo(Stmt\Echo_ $node) : string + { return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; } - - protected function pStmt_Static(Stmt\Static_ $node): string { + protected function pStmt_Static(Stmt\Static_ $node) : string + { return 'static ' . $this->pCommaSeparated($node->vars) . ';'; } - - protected function pStmt_Global(Stmt\Global_ $node): string { + protected function pStmt_Global(Stmt\Global_ $node) : string + { return 'global ' . $this->pCommaSeparated($node->vars) . ';'; } - - protected function pStaticVar(Node\StaticVar $node): string { - return $this->p($node->var) - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); + protected function pStaticVar(Node\StaticVar $node) : string + { + return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - - protected function pStmt_Unset(Stmt\Unset_ $node): string { + protected function pStmt_Unset(Stmt\Unset_ $node) : string + { return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; } - - protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { - $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; + protected function pStmt_InlineHTML(Stmt\InlineHTML $node) : string + { + $newline = $node->getAttribute('hasLeadingNewline', \true) ? $this->newline : ''; return '?>' . $newline . $node->value . 'remaining; } - - protected function pStmt_Nop(Stmt\Nop $node): string { + protected function pStmt_Nop(Stmt\Nop $node) : string + { return ''; } - - protected function pStmt_Block(Stmt\Block $node): string { + protected function pStmt_Block(Stmt\Block $node) : string + { return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - // Helpers - - protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { - return $this->pAttrGroups($node->attrGroups, $node->name === null) - . $this->pModifiers($node->flags) - . 'class' . $afterClassToken - . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken) : string + { + return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - - protected function pObjectProperty(Node $node): string { + protected function pObjectProperty(Node $node) : string + { if ($node instanceof Expr) { return '{' . $this->p($node) . '}'; } else { @@ -1056,9 +894,9 @@ protected function pObjectProperty(Node $node): string { return $node->name; } } - /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ - protected function pEncapsList(array $encapsList, ?string $quote): string { + protected function pEncapsList(array $encapsList, ?string $quote) : string + { $return = ''; foreach ($encapsList as $element) { if ($element instanceof Node\InterpolatedStringPart) { @@ -1067,11 +905,10 @@ protected function pEncapsList(array $encapsList, ?string $quote): string { $return .= '{' . $this->p($element) . '}'; } } - return $return; } - - protected function pSingleQuotedString(string $string): string { + protected function pSingleQuotedString(string $string) : string + { // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even @@ -1079,145 +916,138 @@ protected function pSingleQuotedString(string $string): string { $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; } - - protected function escapeString(string $string, ?string $quote): string { + protected function escapeString(string $string, ?string $quote) : string + { if (null === $quote) { // For doc strings, don't escape newlines - $escaped = addcslashes($string, "\t\f\v$\\"); + $escaped = addcslashes($string, "\t\f\v\$\\"); // But do escape isolated \r. Combined with the terminating newline, it might get // interpreted as \r\n and dropped from the string contents. - $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); + $escaped = preg_replace('/\\r(?!\\n)/', '\\r', $escaped); if ($this->phpVersion->supportsFlexibleHeredoc()) { $escaped = $this->indentString($escaped); } } else { - $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); + $escaped = addcslashes($string, "\n\r\t\f\v\$" . $quote . "\\"); } - // Escape control characters and non-UTF-8 characters. // Regex based on https://stackoverflow.com/a/11709412/385378. $regex = '/( - [\x00-\x08\x0E-\x1F] # Control characters - | [\xC0-\xC1] # Invalid UTF-8 Bytes - | [\xF5-\xFF] # Invalid UTF-8 Bytes - | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point - | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point - | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start - | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start - | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start - | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle - | (? $part) { - if ($part instanceof Node\InterpolatedStringPart - && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) - ) { - return true; + if ($part instanceof Node\InterpolatedStringPart && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0)) { + return \true; } } - return false; + return \false; } - - protected function pDereferenceLhs(Node $node): string { + protected function pDereferenceLhs(Node $node) : string + { if (!$this->dereferenceLhsRequiresParens($node)) { return $this->p($node); } else { return '(' . $this->p($node) . ')'; } } - - protected function pStaticDereferenceLhs(Node $node): string { + protected function pStaticDereferenceLhs(Node $node) : string + { if (!$this->staticDereferenceLhsRequiresParens($node)) { return $this->p($node); } else { return '(' . $this->p($node) . ')'; } } - - protected function pCallLhs(Node $node): string { + protected function pCallLhs(Node $node) : string + { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); } else { return '(' . $this->p($node) . ')'; } } - - protected function pNewOperand(Node $node): string { + protected function pNewOperand(Node $node) : string + { if (!$this->newOperandRequiresParens($node)) { return $this->p($node); } else { return '(' . $this->p($node) . ')'; } } - /** * @param Node[] $nodes */ - protected function hasNodeWithComments(array $nodes): bool { + protected function hasNodeWithComments(array $nodes) : bool + { foreach ($nodes as $node) { if ($node && $node->getComments()) { - return true; + return \true; } } - return false; + return \false; } - /** @param Node[] $nodes */ - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { + protected function pMaybeMultiline(array $nodes, bool $trailingComma = \false) : string + { if (!$this->hasNodeWithComments($nodes)) { return $this->pCommaSeparated($nodes); } else { return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl; } } - /** @param Node\Param[] $params */ - private function hasParamWithAttributes(array $params): bool { + private function hasParamWithAttributes(array $params) : bool + { foreach ($params as $param) { if ($param->attrGroups) { - return true; + return \true; } } - return false; + return \false; } - /** @param Node\Param[] $params */ - protected function pParams(array $params): string { - if ($this->hasNodeWithComments($params) || - ($this->hasParamWithAttributes($params) && !$this->phpVersion->supportsAttributes()) - ) { + protected function pParams(array $params) : string + { + if ($this->hasNodeWithComments($params) || $this->hasParamWithAttributes($params) && !$this->phpVersion->supportsAttributes()) { return $this->pCommaSeparatedMultiline($params, $this->phpVersion->supportsTrailingCommaInParamList()) . $this->nl; } return $this->pCommaSeparated($params); } - /** @param Node\AttributeGroup[] $nodes */ - protected function pAttrGroups(array $nodes, bool $inline = false): string { + protected function pAttrGroups(array $nodes, bool $inline = \false) : string + { $result = ''; $sep = $inline ? ' ' : $this->nl; foreach ($nodes as $node) { $result .= $this->p($node) . $sep; } - return $result; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php similarity index 64% rename from vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index ac8bda2..c3bb702 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -1,176 +1,180 @@ - */ - protected array $precedenceMap = [ + protected $precedenceMap = [ // [precedence, precedenceLHS, precedenceRHS] // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, // where 1 is added to one of the sides depending on associativity. This information is not // used for unary operators and set to -1. - Expr\Clone_::class => [-10, 0, 1], - BinaryOp\Pow::class => [ 0, 0, 1], - Expr\BitwiseNot::class => [ 10, -1, -1], - Expr\UnaryPlus::class => [ 10, -1, -1], - Expr\UnaryMinus::class => [ 10, -1, -1], - Cast\Int_::class => [ 10, -1, -1], - Cast\Double::class => [ 10, -1, -1], - Cast\String_::class => [ 10, -1, -1], - Cast\Array_::class => [ 10, -1, -1], - Cast\Object_::class => [ 10, -1, -1], - Cast\Bool_::class => [ 10, -1, -1], - Cast\Unset_::class => [ 10, -1, -1], - Expr\ErrorSuppress::class => [ 10, -1, -1], - Expr\Instanceof_::class => [ 20, -1, -1], - Expr\BooleanNot::class => [ 30, -1, -1], - BinaryOp\Mul::class => [ 40, 41, 40], - BinaryOp\Div::class => [ 40, 41, 40], - BinaryOp\Mod::class => [ 40, 41, 40], - BinaryOp\Plus::class => [ 50, 51, 50], - BinaryOp\Minus::class => [ 50, 51, 50], + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [0, 0, 1], + Expr\BitwiseNot::class => [10, -1, -1], + Expr\UnaryPlus::class => [10, -1, -1], + Expr\UnaryMinus::class => [10, -1, -1], + Cast\Int_::class => [10, -1, -1], + Cast\Double::class => [10, -1, -1], + Cast\String_::class => [10, -1, -1], + Cast\Array_::class => [10, -1, -1], + Cast\Object_::class => [10, -1, -1], + Cast\Bool_::class => [10, -1, -1], + Cast\Unset_::class => [10, -1, -1], + Expr\ErrorSuppress::class => [10, -1, -1], + Expr\Instanceof_::class => [20, -1, -1], + Expr\BooleanNot::class => [30, -1, -1], + BinaryOp\Mul::class => [40, 41, 40], + BinaryOp\Div::class => [40, 41, 40], + BinaryOp\Mod::class => [40, 41, 40], + BinaryOp\Plus::class => [50, 51, 50], + BinaryOp\Minus::class => [50, 51, 50], // FIXME: This precedence is incorrect for PHP 8. - BinaryOp\Concat::class => [ 50, 51, 50], - BinaryOp\ShiftLeft::class => [ 60, 61, 60], - BinaryOp\ShiftRight::class => [ 60, 61, 60], - BinaryOp\Pipe::class => [ 65, 66, 65], - BinaryOp\Smaller::class => [ 70, 70, 70], - BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], - BinaryOp\Greater::class => [ 70, 70, 70], - BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], - BinaryOp\Equal::class => [ 80, 80, 80], - BinaryOp\NotEqual::class => [ 80, 80, 80], - BinaryOp\Identical::class => [ 80, 80, 80], - BinaryOp\NotIdentical::class => [ 80, 80, 80], - BinaryOp\Spaceship::class => [ 80, 80, 80], - BinaryOp\BitwiseAnd::class => [ 90, 91, 90], - BinaryOp\BitwiseXor::class => [100, 101, 100], - BinaryOp\BitwiseOr::class => [110, 111, 110], - BinaryOp\BooleanAnd::class => [120, 121, 120], - BinaryOp\BooleanOr::class => [130, 131, 130], - BinaryOp\Coalesce::class => [140, 140, 141], - Expr\Ternary::class => [150, 150, 150], - Expr\Assign::class => [160, -1, -1], - Expr\AssignRef::class => [160, -1, -1], - AssignOp\Plus::class => [160, -1, -1], - AssignOp\Minus::class => [160, -1, -1], - AssignOp\Mul::class => [160, -1, -1], - AssignOp\Div::class => [160, -1, -1], - AssignOp\Concat::class => [160, -1, -1], - AssignOp\Mod::class => [160, -1, -1], - AssignOp\BitwiseAnd::class => [160, -1, -1], - AssignOp\BitwiseOr::class => [160, -1, -1], - AssignOp\BitwiseXor::class => [160, -1, -1], - AssignOp\ShiftLeft::class => [160, -1, -1], - AssignOp\ShiftRight::class => [160, -1, -1], - AssignOp\Pow::class => [160, -1, -1], - AssignOp\Coalesce::class => [160, -1, -1], - Expr\YieldFrom::class => [170, -1, -1], - Expr\Yield_::class => [175, -1, -1], - Expr\Print_::class => [180, -1, -1], - BinaryOp\LogicalAnd::class => [190, 191, 190], - BinaryOp\LogicalXor::class => [200, 201, 200], - BinaryOp\LogicalOr::class => [210, 211, 210], - Expr\Include_::class => [220, -1, -1], - Expr\ArrowFunction::class => [230, -1, -1], - Expr\Throw_::class => [240, -1, -1], - Expr\Cast\Void_::class => [250, -1, -1], + BinaryOp\Concat::class => [50, 51, 50], + BinaryOp\ShiftLeft::class => [60, 61, 60], + BinaryOp\ShiftRight::class => [60, 61, 60], + BinaryOp\Pipe::class => [65, 66, 65], + BinaryOp\Smaller::class => [70, 70, 70], + BinaryOp\SmallerOrEqual::class => [70, 70, 70], + BinaryOp\Greater::class => [70, 70, 70], + BinaryOp\GreaterOrEqual::class => [70, 70, 70], + BinaryOp\Equal::class => [80, 80, 80], + BinaryOp\NotEqual::class => [80, 80, 80], + BinaryOp\Identical::class => [80, 80, 80], + BinaryOp\NotIdentical::class => [80, 80, 80], + BinaryOp\Spaceship::class => [80, 80, 80], + BinaryOp\BitwiseAnd::class => [90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, 150, 150], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], + Expr\Cast\Void_::class => [250, -1, -1], ]; - /** @var int Current indentation level. */ - protected int $indentLevel; + protected $indentLevel; /** @var string String for single level of indentation */ - private string $indent; + private $indent; /** @var int Width in spaces to indent by. */ - private int $indentWidth; + private $indentWidth; /** @var bool Whether to use tab indentation. */ - private bool $useTabs; + private $useTabs; /** @var int Width in spaces of one tab. */ - private int $tabWidth = 4; - + private $tabWidth = 4; /** @var string Newline style. Does not include current indentation. */ - protected string $newline; + protected $newline; /** @var string Newline including current indentation. */ - protected string $nl; + protected $nl; /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. * Null if flexible doc strings are used. */ - protected ?string $docStringEndToken; + protected $docStringEndToken; /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected bool $canUseSemicolonNamespaces; + protected $canUseSemicolonNamespaces; /** @var bool Whether to use short array syntax if the node specifies no preference */ - protected bool $shortArraySyntax; + protected $shortArraySyntax; /** @var PhpVersion PHP version to target */ - protected PhpVersion $phpVersion; - + protected $phpVersion; /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ - protected ?TokenStream $origTokens; + protected $origTokens; /** @var Internal\Differ Differ for node lists */ - protected Differ $nodeListDiffer; + protected $nodeListDiffer; /** @var array Map determining whether a certain character is a label character */ - protected array $labelCharMap; + protected $labelCharMap; /** * @var array> Map from token classes and subnode names to FIXUP_* constants. * This is used during format-preserving prints to place additional parens/braces if necessary. */ - protected array $fixupMap; + protected $fixupMap; /** * @var array Map from "{$node->getType()}->{$subNode}" * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped * when removing this node. */ - protected array $removalMap; + protected $removalMap; /** * @var array Map from * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. * $find is an optional token after which the insertion occurs. $extraLeft/Right * are optionally added before/after the main insertions. */ - protected array $insertionMap; + protected $insertionMap; /** * @var array Map From "{$class}->{$subNode}" to string that should be inserted * between elements of this list subnode. */ - protected array $listInsertionMap; - + protected $listInsertionMap; /** * @var array */ - protected array $emptyListInsertionMap; + protected $emptyListInsertionMap; /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] * where $printFn is the function to print the modifiers and $token is the token before which * the modifiers should be reprinted. */ - protected array $modifierChangeMap; - + protected $modifierChangeMap; /** * Creates a pretty printer instance using the given options. * @@ -192,46 +196,42 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { * phpVersion?: PhpVersion, newline?: string, indent?: string, shortArraySyntax?: bool * } $options Dictionary of formatting options */ - public function __construct(array $options = []) { + public function __construct(array $options = []) + { $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); - $this->newline = $options['newline'] ?? "\n"; if ($this->newline !== "\n" && $this->newline != "\r\n") { - throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); + throw new \LogicException('Option "newline" must be one of "\\n" or "\\r\\n"'); } - - $this->shortArraySyntax = - $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); - $this->docStringEndToken = - $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); - + $this->shortArraySyntax = $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); $this->indent = $indent = $options['indent'] ?? ' '; if ($indent === "\t") { - $this->useTabs = true; + $this->useTabs = \true; $this->indentWidth = $this->tabWidth; } elseif ($indent === \str_repeat(' ', \strlen($indent))) { - $this->useTabs = false; + $this->useTabs = \false; $this->indentWidth = \strlen($indent); } else { throw new \LogicException('Option "indent" must either be all spaces or a single tab'); } } - /** * Reset pretty printing state. */ - protected function resetState(): void { + protected function resetState() : void + { $this->indentLevel = 0; $this->nl = $this->newline; $this->origTokens = null; } - /** * Set indentation level * * @param int $level Level in number of spaces */ - protected function setIndentLevel(int $level): void { + protected function setIndentLevel(int $level) : void + { $this->indentLevel = $level; if ($this->useTabs) { $tabs = \intdiv($level, $this->tabWidth); @@ -241,23 +241,22 @@ protected function setIndentLevel(int $level): void { $this->nl = $this->newline . \str_repeat(' ', $level); } } - /** * Increase indentation level. */ - protected function indent(): void { + protected function indent() : void + { $this->indentLevel += $this->indentWidth; $this->nl .= $this->indent; } - /** * Decrease indentation level. */ - protected function outdent(): void { + protected function outdent() : void + { assert($this->indentLevel >= $this->indentWidth); $this->setIndentLevel($this->indentLevel - $this->indentWidth); } - /** * Pretty prints an array of statements. * @@ -265,13 +264,12 @@ protected function outdent(): void { * * @return string Pretty printed statements */ - public function prettyPrint(array $stmts): string { + public function prettyPrint(array $stmts) : string + { $this->resetState(); $this->preprocessNodes($stmts); - - return ltrim($this->handleMagicTokens($this->pStmts($stmts, false))); + return ltrim($this->handleMagicTokens($this->pStmts($stmts, \false))); } - /** * Pretty prints an expression. * @@ -279,11 +277,11 @@ public function prettyPrint(array $stmts): string { * * @return string Pretty printed node */ - public function prettyPrintExpr(Expr $node): string { + public function prettyPrintExpr(Expr $node) : string + { $this->resetState(); return $this->handleMagicTokens($this->p($node)); } - /** * Pretty prints a file of statements (includes the opening newline . $this->newline; } - $p = "newline . $this->newline . $this->prettyPrint($stmts); - if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); + $p = preg_replace('/^<\\?php\\s+\\?>\\r?\\n?/', '', $p); } if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { - $p = preg_replace('/<\?php$/', '', rtrim($p)); + $p = preg_replace('/<\\?php$/', '', rtrim($p)); } - return $p; } - /** * Preprocesses the top-level nodes to initialize pretty printer state. * * @param Node[] $nodes Array of nodes */ - protected function preprocessNodes(array $nodes): void { + protected function preprocessNodes(array $nodes) : void + { /* We can use semicolon-namespaces unless there is a global namespace declaration */ - $this->canUseSemicolonNamespaces = true; + $this->canUseSemicolonNamespaces = \true; foreach ($nodes as $node) { if ($node instanceof Stmt\Namespace_ && null === $node->name) { - $this->canUseSemicolonNamespaces = false; + $this->canUseSemicolonNamespaces = \false; break; } } } - /** * Handles (and removes) doc-string-end tokens. */ - protected function handleMagicTokens(string $str): string { + protected function handleMagicTokens(string $str) : string + { if ($this->docStringEndToken !== null) { // Replace doc-string-end tokens with nothing or a newline - $str = str_replace( - $this->docStringEndToken . ';' . $this->newline, - ';' . $this->newline, - $str); + $str = str_replace($this->docStringEndToken . ';' . $this->newline, ';' . $this->newline, $str); $str = str_replace($this->docStringEndToken, $this->newline, $str); } - return $str; } - /** * Pretty prints an array of nodes (statements) and indents them optionally. * @@ -348,11 +339,11 @@ protected function handleMagicTokens(string $str): string { * * @return string Pretty printed statements */ - protected function pStmts(array $nodes, bool $indent = true): string { + protected function pStmts(array $nodes, bool $indent = \true) : string + { if ($indent) { $this->indent(); } - $result = ''; foreach ($nodes as $node) { $comments = $node->getComments(); @@ -362,17 +353,13 @@ protected function pStmts(array $nodes, bool $indent = true): string { continue; } } - $result .= $this->nl . $this->p($node); } - if ($indent) { $this->outdent(); } - return $result; } - /** * Pretty-print an infix operation while taking precedence into account. * @@ -385,10 +372,8 @@ protected function pStmts(array $nodes, bool $indent = true): string { * * @return string Pretty printed infix operation */ - protected function pInfixOp( - string $class, Node $leftNode, string $operatorString, Node $rightNode, - int $precedence, int $lhsPrecedence - ): string { + protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode, int $precedence, int $lhsPrecedence) : string + { list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; $prefix = ''; $suffix = ''; @@ -397,10 +382,8 @@ protected function pInfixOp( $suffix = ')'; $lhsPrecedence = self::MAX_PRECEDENCE; } - return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) - . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; } - /** * Pretty-print a prefix operation while taking precedence into account. * @@ -412,7 +395,8 @@ protected function pInfixOp( * * @return string Pretty printed prefix operation */ - protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence) : string + { $opPrecedence = $this->precedenceMap[$class][0]; $prefix = ''; $suffix = ''; @@ -422,15 +406,12 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node, $lhsPrecedence = self::MAX_PRECEDENCE; } $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); - if (($operatorString === '+' && $printedArg[0] === '+') || - ($operatorString === '-' && $printedArg[0] === '-') - ) { + if ($operatorString === '+' && $printedArg[0] === '+' || $operatorString === '-' && $printedArg[0] === '-') { // Avoid printing +(+$a) as ++$a and similar. $printedArg = '(' . $printedArg . ')'; } return $prefix . $operatorString . $printedArg . $suffix; } - /** * Pretty-print a postfix operation while taking precedence into account. * @@ -442,7 +423,8 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node, * * @return string Pretty printed postfix operation */ - protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence) : string + { $opPrecedence = $this->precedenceMap[$class][0]; $prefix = ''; $suffix = ''; @@ -456,7 +438,6 @@ protected function pPostfixOp(string $class, Node $node, string $operatorString, } return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; } - /** * Pretty prints an array of nodes and implodes the printed values. * @@ -465,7 +446,8 @@ protected function pPostfixOp(string $class, Node $node, string $operatorString, * * @return string Imploded pretty printed nodes> $pre */ - protected function pImplode(array $nodes, string $glue = ''): string { + protected function pImplode(array $nodes, string $glue = '') : string + { $pNodes = []; foreach ($nodes as $node) { if (null === $node) { @@ -474,10 +456,8 @@ protected function pImplode(array $nodes, string $glue = ''): string { $pNodes[] = $this->p($node); } } - return implode($glue, $pNodes); } - /** * Pretty prints an array of nodes and implodes the printed values with commas. * @@ -485,10 +465,10 @@ protected function pImplode(array $nodes, string $glue = ''): string { * * @return string Comma separated pretty printed nodes */ - protected function pCommaSeparated(array $nodes): string { + protected function pCommaSeparated(array $nodes) : string + { return $this->pImplode($nodes, ', '); } - /** * Pretty prints a comma-separated list of nodes in multiline style, including comments. * @@ -499,9 +479,9 @@ protected function pCommaSeparated(array $nodes): string { * * @return string Comma separated pretty printed nodes in multiline style */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string + { $this->indent(); - $result = ''; $lastIdx = count($nodes) - 1; foreach ($nodes as $idx => $node) { @@ -510,7 +490,6 @@ protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): if ($comments) { $result .= $this->nl . $this->pComments($comments); } - $result .= $this->nl . $this->p($node); } else { $result .= $this->nl; @@ -519,11 +498,9 @@ protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): $result .= ','; } } - $this->outdent(); return $result; } - /** * Prints reformatted text of the passed comments. * @@ -531,16 +508,14 @@ protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): * * @return string Reformatted text of comments */ - protected function pComments(array $comments): string { + protected function pComments(array $comments) : string + { $formattedComments = []; - foreach ($comments as $comment) { $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); } - return implode($this->nl, $formattedComments); } - /** * Perform a format-preserving pretty print of an AST. * @@ -556,7 +531,8 @@ protected function pComments(array $comments): string { * @param Node[] $origStmts Original AST with token offset information * @param Token[] $origTokens Tokens of the original code */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string + { $this->initializeNodeListDiffer(); $this->initializeLabelCharMap(); $this->initializeFixupMap(); @@ -565,12 +541,9 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori $this->initializeListInsertionMap(); $this->initializeEmptyListInsertionMap(); $this->initializeModifierChangeMap(); - $this->resetState(); $this->origTokens = new TokenStream($origTokens, $this->tabWidth); - $this->preprocessNodes($stmts); - $pos = 0; $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); if (null !== $result) { @@ -578,16 +551,14 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori } else { // Fallback // TODO Add newline . $this->pStmts($stmts, false); + $result = "newline . $this->pStmts($stmts, \false); } - return $this->handleMagicTokens($result); } - - protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence) : string + { return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } - /** * Pretty prints a node. * @@ -600,28 +571,22 @@ protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): s * * @return string Pretty printed node */ - protected function p( - Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, - bool $parentFormatPreserved = false - ): string { + protected function p(Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, bool $parentFormatPreserved = \false) : string + { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } - /** @var Node|null $origNode */ $origNode = $node->getAttribute('origNode'); if (null === $origNode) { return $this->pFallback($node, $precedence, $lhsPrecedence); } - $class = \get_class($node); \assert($class === \get_class($origNode)); - $startPos = $origNode->getStartTokenPos(); $endPos = $origNode->getEndTokenPos(); \assert($startPos >= 0 && $endPos >= 0); - $fallbackNode = $node; if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { // Normalize node structure of anonymous classes @@ -630,59 +595,44 @@ protected function p( $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); $class = PrintableNewAnonClassNode::class; } - // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting // is not preserved, then we need to use the fallback code to make sure the tags are // printed. if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); - $type = $node->getType(); $fixupInfo = $this->fixupMap[$class] ?? null; - $result = ''; $pos = $startPos; foreach ($node->getSubNodeNames() as $subNodeName) { - $subNode = $node->$subNodeName; - $origSubNode = $origNode->$subNodeName; - - if ((!$subNode instanceof Node && $subNode !== null) - || (!$origSubNode instanceof Node && $origSubNode !== null) - ) { + $subNode = $node->{$subNodeName}; + $origSubNode = $origNode->{$subNodeName}; + if (!$subNode instanceof Node && $subNode !== null || !$origSubNode instanceof Node && $origSubNode !== null) { if ($subNode === $origSubNode) { // Unchanged, can reuse old code continue; } - if (is_array($subNode) && is_array($origSubNode)) { // Array subnode changed, we might be able to reconstruct it - $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, - $fixupInfo[$subNodeName] ?? null - ); + $listResult = $this->pArray($subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, $fixupInfo[$subNodeName] ?? null); if (null === $listResult) { return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - $result .= $listResult; continue; } - // Check if this is a modifier change $key = $class . '->' . $subNodeName; if (!isset($this->modifierChangeMap[$key])) { return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - [$printFn, $findToken] = $this->modifierChangeMap[$key]; - $result .= $this->$printFn($subNode); + $result .= $this->{$printFn}($subNode); $pos = $this->origTokens->findRight($pos, $findToken); continue; } - $extraLeft = ''; $extraRight = ''; if ($origSubNode !== null) { @@ -694,35 +644,29 @@ protected function p( // Both null, nothing to do continue; } - // A node has been inserted, check if we have insertion information for it $key = $type . '->' . $subNodeName; if (!isset($this->insertionMap[$key])) { return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) - + (int) !$beforeToken; + $subStartPos = $this->origTokens->findRight($pos, $findToken) + (int) (!$beforeToken); } else { $subStartPos = $pos; } - if (null === $extraLeft && null !== $extraRight) { // If inserting on the right only, skipping whitespace looks better $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); } $subEndPos = $subStartPos - 1; } - if (null === $subNode) { // A node has been removed, check if we have removal information for it $key = $type . '->' . $subNodeName; if (!isset($this->removalMap[$key])) { return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - // Adjust positions to account for additional tokens that must be skipped $removalInfo = $this->removalMap[$key]; if (isset($removalInfo['left'])) { @@ -732,40 +676,29 @@ protected function p( $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; } } - $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); - if (null !== $subNode) { $result .= $extraLeft; - $origIndentLevel = $this->indentLevel; $this->setIndentLevel(max($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment, 0)); - // If it's the same node that was previously in this position, it certainly doesn't // need fixup. It's important to check this here, because our fixup checks are more // conservative than strictly necessary. - if (isset($fixupInfo[$subNodeName]) - && $subNode->getAttribute('origNode') !== $origSubNode - ) { + if (isset($fixupInfo[$subNodeName]) && $subNode->getAttribute('origNode') !== $origSubNode) { $fixup = $fixupInfo[$subNodeName]; $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); } else { - $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, \true); } - $this->safeAppend($result, $res); $this->setIndentLevel($origIndentLevel); - $result .= $extraRight; } - $pos = $subEndPos + 1; } - $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); return $result; } - /** * Perform a format-preserving pretty print of an array. * @@ -779,27 +712,21 @@ protected function p( * * @return null|string Result of pretty print or null if cannot preserve formatting */ - protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeClass, string $subNodeName, ?int $fixup - ): ?string { + protected function pArray(array $nodes, array $origNodes, int &$pos, int $indentAdjustment, string $parentNodeClass, string $subNodeName, ?int $fixup) : ?string + { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - $mapKey = $parentNodeClass . '->' . $subNodeName; $insertStr = $this->listInsertionMap[$mapKey] ?? null; $isStmtList = $subNodeName === 'stmts'; - - $beforeFirstKeepOrReplace = true; - $skipRemovedNode = false; + $beforeFirstKeepOrReplace = \true; + $skipRemovedNode = \false; $delayedAdd = []; $lastElemIndentLevel = $this->indentLevel; - - $insertNewline = false; + $insertNewline = \false; if ($insertStr === "\n") { $insertStr = ''; - $insertNewline = true; + $insertNewline = \true; } - if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { $startPos = $origNodes[0]->getStartTokenPos(); $endPos = $origNodes[0]->getEndTokenPos(); @@ -812,7 +739,6 @@ protected function pArray( return null; } } - $result = ''; foreach ($diff as $i => $diffElem) { $diffType = $diffElem->type; @@ -820,10 +746,8 @@ protected function pArray( $arrItem = $diffElem->new; /** @var Node|string|null $origArrItem */ $origArrItem = $diffElem->old; - if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { - $beforeFirstKeepOrReplace = false; - + $beforeFirstKeepOrReplace = \false; if ($origArrItem === null || $arrItem === null) { // We can only handle the case where both are null if ($origArrItem === $arrItem) { @@ -831,31 +755,25 @@ protected function pArray( } return null; } - if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { // We can only deal with nodes. This can occur for Names, which use string arrays. return null; } - $itemStartPos = $origArrItem->getStartTokenPos(); $itemEndPos = $origArrItem->getEndTokenPos(); \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); - $origIndentLevel = $this->indentLevel; $lastElemIndentLevel = max($this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment, 0); $this->setIndentLevel($lastElemIndentLevel); - $comments = $arrItem->getComments(); $origComments = $origArrItem->getComments(); $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; \assert($commentStartPos >= 0); - if ($commentStartPos < $pos) { // Comments may be assigned to multiple nodes if they start at the same position. // Make sure we don't try to print them multiple times. $commentStartPos = $itemStartPos; } - if ($skipRemovedNode) { if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { // We'd remove an opening/closing PHP tag. @@ -864,10 +782,8 @@ protected function pArray( return null; } } else { - $result .= $this->origTokens->getTokenCode( - $pos, $commentStartPos, $indentAdjustment); + $result .= $this->origTokens->getTokenCode($pos, $commentStartPos, $indentAdjustment); } - if (!empty($delayedAdd)) { /** @var Node $delayedAddNode */ foreach ($delayedAdd as $delayedAddNode) { @@ -877,64 +793,49 @@ protected function pArray( $result .= $this->pComments($delayedAddComments) . $this->nl; } } - - $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); - + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, \true)); if ($insertNewline) { $result .= $insertStr . $this->nl; } else { $result .= $insertStr; } } - $delayedAdd = []; } - if ($comments !== $origComments) { if ($comments) { $result .= $this->pComments($comments) . $this->nl; } } else { - $result .= $this->origTokens->getTokenCode( - $commentStartPos, $itemStartPos, $indentAdjustment); + $result .= $this->origTokens->getTokenCode($commentStartPos, $itemStartPos, $indentAdjustment); } - // If we had to remove anything, we have done so now. - $skipRemovedNode = false; + $skipRemovedNode = \false; } elseif ($diffType === DiffElem::TYPE_ADD) { if (null === $insertStr) { // We don't have insertion information for this list type return null; } - if (!$arrItem instanceof Node) { // We only support list insertion of nodes. return null; } - // We go multiline if the original code was multiline, // or if it's an array item with a comment above it. // Match always uses multiline formatting. - if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments() || - $parentNodeClass === Expr\Match_::class) - ) { + if ($insertStr === ', ' && ($this->isMultiline($origNodes) || $arrItem->getComments() || $parentNodeClass === Expr\Match_::class)) { $insertStr = ','; - $insertNewline = true; + $insertNewline = \true; } - if ($beforeFirstKeepOrReplace) { // Will be inserted at the next "replace" or "keep" element $delayedAdd[] = $arrItem; continue; } - $itemStartPos = $pos; $itemEndPos = $pos - 1; - $origIndentLevel = $this->indentLevel; $this->setIndentLevel($lastElemIndentLevel); - if ($insertNewline) { $result .= $insertStr . $this->nl; $comments = $arrItem->getComments(); @@ -949,23 +850,19 @@ protected function pArray( // We only support removal for nodes return null; } - $itemStartPos = $origArrItem->getStartTokenPos(); $itemEndPos = $origArrItem->getEndTokenPos(); \assert($itemStartPos >= 0 && $itemEndPos >= 0); - // Consider comments part of the node. $origComments = $origArrItem->getComments(); if ($origComments) { $itemStartPos = $origComments[0]->getStartTokenPos(); } - if ($i === 0) { // If we're removing from the start, keep the tokens before the node and drop those after it, // instead of the other way around. - $result .= $this->origTokens->getTokenCode( - $pos, $itemStartPos, $indentAdjustment); - $skipRemovedNode = true; + $result .= $this->origTokens->getTokenCode($pos, $itemStartPos, $indentAdjustment); + $skipRemovedNode = \true; } else { if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { // We'd remove an opening/closing PHP tag. @@ -973,42 +870,35 @@ protected function pArray( return null; } } - $pos = $itemEndPos + 1; continue; } else { throw new \Exception("Shouldn't happen"); } - if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); } else { - $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, \true); } $this->safeAppend($result, $res); - $this->setIndentLevel($origIndentLevel); $pos = $itemEndPos + 1; } - if ($skipRemovedNode) { // TODO: Support removing single node. return null; } - if (!empty($delayedAdd)) { if (!isset($this->emptyListInsertionMap[$mapKey])) { return null; } - list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; if (null !== $findToken) { $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); $pos = $insertPos; } - - $first = true; + $first = \true; $result .= $extraLeft; foreach ($delayedAdd as $delayedAddNode) { if (!$first) { @@ -1017,15 +907,13 @@ protected function pArray( $result .= $this->nl; } } - $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - $first = false; + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, \true); + $first = \false; } $result .= $extraRight === "\n" ? $this->nl : $extraRight; } - return $result; } - /** * Print node with fixups. * @@ -1041,7 +929,8 @@ protected function pArray( * * @return string Result of fixed-up print of subnode */ - protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos) : string + { switch ($fixup) { case self::FIXUP_PREC_LEFT: // We use a conservative approximation where lhsPrecedence == precedence. @@ -1063,80 +952,63 @@ protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $ } break; case self::FIXUP_CALL_LHS: - if ($this->callLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { + if ($this->callLhsRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { return '(' . $this->p($subNode) . ')'; } break; case self::FIXUP_DEREF_LHS: - if ($this->dereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { + if ($this->dereferenceLhsRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { return '(' . $this->p($subNode) . ')'; } break; case self::FIXUP_STATIC_DEREF_LHS: - if ($this->staticDereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { + if ($this->staticDereferenceLhsRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { return '(' . $this->p($subNode) . ')'; } break; case self::FIXUP_NEW: - if ($this->newOperandRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { + if ($this->newOperandRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { return '(' . $this->p($subNode) . ')'; } break; case self::FIXUP_BRACED_NAME: case self::FIXUP_VAR_BRACED_NAME: - if ($subNode instanceof Expr - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') - . '{' . $this->p($subNode) . '}'; + if ($subNode instanceof Expr && !$this->origTokens->haveBraces($subStartPos, $subEndPos)) { + return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') . '{' . $this->p($subNode) . '}'; } break; case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Node\InterpolatedStringPart - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { + if (!$subNode instanceof Node\InterpolatedStringPart && !$this->origTokens->haveBraces($subStartPos, $subEndPos)) { return '{' . $this->p($subNode) . '}'; } break; default: throw new \Exception('Cannot happen'); } - // Nothing special to do return $this->p($subNode); } - /** * Appends to a string, ensuring whitespace between label characters. * * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". * Without safeAppend the result would be "echox", which does not preserve semantics. */ - protected function safeAppend(string &$str, string $append): void { + protected function safeAppend(string &$str, string $append) : void + { if ($str === "") { $str = $append; return; } - if ($append === "") { return; } - - if (!$this->labelCharMap[$append[0]] - || !$this->labelCharMap[$str[\strlen($str) - 1]]) { + if (!$this->labelCharMap[$append[0]] || !$this->labelCharMap[$str[\strlen($str) - 1]]) { $str .= $append; } else { $str .= " " . $append; } } - /** * Determines whether the LHS of a call must be wrapped in parenthesis. * @@ -1144,17 +1016,10 @@ protected function safeAppend(string &$str, string $append): void { * * @return bool Whether parentheses are required */ - protected function callLhsRequiresParens(Node $node): bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_); + protected function callLhsRequiresParens(Node $node) : bool + { + return !($node instanceof Node\Name || $node instanceof Expr\Variable || $node instanceof Expr\ArrayDimFetch || $node instanceof Expr\FuncCall || $node instanceof Expr\MethodCall || $node instanceof Expr\NullsafeMethodCall || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_); } - /** * Determines whether the LHS of an array/object operation must be wrapped in parentheses. * @@ -1162,12 +1027,11 @@ protected function callLhsRequiresParens(Node $node): bool { * * @return bool Whether parentheses are required */ - protected function dereferenceLhsRequiresParens(Node $node): bool { + protected function dereferenceLhsRequiresParens(Node $node) : bool + { // A constant can occur on the LHS of an array/object deref, but not a static deref. - return $this->staticDereferenceLhsRequiresParens($node) - && !$node instanceof Expr\ConstFetch; + return $this->staticDereferenceLhsRequiresParens($node) && !$node instanceof Expr\ConstFetch; } - /** * Determines whether the LHS of a static operation must be wrapped in parentheses. * @@ -1175,22 +1039,10 @@ protected function dereferenceLhsRequiresParens(Node $node): bool { * * @return bool Whether parentheses are required */ - protected function staticDereferenceLhsRequiresParens(Node $node): bool { - return !($node instanceof Expr\Variable - || $node instanceof Node\Name - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_ - || $node instanceof Scalar\String_ - || $node instanceof Expr\ClassConstFetch); + protected function staticDereferenceLhsRequiresParens(Node $node) : bool + { + return !($node instanceof Expr\Variable || $node instanceof Node\Name || $node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || $node instanceof Expr\NullsafePropertyFetch || $node instanceof Expr\StaticPropertyFetch || $node instanceof Expr\FuncCall || $node instanceof Expr\MethodCall || $node instanceof Expr\NullsafeMethodCall || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_ || $node instanceof Scalar\String_ || $node instanceof Expr\ClassConstFetch); } - /** * Determines whether an expression used in "new" or "instanceof" requires parentheses. * @@ -1198,21 +1050,19 @@ protected function staticDereferenceLhsRequiresParens(Node $node): bool { * * @return bool Whether parentheses are required */ - protected function newOperandRequiresParens(Node $node): bool { + protected function newOperandRequiresParens(Node $node) : bool + { if ($node instanceof Node\Name || $node instanceof Expr\Variable) { - return false; + return \false; } - if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || - $node instanceof Expr\NullsafePropertyFetch - ) { + if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || $node instanceof Expr\NullsafePropertyFetch) { return $this->newOperandRequiresParens($node->var); } if ($node instanceof Expr\StaticPropertyFetch) { return $this->newOperandRequiresParens($node->class); } - return true; + return \true; } - /** * Print modifiers, including trailing whitespace. * @@ -1220,23 +1070,14 @@ protected function newOperandRequiresParens(Node $node): bool { * * @return string Printed modifiers */ - protected function pModifiers(int $modifiers): string { - return ($modifiers & Modifiers::FINAL ? 'final ' : '') - . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') - . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') - . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') - . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') - . ($modifiers & Modifiers::PUBLIC_SET ? 'public(set) ' : '') - . ($modifiers & Modifiers::PROTECTED_SET ? 'protected(set) ' : '') - . ($modifiers & Modifiers::PRIVATE_SET ? 'private(set) ' : '') - . ($modifiers & Modifiers::STATIC ? 'static ' : '') - . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + protected function pModifiers(int $modifiers) : string + { + return ($modifiers & Modifiers::FINAL ? 'final ' : '') . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') . ($modifiers & Modifiers::PUBLIC_SET ? 'public(set) ' : '') . ($modifiers & Modifiers::PROTECTED_SET ? 'protected(set) ' : '') . ($modifiers & Modifiers::PRIVATE_SET ? 'private(set) ' : '') . ($modifiers & Modifiers::STATIC ? 'static ' : '') . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); } - - protected function pStatic(bool $static): string { + protected function pStatic(bool $static) : string + { return $static ? 'static ' : ''; } - /** * Determine whether a list of nodes uses multiline formatting. * @@ -1244,64 +1085,59 @@ protected function pStatic(bool $static): string { * * @return bool Whether multiline formatting is used */ - protected function isMultiline(array $nodes): bool { + protected function isMultiline(array $nodes) : bool + { if (\count($nodes) < 2) { - return false; + return \false; } - $pos = -1; foreach ($nodes as $node) { if (null === $node) { continue; } - $endPos = $node->getEndTokenPos() + 1; if ($pos >= 0) { $text = $this->origTokens->getTokenCode($pos, $endPos, 0); - if (false === strpos($text, "\n")) { + if (\false === strpos($text, "\n")) { // We require that a newline is present between *every* item. If the formatting // is inconsistent, with only some items having newlines, we don't consider it // as multiline - return false; + return \false; } } $pos = $endPos; } - - return true; + return \true; } - /** * Lazily initializes label char map. * * The label char map determines whether a certain character may occur in a label. */ - protected function initializeLabelCharMap(): void { + protected function initializeLabelCharMap() : void + { if (isset($this->labelCharMap)) { return; } - $this->labelCharMap = []; for ($i = 0; $i < 256; $i++) { $chr = chr($i); $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); } - if ($this->phpVersion->allowsDelInIdentifiers()) { - $this->labelCharMap["\x7f"] = true; + $this->labelCharMap[""] = \true; } } - /** * Lazily initializes node list differ. * * The node list differ is used to determine differences between two array subnodes. */ - protected function initializeNodeListDiffer(): void { + protected function initializeNodeListDiffer() : void + { if (isset($this->nodeListDiffer)) { return; } - $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { if ($a instanceof Node && $b instanceof Node) { return $a === $b->getAttribute('origNode'); @@ -1310,200 +1146,89 @@ protected function initializeNodeListDiffer(): void { return $a === null && $b === null; }); } - /** * Lazily initializes fixup map. * * The fixup map is used to determine whether a certain subnode of a certain node may require * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. */ - protected function initializeFixupMap(): void { + protected function initializeFixupMap() : void + { if (isset($this->fixupMap)) { return; } - - $this->fixupMap = [ - Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_UNARY, - 'class' => self::FIXUP_NEW, - ], - Expr\Ternary::class => [ - 'cond' => self::FIXUP_PREC_LEFT, - 'else' => self::FIXUP_PREC_RIGHT, - ], - Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], - - Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], - Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\New_::class => ['class' => self::FIXUP_NEW], - Expr\MethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafeMethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_VAR_BRACED_NAME, - ], - Expr\PropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafePropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Scalar\InterpolatedString::class => [ - 'parts' => self::FIXUP_ENCAPSED, - ], - ]; - - $binaryOps = [ - BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, - BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, - BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, - BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, - BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, - BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, - BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, - BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, BinaryOp\Pipe::class, - ]; + $this->fixupMap = [Expr\Instanceof_::class => ['expr' => self::FIXUP_PREC_UNARY, 'class' => self::FIXUP_NEW], Expr\Ternary::class => ['cond' => self::FIXUP_PREC_LEFT, 'else' => self::FIXUP_PREC_RIGHT], Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], Expr\ClassConstFetch::class => ['class' => self::FIXUP_STATIC_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME], Expr\New_::class => ['class' => self::FIXUP_NEW], Expr\MethodCall::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME], Expr\NullsafeMethodCall::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME], Expr\StaticPropertyFetch::class => ['class' => self::FIXUP_STATIC_DEREF_LHS, 'name' => self::FIXUP_VAR_BRACED_NAME], Expr\PropertyFetch::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME], Expr\NullsafePropertyFetch::class => ['var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME], Scalar\InterpolatedString::class => ['parts' => self::FIXUP_ENCAPSED]]; + $binaryOps = [BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, BinaryOp\Pipe::class]; foreach ($binaryOps as $binaryOp) { - $this->fixupMap[$binaryOp] = [ - 'left' => self::FIXUP_PREC_LEFT, - 'right' => self::FIXUP_PREC_RIGHT - ]; + $this->fixupMap[$binaryOp] = ['left' => self::FIXUP_PREC_LEFT, 'right' => self::FIXUP_PREC_RIGHT]; } - - $prefixOps = [ - Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, - Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, - Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, - Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, - Expr\ArrowFunction::class, Expr\Throw_::class, - ]; + $prefixOps = [Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, Expr\ArrowFunction::class, Expr\Throw_::class]; foreach ($prefixOps as $prefixOp) { $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; } } - /** * Lazily initializes the removal map. * * The removal map is used to determine which additional tokens should be removed when a * certain node is replaced by null. */ - protected function initializeRemovalMap(): void { + protected function initializeRemovalMap() : void + { if (isset($this->removalMap)) { return; } - $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; $stripLeft = ['left' => \T_WHITESPACE]; $stripRight = ['right' => \T_WHITESPACE]; $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; $stripColon = ['left' => ':']; $stripEquals = ['left' => '=']; - $this->removalMap = [ - 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'ArrayItem->key' => $stripDoubleArrow, - 'Expr_ArrowFunction->returnType' => $stripColon, - 'Expr_Closure->returnType' => $stripColon, - 'Expr_Exit->expr' => $stripBoth, - 'Expr_Ternary->if' => $stripBoth, - 'Expr_Yield->key' => $stripDoubleArrow, - 'Expr_Yield->value' => $stripBoth, - 'Param->type' => $stripRight, - 'Param->default' => $stripEquals, - 'Stmt_Break->num' => $stripBoth, - 'Stmt_Catch->var' => $stripLeft, - 'Stmt_ClassConst->type' => $stripRight, - 'Stmt_ClassMethod->returnType' => $stripColon, - 'Stmt_Class->extends' => ['left' => \T_EXTENDS], - 'Stmt_Enum->scalarType' => $stripColon, - 'Stmt_EnumCase->expr' => $stripEquals, - 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], - 'Stmt_Continue->num' => $stripBoth, - 'Stmt_Foreach->keyVar' => $stripDoubleArrow, - 'Stmt_Function->returnType' => $stripColon, - 'Stmt_If->else' => $stripLeft, - 'Stmt_Namespace->name' => $stripLeft, - 'Stmt_Property->type' => $stripRight, - 'PropertyItem->default' => $stripEquals, - 'Stmt_Return->expr' => $stripBoth, - 'Stmt_StaticVar->default' => $stripEquals, - 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, - 'Stmt_TryCatch->finally' => $stripLeft, - // 'Stmt_Case->cond': Replace with "default" - // 'Stmt_Class->name': Unclear what to do - // 'Stmt_Declare->stmts': Not a plain node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node - ]; + $this->removalMap = ['Expr_ArrayDimFetch->dim' => $stripBoth, 'ArrayItem->key' => $stripDoubleArrow, 'Expr_ArrowFunction->returnType' => $stripColon, 'Expr_Closure->returnType' => $stripColon, 'Expr_Exit->expr' => $stripBoth, 'Expr_Ternary->if' => $stripBoth, 'Expr_Yield->key' => $stripDoubleArrow, 'Expr_Yield->value' => $stripBoth, 'Param->type' => $stripRight, 'Param->default' => $stripEquals, 'Stmt_Break->num' => $stripBoth, 'Stmt_Catch->var' => $stripLeft, 'Stmt_ClassConst->type' => $stripRight, 'Stmt_ClassMethod->returnType' => $stripColon, 'Stmt_Class->extends' => ['left' => \T_EXTENDS], 'Stmt_Enum->scalarType' => $stripColon, 'Stmt_EnumCase->expr' => $stripEquals, 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], 'Stmt_Continue->num' => $stripBoth, 'Stmt_Foreach->keyVar' => $stripDoubleArrow, 'Stmt_Function->returnType' => $stripColon, 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, 'Stmt_Property->type' => $stripRight, 'PropertyItem->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, 'Stmt_TryCatch->finally' => $stripLeft]; } - - protected function initializeInsertionMap(): void { + protected function initializeInsertionMap() : void + { if (isset($this->insertionMap)) { return; } - // TODO: "yield" where both key and value are inserted doesn't work // [$find, $beforeToken, $extraLeft, $extraRight] $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], - 'Expr_Closure->returnType' => [')', false, ': ', null], - 'Expr_Ternary->if' => ['?', false, ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], - 'Param->type' => [null, false, null, ' '], - 'Param->default' => [null, false, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], - 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], - 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], - 'Stmt_Class->extends' => [null, false, ' extends ', null], - 'Stmt_Enum->scalarType' => [null, false, ' : ', null], - 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ': ', null], - 'Stmt_If->else' => [null, false, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], - 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'PropertyItem->default' => [null, false, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], - 'Stmt_StaticVar->default' => [null, false, ' = ', null], + 'Expr_ArrayDimFetch->dim' => ['[', \false, null, null], + 'ArrayItem->key' => [null, \false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', \false, ': ', null], + 'Expr_Closure->returnType' => [')', \false, ': ', null], + 'Expr_Ternary->if' => ['?', \false, ' ', ' '], + 'Expr_Yield->key' => [\T_YIELD, \false, null, ' => '], + 'Expr_Yield->value' => [\T_YIELD, \false, ' ', null], + 'Param->type' => [null, \false, null, ' '], + 'Param->default' => [null, \false, ' = ', null], + 'Stmt_Break->num' => [\T_BREAK, \false, ' ', null], + 'Stmt_Catch->var' => [null, \false, ' ', null], + 'Stmt_ClassMethod->returnType' => [')', \false, ': ', null], + 'Stmt_ClassConst->type' => [\T_CONST, \false, ' ', null], + 'Stmt_Class->extends' => [null, \false, ' extends ', null], + 'Stmt_Enum->scalarType' => [null, \false, ' : ', null], + 'Stmt_EnumCase->expr' => [null, \false, ' = ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, \false, ' extends ', null], + 'Stmt_Continue->num' => [\T_CONTINUE, \false, ' ', null], + 'Stmt_Foreach->keyVar' => [\T_AS, \false, null, ' => '], + 'Stmt_Function->returnType' => [')', \false, ': ', null], + 'Stmt_If->else' => [null, \false, ' ', null], + 'Stmt_Namespace->name' => [\T_NAMESPACE, \false, ' ', null], + 'Stmt_Property->type' => [\T_VARIABLE, \true, null, ' '], + 'PropertyItem->default' => [null, \false, ' = ', null], + 'Stmt_Return->expr' => [\T_RETURN, \false, ' ', null], + 'Stmt_StaticVar->default' => [null, \false, ' = ', null], //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, false, ' ', null], - - // 'Expr_Exit->expr': Complicated due to optional () - // 'Stmt_Case->cond': Conversion from default to case - // 'Stmt_Class->name': Unclear - // 'Stmt_Declare->stmts': Not a proper node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node + 'Stmt_TryCatch->finally' => [null, \false, ' ', null], ]; } - - protected function initializeListInsertionMap(): void { + protected function initializeListInsertionMap() : void + { if (isset($this->listInsertionMap)) { return; } - $this->listInsertionMap = [ // special //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully @@ -1513,7 +1238,6 @@ protected function initializeListInsertionMap(): void { IntersectionType::class . '->types' => '&', Stmt\If_::class . '->elseifs' => ' ', Stmt\TryCatch::class . '->catches' => ' ', - // comma-separated lists Expr\Array_::class . '->items' => ', ', Expr\ArrowFunction::class . '->params' => ', ', @@ -1547,12 +1271,11 @@ protected function initializeListInsertionMap(): void { Stmt\StaticVar::class . '->vars' => ', ', Stmt\TraitUse::class . '->traits' => ', ', Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', - Stmt\Unset_::class . '->vars' => ', ', + Stmt\Unset_::class . '->vars' => ', ', Stmt\UseUse::class . '->uses' => ', ', MatchArm::class . '->conds' => ', ', AttributeGroup::class . '->attrs' => ', ', PropertyHook::class . '->params' => ', ', - // statement lists Expr\Closure::class . '->stmts' => "\n", Stmt\Case_::class . '->stmts' => "\n", @@ -1574,7 +1297,6 @@ protected function initializeListInsertionMap(): void { Stmt\If_::class . '->stmts' => "\n", Stmt\Namespace_::class . '->stmts' => "\n", Stmt\Block::class . '->stmts' => "\n", - // Attribute groups Stmt\Class_::class . '->attrGroups' => "\n", Stmt\Enum_::class . '->attrGroups' => "\n", @@ -1590,7 +1312,6 @@ protected function initializeListInsertionMap(): void { Expr\ArrowFunction::class . '->attrGroups' => ' ', Param::class . '->attrGroups' => ' ', PropertyHook::class . '->attrGroups' => ' ', - Stmt\Switch_::class . '->cases' => "\n", Stmt\TraitUse::class . '->adaptations' => "\n", Stmt\TryCatch::class . '->stmts' => "\n", @@ -1598,96 +1319,25 @@ protected function initializeListInsertionMap(): void { PropertyHook::class . '->body' => "\n", Stmt\Property::class . '->hooks' => "\n", Param::class . '->hooks' => "\n", - // dummy for top-level context 'File->stmts' => "\n", ]; } - - protected function initializeEmptyListInsertionMap(): void { + protected function initializeEmptyListInsertionMap() : void + { if (isset($this->emptyListInsertionMap)) { return; } - // TODO Insertion into empty statement lists. - // [$find, $extraLeft, $extraRight] - $this->emptyListInsertionMap = [ - Expr\ArrowFunction::class . '->params' => ['(', '', ''], - Expr\Closure::class . '->uses' => [')', ' use (', ')'], - Expr\Closure::class . '->params' => ['(', '', ''], - Expr\FuncCall::class . '->args' => ['(', '', ''], - Expr\MethodCall::class . '->args' => ['(', '', ''], - Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], - Expr\New_::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], - Expr\StaticCall::class . '->args' => ['(', '', ''], - Stmt\Class_::class . '->implements' => [null, ' implements ', ''], - Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], - Stmt\ClassMethod::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], - Stmt\Function_::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], - Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Property::class . '->attrGroups' => [null, '', "\n"], - Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], - Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], - Expr\Closure::class . '->attrGroups' => [null, '', ' '], - Stmt\Const_::class . '->attrGroups' => [null, '', "\n"], - PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], - - /* These cannot be empty to start with: - * Expr_Isset->vars - * Stmt_Catch->types - * Stmt_Const->consts - * Stmt_ClassConst->consts - * Stmt_Declare->declares - * Stmt_Echo->exprs - * Stmt_Global->vars - * Stmt_GroupUse->uses - * Stmt_Property->props - * Stmt_StaticVar->vars - * Stmt_TraitUse->traits - * Stmt_TraitUseAdaptation_Precedence->insteadof - * Stmt_Unset->vars - * Stmt_Use->uses - * UnionType->types - */ - - /* TODO - * Stmt_If->elseifs - * Stmt_TryCatch->catches - * Expr_Array->items - * Expr_List->items - * Stmt_For->init - * Stmt_For->cond - * Stmt_For->loop - */ - ]; + $this->emptyListInsertionMap = [Expr\ArrowFunction::class . '->params' => ['(', '', ''], Expr\Closure::class . '->uses' => [')', ' use (', ')'], Expr\Closure::class . '->params' => ['(', '', ''], Expr\FuncCall::class . '->args' => ['(', '', ''], Expr\MethodCall::class . '->args' => ['(', '', ''], Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], Expr\New_::class . '->args' => ['(', '', ''], PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], Expr\StaticCall::class . '->args' => ['(', '', ''], Stmt\Class_::class . '->implements' => [null, ' implements ', ''], Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], Stmt\ClassMethod::class . '->params' => ['(', '', ''], Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], Stmt\Function_::class . '->params' => ['(', '', ''], Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], Stmt\Property::class . '->attrGroups' => [null, '', "\n"], Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], Expr\Closure::class . '->attrGroups' => [null, '', ' '], Stmt\Const_::class . '->attrGroups' => [null, '', "\n"], PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', '']]; } - - protected function initializeModifierChangeMap(): void { + protected function initializeModifierChangeMap() : void + { if (isset($this->modifierChangeMap)) { return; } - - $this->modifierChangeMap = [ - Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], - Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], - Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], - Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], - PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], - Param::class . '->flags' => ['pModifiers', \T_VARIABLE], - PropertyHook::class . '->flags' => ['pModifiers', \T_STRING], - Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], - Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], - //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO - ]; - + $this->modifierChangeMap = [Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], Param::class . '->flags' => ['pModifiers', \T_VARIABLE], PropertyHook::class . '->flags' => ['pModifiers', \T_STRING], Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN]]; // List of integer subnodes that are not modifiers: // Expr_Include->type // Stmt_GroupUse->type diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php new file mode 100644 index 0000000..e730a92 --- /dev/null +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php @@ -0,0 +1,21 @@ +pos + \strlen(is_array($this) ? $this[1] : $this); + } + /** Get 1-based end line number of the token. */ + public function getEndLine() : int + { + return $this->line + \substr_count(is_array($this) ? $this[1] : $this, "\n"); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/compatibility_tokens.php similarity index 71% rename from vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php rename to vendor/prefixed/nikic/php-parser/lib/PhpParser/compatibility_tokens.php index ced038d..1d5a871 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/compatibility_tokens.php @@ -1,9 +1,11 @@ - */ - function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void + function trigger_deprecation(string $package, string $version, string $message, ...$args) : void { - @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); + @\trigger_error(($package || $version ? "Since {$package} {$version}: " : '') . ($args ? \vsprintf($message, $args) : $message), \E_USER_DEPRECATED); } } diff --git a/vendor/prefixed/symfony/finder/Comparator/Comparator.php b/vendor/prefixed/symfony/finder/Comparator/Comparator.php new file mode 100644 index 0000000..55ac4b9 --- /dev/null +++ b/vendor/prefixed/symfony/finder/Comparator/Comparator.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator; + +/** + * @author Fabien Potencier + */ +class Comparator +{ + /** + * @var string + */ + private $target; + /** + * @var string + */ + private $operator; + public function __construct(string $target, string $operator = '==') + { + $this->target = $target; + if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { + throw new \InvalidArgumentException(\sprintf('Invalid operator "%s".', $operator)); + } + $this->operator = $operator; + } + /** + * Gets the target value. + */ + public function getTarget() : string + { + return $this->target; + } + /** + * Gets the comparison operator. + */ + public function getOperator() : string + { + return $this->operator; + } + /** + * Tests against the target. + * @param mixed $test + */ + public function test($test) : bool + { + switch ($this->operator) { + case '>': + return $test > $this->target; + case '>=': + return $test >= $this->target; + case '<': + return $test < $this->target; + case '<=': + return $test <= $this->target; + case '!=': + return $test != $this->target; + default: + return $test == $this->target; + } + } +} diff --git a/vendor/symfony/finder/Comparator/DateComparator.php b/vendor/prefixed/symfony/finder/Comparator/DateComparator.php similarity index 69% rename from vendor/symfony/finder/Comparator/DateComparator.php rename to vendor/prefixed/symfony/finder/Comparator/DateComparator.php index f7c27de..30e2bc7 100644 --- a/vendor/symfony/finder/Comparator/DateComparator.php +++ b/vendor/prefixed/symfony/finder/Comparator/DateComparator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Comparator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator; /** * DateCompare compiles date comparisons. @@ -25,26 +24,22 @@ class DateComparator extends Comparator */ public function __construct(string $test) { - if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) { - throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test)); + if (!preg_match('#^\\s*(==|!=|[<>]=?|after|since|before|until)?\\s*(.+?)\\s*$#i', $test, $matches)) { + throw new \InvalidArgumentException(\sprintf('Don\'t understand "%s" as a date test.', $test)); } - try { $date = new \DateTimeImmutable($matches[2]); $target = $date->format('U'); - } catch (\Exception) { - throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2])); + } catch (\Exception $exception) { + throw new \InvalidArgumentException(\sprintf('"%s" is not a valid date.', $matches[2])); } - $operator = $matches[1] ?: '=='; if ('since' === $operator || 'after' === $operator) { $operator = '>'; } - if ('until' === $operator || 'before' === $operator) { $operator = '<'; } - parent::__construct($target, $operator); } } diff --git a/vendor/symfony/finder/Comparator/NumberComparator.php b/vendor/prefixed/symfony/finder/Comparator/NumberComparator.php similarity index 81% rename from vendor/symfony/finder/Comparator/NumberComparator.php rename to vendor/prefixed/symfony/finder/Comparator/NumberComparator.php index dd30820..bddfdea 100644 --- a/vendor/symfony/finder/Comparator/NumberComparator.php +++ b/vendor/prefixed/symfony/finder/Comparator/NumberComparator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Comparator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator; /** * NumberComparator compiles a simple comparison to an anonymous @@ -19,7 +18,7 @@ * magnitudes. * * The target value may use magnitudes of kilobytes (k, ki), - * megabytes (m, mi), or gigabytes (g, gi). Those suffixed + * megabytes (m, mi), or gigabytes (g, gi). Those suffixed * with an i use the appropriate 2**n version in accordance with the * IEC standard: http://physics.nist.gov/cuu/Units/binary.html * @@ -41,13 +40,12 @@ class NumberComparator extends Comparator */ public function __construct(?string $test) { - if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) { - throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null')); + if (null === $test || !preg_match('#^\\s*(==|!=|[<>]=?)?\\s*([0-9\\.]+)\\s*([kmg]i?)?\\s*$#i', $test, $matches)) { + throw new \InvalidArgumentException(\sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null')); } - $target = $matches[2]; if (!is_numeric($target)) { - throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target)); + throw new \InvalidArgumentException(\sprintf('Invalid number "%s".', $target)); } if (isset($matches[3])) { // magnitude @@ -72,7 +70,6 @@ public function __construct(?string $test) break; } } - parent::__construct($target, $matches[1] ?: '=='); } } diff --git a/vendor/symfony/finder/Exception/AccessDeniedException.php b/vendor/prefixed/symfony/finder/Exception/AccessDeniedException.php similarity index 82% rename from vendor/symfony/finder/Exception/AccessDeniedException.php rename to vendor/prefixed/symfony/finder/Exception/AccessDeniedException.php index ee195ea..f930790 100644 --- a/vendor/symfony/finder/Exception/AccessDeniedException.php +++ b/vendor/prefixed/symfony/finder/Exception/AccessDeniedException.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Exception; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Exception; /** * @author Jean-François Simon diff --git a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php b/vendor/prefixed/symfony/finder/Exception/DirectoryNotFoundException.php similarity index 82% rename from vendor/symfony/finder/Exception/DirectoryNotFoundException.php rename to vendor/prefixed/symfony/finder/Exception/DirectoryNotFoundException.php index c6cc0f2..c796404 100644 --- a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php +++ b/vendor/prefixed/symfony/finder/Exception/DirectoryNotFoundException.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Exception; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Exception; /** * @author Andreas Erhard diff --git a/vendor/symfony/finder/Finder.php b/vendor/prefixed/symfony/finder/Finder.php similarity index 74% rename from vendor/symfony/finder/Finder.php rename to vendor/prefixed/symfony/finder/Finder.php index 0fd283c..136981b 100644 --- a/vendor/symfony/finder/Finder.php +++ b/vendor/prefixed/symfony/finder/Finder.php @@ -8,22 +8,20 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder; - -use Symfony\Component\Finder\Comparator\DateComparator; -use Symfony\Component\Finder\Comparator\NumberComparator; -use Symfony\Component\Finder\Exception\DirectoryNotFoundException; -use Symfony\Component\Finder\Iterator\CustomFilterIterator; -use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; -use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; -use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator; -use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; -use Symfony\Component\Finder\Iterator\FilenameFilterIterator; -use Symfony\Component\Finder\Iterator\LazyIterator; -use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; -use Symfony\Component\Finder\Iterator\SortableIterator; - +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder; + +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator\DateComparator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator\NumberComparator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Exception\DirectoryNotFoundException; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\CustomFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\DateRangeFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\FilecontentFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\FilenameFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\LazyIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator\SortableIterator; /** * Finder allows to build rules to find files and directories. * @@ -44,67 +42,122 @@ class Finder implements \IteratorAggregate, \Countable public const IGNORE_VCS_FILES = 1; public const IGNORE_DOT_FILES = 2; public const IGNORE_VCS_IGNORED_FILES = 4; - - private int $mode = 0; - private array $names = []; - private array $notNames = []; - private array $exclude = []; - private array $filters = []; - private array $pruneFilters = []; - private array $depths = []; - private array $sizes = []; - private bool $followLinks = false; - private bool $reverseSorting = false; - private \Closure|int|false $sort = false; - private int $ignore = 0; - private array $dirs = []; - private array $dates = []; - private array $iterators = []; - private array $contains = []; - private array $notContains = []; - private array $paths = []; - private array $notPaths = []; - private bool $ignoreUnreadableDirs = false; - - private static array $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; - + /** + * @var int + */ + private $mode = 0; + /** + * @var mixed[] + */ + private $names = []; + /** + * @var mixed[] + */ + private $notNames = []; + /** + * @var mixed[] + */ + private $exclude = []; + /** + * @var mixed[] + */ + private $filters = []; + /** + * @var mixed[] + */ + private $pruneFilters = []; + /** + * @var mixed[] + */ + private $depths = []; + /** + * @var mixed[] + */ + private $sizes = []; + /** + * @var bool + */ + private $followLinks = \false; + /** + * @var bool + */ + private $reverseSorting = \false; + /** + * @var \Closure|int|false + */ + private $sort = \false; + /** + * @var int + */ + private $ignore = 0; + /** + * @var mixed[] + */ + private $dirs = []; + /** + * @var mixed[] + */ + private $dates = []; + /** + * @var mixed[] + */ + private $iterators = []; + /** + * @var mixed[] + */ + private $contains = []; + /** + * @var mixed[] + */ + private $notContains = []; + /** + * @var mixed[] + */ + private $paths = []; + /** + * @var mixed[] + */ + private $notPaths = []; + /** + * @var bool + */ + private $ignoreUnreadableDirs = \false; + /** + * @var mixed[] + */ + private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; public function __construct() { $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; } - /** * Creates a new Finder. + * @return static */ - public static function create(): static + public static function create() { return new static(); } - /** * Restricts the matching to directories only. * * @return $this */ - public function directories(): static + public function directories() { $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES; - return $this; } - /** * Restricts the matching to files only. * * @return $this */ - public function files(): static + public function files() { $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES; - return $this; } - /** * Adds tests for the directory depth. * @@ -121,15 +174,13 @@ public function files(): static * @see DepthRangeFilterIterator * @see NumberComparator */ - public function depth(string|int|array $levels): static + public function depth($levels) { foreach ((array) $levels as $level) { - $this->depths[] = new Comparator\NumberComparator($level); + $this->depths[] = new NumberComparator($level); } - return $this; } - /** * Adds tests for file dates (last modified). * @@ -149,15 +200,13 @@ public function depth(string|int|array $levels): static * @see DateRangeFilterIterator * @see DateComparator */ - public function date(string|array $dates): static + public function date($dates) { foreach ((array) $dates as $date) { - $this->dates[] = new Comparator\DateComparator($date); + $this->dates[] = new DateComparator($date); } - return $this; } - /** * Adds rules that files must match. * @@ -174,13 +223,11 @@ public function date(string|array $dates): static * * @see FilenameFilterIterator */ - public function name(string|array $patterns): static + public function name($patterns) { $this->names = array_merge($this->names, (array) $patterns); - return $this; } - /** * Adds rules that files must not match. * @@ -190,13 +237,11 @@ public function name(string|array $patterns): static * * @see FilenameFilterIterator */ - public function notName(string|array $patterns): static + public function notName($patterns) { $this->notNames = array_merge($this->notNames, (array) $patterns); - return $this; } - /** * Adds tests that file contents must match. * @@ -212,13 +257,11 @@ public function notName(string|array $patterns): static * * @see FilecontentFilterIterator */ - public function contains(string|array $patterns): static + public function contains($patterns) { $this->contains = array_merge($this->contains, (array) $patterns); - return $this; } - /** * Adds tests that file contents must not match. * @@ -234,13 +277,11 @@ public function contains(string|array $patterns): static * * @see FilecontentFilterIterator */ - public function notContains(string|array $patterns): static + public function notContains($patterns) { $this->notContains = array_merge($this->notContains, (array) $patterns); - return $this; } - /** * Adds rules that filenames must match. * @@ -258,13 +299,11 @@ public function notContains(string|array $patterns): static * * @see FilenameFilterIterator */ - public function path(string|array $patterns): static + public function path($patterns) { $this->paths = array_merge($this->paths, (array) $patterns); - return $this; } - /** * Adds rules that filenames must not match. * @@ -282,13 +321,11 @@ public function path(string|array $patterns): static * * @see FilenameFilterIterator */ - public function notPath(string|array $patterns): static + public function notPath($patterns) { $this->notPaths = array_merge($this->notPaths, (array) $patterns); - return $this; } - /** * Adds tests for file sizes. * @@ -304,15 +341,13 @@ public function notPath(string|array $patterns): static * @see SizeRangeFilterIterator * @see NumberComparator */ - public function size(string|int|array $sizes): static + public function size($sizes) { foreach ((array) $sizes as $size) { - $this->sizes[] = new Comparator\NumberComparator($size); + $this->sizes[] = new NumberComparator($size); } - return $this; } - /** * Excludes directories. * @@ -326,13 +361,11 @@ public function size(string|int|array $sizes): static * * @see ExcludeDirectoryFilterIterator */ - public function exclude(string|array $dirs): static + public function exclude($dirs) { $this->exclude = array_merge($this->exclude, (array) $dirs); - return $this; } - /** * Excludes "hidden" directories and files (starting with a dot). * @@ -342,17 +375,15 @@ public function exclude(string|array $dirs): static * * @see ExcludeDirectoryFilterIterator */ - public function ignoreDotFiles(bool $ignoreDotFiles): static + public function ignoreDotFiles(bool $ignoreDotFiles) { if ($ignoreDotFiles) { $this->ignore |= static::IGNORE_DOT_FILES; } else { $this->ignore &= ~static::IGNORE_DOT_FILES; } - return $this; } - /** * Forces the finder to ignore version control directories. * @@ -362,17 +393,15 @@ public function ignoreDotFiles(bool $ignoreDotFiles): static * * @see ExcludeDirectoryFilterIterator */ - public function ignoreVCS(bool $ignoreVCS): static + public function ignoreVCS(bool $ignoreVCS) { if ($ignoreVCS) { $this->ignore |= static::IGNORE_VCS_FILES; } else { $this->ignore &= ~static::IGNORE_VCS_FILES; } - return $this; } - /** * Forces Finder to obey .gitignore and ignore files based on rules listed there. * @@ -380,35 +409,29 @@ public function ignoreVCS(bool $ignoreVCS): static * * @return $this */ - public function ignoreVCSIgnored(bool $ignoreVCSIgnored): static + public function ignoreVCSIgnored(bool $ignoreVCSIgnored) { if ($ignoreVCSIgnored) { $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; } else { $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; } - return $this; } - /** * Adds VCS patterns. * * @see ignoreVCS() * * @param string|string[] $pattern VCS patterns to ignore - * - * @return void */ - public static function addVCSPattern(string|array $pattern) + public static function addVCSPattern($pattern) : void { foreach ((array) $pattern as $p) { self::$vcsPatterns[] = $p; } - self::$vcsPatterns = array_unique(self::$vcsPatterns); } - /** * Sorts files and directories by an anonymous function. * @@ -420,13 +443,11 @@ public static function addVCSPattern(string|array $pattern) * * @see SortableIterator */ - public function sort(\Closure $closure): static + public function sort(\Closure $closure) { $this->sort = $closure; - return $this; } - /** * Sorts files and directories by extension. * @@ -436,13 +457,11 @@ public function sort(\Closure $closure): static * * @see SortableIterator */ - public function sortByExtension(): static + public function sortByExtension() { - $this->sort = Iterator\SortableIterator::SORT_BY_EXTENSION; - + $this->sort = SortableIterator::SORT_BY_EXTENSION; return $this; } - /** * Sorts files and directories by name. * @@ -452,13 +471,11 @@ public function sortByExtension(): static * * @see SortableIterator */ - public function sortByName(bool $useNaturalSort = false): static + public function sortByName(bool $useNaturalSort = \false) { - $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME; - + $this->sort = $useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL : SortableIterator::SORT_BY_NAME; return $this; } - /** * Sorts files and directories by name case insensitive. * @@ -468,13 +485,11 @@ public function sortByName(bool $useNaturalSort = false): static * * @see SortableIterator */ - public function sortByCaseInsensitiveName(bool $useNaturalSort = false): static + public function sortByCaseInsensitiveName(bool $useNaturalSort = \false) { - $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : Iterator\SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE; - + $this->sort = $useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE; return $this; } - /** * Sorts files and directories by size. * @@ -484,13 +499,11 @@ public function sortByCaseInsensitiveName(bool $useNaturalSort = false): static * * @see SortableIterator */ - public function sortBySize(): static + public function sortBySize() { - $this->sort = Iterator\SortableIterator::SORT_BY_SIZE; - + $this->sort = SortableIterator::SORT_BY_SIZE; return $this; } - /** * Sorts files and directories by type (directories before files), then by name. * @@ -500,13 +513,11 @@ public function sortBySize(): static * * @see SortableIterator */ - public function sortByType(): static + public function sortByType() { - $this->sort = Iterator\SortableIterator::SORT_BY_TYPE; - + $this->sort = SortableIterator::SORT_BY_TYPE; return $this; } - /** * Sorts files and directories by the last accessed time. * @@ -518,25 +529,21 @@ public function sortByType(): static * * @see SortableIterator */ - public function sortByAccessedTime(): static + public function sortByAccessedTime() { - $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME; - + $this->sort = SortableIterator::SORT_BY_ACCESSED_TIME; return $this; } - /** * Reverses the sorting. * * @return $this */ - public function reverseSorting(): static + public function reverseSorting() { - $this->reverseSorting = true; - + $this->reverseSorting = \true; return $this; } - /** * Sorts files and directories by the last inode changed time. * @@ -550,13 +557,11 @@ public function reverseSorting(): static * * @see SortableIterator */ - public function sortByChangedTime(): static + public function sortByChangedTime() { - $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME; - + $this->sort = SortableIterator::SORT_BY_CHANGED_TIME; return $this; } - /** * Sorts files and directories by the last modified time. * @@ -568,13 +573,11 @@ public function sortByChangedTime(): static * * @see SortableIterator */ - public function sortByModifiedTime(): static + public function sortByModifiedTime() { - $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME; - + $this->sort = SortableIterator::SORT_BY_MODIFIED_TIME; return $this; } - /** * Filters the iterator with an anonymous function. * @@ -588,30 +591,24 @@ public function sortByModifiedTime(): static * * @see CustomFilterIterator */ - public function filter(\Closure $closure /* , bool $prune = false */): static + public function filter(\Closure $closure, bool $prune = \false) { - $prune = 1 < \func_num_args() ? func_get_arg(1) : false; $this->filters[] = $closure; - if ($prune) { $this->pruneFilters[] = $closure; } - return $this; } - /** * Forces the following of symlinks. * * @return $this */ - public function followLinks(): static + public function followLinks() { - $this->followLinks = true; - + $this->followLinks = \true; return $this; } - /** * Tells finder to ignore unreadable directories. * @@ -619,13 +616,11 @@ public function followLinks(): static * * @return $this */ - public function ignoreUnreadableDirs(bool $ignore = true): static + public function ignoreUnreadableDirs(bool $ignore = \true) { $this->ignoreUnreadableDirs = $ignore; - return $this; } - /** * Searches files and directories which match defined rules. * @@ -635,26 +630,22 @@ public function ignoreUnreadableDirs(bool $ignore = true): static * * @throws DirectoryNotFoundException if one of the directories does not exist */ - public function in(string|array $dirs): static + public function in($dirs) { $resolvedDirs = []; - foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = [$this->normalizeDir($dir)]; } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) { sort($glob); - $resolvedDirs[] = array_map($this->normalizeDir(...), $glob); + $resolvedDirs[] = array_map(\Closure::fromCallable([$this, 'normalizeDir']), $glob); } else { - throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir)); + throw new DirectoryNotFoundException(\sprintf('The "%s" directory does not exist.', $dir)); } } - $this->dirs = array_merge($this->dirs, ...$resolvedDirs); - return $this; } - /** * Returns an Iterator for the current Finder configuration. * @@ -664,107 +655,87 @@ public function in(string|array $dirs): static * * @throws \LogicException if the in() method has not been called */ - public function getIterator(): \Iterator + public function getIterator() : \Iterator { if (0 === \count($this->dirs) && 0 === \count($this->iterators)) { throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); } - if (1 === \count($this->dirs) && 0 === \count($this->iterators)) { $iterator = $this->searchInDirectory($this->dirs[0]); - if ($this->sort || $this->reverseSorting) { - $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); + $iterator = (new SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); } - return $iterator; } - $iterator = new \AppendIterator(); foreach ($this->dirs as $dir) { - $iterator->append(new \IteratorIterator(new LazyIterator(fn () => $this->searchInDirectory($dir)))); + $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) { + return $this->searchInDirectory($dir); + }))); } - foreach ($this->iterators as $it) { $iterator->append($it); } - if ($this->sort || $this->reverseSorting) { - $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); + $iterator = (new SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); } - return $iterator; } - /** * Appends an existing set of files/directories to the finder. * * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. * * @return $this - * - * @throws \InvalidArgumentException when the given argument is not iterable */ - public function append(iterable $iterator): static + public function append(iterable $iterator) { if ($iterator instanceof \IteratorAggregate) { $this->iterators[] = $iterator->getIterator(); } elseif ($iterator instanceof \Iterator) { $this->iterators[] = $iterator; - } elseif (is_iterable($iterator)) { + } else { $it = new \ArrayIterator(); foreach ($iterator as $file) { $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file); $it[$file->getPathname()] = $file; } $this->iterators[] = $it; - } else { - throw new \InvalidArgumentException('Finder::append() method wrong argument type.'); } - return $this; } - /** * Check if any results were found. */ - public function hasResults(): bool + public function hasResults() : bool { foreach ($this->getIterator() as $_) { - return true; + return \true; } - - return false; + return \false; } - /** * Counts all the results collected by the iterators. */ - public function count(): int + public function count() : int { return iterator_count($this->getIterator()); } - - private function searchInDirectory(string $dir): \Iterator + private function searchInDirectory(string $dir) : \Iterator { $exclude = $this->exclude; $notPaths = $this->notPaths; - if ($this->pruneFilters) { $exclude = array_merge($exclude, $this->pruneFilters); } - if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { $exclude = array_merge($exclude, self::$vcsPatterns); } - if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $notPaths[] = '#(^|/)\..+(/|$)#'; + $notPaths[] = '#(^|/)\\..+(/|$)#'; } - $minDepth = 0; $maxDepth = \PHP_INT_MAX; - foreach ($this->depths as $comparator) { switch ($comparator->getOperator()) { case '>': @@ -783,77 +754,58 @@ private function searchInDirectory(string $dir): \Iterator $minDepth = $maxDepth = $comparator->getTarget(); } } - $flags = \RecursiveDirectoryIterator::SKIP_DOTS; - if ($this->followLinks) { $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; } - $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs); - if ($exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude); + $iterator = new ExcludeDirectoryFilterIterator($iterator, $exclude); } - $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); - if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) { - $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth); + $iterator = new DepthRangeFilterIterator($iterator, $minDepth, $maxDepth); } - if ($this->mode) { $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); } - if ($this->names || $this->notNames) { - $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); + $iterator = new FilenameFilterIterator($iterator, $this->names, $this->notNames); } - if ($this->contains || $this->notContains) { - $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); + $iterator = new FilecontentFilterIterator($iterator, $this->contains, $this->notContains); } - if ($this->sizes) { - $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); + $iterator = new SizeRangeFilterIterator($iterator, $this->sizes); } - if ($this->dates) { - $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); + $iterator = new DateRangeFilterIterator($iterator, $this->dates); } - if ($this->filters) { - $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); + $iterator = new CustomFilterIterator($iterator, $this->filters); } - if ($this->paths || $notPaths) { $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths); } - if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) { $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir); } - return $iterator; } - /** * Normalizes given directory names by removing trailing slashes. * * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper */ - private function normalizeDir(string $dir): string + private function normalizeDir(string $dir) : string { if ('/' === $dir) { return $dir; } - - $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); - - if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) { + $dir = rtrim($dir, '/' . \DIRECTORY_SEPARATOR); + if (preg_match('#^(ssh2\\.)?s?ftp://#', $dir)) { $dir .= '/'; } - return $dir; } } diff --git a/vendor/prefixed/symfony/finder/Gitignore.php b/vendor/prefixed/symfony/finder/Gitignore.php new file mode 100644 index 0000000..66490fc --- /dev/null +++ b/vendor/prefixed/symfony/finder/Gitignore.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder; + +/** + * Gitignore matches against text. + * + * @author Michael Voříšek + * @author Ahmed Abdou + */ +class Gitignore +{ + /** + * Returns a regexp which is the equivalent of the gitignore pattern. + * + * Format specification: https://git-scm.com/docs/gitignore#_pattern_format + */ + public static function toRegex(string $gitignoreFileContent) : string + { + return self::buildRegex($gitignoreFileContent, \false); + } + public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent) : string + { + return self::buildRegex($gitignoreFileContent, \true); + } + private static function buildRegex(string $gitignoreFileContent, bool $inverted) : string + { + $gitignoreFileContent = preg_replace('~(? $iterator The Iterator to filter * @param callable[] $filters An array of PHP callbacks @@ -39,23 +40,19 @@ public function __construct(\Iterator $iterator, array $filters) } } $this->filters = $filters; - parent::__construct($iterator); } - /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { $fileinfo = $this->current(); - foreach ($this->filters as $filter) { - if (false === $filter($fileinfo)) { - return false; + if (\false === $filter($fileinfo)) { + return \false; } } - - return true; + return \true; } } diff --git a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/DateRangeFilterIterator.php similarity index 76% rename from vendor/symfony/finder/Iterator/DateRangeFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/DateRangeFilterIterator.php index 718d42b..1603541 100644 --- a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/DateRangeFilterIterator.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Comparator\DateComparator; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator\DateComparator; /** * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates). * @@ -22,8 +20,10 @@ */ class DateRangeFilterIterator extends \FilterIterator { - private array $comparators = []; - + /** + * @var mixed[] + */ + private $comparators = []; /** * @param \Iterator $iterator * @param DateComparator[] $comparators @@ -31,28 +31,23 @@ class DateRangeFilterIterator extends \FilterIterator public function __construct(\Iterator $iterator, array $comparators) { $this->comparators = $comparators; - parent::__construct($iterator); } - /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { $fileinfo = $this->current(); - if (!file_exists($fileinfo->getPathname())) { - return false; + return \false; } - $filedate = $fileinfo->getMTime(); foreach ($this->comparators as $compare) { if (!$compare->test($filedate)) { - return false; + return \false; } } - - return true; + return \true; } } diff --git a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/DepthRangeFilterIterator.php similarity index 88% rename from vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/DepthRangeFilterIterator.php index 1cddb5f..5186813 100644 --- a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/DepthRangeFilterIterator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Iterator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; /** * DepthRangeFilterIterator limits the directory depth. @@ -23,8 +22,10 @@ */ class DepthRangeFilterIterator extends \FilterIterator { - private int $minDepth = 0; - + /** + * @var int + */ + private $minDepth = 0; /** * @param \RecursiveIteratorIterator<\RecursiveIterator> $iterator The Iterator to filter * @param int $minDepth The min depth @@ -34,14 +35,12 @@ public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth { $this->minDepth = $minDepth; $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth); - parent::__construct($iterator); } - /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { return $this->getInnerIterator()->getDepth() >= $this->minDepth; } diff --git a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php similarity index 76% rename from vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php index ebbc76e..6ba6261 100644 --- a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\SplFileInfo; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\SplFileInfo; /** * ExcludeDirectoryFilterIterator filters out directories. * @@ -25,14 +23,19 @@ class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator { /** @var \Iterator */ - private \Iterator $iterator; - private bool $isRecursive; + private $iterator; + /** + * @var bool + */ + private $isRecursive; /** @var array */ - private array $excludedDirs = []; - private ?string $excludedPattern = null; + private $excludedDirs = []; + /** + * @var string|null + */ + private $excludedPattern; /** @var list */ - private array $pruneFilters = []; - + private $pruneFilters = []; /** * @param \Iterator $iterator The Iterator to filter * @param list $directories An array of directories to exclude @@ -47,64 +50,52 @@ public function __construct(\Iterator $iterator, array $directories) if (!\is_callable($directory)) { throw new \InvalidArgumentException('Invalid PHP callback.'); } - $this->pruneFilters[] = $directory; - continue; } - $directory = rtrim($directory, '/'); - if (!$this->isRecursive || str_contains($directory, '/')) { + if (!$this->isRecursive || strpos($directory, '/') !== false) { $patterns[] = preg_quote($directory, '#'); } else { - $this->excludedDirs[$directory] = true; + $this->excludedDirs[$directory] = \true; } } if ($patterns) { - $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#'; + $this->excludedPattern = '#(?:^|/)(?:' . implode('|', $patterns) . ')(?:/|$)#'; } - parent::__construct($iterator); } - /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) { - return false; + return \false; } - if ($this->excludedPattern) { $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath(); $path = str_replace('\\', '/', $path); - return !preg_match($this->excludedPattern, $path); } - if ($this->pruneFilters && $this->hasChildren()) { foreach ($this->pruneFilters as $pruneFilter) { if (!$pruneFilter($this->current())) { - return false; + return \false; } } } - - return true; + return \true; } - - public function hasChildren(): bool + public function hasChildren() : bool { return $this->isRecursive && $this->iterator->hasChildren(); } - - public function getChildren(): self + public function getChildren() : self { $children = new self($this->iterator->getChildren(), []); $children->excludedDirs = $this->excludedDirs; $children->excludedPattern = $this->excludedPattern; - return $children; } } diff --git a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/FileTypeFilterIterator.php similarity index 83% rename from vendor/symfony/finder/Iterator/FileTypeFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/FileTypeFilterIterator.php index 2130378..0f8eb6b 100644 --- a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/FileTypeFilterIterator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Iterator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; /** * FileTypeFilterIterator only keeps files, directories, or both. @@ -20,11 +19,12 @@ */ class FileTypeFilterIterator extends \FilterIterator { + /** + * @var int + */ + private $mode; public const ONLY_FILES = 1; public const ONLY_DIRECTORIES = 2; - - private int $mode; - /** * @param \Iterator $iterator The Iterator to filter * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) @@ -32,22 +32,19 @@ class FileTypeFilterIterator extends \FilterIterator public function __construct(\Iterator $iterator, int $mode) { $this->mode = $mode; - parent::__construct($iterator); } - /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { $fileinfo = $this->current(); if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) { - return false; + return \false; } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) { - return false; + return \false; } - - return true; + return \true; } } diff --git a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/FilecontentFilterIterator.php similarity index 73% rename from vendor/symfony/finder/Iterator/FilecontentFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/FilecontentFilterIterator.php index bdc71ff..f02b0cc 100644 --- a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/FilecontentFilterIterator.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\SplFileInfo; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\SplFileInfo; /** * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings). * @@ -26,33 +24,28 @@ class FilecontentFilterIterator extends MultiplePcreFilterIterator /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { if (!$this->matchRegexps && !$this->noMatchRegexps) { - return true; + return \true; } - $fileinfo = $this->current(); - if ($fileinfo->isDir() || !$fileinfo->isReadable()) { - return false; + return \false; } - $content = $fileinfo->getContents(); if (!$content) { - return false; + return \false; } - return $this->isAccepted($content); } - /** * Converts string to regexp if necessary. * * @param string $str Pattern: string or regexp */ - protected function toRegex(string $str): string + protected function toRegex(string $str) : string { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; + return $this->isRegex($str) ? $str : '/' . preg_quote($str, '/') . '/'; } } diff --git a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/FilenameFilterIterator.php similarity index 80% rename from vendor/symfony/finder/Iterator/FilenameFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/FilenameFilterIterator.php index 05d9535..ec4492b 100644 --- a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/FilenameFilterIterator.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Glob; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Glob; /** * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string). * @@ -25,11 +23,10 @@ class FilenameFilterIterator extends MultiplePcreFilterIterator /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { return $this->isAccepted($this->current()->getFilename()); } - /** * Converts glob to regexp. * @@ -38,7 +35,7 @@ public function accept(): bool * * @param string $str Pattern: glob or regexp */ - protected function toRegex(string $str): string + protected function toRegex(string $str) : string { return $this->isRegex($str) ? $str : Glob::toRegex($str); } diff --git a/vendor/symfony/finder/Iterator/LazyIterator.php b/vendor/prefixed/symfony/finder/Iterator/LazyIterator.php similarity index 64% rename from vendor/symfony/finder/Iterator/LazyIterator.php rename to vendor/prefixed/symfony/finder/Iterator/LazyIterator.php index 5b5806b..1a2854a 100644 --- a/vendor/symfony/finder/Iterator/LazyIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/LazyIterator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Iterator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; /** * @author Jérémy Derussé @@ -18,14 +17,15 @@ */ class LazyIterator implements \IteratorAggregate { - private \Closure $iteratorFactory; - + /** + * @var \Closure + */ + private $iteratorFactory; public function __construct(callable $iteratorFactory) { - $this->iteratorFactory = $iteratorFactory(...); + $this->iteratorFactory = \Closure::fromCallable($iteratorFactory); } - - public function getIterator(): \Traversable + public function getIterator() : \Traversable { yield from ($this->iteratorFactory)(); } diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/MultiplePcreFilterIterator.php similarity index 80% rename from vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/MultiplePcreFilterIterator.php index 82a9df3..fa2ef6d 100644 --- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/MultiplePcreFilterIterator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Iterator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; /** * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). @@ -23,9 +22,14 @@ */ abstract class MultiplePcreFilterIterator extends \FilterIterator { + /** + * @var mixed[] + */ protected $matchRegexps = []; + /** + * @var mixed[] + */ protected $noMatchRegexps = []; - /** * @param \Iterator $iterator The Iterator to filter * @param string[] $matchPatterns An array of patterns that need to match @@ -36,14 +40,11 @@ public function __construct(\Iterator $iterator, array $matchPatterns, array $no foreach ($matchPatterns as $pattern) { $this->matchRegexps[] = $this->toRegex($pattern); } - foreach ($noMatchPatterns as $pattern) { $this->noMatchRegexps[] = $this->toRegex($pattern); } - parent::__construct($iterator); } - /** * Checks whether the string is accepted by the regex filters. * @@ -51,61 +52,48 @@ public function __construct(\Iterator $iterator, array $matchPatterns, array $no * Such case can be handled by child classes before calling the method if they want to * apply a different behavior. */ - protected function isAccepted(string $string): bool + protected function isAccepted(string $string) : bool { // should at least not match one rule to exclude foreach ($this->noMatchRegexps as $regex) { if (preg_match($regex, $string)) { - return false; + return \false; } } - // should at least match one rule if ($this->matchRegexps) { foreach ($this->matchRegexps as $regex) { if (preg_match($regex, $string)) { - return true; + return \true; } } - - return false; + return \false; } - // If there is no match rules, the file is accepted - return true; + return \true; } - /** * Checks whether the string is a regex. */ - protected function isRegex(string $str): bool + protected function isRegex(string $str) : bool { - $availableModifiers = 'imsxuADU'; - - if (\PHP_VERSION_ID >= 80200) { - $availableModifiers .= 'n'; - } - - if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) { + $availableModifiers = 'imsxuADUn'; + if (preg_match('/^(.{3,}?)[' . $availableModifiers . ']*$/', $str, $m)) { $start = substr($m[1], 0, 1); $end = substr($m[1], -1); - if ($start === $end) { return !preg_match('/[*?[:alnum:] \\\\]/', $start); } - foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) { if ($start === $delimiters[0] && $end === $delimiters[1]) { - return true; + return \true; } } } - - return false; + return \false; } - /** * Converts string into regexp. */ - abstract protected function toRegex(string $str): string; + protected abstract function toRegex(string $str) : string; } diff --git a/vendor/symfony/finder/Iterator/PathFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/PathFilterIterator.php similarity index 78% rename from vendor/symfony/finder/Iterator/PathFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/PathFilterIterator.php index c6d5813..432dc05 100644 --- a/vendor/symfony/finder/Iterator/PathFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/PathFilterIterator.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\SplFileInfo; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\SplFileInfo; /** * PathFilterIterator filters files by path patterns (e.g. some/special/dir). * @@ -26,17 +24,14 @@ class PathFilterIterator extends MultiplePcreFilterIterator /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { $filename = $this->current()->getRelativePathname(); - if ('\\' === \DIRECTORY_SEPARATOR) { $filename = str_replace('\\', '/', $filename); } - return $this->isAccepted($filename); } - /** * Converts strings to regexp. * @@ -49,8 +44,8 @@ public function accept(): bool * * @param string $str Pattern: regexp or dirname */ - protected function toRegex(string $str): string + protected function toRegex(string $str) : string { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; + return $this->isRegex($str) ? $str : '/' . preg_quote($str, '/') . '/'; } } diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/prefixed/symfony/finder/Iterator/RecursiveDirectoryIterator.php similarity index 70% rename from vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php rename to vendor/prefixed/symfony/finder/Iterator/RecursiveDirectoryIterator.php index f5fd2d4..957a4ba 100644 --- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -8,12 +8,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Exception\AccessDeniedException; -use Symfony\Component\Finder\SplFileInfo; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Exception\AccessDeniedException; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\SplFileInfo; /** * Extends the \RecursiveDirectoryIterator to support relative paths. * @@ -23,23 +21,35 @@ */ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator { - private bool $ignoreUnreadableDirs; - private bool $ignoreFirstRewind = true; - + /** + * @var bool + */ + private $ignoreUnreadableDirs; + /** + * @var bool + */ + private $ignoreFirstRewind = \true; // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations - private string $rootPath; - private string $subPath; - private string $directorySeparator = '/'; - + /** + * @var string + */ + private $rootPath; + /** + * @var string + */ + private $subPath; + /** + * @var string + */ + private $directorySeparator = '/'; /** * @throws \RuntimeException */ - public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false) + public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = \false) { if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) { throw new \RuntimeException('This iterator only support returning current as fileinfo.'); } - parent::__construct($path, $flags); $this->ignoreUnreadableDirs = $ignoreUnreadableDirs; $this->rootPath = $path; @@ -47,14 +57,12 @@ public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs $this->directorySeparator = \DIRECTORY_SEPARATOR; } } - /** * Return an instance of SplFileInfo with support for relative paths. */ - public function current(): SplFileInfo + public function current() : SplFileInfo { // the logic here avoids redoing the same work in all iterations - if (!isset($this->subPath)) { $this->subPath = $this->getSubPath(); } @@ -64,71 +72,56 @@ public function current(): SplFileInfo } $subPathname .= $this->getFilename(); $basePath = $this->rootPath; - - if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator) && !str_ends_with($basePath, '/')) { + if ('/' !== $basePath && substr_compare($basePath, $this->directorySeparator, -strlen($this->directorySeparator)) !== 0 && substr_compare($basePath, '/', -strlen('/')) !== 0) { $basePath .= $this->directorySeparator; } - - return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname); + return new SplFileInfo($basePath . $subPathname, $this->subPath, $subPathname); } - - public function hasChildren(bool $allowLinks = false): bool + public function hasChildren($allowLinks = \false) : bool { $hasChildren = parent::hasChildren($allowLinks); - if (!$hasChildren || !$this->ignoreUnreadableDirs) { return $hasChildren; } - try { parent::getChildren(); - - return true; - } catch (\UnexpectedValueException) { + return \true; + } catch (\UnexpectedValueException $exception) { // If directory is unreadable and finder is set to ignore it, skip children - return false; + return \false; } } - /** * @throws AccessDeniedException */ - public function getChildren(): \RecursiveDirectoryIterator + public function getChildren() : \RecursiveDirectoryIterator { try { $children = parent::getChildren(); - if ($children instanceof self) { // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs; - // performance optimization to avoid redoing the same work in all children $children->rootPath = $this->rootPath; } - return $children; } catch (\UnexpectedValueException $e) { throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e); } } - - public function next(): void + public function next() : void { - $this->ignoreFirstRewind = false; - + $this->ignoreFirstRewind = \false; parent::next(); } - - public function rewind(): void + public function rewind() : void { // some streams like FTP are not rewindable, ignore the first rewind after creation, // as newly created DirectoryIterator does not need to be rewound if ($this->ignoreFirstRewind) { - $this->ignoreFirstRewind = false; - + $this->ignoreFirstRewind = \false; return; } - parent::rewind(); } } diff --git a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/SizeRangeFilterIterator.php similarity index 75% rename from vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/SizeRangeFilterIterator.php index 925830a..6cd0c8b 100644 --- a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/SizeRangeFilterIterator.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Comparator\NumberComparator; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Comparator\NumberComparator; /** * SizeRangeFilterIterator filters out files that are not in the given size range. * @@ -22,8 +20,10 @@ */ class SizeRangeFilterIterator extends \FilterIterator { - private array $comparators = []; - + /** + * @var mixed[] + */ + private $comparators = []; /** * @param \Iterator $iterator * @param NumberComparator[] $comparators @@ -31,27 +31,23 @@ class SizeRangeFilterIterator extends \FilterIterator public function __construct(\Iterator $iterator, array $comparators) { $this->comparators = $comparators; - parent::__construct($iterator); } - /** * Filters the iterator values. */ - public function accept(): bool + public function accept() : bool { $fileinfo = $this->current(); if (!$fileinfo->isFile()) { - return true; + return \true; } - $filesize = $fileinfo->getSize(); foreach ($this->comparators as $compare) { if (!$compare->test($filesize)) { - return false; + return \false; } } - - return true; + return \true; } } diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/prefixed/symfony/finder/Iterator/SortableIterator.php similarity index 55% rename from vendor/symfony/finder/Iterator/SortableIterator.php rename to vendor/prefixed/symfony/finder/Iterator/SortableIterator.php index 177cd0b..c0b72fd 100644 --- a/vendor/symfony/finder/Iterator/SortableIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/SortableIterator.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder\Iterator; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; /** * SortableIterator applies a sort on a given Iterator. @@ -31,73 +30,88 @@ class SortableIterator implements \IteratorAggregate public const SORT_BY_NAME_NATURAL_CASE_INSENSITIVE = 8; public const SORT_BY_EXTENSION = 9; public const SORT_BY_SIZE = 10; - /** @var \Traversable */ - private \Traversable $iterator; - private \Closure|int $sort; - + private $iterator; + /** + * @var \Closure|int + */ + private $sort; /** * @param \Traversable $iterator * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) * * @throws \InvalidArgumentException */ - public function __construct(\Traversable $iterator, int|callable $sort, bool $reverseOrder = false) + public function __construct(\Traversable $iterator, $sort, bool $reverseOrder = \false) { $this->iterator = $iterator; $order = $reverseOrder ? -1 : 1; - if (self::SORT_BY_NAME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; } elseif (self::SORT_BY_NAME_NATURAL === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; } elseif (self::SORT_BY_NAME_CASE_INSENSITIVE === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; } elseif (self::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - } elseif (self::SORT_BY_TYPE === $sort) { $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strnatcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; + } elseif (self::SORT_BY_TYPE === $sort) { + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use($order) { if ($a->isDir() && $b->isFile()) { return -$order; } elseif ($a->isFile() && $b->isDir()) { return $order; } - return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); }; } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getATime() - $b->getATime()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getATime() - $b->getATime()); + }; } elseif (self::SORT_BY_CHANGED_TIME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getCTime() - $b->getCTime()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getCTime() - $b->getCTime()); + }; } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getMTime() - $b->getMTime()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getMTime() - $b->getMTime()); + }; } elseif (self::SORT_BY_EXTENSION === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getExtension(), $b->getExtension()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strnatcmp($a->getExtension(), $b->getExtension()); + }; } elseif (self::SORT_BY_SIZE === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getSize() - $b->getSize()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getSize() - $b->getSize()); + }; } elseif (self::SORT_BY_NONE === $sort) { $this->sort = $order; } elseif (\is_callable($sort)) { - $this->sort = $reverseOrder ? static fn (\SplFileInfo $a, \SplFileInfo $b) => -$sort($a, $b) : $sort(...); + $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { + return -$sort($a, $b); + } : \Closure::fromCallable($sort); } else { throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); } } - - public function getIterator(): \Traversable + public function getIterator() : \Traversable { if (1 === $this->sort) { return $this->iterator; } - - $array = iterator_to_array($this->iterator, true); - + $array = iterator_to_array($this->iterator, \true); if (-1 === $this->sort) { $array = array_reverse($array); } else { uasort($array, $this->sort); } - return new \ArrayIterator($array); } } diff --git a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/vendor/prefixed/symfony/finder/Iterator/VcsIgnoredFilterIterator.php similarity index 69% rename from vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php rename to vendor/prefixed/symfony/finder/Iterator/VcsIgnoredFilterIterator.php index b278706..c2d3bd4 100644 --- a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +++ b/vendor/prefixed/symfony/finder/Iterator/VcsIgnoredFilterIterator.php @@ -8,166 +8,127 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Iterator; -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Gitignore; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder\Gitignore; /** * @extends \FilterIterator */ final class VcsIgnoredFilterIterator extends \FilterIterator { - private string $baseDir; - + /** + * @var string + */ + private $baseDir; /** * @var array */ - private array $gitignoreFilesCache = []; - + private $gitignoreFilesCache = []; /** * @var array */ - private array $ignoredPathsCache = []; - + private $ignoredPathsCache = []; /** * @param \Iterator $iterator */ public function __construct(\Iterator $iterator, string $baseDir) { $this->baseDir = $this->normalizePath($baseDir); - - foreach ([$this->baseDir, ...$this->parentDirectoriesUpwards($this->baseDir)] as $directory) { + foreach (array_merge([$this->baseDir], $this->parentDirectoriesUpwards($this->baseDir)) as $directory) { if (@is_dir("{$directory}/.git")) { $this->baseDir = $directory; break; } } - parent::__construct($iterator); } - - public function accept(): bool + public function accept() : bool { $file = $this->current(); - $fileRealPath = $this->normalizePath($file->getRealPath()); - return !$this->isIgnored($fileRealPath); } - - private function isIgnored(string $fileRealPath): bool + private function isIgnored(string $fileRealPath) : bool { - if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) { + if (is_dir($fileRealPath) && substr_compare($fileRealPath, '/', -strlen('/')) !== 0) { $fileRealPath .= '/'; } - if (isset($this->ignoredPathsCache[$fileRealPath])) { return $this->ignoredPathsCache[$fileRealPath]; } - - $ignored = false; - + $ignored = \false; foreach ($this->parentDirectoriesDownwards($fileRealPath) as $parentDirectory) { if ($this->isIgnored($parentDirectory)) { // rules in ignored directories are ignored, no need to check further. break; } - $fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1); - - if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) { + if (null === ($regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore"))) { continue; } - [$exclusionRegex, $inclusionRegex] = $regexps; - if (preg_match($exclusionRegex, $fileRelativePath)) { - $ignored = true; - + $ignored = \true; continue; } - if (preg_match($inclusionRegex, $fileRelativePath)) { - $ignored = false; + $ignored = \false; } } - return $this->ignoredPathsCache[$fileRealPath] = $ignored; } - /** * @return list */ - private function parentDirectoriesUpwards(string $from): array + private function parentDirectoriesUpwards(string $from) : array { $parentDirectories = []; - $parentDirectory = $from; - - while (true) { + while (\true) { $newParentDirectory = \dirname($parentDirectory); - // dirname('/') = '/' if ($newParentDirectory === $parentDirectory) { break; } - $parentDirectories[] = $parentDirectory = $newParentDirectory; } - return $parentDirectories; } - - private function parentDirectoriesUpTo(string $from, string $upTo): array + private function parentDirectoriesUpTo(string $from, string $upTo) : array { - return array_filter( - $this->parentDirectoriesUpwards($from), - static fn (string $directory): bool => str_starts_with($directory, $upTo) - ); + return array_filter($this->parentDirectoriesUpwards($from), static function (string $directory) use ($upTo) : bool { + return strncmp($directory, $upTo, strlen($upTo)) === 0; + }); } - /** * @return list */ - private function parentDirectoriesDownwards(string $fileRealPath): array + private function parentDirectoriesDownwards(string $fileRealPath) : array { - return array_reverse( - $this->parentDirectoriesUpTo($fileRealPath, $this->baseDir) - ); + return array_reverse($this->parentDirectoriesUpTo($fileRealPath, $this->baseDir)); } - /** * @return array{0: string, 1: string}|null */ - private function readGitignoreFile(string $path): ?array + private function readGitignoreFile(string $path) : ?array { if (\array_key_exists($path, $this->gitignoreFilesCache)) { return $this->gitignoreFilesCache[$path]; } - if (!file_exists($path)) { return $this->gitignoreFilesCache[$path] = null; } - if (!is_file($path) || !is_readable($path)) { throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable."); } - $gitignoreFileContent = file_get_contents($path); - - return $this->gitignoreFilesCache[$path] = [ - Gitignore::toRegex($gitignoreFileContent), - Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent), - ]; + return $this->gitignoreFilesCache[$path] = [Gitignore::toRegex($gitignoreFileContent), Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent)]; } - - private function normalizePath(string $path): string + private function normalizePath(string $path) : string { if ('\\' === \DIRECTORY_SEPARATOR) { return str_replace('\\', '/', $path); } - return $path; } } diff --git a/vendor/symfony/finder/LICENSE b/vendor/prefixed/symfony/finder/LICENSE similarity index 100% rename from vendor/symfony/finder/LICENSE rename to vendor/prefixed/symfony/finder/LICENSE diff --git a/vendor/symfony/finder/SplFileInfo.php b/vendor/prefixed/symfony/finder/SplFileInfo.php similarity index 74% rename from vendor/symfony/finder/SplFileInfo.php rename to vendor/prefixed/symfony/finder/SplFileInfo.php index 867e8e8..840fc58 100644 --- a/vendor/symfony/finder/SplFileInfo.php +++ b/vendor/prefixed/symfony/finder/SplFileInfo.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Finder; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Finder; /** * Extends \SplFileInfo to support relative paths. @@ -18,9 +17,14 @@ */ class SplFileInfo extends \SplFileInfo { - private string $relativePath; - private string $relativePathname; - + /** + * @var string + */ + private $relativePath; + /** + * @var string + */ + private $relativePathname; /** * @param string $file The file name * @param string $relativePath The relative path @@ -28,55 +32,51 @@ class SplFileInfo extends \SplFileInfo */ public function __construct(string $file, string $relativePath, string $relativePathname) { - parent::__construct($file); $this->relativePath = $relativePath; $this->relativePathname = $relativePathname; + parent::__construct($file); } - /** * Returns the relative path. * * This path does not contain the file name. */ - public function getRelativePath(): string + public function getRelativePath() : string { return $this->relativePath; } - /** * Returns the relative path name. * * This path contains the file name. */ - public function getRelativePathname(): string + public function getRelativePathname() : string { return $this->relativePathname; } - - public function getFilenameWithoutExtension(): string + public function getFilenameWithoutExtension() : string { $filename = $this->getFilename(); - return pathinfo($filename, \PATHINFO_FILENAME); } - /** * Returns the contents of the file. * * @throws \RuntimeException */ - public function getContents(): string + public function getContents() : string { - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); + set_error_handler(function ($type, $msg) use(&$error) { + $error = $msg; + }); try { $content = file_get_contents($this->getPathname()); } finally { restore_error_handler(); } - if (false === $content) { + if (\false === $content) { throw new \RuntimeException($error); } - return $content; } } diff --git a/vendor/symfony/polyfill-ctype/Ctype.php b/vendor/prefixed/symfony/polyfill-ctype/Ctype.php similarity index 95% rename from vendor/symfony/polyfill-ctype/Ctype.php rename to vendor/prefixed/symfony/polyfill-ctype/Ctype.php index ba75a2c..9fab551 100644 --- a/vendor/symfony/polyfill-ctype/Ctype.php +++ b/vendor/prefixed/symfony/polyfill-ctype/Ctype.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Polyfill\Ctype; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Polyfill\Ctype; /** * Ctype implementation through regex. @@ -32,10 +31,8 @@ final class Ctype public static function ctype_alnum($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); } - /** * Returns TRUE if every character in text is a letter, FALSE otherwise. * @@ -48,10 +45,8 @@ public static function ctype_alnum($text) public static function ctype_alpha($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); } - /** * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. * @@ -64,10 +59,8 @@ public static function ctype_alpha($text) public static function ctype_cntrl($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); + return \is_string($text) && '' !== $text && !preg_match('/[^\\x00-\\x1f\\x7f]/', $text); } - /** * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. * @@ -80,10 +73,8 @@ public static function ctype_cntrl($text) public static function ctype_digit($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); } - /** * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. * @@ -96,10 +87,8 @@ public static function ctype_digit($text) public static function ctype_graph($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); } - /** * Returns TRUE if every character in text is a lowercase letter. * @@ -112,10 +101,8 @@ public static function ctype_graph($text) public static function ctype_lower($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); } - /** * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. * @@ -128,10 +115,8 @@ public static function ctype_lower($text) public static function ctype_print($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); } - /** * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. * @@ -144,10 +129,8 @@ public static function ctype_print($text) public static function ctype_punct($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); + return \is_string($text) && '' !== $text && !preg_match('/[^!-\\/\\:-@\\[-`\\{-~]/', $text); } - /** * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. * @@ -160,10 +143,8 @@ public static function ctype_punct($text) public static function ctype_space($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); + return \is_string($text) && '' !== $text && !preg_match('/[^\\s]/', $text); } - /** * Returns TRUE if every character in text is an uppercase letter. * @@ -176,10 +157,8 @@ public static function ctype_space($text) public static function ctype_upper($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); } - /** * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. * @@ -192,10 +171,8 @@ public static function ctype_upper($text) public static function ctype_xdigit($text) { $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); } - /** * Converts integers to their char versions according to normal ctype behaviour, if needed. * @@ -214,19 +191,15 @@ private static function convert_int_to_char_for_ctype($int, $function) if (!\is_int($int)) { return $int; } - if ($int < -128 || $int > 255) { return (string) $int; } - if (\PHP_VERSION_ID >= 80100) { - @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED); + @trigger_error($function . '(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED); } - if ($int < 0) { $int += 256; } - return \chr($int); } } diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/prefixed/symfony/polyfill-ctype/LICENSE similarity index 100% rename from vendor/symfony/polyfill-ctype/LICENSE rename to vendor/prefixed/symfony/polyfill-ctype/LICENSE diff --git a/vendor/prefixed/symfony/polyfill-ctype/bootstrap.php b/vendor/prefixed/symfony/polyfill-ctype/bootstrap.php new file mode 100644 index 0000000..413f92f --- /dev/null +++ b/vendor/prefixed/symfony/polyfill-ctype/bootstrap.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use Symfony\Polyfill\Ctype as p; +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__ . '/bootstrap80.php'; +} +if (!\function_exists('ctype_alnum')) { + function ctype_alnum($text) + { + return p\Ctype::ctype_alnum($text); + } +} +if (!\function_exists('ctype_alpha')) { + function ctype_alpha($text) + { + return p\Ctype::ctype_alpha($text); + } +} +if (!\function_exists('ctype_cntrl')) { + function ctype_cntrl($text) + { + return p\Ctype::ctype_cntrl($text); + } +} +if (!\function_exists('ctype_digit')) { + function ctype_digit($text) + { + return p\Ctype::ctype_digit($text); + } +} +if (!\function_exists('ctype_graph')) { + function ctype_graph($text) + { + return p\Ctype::ctype_graph($text); + } +} +if (!\function_exists('ctype_lower')) { + function ctype_lower($text) + { + return p\Ctype::ctype_lower($text); + } +} +if (!\function_exists('ctype_print')) { + function ctype_print($text) + { + return p\Ctype::ctype_print($text); + } +} +if (!\function_exists('ctype_punct')) { + function ctype_punct($text) + { + return p\Ctype::ctype_punct($text); + } +} +if (!\function_exists('ctype_space')) { + function ctype_space($text) + { + return p\Ctype::ctype_space($text); + } +} +if (!\function_exists('ctype_upper')) { + function ctype_upper($text) + { + return p\Ctype::ctype_upper($text); + } +} +if (!\function_exists('ctype_xdigit')) { + function ctype_xdigit($text) + { + return p\Ctype::ctype_xdigit($text); + } +} diff --git a/vendor/prefixed/symfony/polyfill-ctype/bootstrap80.php b/vendor/prefixed/symfony/polyfill-ctype/bootstrap80.php new file mode 100644 index 0000000..44d7bd1 --- /dev/null +++ b/vendor/prefixed/symfony/polyfill-ctype/bootstrap80.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use Symfony\Polyfill\Ctype as p; +if (!\function_exists('ctype_alnum')) { + /** + * @param mixed $text + */ + function ctype_alnum($text) : bool + { + return p\Ctype::ctype_alnum($text); + } +} +if (!\function_exists('ctype_alpha')) { + /** + * @param mixed $text + */ + function ctype_alpha($text) : bool + { + return p\Ctype::ctype_alpha($text); + } +} +if (!\function_exists('ctype_cntrl')) { + /** + * @param mixed $text + */ + function ctype_cntrl($text) : bool + { + return p\Ctype::ctype_cntrl($text); + } +} +if (!\function_exists('ctype_digit')) { + /** + * @param mixed $text + */ + function ctype_digit($text) : bool + { + return p\Ctype::ctype_digit($text); + } +} +if (!\function_exists('ctype_graph')) { + /** + * @param mixed $text + */ + function ctype_graph($text) : bool + { + return p\Ctype::ctype_graph($text); + } +} +if (!\function_exists('ctype_lower')) { + /** + * @param mixed $text + */ + function ctype_lower($text) : bool + { + return p\Ctype::ctype_lower($text); + } +} +if (!\function_exists('ctype_print')) { + /** + * @param mixed $text + */ + function ctype_print($text) : bool + { + return p\Ctype::ctype_print($text); + } +} +if (!\function_exists('ctype_punct')) { + /** + * @param mixed $text + */ + function ctype_punct($text) : bool + { + return p\Ctype::ctype_punct($text); + } +} +if (!\function_exists('ctype_space')) { + /** + * @param mixed $text + */ + function ctype_space($text) : bool + { + return p\Ctype::ctype_space($text); + } +} +if (!\function_exists('ctype_upper')) { + /** + * @param mixed $text + */ + function ctype_upper($text) : bool + { + return p\Ctype::ctype_upper($text); + } +} +if (!\function_exists('ctype_xdigit')) { + /** + * @param mixed $text + */ + function ctype_xdigit($text) : bool + { + return p\Ctype::ctype_xdigit($text); + } +} diff --git a/vendor/symfony/yaml/Command/LintCommand.php b/vendor/prefixed/symfony/yaml/Command/LintCommand.php similarity index 61% rename from vendor/symfony/yaml/Command/LintCommand.php rename to vendor/prefixed/symfony/yaml/Command/LintCommand.php index e32339e..6a0995d 100644 --- a/vendor/symfony/yaml/Command/LintCommand.php +++ b/vendor/prefixed/symfony/yaml/Command/LintCommand.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Yaml\Command; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Command; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\CI\GithubActionReporter; @@ -23,10 +22,9 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Yaml; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception\ParseException; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Parser; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Yaml; /** * Validates YAML files syntax and outputs encountered errors. * @@ -36,31 +34,35 @@ #[AsCommand(name: 'lint:yaml', description: 'Lint a YAML file and outputs encountered errors')] class LintCommand extends Command { - private Parser $parser; - private ?string $format = null; - private bool $displayCorrectFiles; - private ?\Closure $directoryIteratorProvider; - private ?\Closure $isReadableProvider; - + /** + * @var \Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Parser + */ + private $parser; + /** + * @var string|null + */ + private $format; + /** + * @var bool + */ + private $displayCorrectFiles; + /** + * @var \Closure|null + */ + private $directoryIteratorProvider; + /** + * @var \Closure|null + */ + private $isReadableProvider; public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null) { parent::__construct($name); - - $this->directoryIteratorProvider = null === $directoryIteratorProvider ? null : $directoryIteratorProvider(...); - $this->isReadableProvider = null === $isReadableProvider ? null : $isReadableProvider(...); + $this->directoryIteratorProvider = null === $directoryIteratorProvider ? null : \Closure::fromCallable($directoryIteratorProvider); + $this->isReadableProvider = null === $isReadableProvider ? null : \Closure::fromCallable($isReadableProvider); } - - /** - * @return void - */ - protected function configure() + protected function configure() : void { - $this - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions()))) - ->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude') - ->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null) - ->setHelp(<<addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')->addOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())))->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude')->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null)->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT the first encountered syntax error. @@ -75,6 +77,9 @@ protected function configure() Or of a whole directory: php %command.full_name% dirname + +The --format option specifies the format of the command output: + php %command.full_name% dirname --format=json You can also exclude one or more specific files: @@ -82,194 +87,158 @@ protected function configure() php %command.full_name% dirname --exclude="dirname/foo.yaml" --exclude="dirname/bar.yaml" EOF - ) - ; +); } - - protected function execute(InputInterface $input, OutputInterface $output): int + protected function execute(InputInterface $input, OutputInterface $output) : int { $io = new SymfonyStyle($input, $output); $filenames = (array) $input->getArgument('filename'); $excludes = $input->getOption('exclude'); $this->format = $input->getOption('format'); $flags = $input->getOption('parse-tags'); - if (null === $this->format) { // Autodetect format according to CI environment $this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; } - $flags = $flags ? Yaml::PARSE_CUSTOM_TAGS : 0; - $this->displayCorrectFiles = $output->isVerbose(); - if (['-'] === $filenames) { return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]); } - if (!$filenames) { throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); } - $filesInfo = []; foreach ($filenames as $filename) { if (!$this->isReadable($filename)) { - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); + throw new RuntimeException(\sprintf('File or directory "%s" is not readable.', $filename)); } - foreach ($this->getFiles($filename) as $file) { - if (!\in_array($file->getPathname(), $excludes, true)) { + if (!\in_array($file->getPathname(), $excludes, \true)) { $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file); } } } - return $this->display($io, $filesInfo); } - - private function validate(string $content, int $flags, ?string $file = null): array + private function validate(string $content, int $flags, ?string $file = null) : array { - $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) { + $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use(&$prevErrorHandler) { if (\E_USER_DEPRECATED === $level) { throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1); } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; + return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : \false; }); - try { $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags); } catch (ParseException $e) { - return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()]; + return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => \false, 'message' => $e->getMessage()]; } finally { restore_error_handler(); } - - return ['file' => $file, 'valid' => true]; + return ['file' => $file, 'valid' => \true]; } - - private function display(SymfonyStyle $io, array $files): int + private function display(SymfonyStyle $io, array $files) : int { - return match ($this->format) { - 'txt' => $this->displayTxt($io, $files), - 'json' => $this->displayJson($io, $files), - 'github' => $this->displayTxt($io, $files, true), - default => throw new InvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))), - }; + switch ($this->format) { + case 'txt': + return $this->displayTxt($io, $files); + case 'json': + return $this->displayJson($io, $files); + case 'github': + return $this->displayTxt($io, $files, \true); + default: + throw new InvalidArgumentException(\sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))); + } } - - private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false): int + private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = \false) : int { $countFiles = \count($filesInfo); $erroredFiles = 0; - $suggestTagOption = false; - + $suggestTagOption = \false; if ($errorAsGithubAnnotations) { $githubReporter = new GithubActionReporter($io); } - foreach ($filesInfo as $info) { if ($info['valid'] && $this->displayCorrectFiles) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); + $io->comment('OK' . ($info['file'] ? \sprintf(' in %s', $info['file']) : '')); } elseif (!$info['valid']) { ++$erroredFiles; - $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - $io->text(sprintf(' >> %s', $info['message'])); - - if (str_contains($info['message'], 'PARSE_CUSTOM_TAGS')) { - $suggestTagOption = true; + $io->text(' ERROR ' . ($info['file'] ? \sprintf(' in %s', $info['file']) : '')); + $io->text(\sprintf(' >> %s', $info['message'])); + if (strpos($info['message'], 'PARSE_CUSTOM_TAGS') !== false) { + $suggestTagOption = \true; } - if ($errorAsGithubAnnotations) { $githubReporter->error($info['message'], $info['file'] ?? 'php://stdin', $info['line']); } } } - if (0 === $erroredFiles) { - $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles)); + $io->success(\sprintf('All %d YAML files contain valid syntax.', $countFiles)); } else { - $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : '')); + $io->warning(\sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : '')); } - return min($erroredFiles, 1); } - - private function displayJson(SymfonyStyle $io, array $filesInfo): int + private function displayJson(SymfonyStyle $io, array $filesInfo) : int { $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { + array_walk($filesInfo, function (&$v) use(&$errors) { $v['file'] = (string) $v['file']; if (!$v['valid']) { ++$errors; } - - if (isset($v['message']) && str_contains($v['message'], 'PARSE_CUSTOM_TAGS')) { + if (isset($v['message']) && strpos($v['message'], 'PARSE_CUSTOM_TAGS') !== false) { $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.'; } }); - $io->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - return min($errors, 1); } - - private function getFiles(string $fileOrDirectory): iterable + private function getFiles(string $fileOrDirectory) : iterable { if (is_file($fileOrDirectory)) { - yield new \SplFileInfo($fileOrDirectory); - + (yield new \SplFileInfo($fileOrDirectory)); return; } - foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { if (!\in_array($file->getExtension(), ['yml', 'yaml'])) { continue; } - - yield $file; + (yield $file); } } - - private function getParser(): Parser + private function getParser() : Parser { - return $this->parser ??= new Parser(); + return $this->parser = $this->parser ?? new Parser(); } - - private function getDirectoryIterator(string $directory): iterable + private function getDirectoryIterator(string $directory) : iterable { - $default = fn ($directory) => new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - + $default = function ($directory) { + return new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), \RecursiveIteratorIterator::LEAVES_ONLY); + }; if (null !== $this->directoryIteratorProvider) { return ($this->directoryIteratorProvider)($directory, $default); } - return $default($directory); } - - private function isReadable(string $fileOrDirectory): bool + private function isReadable(string $fileOrDirectory) : bool { - $default = is_readable(...); - + $default = \Closure::fromCallable('is_readable'); if (null !== $this->isReadableProvider) { return ($this->isReadableProvider)($fileOrDirectory, $default); } - return $default($fileOrDirectory); } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void + public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void { if ($input->mustSuggestOptionValuesFor('format')) { $suggestions->suggestValues($this->getAvailableFormatOptions()); } } - - private function getAvailableFormatOptions(): array + /** @return string[] */ + private function getAvailableFormatOptions() : array { return ['txt', 'json', 'github']; } diff --git a/vendor/prefixed/symfony/yaml/Dumper.php b/vendor/prefixed/symfony/yaml/Dumper.php new file mode 100644 index 0000000..7b35f4e --- /dev/null +++ b/vendor/prefixed/symfony/yaml/Dumper.php @@ -0,0 +1,153 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml; + +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Tag\TaggedValue; +/** + * Dumper dumps PHP variables to YAML strings. + * + * @author Fabien Potencier + * + * @final + */ +class Dumper +{ + /** + * @var int + */ + private $indentation = 4; + /** + * @param int $indentation The amount of spaces to use for indentation of nested nodes + */ + public function __construct(int $indentation = 4) + { + $this->indentation = $indentation; + if ($indentation < 1) { + throw new \InvalidArgumentException('The indentation must be greater than zero.'); + } + } + /** + * Dumps a PHP value to YAML. + * + * @param mixed $input The PHP value + * @param int $inline The level where you switch to inline YAML + * @param int $indent The level of indentation (used internally) + * @param int-mask-of $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string + */ + public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0) : string + { + if ($flags & Yaml::DUMP_NULL_AS_EMPTY && $flags & Yaml::DUMP_NULL_AS_TILDE) { + throw new \InvalidArgumentException('The Yaml::DUMP_NULL_AS_EMPTY and Yaml::DUMP_NULL_AS_TILDE flags cannot be used together.'); + } + return $this->doDump($input, $inline, $indent, $flags); + } + /** + * @param mixed $input + */ + private function doDump($input, int $inline = 0, int $indent = 0, int $flags = 0, int $nestingLevel = 0) : string + { + $output = ''; + $prefix = $indent ? str_repeat(' ', $indent) : ''; + $dumpObjectAsInlineMap = \true; + if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) { + $dumpObjectAsInlineMap = !(array) $input; + } + if ($inline <= 0 || !\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap || !$input) { + $output .= $prefix . Inline::dump($input, $flags, 0 === $nestingLevel); + } elseif ($input instanceof TaggedValue) { + $output .= $this->dumpTaggedValue($input, $inline, $indent, $flags, $prefix, $nestingLevel); + } else { + $dumpAsMap = Inline::isHash($input); + $compactNestedMapping = Yaml::DUMP_COMPACT_NESTED_MAPPING & $flags && !$dumpAsMap; + foreach ($input as $key => $value) { + if ('' !== $output && "\n" !== $output[-1]) { + $output .= "\n"; + } + if (\is_int($key) && Yaml::DUMP_NUMERIC_KEY_AS_STRING & $flags) { + $key = (string) $key; + } + if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && strpos($value, "\n") !== false && strpos($value, "\r") === false) { + $blockIndentationIndicator = $this->getBlockIndentationIndicator($value); + if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) { + $blockChompingIndicator = '+'; + } elseif ("\n" === $value[-1]) { + $blockChompingIndicator = ''; + } else { + $blockChompingIndicator = '-'; + } + $output .= \sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags) . ':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator); + foreach (explode("\n", $value) as $row) { + if ('' === $row) { + $output .= "\n"; + } else { + $output .= \sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); + } + } + continue; + } + if ($value instanceof TaggedValue) { + $output .= \sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags) . ':' : '-', $value->getTag()); + if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && strpos($value->getValue(), "\n") !== false && strpos($value->getValue(), "\r\n") === false) { + $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue()); + $output .= \sprintf(' |%s', $blockIndentationIndicator); + foreach (explode("\n", $value->getValue()) as $row) { + $output .= \sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); + } + continue; + } + if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) { + $output .= ' ' . $this->doDump($value->getValue(), $inline - 1, 0, $flags, $nestingLevel + 1) . "\n"; + } else { + $output .= "\n"; + $output .= $this->doDump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags, $nestingLevel + 1); + } + continue; + } + $dumpObjectAsInlineMap = \true; + if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) { + $dumpObjectAsInlineMap = !(array) $value; + } + $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || !$value; + $output .= \sprintf('%s%s%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags) . ':' : '-', $willBeInlined || $compactNestedMapping && \is_array($value) && Inline::isHash($value) ? ' ' : "\n", $compactNestedMapping && \is_array($value) && Inline::isHash($value) ? substr($this->doDump($value, $inline - 1, $indent + 2, $flags, $nestingLevel + 1), $indent + 2) : $this->doDump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags, $nestingLevel + 1)) . ($willBeInlined ? "\n" : ''); + } + } + return $output; + } + private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix, int $nestingLevel) : string + { + $output = \sprintf('%s!%s', $prefix ? $prefix . ' ' : '', $value->getTag()); + if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && strpos($value->getValue(), "\n") !== false && strpos($value->getValue(), "\r\n") === false) { + $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue()); + $output .= \sprintf(' |%s', $blockIndentationIndicator); + foreach (explode("\n", $value->getValue()) as $row) { + $output .= \sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); + } + return $output; + } + if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) { + return $output . ' ' . $this->doDump($value->getValue(), $inline - 1, 0, $flags, $nestingLevel + 1) . "\n"; + } + return $output . "\n" . $this->doDump($value->getValue(), $inline - 1, $indent, $flags, $nestingLevel + 1); + } + private function getBlockIndentationIndicator(string $value) : string + { + $lines = explode("\n", $value); + // If the first line (that is neither empty nor contains only spaces) + // starts with a space character, the spec requires a block indentation indicator + // http://www.yaml.org/spec/1.2/spec.html#id2793979 + foreach ($lines as $line) { + if ('' !== trim($line, ' ')) { + return strncmp($line, ' ', strlen(' ')) === 0 ? (string) $this->indentation : ''; + } + } + return ''; + } +} diff --git a/vendor/prefixed/symfony/yaml/Escaper.php b/vendor/prefixed/symfony/yaml/Escaper.php new file mode 100644 index 0000000..2c9420c --- /dev/null +++ b/vendor/prefixed/symfony/yaml/Escaper.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml; + +/** + * Escaper encapsulates escaping rules for single and double-quoted + * YAML strings. + * + * @author Matthew Lewinski + * + * @internal + */ +class Escaper +{ + // Characters that would cause a dumped string to require double quoting. + public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]||…| |
|
"; + // Mapping arrays for escaping a double quoted string. The backslash is + // first to ensure proper escaping because str_replace operates iteratively + // on the input arrays. This ordering of the characters avoids the use of strtr, + // which performs more slowly. + private const ESCAPEES = ['\\', '\\\\', '\\"', '"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\t", "\n", "\v", "\f", "\r", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "", "…", " ", "
", "
"]; + private const ESCAPED = ['\\\\', '\\"', '\\\\', '\\"', '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', '\\x7f', '\\N', '\\_', '\\L', '\\P']; + /** + * Determines if a PHP value would require double quoting in YAML. + * + * @param string $value A PHP value + */ + public static function requiresDoubleQuoting(string $value) : bool + { + return 0 < preg_match('/' . self::REGEX_CHARACTER_TO_ESCAPE . '/u', $value); + } + /** + * Escapes and surrounds a PHP value with double quotes. + * + * @param string $value A PHP value + */ + public static function escapeWithDoubleQuotes(string $value) : string + { + return \sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value)); + } + /** + * Determines if a PHP value would require single quoting in YAML. + * + * @param string $value A PHP value + */ + public static function requiresSingleQuoting(string $value) : bool + { + // Determines if a PHP value is entirely composed of a value that would + // require single quoting in YAML. + if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) { + return \true; + } + // Determines if the PHP value contains any single characters that would + // cause it to require single quoting in YAML. + return 0 < preg_match('/[\\s\'"\\:\\{\\}\\[\\],&\\*\\#\\?] | \\A[\\-?|<>=!%@`\\p{Zs}]/xu', $value); + } + /** + * Escapes and surrounds a PHP value with single quotes. + * + * @param string $value A PHP value + */ + public static function escapeWithSingleQuotes(string $value) : string + { + return \sprintf("'%s'", str_replace('\'', '\'\'', $value)); + } +} diff --git a/vendor/symfony/yaml/Exception/DumpException.php b/vendor/prefixed/symfony/yaml/Exception/DumpException.php similarity index 84% rename from vendor/symfony/yaml/Exception/DumpException.php rename to vendor/prefixed/symfony/yaml/Exception/DumpException.php index cce972f..2d249c5 100644 --- a/vendor/symfony/yaml/Exception/DumpException.php +++ b/vendor/prefixed/symfony/yaml/Exception/DumpException.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Yaml\Exception; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception; /** * Exception class thrown when an error occurs during dumping. diff --git a/vendor/symfony/yaml/Exception/ExceptionInterface.php b/vendor/prefixed/symfony/yaml/Exception/ExceptionInterface.php similarity index 84% rename from vendor/symfony/yaml/Exception/ExceptionInterface.php rename to vendor/prefixed/symfony/yaml/Exception/ExceptionInterface.php index 9091316..3b94ffa 100644 --- a/vendor/symfony/yaml/Exception/ExceptionInterface.php +++ b/vendor/prefixed/symfony/yaml/Exception/ExceptionInterface.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Yaml\Exception; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception; /** * Exception interface for all exceptions thrown by the component. diff --git a/vendor/symfony/yaml/Exception/ParseException.php b/vendor/prefixed/symfony/yaml/Exception/ParseException.php similarity index 60% rename from vendor/symfony/yaml/Exception/ParseException.php rename to vendor/prefixed/symfony/yaml/Exception/ParseException.php index 60e8e19..3cad25c 100644 --- a/vendor/symfony/yaml/Exception/ParseException.php +++ b/vendor/prefixed/symfony/yaml/Exception/ParseException.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Yaml\Exception; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception; /** * Exception class thrown when an error occurs during parsing. @@ -18,113 +17,101 @@ */ class ParseException extends RuntimeException { - private ?string $parsedFile; - private int $parsedLine; - private ?string $snippet; - private string $rawMessage; - /** - * @param string $message The error message + * @var string + */ + private $rawMessage; + /** + * @var int + */ + private $parsedLine = -1; + /** + * @var string|null + */ + private $snippet; + /** + * @var string|null + */ + private $parsedFile; + /** + * @param string $rawMessage The error message * @param int $parsedLine The line where the error occurred * @param string|null $snippet The snippet of code near the problem * @param string|null $parsedFile The file name where the error occurred */ - public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null) + public function __construct(string $rawMessage, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null) { - $this->parsedFile = $parsedFile; + $this->rawMessage = $rawMessage; $this->parsedLine = $parsedLine; $this->snippet = $snippet; - $this->rawMessage = $message; - + $this->parsedFile = $parsedFile; $this->updateRepr(); - parent::__construct($this->message, 0, $previous); } - /** * Gets the snippet of code near the error. */ - public function getSnippet(): string + public function getSnippet() : string { return $this->snippet; } - /** * Sets the snippet of code near the error. - * - * @return void */ - public function setSnippet(string $snippet) + public function setSnippet(string $snippet) : void { $this->snippet = $snippet; - $this->updateRepr(); } - /** * Gets the filename where the error occurred. * * This method returns null if a string is parsed. */ - public function getParsedFile(): string + public function getParsedFile() : string { return $this->parsedFile; } - /** * Sets the filename where the error occurred. - * - * @return void */ - public function setParsedFile(string $parsedFile) + public function setParsedFile(string $parsedFile) : void { $this->parsedFile = $parsedFile; - $this->updateRepr(); } - /** * Gets the line where the error occurred. */ - public function getParsedLine(): int + public function getParsedLine() : int { return $this->parsedLine; } - /** * Sets the line where the error occurred. - * - * @return void */ - public function setParsedLine(int $parsedLine) + public function setParsedLine(int $parsedLine) : void { $this->parsedLine = $parsedLine; - $this->updateRepr(); } - - private function updateRepr(): void + private function updateRepr() : void { $this->message = $this->rawMessage; - - $dot = false; - if (str_ends_with($this->message, '.')) { + $dot = \false; + if (substr_compare($this->message, '.', -strlen('.')) === 0) { $this->message = substr($this->message, 0, -1); - $dot = true; + $dot = \true; } - if (null !== $this->parsedFile) { - $this->message .= sprintf(' in %s', json_encode($this->parsedFile, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); + $this->message .= \sprintf(' in %s', json_encode($this->parsedFile, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); } - if ($this->parsedLine >= 0) { - $this->message .= sprintf(' at line %d', $this->parsedLine); + $this->message .= \sprintf(' at line %d', $this->parsedLine); } - if ($this->snippet) { - $this->message .= sprintf(' (near "%s")', $this->snippet); + $this->message .= \sprintf(' (near "%s")', $this->snippet); } - if ($dot) { $this->message .= '.'; } diff --git a/vendor/symfony/yaml/Exception/RuntimeException.php b/vendor/prefixed/symfony/yaml/Exception/RuntimeException.php similarity index 85% rename from vendor/symfony/yaml/Exception/RuntimeException.php rename to vendor/prefixed/symfony/yaml/Exception/RuntimeException.php index 3f36b73..65d83f6 100644 --- a/vendor/symfony/yaml/Exception/RuntimeException.php +++ b/vendor/prefixed/symfony/yaml/Exception/RuntimeException.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Yaml\Exception; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception; /** * Exception class thrown when an error occurs during parsing. diff --git a/vendor/symfony/yaml/Inline.php b/vendor/prefixed/symfony/yaml/Inline.php similarity index 67% rename from vendor/symfony/yaml/Inline.php rename to vendor/prefixed/symfony/yaml/Inline.php index 0394c09..b5575c1 100644 --- a/vendor/symfony/yaml/Inline.php +++ b/vendor/prefixed/symfony/yaml/Inline.php @@ -8,13 +8,11 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml; -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\DumpException; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception\DumpException; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception\ParseException; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Tag\TaggedValue; /** * Inline implements a YAML parser/dumper for the YAML inline syntax. * @@ -25,28 +23,41 @@ class Inline { public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - - public static int $parsedLineNumber = -1; - public static ?string $parsedFilename = null; - - private static bool $exceptionOnInvalidType = false; - private static bool $objectSupport = false; - private static bool $objectForMap = false; - private static bool $constantSupport = false; - - public static function initialize(int $flags, ?int $parsedLineNumber = null, ?string $parsedFilename = null): void + /** + * @var int + */ + public static $parsedLineNumber = -1; + /** + * @var string|null + */ + public static $parsedFilename; + /** + * @var bool + */ + private static $exceptionOnInvalidType = \false; + /** + * @var bool + */ + private static $objectSupport = \false; + /** + * @var bool + */ + private static $objectForMap = \false; + /** + * @var bool + */ + private static $constantSupport = \false; + public static function initialize(int $flags, ?int $parsedLineNumber = null, ?string $parsedFilename = null) : void { self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); self::$parsedFilename = $parsedFilename; - if (null !== $parsedLineNumber) { self::$parsedLineNumber = $parsedLineNumber; } } - /** * Converts a YAML string to a PHP value. * @@ -54,17 +65,15 @@ public static function initialize(int $flags, ?int $parsedLineNumber = null, ?st * @param array $references Mapping of variable names to values * * @throws ParseException + * @return mixed */ - public static function parse(string $value, int $flags = 0, array &$references = []): mixed + public static function parse(string $value, int $flags = 0, array &$references = []) { self::initialize($flags); - $value = trim($value); - if ('' === $value) { return ''; } - $i = 0; $tag = self::parseTag($value, $i, $flags); switch ($value[$i]) { @@ -77,21 +86,17 @@ public static function parse(string $value, int $flags = 0, array &$references = ++$i; break; default: - $result = self::parseScalar($value, $flags, null, $i, true, $references); + $result = self::parseScalar($value, $flags, null, $i, \true, $references); } - // some comments are allowed at the end - if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); + if (preg_replace('/\\s*#.*$/A', '', substr($value, $i))) { + throw new ParseException(\sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } - if (null !== $tag && '' !== $tag) { return new TaggedValue($tag, $result); } - return $result; } - /** * Dumps a given PHP variable to a YAML string. * @@ -100,54 +105,54 @@ public static function parse(string $value, int $flags = 0, array &$references = * * @throws DumpException When trying to dump PHP resource */ - public static function dump(mixed $value, int $flags = 0): string + public static function dump($value, int $flags = 0, bool $rootLevel = \false) : string { - switch (true) { + switch (\true) { case \is_resource($value): if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); + throw new DumpException(\sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); } - return self::dumpNull($flags); case $value instanceof \DateTimeInterface: - return $value->format(match (true) { - !$length = \strlen(rtrim($value->format('u'), '0')) => 'c', - $length < 4 => 'Y-m-d\TH:i:s.vP', - default => 'Y-m-d\TH:i:s.uP', - }); + return $value->format((function () use ($value) { + switch (\true) { + case !($length = \strlen(rtrim($value->format('u'), '0'))): + return 'c'; + case $length < 4: + return 'Y-m-d\\TH:i:s.vP'; + default: + return 'Y-m-d\\TH:i:s.uP'; + } + })()); case $value instanceof \UnitEnum: - return sprintf('!php/const %s::%s', $value::class, $value->name); + return \sprintf('!php/enum %s::%s', get_class($value), $value->name); case \is_object($value): if ($value instanceof TaggedValue) { - return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags); + return '!' . $value->getTag() . ' ' . self::dump($value->getValue(), $flags); } - if (Yaml::DUMP_OBJECT & $flags) { - return '!php/object '.self::dump(serialize($value)); + return '!php/object ' . self::dump(serialize($value)); } - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { return self::dumpHashArray($value, $flags); } - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { throw new DumpException('Object support when dumping a YAML file has been disabled.'); } - return self::dumpNull($flags); case \is_array($value): return self::dumpArray($value, $flags); case null === $value: - return self::dumpNull($flags); - case true === $value: + return self::dumpNull($flags, $rootLevel); + case \true === $value: return 'true'; - case false === $value: + case \false === $value: return 'false'; case \is_int($value): return $value; - case is_numeric($value) && false === strpbrk($value, "\f\n\r\t\v"): + case is_numeric($value) && \false === strpbrk($value, "\f\n\r\t\v"): $locale = setlocale(\LC_NUMERIC, 0); - if (false !== $locale) { + if (\false !== $locale) { setlocale(\LC_NUMERIC, 'C'); } if (\is_float($value)) { @@ -156,32 +161,31 @@ public static function dump(mixed $value, int $flags = 0): string $repr = str_ireplace('INF', '.Inf', $repr); } elseif (floor($value) == $value && $repr == $value) { // Preserve float data type since storing a whole number will result in integer value. - if (!str_contains($repr, 'E')) { + if (strpos($repr, 'E') === false) { $repr .= '.0'; } } } else { - $repr = \is_string($value) ? "'$value'" : (string) $value; + $repr = \is_string($value) ? "'{$value}'" : (string) $value; } - if (false !== $locale) { + if (\false !== $locale) { setlocale(\LC_NUMERIC, $locale); } - return $repr; case '' == $value: return "''"; case self::isBinaryString($value): - return '!!binary '.base64_encode($value); + return '!!binary ' . base64_encode($value); case Escaper::requiresDoubleQuoting($value): + case Yaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES & $flags: return Escaper::escapeWithDoubleQuotes($value); case Escaper::requiresSingleQuoting($value): $singleQuoted = Escaper::escapeWithSingleQuotes($value); - if (!str_contains($value, "'")) { + if (strpos($value, "'") === false) { return $singleQuoted; } // Attempt double-quoting the string instead to see if it's more efficient. $doubleQuoted = Escaper::escapeWithDoubleQuotes($value); - return \strlen($doubleQuoted) < \strlen($singleQuoted) ? $doubleQuoted : $singleQuoted; case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value): case Parser::preg_match(self::getHexRegex(), $value): @@ -191,34 +195,30 @@ public static function dump(mixed $value, int $flags = 0): string return $value; } } - /** * Check if given array is hash or just normal indexed array. + * @param mixed[]|\ArrayObject|\stdClass $value */ - public static function isHash(array|\ArrayObject|\stdClass $value): bool + public static function isHash($value) : bool { if ($value instanceof \stdClass || $value instanceof \ArrayObject) { - return true; + return \true; } - $expectedKey = 0; - foreach ($value as $key => $val) { if ($key !== $expectedKey++) { - return true; + return \true; } } - - return false; + return \false; } - /** * Dumps a PHP array to a YAML string. * * @param array $value The PHP array to dump * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string */ - private static function dumpArray(array $value, int $flags): string + private static function dumpArray(array $value, int $flags) : string { // array if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) { @@ -226,132 +226,116 @@ private static function dumpArray(array $value, int $flags): string foreach ($value as $val) { $output[] = self::dump($val, $flags); } - - return sprintf('[%s]', implode(', ', $output)); + return \sprintf('[%s]', implode(', ', $output)); } - return self::dumpHashArray($value, $flags); } - /** * Dumps hash array to a YAML string. * * @param array|\ArrayObject|\stdClass $value The hash array to dump * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string */ - private static function dumpHashArray(array|\ArrayObject|\stdClass $value, int $flags): string + private static function dumpHashArray($value, int $flags) : string { $output = []; + $keyFlags = $flags & ~Yaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES; foreach ($value as $key => $val) { if (\is_int($key) && Yaml::DUMP_NUMERIC_KEY_AS_STRING & $flags) { $key = (string) $key; } - - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); + $output[] = \sprintf('%s: %s', self::dump($key, $keyFlags), self::dump($val, $flags)); } - - return sprintf('{ %s }', implode(', ', $output)); + return \sprintf('{ %s }', implode(', ', $output)); } - - private static function dumpNull(int $flags): string + private static function dumpNull(int $flags, bool $rootLevel = \false) : string { if (Yaml::DUMP_NULL_AS_TILDE & $flags) { return '~'; } - + if (Yaml::DUMP_NULL_AS_EMPTY & $flags && !$rootLevel) { + return ''; + } return 'null'; } - /** * Parses a YAML scalar. * * @throws ParseException When malformed inline YAML string is parsed + * @return mixed */ - public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], ?bool &$isQuoted = null): mixed + public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = \true, array &$references = [], ?bool &$isQuoted = null) { - if (\in_array($scalar[$i], ['"', "'"], true)) { + if (\in_array($scalar[$i], ['"', "'"], \true)) { // quoted scalar - $isQuoted = true; + $isQuoted = \true; $output = self::parseQuotedScalar($scalar, $i); - if (null !== $delimiters) { $tmp = ltrim(substr($scalar, $i), " \n"); if ('' === $tmp) { - throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + throw new ParseException(\sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } if (!\in_array($tmp[0], $delimiters)) { - throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + throw new ParseException(\sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } } } else { // "normal" string - $isQuoted = false; - + $isQuoted = \false; if (!$delimiters) { $output = substr($scalar, $i); $i += \strlen($output); - // remove comments - if (Parser::preg_match('/[ \t]+#/', $output, $match, \PREG_OFFSET_CAPTURE)) { + if (Parser::preg_match('/[ \\t]+#/', $output, $match, \PREG_OFFSET_CAPTURE)) { $output = substr($output, 0, $match[0][1]); } - } elseif (Parser::preg_match('/^(.*?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { + } elseif (Parser::preg_match('/^(.*?)(' . implode('|', $delimiters) . ')/', substr($scalar, $i), $match)) { $output = $match[1]; $i += \strlen($output); $output = trim($output); } else { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename); + throw new ParseException(\sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename); } - // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0] || '%' === $output[0])) { - throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename); + throw new ParseException(\sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename); } - if ($evaluate) { $output = self::evaluateScalar($output, $flags, $references, $isQuoted); } } - return $output; } - /** * Parses a YAML quoted scalar. * * @throws ParseException When malformed inline YAML string is parsed */ - private static function parseQuotedScalar(string $scalar, int &$i = 0): string + private static function parseQuotedScalar(string $scalar, int &$i = 0) : string { - if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + if (!Parser::preg_match('/' . self::REGEX_QUOTED_STRING . '/Au', substr($scalar, $i), $match)) { + throw new ParseException(\sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - $output = substr($match[0], 1, -1); - $unescaper = new Unescaper(); if ('"' == $scalar[$i]) { $output = $unescaper->unescapeDoubleQuotedString($output); } else { $output = $unescaper->unescapeSingleQuotedString($output); } - $i += \strlen($match[0]); - return $output; } - /** * Parses a YAML sequence. * * @throws ParseException When malformed inline YAML string is parsed */ - private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []): array + private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []) : array { $output = []; $len = \strlen($sequence); ++$i; - // [foo, bar, ...] $lastToken = null; while ($i < $len) { @@ -364,12 +348,9 @@ private static function parseSequence(string $sequence, int $flags, int &$i = 0, } elseif (',' === $sequence[$i]) { $lastToken = 'separator'; } - ++$i; - continue; } - $tag = self::parseTag($sequence, $i, $flags); switch ($sequence[$i]) { case '[': @@ -382,51 +363,43 @@ private static function parseSequence(string $sequence, int $flags, int &$i = 0, break; default: $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references, $isQuoted); - // the value can be an array if a reference has been resolved to an array var - if (\is_string($value) && !$isQuoted && str_contains($value, ': ')) { + if (\is_string($value) && !$isQuoted && strpos($value, ': ') !== false) { // embedded mapping? try { $pos = 0; - $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references); - } catch (\InvalidArgumentException) { + $value = self::parseMapping('{' . $value . '}', $flags, $pos, $references); + } catch (\InvalidArgumentException $exception) { // no, it's not } } - if (!$isQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { $references[$matches['ref']] = $matches['value']; $value = $matches['value']; } - --$i; } - if (null !== $tag && '' !== $tag) { $value = new TaggedValue($tag, $value); } - $output[] = $value; - $lastToken = 'value'; ++$i; } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename); + throw new ParseException(\sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename); } - /** * Parses a YAML mapping. * * @throws ParseException When malformed inline YAML string is parsed + * @return mixed[]|\stdClass */ - private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []): array|\stdClass + private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []) { $output = []; $len = \strlen($mapping); ++$i; - $allowOverwrite = false; - + $allowOverwrite = \false; // {foo: bar, bar:foo, ...} while ($i < $len) { switch ($mapping[$i]) { @@ -439,51 +412,39 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a if (self::$objectForMap) { return (object) $output; } - return $output; } - // key $offsetBeforeKeyParsing = $i; - $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true); - $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false); - + $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], \true); + $key = self::parseScalar($mapping, $flags, [':', ' '], $i, \false); if ($offsetBeforeKeyParsing === $i) { throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping); } - if ('!php/const' === $key || '!php/enum' === $key) { - $key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false); + $key .= ' ' . self::parseScalar($mapping, $flags, ['(?value')) { - $enum = substr($enum, 0, -7); + $enumName = self::parseScalar(substr($scalar, 10), 0, null, $i, \false); + $useName = strpos($enumName, '::') !== false; + $enum = $useName ? strstr($enumName, '::', \true) : $enumName; + if (!class_exists($enum)) { + throw new ParseException(\sprintf('The enum "%s" is not defined.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - if (!\defined($enum)) { - throw new ParseException(sprintf('The enum "%s" is not defined.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + if (!$useName) { + return $enum::cases(); } - - $value = \constant($enum); - - if (!$value instanceof \UnitEnum) { - throw new ParseException(sprintf('The string "%s" is not the name of a valid enum.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + if ($useValue = substr_compare($enumName, '->value', -strlen('->value')) === 0) { + $enumName = substr($enumName, 0, -7); } + if (!\defined($enumName)) { + throw new ParseException(\sprintf('The string "%s" is not the name of a valid enum.', $enumName), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + $value = \constant($enumName); if (!$useValue) { return $value; } if (!$value instanceof \BackedEnum) { - throw new ParseException(sprintf('The enum "%s" defines no value next to its name.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + throw new ParseException(\sprintf('The enum "%s" defines no value next to its name.', $enumName), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - return $value->value; } if (self::$exceptionOnInvalidType) { - throw new ParseException(sprintf('The string "%s" could not be parsed as an enum. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + throw new ParseException(\sprintf('The string "%s" could not be parsed as an enum. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - return null; - case str_starts_with($scalar, '!!float '): + case strncmp($scalar, '!!float ', strlen('!!float ')) === 0: return (float) substr($scalar, 8); - case str_starts_with($scalar, '!!binary '): + case strncmp($scalar, '!!binary ', strlen('!!binary ')) === 0: return self::evaluateBinaryScalar(substr($scalar, 9)); } - - throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename); - case preg_match('/^(?:\+|-)?0o(?P[0-7_]++)$/', $scalar, $matches): + throw new ParseException(\sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename); + case preg_match('/^(?:\\+|-)?0o(?P[0-7_]++)$/', $scalar, $matches): $value = str_replace('_', '', $matches['value']); - if ('-' === $scalar[0]) { return -octdec($value); } - return octdec($value); - case \in_array($scalar[0], ['+', '-', '.'], true) || is_numeric($scalar[0]): + case \in_array($scalar[0], ['+', '-', '.'], \true) || is_numeric($scalar[0]): if (Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar)) { $scalar = str_replace('_', '', $scalar); } - - switch (true) { + switch (\true) { case ctype_digit($scalar): case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; + return $scalar === (string) $cast ? $cast : $scalar; case is_numeric($scalar): case Parser::preg_match(self::getHexRegex(), $scalar): $scalar = str_replace('_', '', $scalar); - - return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar; + return '0x' === $scalar[0] . $scalar[1] ? hexdec($scalar) : (float) $scalar; case '.inf' === $scalarLower: case '.nan' === $scalarLower: return -log(0); case '-.inf' === $scalarLower: return log(0); - case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar): + case Parser::preg_match('/^(-|\\+)?[0-9][0-9_]*(\\.[0-9_]+)?$/', $scalar): return (float) str_replace('_', '', $scalar); case Parser::preg_match(self::getTimestampRegex(), $scalar): try { @@ -724,96 +662,75 @@ private static function evaluateScalar(string $scalar, int $flags, array &$refer // Some dates accepted by the regex are not valid dates. throw new ParseException(\sprintf('The date "%s" could not be parsed as it is an invalid date.', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename, $e); } - if (Yaml::PARSE_DATETIME & $flags) { return $time; } - if ('' !== rtrim($time->format('u'), '0')) { return (float) $time->format('U.u'); } - try { - if (false !== $scalar = $time->getTimestamp()) { + if (\false !== ($scalar = $time->getTimestamp())) { return $scalar; } - } catch (\DateRangeError|\ValueError) { + } catch (\Matomo\Dependencies\OpenApiDocs\DateRangeError|\ValueError $exception) { // no-op } - return $time->format('U'); } } - return (string) $scalar; } - - private static function parseTag(string $value, int &$i, int $flags): ?string + private static function parseTag(string $value, int &$i, int $flags) : ?string { if ('!' !== $value[$i]) { return null; } - $tagLength = strcspn($value, " \t\n[]{},", $i + 1); $tag = substr($value, $i + 1, $tagLength); - $nextOffset = $i + $tagLength + 1; $nextOffset += strspn($value, ' ', $nextOffset); - - if ('' === $tag && (!isset($value[$nextOffset]) || \in_array($value[$nextOffset], [']', '}', ','], true))) { + if ('' === $tag && (!isset($value[$nextOffset]) || \in_array($value[$nextOffset], [']', '}', ','], \true))) { throw new ParseException('Using the unquoted scalar value "!" is not supported. You must quote it.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); } - // Is followed by a scalar and is a built-in tag - if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || \in_array($tag, ['str', 'php/const', 'php/enum', 'php/object'], true))) { + if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], \true)) && ('!' === $tag[0] || \in_array($tag, ['str', 'php/const', 'php/enum', 'php/object'], \true))) { // Manage in {@link self::evaluateScalar()} return null; } - $i = $nextOffset; - // Built-in tags if ('' !== $tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); + throw new ParseException(\sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } - if ('' !== $tag && !isset($value[$i])) { - throw new ParseException(sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); + throw new ParseException(\sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } - if ('' === $tag || Yaml::PARSE_CUSTOM_TAGS & $flags) { return $tag; } - - throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); + throw new ParseException(\sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } - - public static function evaluateBinaryScalar(string $scalar): string + public static function evaluateBinaryScalar(string $scalar) : string { - $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar)); - - if (0 !== (\strlen($parsedBinaryData) % 4)) { - throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + $parsedBinaryData = self::parseScalar(preg_replace('/\\s/', '', $scalar)); + if (0 !== \strlen($parsedBinaryData) % 4) { + throw new ParseException(\sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) { - throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + throw new ParseException(\sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - - return base64_decode($parsedBinaryData, true); + return base64_decode($parsedBinaryData, \true); } - - private static function isBinaryString(string $value): bool + private static function isBinaryString(string $value) : bool { - return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value); + return !preg_match('//u', $value) || preg_match('/[^\\x00\\x07-\\x0d\\x1B\\x20-\\xff]/', $value); } - /** * Gets a regex that matches a YAML date. * * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 */ - private static function getTimestampRegex(): string + private static function getTimestampRegex() : string { return <<[0-9][0-9]?) :(?P[0-9][0-9]) :(?P[0-9][0-9]) - (?:\.(?P[0-9]*))? + (?:\\.(?P[0-9]*))? (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) (?::(?P[0-9][0-9]))?))?)? - $~x + \$~x EOF; } - /** * Gets a regex that matches a YAML number in hexadecimal notation. */ - private static function getHexRegex(): string + private static function getHexRegex() : string { return '~^0x[0-9a-f_]++$~i'; } diff --git a/vendor/symfony/yaml/LICENSE b/vendor/prefixed/symfony/yaml/LICENSE similarity index 100% rename from vendor/symfony/yaml/LICENSE rename to vendor/prefixed/symfony/yaml/LICENSE diff --git a/vendor/symfony/yaml/Parser.php b/vendor/prefixed/symfony/yaml/Parser.php similarity index 73% rename from vendor/symfony/yaml/Parser.php rename to vendor/prefixed/symfony/yaml/Parser.php index 19b48cf..a36e9bb 100644 --- a/vendor/symfony/yaml/Parser.php +++ b/vendor/prefixed/symfony/yaml/Parser.php @@ -8,12 +8,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml; -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception\ParseException; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Tag\TaggedValue; /** * Parser parses YAML strings to convert them to PHP arrays. * @@ -23,65 +21,92 @@ */ class Parser { - public const TAG_PATTERN = '(?P![\w!.\/:-]+)'; - public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; + public const TAG_PATTERN = '(?P![\\w!.\\/:-]+)'; + public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\\||>)(?P\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?P +#.*)?'; public const REFERENCE_PATTERN = '#^&(?P[^ ]++) *+(?P.*)#u'; - - private ?string $filename = null; - private int $offset = 0; - private int $numberOfParsedLines = 0; - private ?int $totalNumberOfLines = null; - private array $lines = []; - private int $currentLineNb = -1; - private string $currentLine = ''; - private array $refs = []; - private array $skippedLineNumbers = []; - private array $locallySkippedLineNumbers = []; - private array $refsBeingParsed = []; - + /** + * @var string|null + */ + private $filename; + /** + * @var int + */ + private $offset = 0; + /** + * @var int + */ + private $numberOfParsedLines = 0; + /** + * @var int|null + */ + private $totalNumberOfLines; + /** + * @var mixed[] + */ + private $lines = []; + /** + * @var int + */ + private $currentLineNb = -1; + /** + * @var string + */ + private $currentLine = ''; + /** + * @var mixed[] + */ + private $refs = []; + /** + * @var mixed[] + */ + private $skippedLineNumbers = []; + /** + * @var mixed[] + */ + private $locallySkippedLineNumbers = []; + /** + * @var mixed[] + */ + private $refsBeingParsed = []; /** * Parses a YAML file into a PHP value. * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior + * @param string $filename The path to the YAML file to be parsed + * @param int-mask-of $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * * @throws ParseException If the file could not be read or the YAML is not valid + * @return mixed */ - public function parseFile(string $filename, int $flags = 0): mixed + public function parseFile(string $filename, int $flags = 0) { if (!is_file($filename)) { - throw new ParseException(sprintf('File "%s" does not exist.', $filename)); + throw new ParseException(\sprintf('File "%s" does not exist.', $filename)); } - if (!is_readable($filename)) { - throw new ParseException(sprintf('File "%s" cannot be read.', $filename)); + throw new ParseException(\sprintf('File "%s" cannot be read.', $filename)); } - $this->filename = $filename; - try { return $this->parse(file_get_contents($filename), $flags); } finally { $this->filename = null; } } - /** * Parses a YAML string to a PHP value. * - * @param string $value A YAML string - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior + * @param string $value A YAML string + * @param int-mask-of $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * * @throws ParseException If the YAML is not valid + * @return mixed */ - public function parse(string $value, int $flags = 0): mixed + public function parse(string $value, int $flags = 0) { - if (false === preg_match('//u', $value)) { + if (\false === preg_match('//u', $value)) { throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); } - $this->refs = []; - try { $data = $this->doParse($value, $flags); } finally { @@ -95,11 +120,12 @@ public function parse(string $value, int $flags = 0): mixed $this->locallySkippedLineNumbers = []; $this->totalNumberOfLines = null; } - return $data; } - - private function doParse(string $value, int $flags): mixed + /** + * @return mixed + */ + private function doParse(string $value, int $flags) { $this->currentLineNb = -1; $this->currentLine = ''; @@ -107,86 +133,63 @@ private function doParse(string $value, int $flags): mixed $this->lines = explode("\n", $value); $this->numberOfParsedLines = \count($this->lines); $this->locallySkippedLineNumbers = []; - $this->totalNumberOfLines ??= $this->numberOfParsedLines; - + $this->totalNumberOfLines = $this->totalNumberOfLines ?? $this->numberOfParsedLines; if (!$this->moveToNextLine()) { return null; } - $data = []; $context = null; - $allowOverwrite = false; - + $allowOverwrite = \false; while ($this->isCurrentLineEmpty()) { if (!$this->moveToNextLine()) { return null; } } - // Resolves the tag and returns if end of the document - if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) { + if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, \false)) && !$this->moveToNextLine()) { return new TaggedValue($tag, ''); } - do { if ($this->isCurrentLineEmpty()) { continue; } - // tab? if ("\t" === $this->currentLine[0]) { throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename); - - $isRef = $mergeNode = false; - if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { + $isRef = $mergeNode = \false; + if ('-' === $this->currentLine[0] && self::preg_match('#^\\-((?P\\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { if ($context && 'mapping' == $context) { throw new ParseException('You cannot define a sequence item when in a mapping.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } $context = 'sequence'; - if (isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { $isRef = $matches['ref']; $this->refsBeingParsed[] = $isRef; $values['value'] = $matches['value']; } - if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) { throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); } - // array - if (isset($values['value']) && str_starts_with(ltrim($values['value'], ' '), '-')) { + if (isset($values['value']) && strncmp(ltrim($values['value'], ' '), '-', strlen('-')) === 0) { // Inline first child $currentLineNumber = $this->getRealCurrentLineNb(); - $sequenceIndentation = \strlen($values['leadspaces']) + 1; $sequenceYaml = substr($this->currentLine, $sequenceIndentation); - $sequenceYaml .= "\n".$this->getNextEmbedBlock($sequenceIndentation, true); - + $sequenceYaml .= "\n" . $this->getNextEmbedBlock($sequenceIndentation, \true); $data[] = $this->parseBlock($currentLineNumber, rtrim($sequenceYaml), $flags); - } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || str_starts_with(ltrim($values['value'], ' '), '#')) { - $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags); - } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) { - $data[] = new TaggedValue( - $subTag, - $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags) - ); + } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || strncmp(ltrim($values['value'], ' '), '#', strlen('#')) === 0) { + $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, \true) ?? '', $flags); + } elseif (null !== ($subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags))) { + $data[] = new TaggedValue($subTag, $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, \true), $flags)); } else { - if ( - isset($values['leadspaces']) - && ( - '!' === $values['value'][0] - || self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $this->trimTag($values['value']), $matches) - ) - ) { + if (isset($values['leadspaces']) && ('!' === $values['value'][0] || self::preg_match('#^(?P' . Inline::REGEX_QUOTED_STRING . '|[^ \'"\\{\\[].*?) *\\:(\\s+(?P.+?))?\\s*$#u', $this->trimTag($values['value']), $matches))) { $block = $values['value']; if ($this->isNextLineIndented() || isset($matches['value']) && '>-' === $matches['value']) { - $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1); + $block .= "\n" . $this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1); } - $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags); } else { $data[] = $this->parseValue($values['value'], $flags, $context); @@ -196,62 +199,45 @@ private function doParse(string $value, int $flags): mixed $this->refs[$isRef] = end($data); array_pop($this->refsBeingParsed); } - } elseif ( - // @todo in 7.0 remove legacy "(?:!?!php/const:)?" - self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P.+))?$#u', rtrim($this->currentLine), $values) - && (!str_contains($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) - ) { - if (str_starts_with($values['key'], '!php/const:')) { - trigger_deprecation('symfony/yaml', '6.2', 'YAML syntax for key "%s" is deprecated and replaced by "!php/const %s".', $values['key'], substr($values['key'], 11)); - } - + } elseif (self::preg_match('#^(?P(?:![^\\s]++\\s++)?(?:' . Inline::REGEX_QUOTED_STRING . '|[^ \'"\\[\\{!].*?)) *\\:(( |\\t)++(?P.+))?$#u', rtrim($this->currentLine), $values) && (strpos($values['key'], ' #') === false || \in_array($values['key'][0], ['"', "'"]))) { if ($context && 'sequence' == $context) { throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename); } $context = 'mapping'; - try { $key = Inline::parseScalar($values['key']); } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); - throw $e; } - if (!\is_string($key) && !\is_int($key)) { - throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string') . ' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine); } - // Convert float keys to strings, to avoid being converted to integers by PHP if (\is_float($key)) { $key = (string) $key; } - if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P[^ ]+)#u', $values['value'], $refMatches))) { - $mergeNode = true; - $allowOverwrite = true; + $mergeNode = \true; + $allowOverwrite = \true; if (isset($values['value'][0]) && '*' === $values['value'][0]) { $refName = substr(rtrim($values['value']), 1); if (!\array_key_exists($refName, $this->refs)) { - if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); + if (\false !== ($pos = array_search($refName, $this->refsBeingParsed, \true))) { + throw new ParseException(\sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); + throw new ParseException(\sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - $refValue = $this->refs[$refName]; - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) { $refValue = (array) $refValue; } - if (!\is_array($refValue)) { throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - - $data += $refValue; // array union + $data += $refValue; + // array union } else { if (isset($values['value']) && '' !== $values['value']) { $value = $values['value']; @@ -259,15 +245,12 @@ private function doParse(string $value, int $flags): mixed $value = $this->getNextEmbedBlock(); } $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags); - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) { $parsed = (array) $parsed; } - if (!\is_array($parsed)) { throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - if (isset($parsed[0])) { // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier @@ -276,17 +259,17 @@ private function doParse(string $value, int $flags): mixed if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) { $parsedItem = (array) $parsedItem; } - if (!\is_array($parsedItem)) { throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename); } - - $data += $parsedItem; // array union + $data += $parsedItem; + // array union } } else { // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the // current mapping, unless the key already exists in it. - $data += $parsed; // array union + $data += $parsed; + // array union } } } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { @@ -294,24 +277,26 @@ private function doParse(string $value, int $flags): mixed $this->refsBeingParsed[] = $isRef; $values['value'] = $matches['value']; } - $subTag = null; if ($mergeNode) { // Merge keys - } elseif (!isset($values['value']) || '' === $values['value'] || str_starts_with($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { + } elseif (!isset($values['value']) || '' === $values['value'] || strncmp($values['value'], '#', strlen('#')) === 0 || null !== ($subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { // hash // if next line is less indented or equal, then it means that the current value is null if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { // Spec: Keys MUST be unique; first one wins. // But overwriting is allowed when a merge node is used in current block. if ($allowOverwrite || !isset($data[$key])) { + if (!$allowOverwrite && \array_key_exists($key, $data)) { + trigger_deprecation('symfony/yaml', '7.2', 'Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated and will throw a ParseException in 8.0.', $key, $this->getRealCurrentLineNb() + 1); + } if (null !== $subTag) { $data[$key] = new TaggedValue($subTag, ''); } else { $data[$key] = null; } } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException(\sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); } } else { // remember the parsed line number here in case we need it to provide some contexts in error messages below @@ -319,13 +304,14 @@ private function doParse(string $value, int $flags): mixed $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags); if ('<<' === $key) { $this->refs[$refMatches['ref']] = $value; - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) { $value = (array) $value; } - $data += $value; } elseif ($allowOverwrite || !isset($data[$key])) { + if (!$allowOverwrite && \array_key_exists($key, $data)) { + trigger_deprecation('symfony/yaml', '7.2', 'Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated and will throw a ParseException in 8.0.', $key, $this->getRealCurrentLineNb() + 1); + } // Spec: Keys MUST be unique; first one wins. // But overwriting is allowed when a merge node is used in current block. if (null !== $subTag) { @@ -334,7 +320,7 @@ private function doParse(string $value, int $flags): mixed $data[$key] = $value; } } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine); + throw new ParseException(\sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine); } } } else { @@ -342,9 +328,12 @@ private function doParse(string $value, int $flags): mixed // Spec: Keys MUST be unique; first one wins. // But overwriting is allowed when a merge node is used in current block. if ($allowOverwrite || !isset($data[$key])) { + if (!$allowOverwrite && \array_key_exists($key, $data)) { + trigger_deprecation('symfony/yaml', '7.2', 'Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated and will throw a ParseException in 8.0.', $key, $this->getRealCurrentLineNb() + 1); + } $data[$key] = $value; } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException(\sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); } } if ($isRef) { @@ -355,55 +344,45 @@ private function doParse(string $value, int $flags): mixed if (null !== $context) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - try { return Inline::parse($this->lexInlineQuotedString(), $flags, $this->refs); } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); - throw $e; } } elseif ('{' === $this->currentLine[0]) { if (null !== $context) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - try { $parsedMapping = Inline::parse($this->lexInlineMapping(), $flags, $this->refs); - while ($this->moveToNextLine()) { if (!$this->isCurrentLineEmpty()) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } - return $parsedMapping; } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); - throw $e; } } elseif ('[' === $this->currentLine[0]) { if (null !== $context) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - try { $parsedSequence = Inline::parse($this->lexInlineSequence(), $flags, $this->refs); - while ($this->moveToNextLine()) { if (!$this->isCurrentLineEmpty()) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } - return $parsedSequence; } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); - throw $e; } } else { @@ -411,11 +390,9 @@ private function doParse(string $value, int $flags): mixed if ('---' === $this->currentLine) { throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename); } - - if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) { + if (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1]) { throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); } - // 1-liner optionally followed by newline(s) if (\is_string($value) && $this->lines[0] === trim($value)) { try { @@ -423,136 +400,112 @@ private function doParse(string $value, int $flags): mixed } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); - throw $e; } - return $value; } - // try to parse the value as a multi-line string as a last resort if (0 === $this->currentLineNb) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; + $previousLineWasNewline = \false; + $previousLineWasTerminatedWithBackslash = \false; $value = ''; - foreach ($this->lines as $line) { $trimmedLine = trim($line); if ('#' === ($trimmedLine[0] ?? '')) { continue; } // If the indentation is not consistent at offset 0, it is to be considered as a ParseError - if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) { + if (0 === $this->offset && isset($line[0]) && ' ' === $line[0]) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - - if (str_contains($line, ': ')) { + if (strpos($line, ': ') !== false) { throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - if ('' === $trimmedLine) { $value .= "\n"; } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { $value .= ' '; } - - if ('' !== $trimmedLine && str_ends_with($line, '\\')) { + if ('' !== $trimmedLine && substr_compare($line, '\\', -strlen('\\')) === 0) { $value .= ltrim(substr($line, 0, -1)); } elseif ('' !== $trimmedLine) { $value .= $trimmedLine; } - if ('' === $trimmedLine) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif (str_ends_with($line, '\\')) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; + $previousLineWasNewline = \true; + $previousLineWasTerminatedWithBackslash = \false; + } elseif (substr_compare($line, '\\', -strlen('\\')) === 0) { + $previousLineWasNewline = \false; + $previousLineWasTerminatedWithBackslash = \true; } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; + $previousLineWasNewline = \false; + $previousLineWasTerminatedWithBackslash = \false; } } - try { return Inline::parse(trim($value)); - } catch (ParseException) { + } catch (ParseException $exception) { // fall-through to the ParseException thrown below } } - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } while ($this->moveToNextLine()); - if (null !== $tag) { $data = new TaggedValue($tag, $data); } - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && 'mapping' === $context && !\is_object($data)) { $object = new \stdClass(); - foreach ($data as $key => $value) { - $object->$key = $value; + $object->{$key} = $value; } - $data = $object; } - - return empty($data) ? null : $data; + return $data ?: null; } - - private function parseBlock(int $offset, string $yaml, int $flags): mixed + /** + * @return mixed + */ + private function parseBlock(int $offset, string $yaml, int $flags) { $skippedLineNumbers = $this->skippedLineNumbers; - foreach ($this->locallySkippedLineNumbers as $lineNumber) { if ($lineNumber < $offset) { continue; } - $skippedLineNumbers[] = $lineNumber; } - $parser = new self(); $parser->offset = $offset; $parser->totalNumberOfLines = $this->totalNumberOfLines; $parser->skippedLineNumbers = $skippedLineNumbers; - $parser->refs = &$this->refs; + $parser->refs =& $this->refs; $parser->refsBeingParsed = $this->refsBeingParsed; - return $parser->doParse($yaml, $flags); } - /** * Returns the current line number (takes the offset into account). * * @internal */ - public function getRealCurrentLineNb(): int + public function getRealCurrentLineNb() : int { $realCurrentLineNumber = $this->currentLineNb + $this->offset; - foreach ($this->skippedLineNumbers as $skippedLineNumber) { if ($skippedLineNumber > $realCurrentLineNumber) { break; } - ++$realCurrentLineNumber; } - return $realCurrentLineNumber; } - - private function getCurrentLineIndentation(): int + private function getCurrentLineIndentation() : int { if (' ' !== ($this->currentLine[0] ?? '')) { return 0; } - return \strlen($this->currentLine) - \strlen(ltrim($this->currentLine, ' ')); } - /** * Returns the next embed block of YAML. * @@ -561,25 +514,20 @@ private function getCurrentLineIndentation(): int * * @throws ParseException When indentation problem are detected */ - private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = false): string + private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = \false) : string { $oldLineIndentation = $this->getCurrentLineIndentation(); - if (!$this->moveToNextLine()) { return ''; } - if (null === $indentation) { $newIndent = null; $movements = 0; - do { - $EOF = false; - + $EOF = \false; // empty and comment-like lines do not influence the indentation depth if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { $EOF = !$this->moveToNextLine(); - if (!$EOF) { ++$movements; } @@ -587,110 +535,86 @@ private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = $newIndent = $this->getCurrentLineIndentation(); } } while (!$EOF && null === $newIndent); - for ($i = 0; $i < $movements; ++$i) { $this->moveToPreviousLine(); } - $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); - if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } else { $newIndent = $indentation; } - $data = []; - if ($this->getCurrentLineIndentation() >= $newIndent) { $data[] = substr($this->currentLine, $newIndent ?? 0); } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { $data[] = $this->currentLine; } else { $this->moveToPreviousLine(); - return ''; } - if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { // the previous line contained a dash but no item content, this line is a sequence item with the same indentation // and therefore no nested list or mapping $this->moveToPreviousLine(); - return ''; } - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); $isItComment = $this->isCurrentLineComment(); - while ($this->moveToNextLine()) { if ($isItComment && !$isItUnindentedCollection) { $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); $isItComment = $this->isCurrentLineComment(); } - $indent = $this->getCurrentLineIndentation(); - if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { $this->moveToPreviousLine(); break; } - if ($this->isCurrentLineBlank()) { $data[] = substr($this->currentLine, $newIndent ?? 0); continue; } - if ($indent >= $newIndent) { $data[] = substr($this->currentLine, $newIndent ?? 0); } elseif ($this->isCurrentLineComment()) { $data[] = $this->currentLine; } elseif (0 == $indent) { $this->moveToPreviousLine(); - break; } else { throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } - return implode("\n", $data); } - - private function hasMoreLines(): bool + private function hasMoreLines() : bool { - return (\count($this->lines) - 1) > $this->currentLineNb; + return \count($this->lines) - 1 > $this->currentLineNb; } - /** * Moves the parser to the next line. */ - private function moveToNextLine(): bool + private function moveToNextLine() : bool { if ($this->currentLineNb >= $this->numberOfParsedLines - 1) { - return false; + return \false; } - $this->currentLine = $this->lines[++$this->currentLineNb]; - - return true; + return \true; } - /** * Moves the parser to the previous line. */ - private function moveToPreviousLine(): bool + private function moveToPreviousLine() : bool { if ($this->currentLineNb < 1) { - return false; + return \false; } - $this->currentLine = $this->lines[--$this->currentLineNb]; - - return true; + return \true; } - /** * Parses a YAML value. * @@ -699,110 +623,87 @@ private function moveToPreviousLine(): bool * @param string $context The parser context (either sequence or mapping) * * @throws ParseException When reference does not exist + * @return mixed */ - private function parseValue(string $value, int $flags, string $context): mixed + private function parseValue(string $value, int $flags, string $context) { - if (str_starts_with($value, '*')) { - if (false !== $pos = strpos($value, '#')) { + if (strncmp($value, '*', strlen('*')) === 0) { + if (\false !== ($pos = strpos($value, '#'))) { $value = substr($value, 1, $pos - 2); } else { $value = substr($value, 1); } - if (!\array_key_exists($value, $this->refs)) { - if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); + if (\false !== ($pos = array_search($value, $this->refsBeingParsed, \true))) { + throw new ParseException(\sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); + throw new ParseException(\sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); } - return $this->refs[$value]; } - - if (\in_array($value[0], ['!', '|', '>'], true) && self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { + if (\in_array($value[0], ['!', '|', '>'], \true) && self::preg_match('/^(?:' . self::TAG_PATTERN . ' +)?' . self::BLOCK_SCALAR_HEADER_PATTERN . '$/', $value, $matches)) { $modifiers = $matches['modifiers'] ?? ''; - - $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers)); - + $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\\d+#', '', $modifiers), abs((int) $modifiers)); if ('' !== $matches['tag'] && '!' !== $matches['tag']) { if ('!!binary' === $matches['tag']) { return Inline::evaluateBinaryScalar($data); } - return new TaggedValue(substr($matches['tag'], 1), $data); } - return $data; } - try { if ('' !== $value && '{' === $value[0]) { $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - return Inline::parse($this->lexInlineMapping($cursor), $flags, $this->refs); } elseif ('' !== $value && '[' === $value[0]) { $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - return Inline::parse($this->lexInlineSequence($cursor), $flags, $this->refs); } - switch ($value[0] ?? '') { case '"': case "'": $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); $parsedValue = Inline::parse($this->lexInlineQuotedString($cursor), $flags, $this->refs); - - if (isset($this->currentLine[$cursor]) && preg_replace('/\s*(#.*)?$/A', '', substr($this->currentLine, $cursor))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($this->currentLine, $cursor))); + if (isset($this->currentLine[$cursor]) && preg_replace('/\\s*(#.*)?$/A', '', substr($this->currentLine, $cursor))) { + throw new ParseException(\sprintf('Unexpected characters near "%s".', substr($this->currentLine, $cursor))); } - return $parsedValue; default: $lines = []; - while ($this->moveToNextLine()) { // unquoted strings end before the first unindented line if (0 === $this->getCurrentLineIndentation()) { $this->moveToPreviousLine(); - break; } - $lines[] = trim($this->currentLine); } - - for ($i = 0, $linesCount = \count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) { + for ($i = 0, $linesCount = \count($lines), $previousLineBlank = \false; $i < $linesCount; ++$i) { if ('' === $lines[$i]) { $value .= "\n"; - $previousLineBlank = true; + $previousLineBlank = \true; } elseif ($previousLineBlank) { $value .= $lines[$i]; - $previousLineBlank = false; + $previousLineBlank = \false; } else { - $value .= ' '.$lines[$i]; - $previousLineBlank = false; + $value .= ' ' . $lines[$i]; + $previousLineBlank = \false; } } - Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); - $parsedValue = Inline::parse($value, $flags, $this->refs); - - if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && str_contains($parsedValue, ': ')) { + if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && strpos($parsedValue, ': ') !== false) { throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename); } - return $parsedValue; } } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); - throw $e; } } - /** * Parses a block scalar. * @@ -810,16 +711,14 @@ private function parseValue(string $value, int $flags, string $context): mixed * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -) * @param int $indentation The indentation indicator that was used to begin this block scalar */ - private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0): string + private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0) : string { $notEOF = $this->moveToNextLine(); if (!$notEOF) { return ''; } - $isCurrentLineBlank = $this->isCurrentLineBlank(); $blockLines = []; - // leading blank lines are consumed before determining indentation while ($notEOF && $isCurrentLineBlank) { // newline only if not EOF @@ -828,25 +727,16 @@ private function parseBlockScalar(string $style, string $chomping = '', int $ind $isCurrentLineBlank = $this->isCurrentLineBlank(); } } - // determine indentation if not specified if (0 === $indentation) { $currentLineLength = \strlen($this->currentLine); - for ($i = 0; $i < $currentLineLength && ' ' === $this->currentLine[$i]; ++$i) { ++$indentation; } } - if ($indentation > 0) { - $pattern = sprintf('/^ {%d}(.*)$/', $indentation); - - while ( - $notEOF && ( - $isCurrentLineBlank - || self::preg_match($pattern, $this->currentLine, $matches) - ) - ) { + $pattern = \sprintf('/^ {%d}(.*)$/', $indentation); + while ($notEOF && ($isCurrentLineBlank || self::preg_match($pattern, $this->currentLine, $matches))) { if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) { $blockLines[] = substr($this->currentLine, $indentation); } elseif ($isCurrentLineBlank) { @@ -854,7 +744,6 @@ private function parseBlockScalar(string $style, string $chomping = '', int $ind } else { $blockLines[] = $matches[1]; } - // newline only if not EOF if ($notEOF = $this->moveToNextLine()) { $isCurrentLineBlank = $this->isCurrentLineBlank(); @@ -863,175 +752,142 @@ private function parseBlockScalar(string $style, string $chomping = '', int $ind } elseif ($notEOF) { $blockLines[] = ''; } - if ($notEOF) { $blockLines[] = ''; $this->moveToPreviousLine(); - } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { + } elseif (!$this->isCurrentLineLastLineInDocument()) { $blockLines[] = ''; } - // folded style if ('>' === $style) { $text = ''; - $previousLineIndented = false; - $previousLineBlank = false; - + $previousLineIndented = \false; + $previousLineBlank = \false; for ($i = 0, $blockLinesCount = \count($blockLines); $i < $blockLinesCount; ++$i) { if ('' === $blockLines[$i]) { $text .= "\n"; - $previousLineIndented = false; - $previousLineBlank = true; + $previousLineIndented = \false; + $previousLineBlank = \true; } elseif (' ' === $blockLines[$i][0]) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = true; - $previousLineBlank = false; + $text .= "\n" . $blockLines[$i]; + $previousLineIndented = \true; + $previousLineBlank = \false; } elseif ($previousLineIndented) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; + $text .= "\n" . $blockLines[$i]; + $previousLineIndented = \false; + $previousLineBlank = \false; } elseif ($previousLineBlank || 0 === $i) { $text .= $blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; + $previousLineIndented = \false; + $previousLineBlank = \false; } else { - $text .= ' '.$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; + $text .= ' ' . $blockLines[$i]; + $previousLineIndented = \false; + $previousLineBlank = \false; } } } else { $text = implode("\n", $blockLines); } - // deal with trailing newlines if ('' === $chomping) { - $text = preg_replace('/\n+$/', "\n", $text); + $text = preg_replace('/\\n+$/', "\n", $text); } elseif ('-' === $chomping) { - $text = preg_replace('/\n+$/', '', $text); + $text = preg_replace('/\\n+$/', '', $text); } - return $text; } - /** * Returns true if the next line is indented. */ - private function isNextLineIndented(): bool + private function isNextLineIndented() : bool { $currentIndentation = $this->getCurrentLineIndentation(); $movements = 0; - do { $EOF = !$this->moveToNextLine(); - if (!$EOF) { ++$movements; } } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - if ($EOF) { for ($i = 0; $i < $movements; ++$i) { $this->moveToPreviousLine(); } - - return false; + return \false; } - $ret = $this->getCurrentLineIndentation() > $currentIndentation; - for ($i = 0; $i < $movements; ++$i) { $this->moveToPreviousLine(); } - return $ret; } - - private function isCurrentLineEmpty(): bool + private function isCurrentLineEmpty() : bool { return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); } - - private function isCurrentLineBlank(): bool + private function isCurrentLineBlank() : bool { return '' === $this->currentLine || '' === trim($this->currentLine, ' '); } - - private function isCurrentLineComment(): bool + private function isCurrentLineComment() : bool { // checking explicitly the first char of the trim is faster than loops or strpos $ltrimmedLine = '' !== $this->currentLine && ' ' === $this->currentLine[0] ? ltrim($this->currentLine, ' ') : $this->currentLine; - return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0]; } - - private function isCurrentLineLastLineInDocument(): bool + private function isCurrentLineLastLineInDocument() : bool { - return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); + return $this->offset + $this->currentLineNb >= $this->totalNumberOfLines - 1; } - - private function cleanup(string $value): string + private function cleanup(string $value) : string { $value = str_replace(["\r\n", "\r"], "\n", $value); - // strip YAML header $count = 0; - $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count); + $value = preg_replace('#^\\%YAML[: ][\\d\\.]+.*\\n#u', '', $value, -1, $count); $this->offset += $count; - // remove leading comments - $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); + $trimmedValue = preg_replace('#^(\\#.*?\\n)+#s', '', $value, -1, $count); if (1 === $count) { // items have been removed, update the offset $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); $value = $trimmedValue; } - // remove start of the document marker (---) - $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); + $trimmedValue = preg_replace('#^\\-\\-\\-.*?\\n#s', '', $value, -1, $count); if (1 === $count) { // items have been removed, update the offset $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); $value = $trimmedValue; - // remove end of the document marker (...) - $value = preg_replace('#\.\.\.\s*$#', '', $value); + $value = preg_replace('#\\.\\.\\.\\s*$#', '', $value); } - return $value; } - - private function isNextLineUnIndentedCollection(): bool + private function isNextLineUnIndentedCollection() : bool { $currentIndentation = $this->getCurrentLineIndentation(); $movements = 0; - do { $EOF = !$this->moveToNextLine(); - if (!$EOF) { ++$movements; } } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - if ($EOF) { - return false; + return \false; } - $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - for ($i = 0; $i < $movements; ++$i) { $this->moveToPreviousLine(); } - return $ret; } - - private function isStringUnIndentedCollectionItem(): bool + private function isStringUnIndentedCollectionItem() : bool { - return '-' === rtrim($this->currentLine) || str_starts_with($this->currentLine, '- '); + return '-' === rtrim($this->currentLine) || strncmp($this->currentLine, '- ', strlen('- ')) === 0; } - /** * A local wrapper for "preg_match" which will throw a ParseException if there * is an internal error in the PCRE engine. @@ -1043,159 +899,128 @@ private function isStringUnIndentedCollectionItem(): bool * * @internal */ - public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int + public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int { - if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) { + if (\false === ($ret = preg_match($pattern, $subject, $matches, $flags, $offset))) { throw new ParseException(preg_last_error_msg()); } - return $ret; } - /** * Trim the tag on top of the value. * * Prevent values such as "!foo {quz: bar}" to be considered as * a mapping block. */ - private function trimTag(string $value): string + private function trimTag(string $value) : string { if ('!' === $value[0]) { return ltrim(substr($value, 1, strcspn($value, " \r\n", 1)), ' '); } - return $value; } - - private function getLineTag(string $value, int $flags, bool $nextLineCheck = true): ?string + private function getLineTag(string $value, int $flags, bool $nextLineCheck = \true) : ?string { - if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) { + if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^' . self::TAG_PATTERN . ' *( +#.*)?$/', $value, $matches)) { return null; } - if ($nextLineCheck && !$this->isNextLineIndented()) { return null; } - $tag = substr($matches['tag'], 1); - // Built-in tags if ($tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename); + throw new ParseException(\sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename); } - if (Yaml::PARSE_CUSTOM_TAGS & $flags) { return $tag; } - - throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename); + throw new ParseException(\sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename); } - - private function lexInlineQuotedString(int &$cursor = 0): string + private function lexInlineQuotedString(int &$cursor = 0) : string { $quotation = $this->currentLine[$cursor]; $value = $quotation; ++$cursor; - - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; + $previousLineWasNewline = \true; + $previousLineWasTerminatedWithBackslash = \false; $lineNumber = 0; - do { if (++$lineNumber > 1) { $cursor += strspn($this->currentLine, ' ', $cursor); } - if ($this->isCurrentLineBlank()) { $value .= "\n"; } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { $value .= ' '; } - for (; \strlen($this->currentLine) > $cursor; ++$cursor) { switch ($this->currentLine[$cursor]) { case '\\': if ("'" === $quotation) { $value .= '\\'; } elseif (isset($this->currentLine[++$cursor])) { - $value .= '\\'.$this->currentLine[$cursor]; + $value .= '\\' . $this->currentLine[$cursor]; } - break; case $quotation: ++$cursor; - if ("'" === $quotation && isset($this->currentLine[$cursor]) && "'" === $this->currentLine[$cursor]) { $value .= "''"; break; } - - return $value.$quotation; + return $value . $quotation; default: $value .= $this->currentLine[$cursor]; } } - if ($this->isCurrentLineBlank()) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; + $previousLineWasNewline = \true; + $previousLineWasTerminatedWithBackslash = \false; } elseif ('\\' === $this->currentLine[-1]) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; + $previousLineWasNewline = \false; + $previousLineWasTerminatedWithBackslash = \true; } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; + $previousLineWasNewline = \false; + $previousLineWasTerminatedWithBackslash = \false; } - if ($this->hasMoreLines()) { $cursor = 0; } } while ($this->moveToNextLine()); - throw new ParseException('Malformed inline YAML string.'); } - - private function lexUnquotedString(int &$cursor): string + private function lexUnquotedString(int &$cursor) : string { $offset = $cursor; - - while ($cursor < strlen($this->currentLine)) { - if (in_array($this->currentLine[$cursor], ['[', ']', '{', '}', ',', ':'], true)) { + while ($cursor < \strlen($this->currentLine)) { + if (\in_array($this->currentLine[$cursor], ['[', ']', '{', '}', ',', ':'], \true)) { break; } - - if (\in_array($this->currentLine[$cursor], [' ', "\t"], true) && '#' === ($this->currentLine[$cursor + 1] ?? '')) { + if (\in_array($this->currentLine[$cursor], [' ', "\t"], \true) && '#' === ($this->currentLine[$cursor + 1] ?? '')) { break; } - ++$cursor; } - if ($cursor === $offset) { throw new ParseException('Malformed unquoted YAML string.'); } - return substr($this->currentLine, $offset, $cursor - $offset); } - - private function lexInlineMapping(int &$cursor = 0, bool $consumeUntilEol = true): string + private function lexInlineMapping(int &$cursor = 0, bool $consumeUntilEol = \true) : string { return $this->lexInlineStructure($cursor, '}', $consumeUntilEol); } - - private function lexInlineSequence(int &$cursor = 0, bool $consumeUntilEol = true): string + private function lexInlineSequence(int &$cursor = 0, bool $consumeUntilEol = \true) : string { return $this->lexInlineStructure($cursor, ']', $consumeUntilEol); } - - private function lexInlineStructure(int &$cursor, string $closingTag, bool $consumeUntilEol = true): string + private function lexInlineStructure(int &$cursor, string $closingTag, bool $consumeUntilEol = \true) : string { $value = $this->currentLine[$cursor]; ++$cursor; - do { $this->consumeWhitespaces($cursor); - while (isset($this->currentLine[$cursor])) { switch ($this->currentLine[$cursor]) { case '"': @@ -1208,57 +1033,47 @@ private function lexInlineStructure(int &$cursor, string $closingTag, bool $cons ++$cursor; break; case '{': - $value .= $this->lexInlineMapping($cursor, false); + $value .= $this->lexInlineMapping($cursor, \false); break; case '[': - $value .= $this->lexInlineSequence($cursor, false); + $value .= $this->lexInlineSequence($cursor, \false); break; case $closingTag: $value .= $this->currentLine[$cursor]; ++$cursor; - - if ($consumeUntilEol && isset($this->currentLine[$cursor]) && ($whitespaces = strspn($this->currentLine, ' ', $cursor) + $cursor) < strlen($this->currentLine) && '#' !== $this->currentLine[$whitespaces]) { - throw new ParseException(sprintf('Unexpected token "%s".', trim(substr($this->currentLine, $cursor)))); + if ($consumeUntilEol && isset($this->currentLine[$cursor]) && ($whitespaces = strspn($this->currentLine, ' ', $cursor) + $cursor) < \strlen($this->currentLine) && '#' !== $this->currentLine[$whitespaces]) { + throw new ParseException(\sprintf('Unexpected token "%s".', trim(substr($this->currentLine, $cursor)))); } - return $value; case '#': break 2; default: $value .= $this->lexUnquotedString($cursor); } - if ($this->consumeWhitespaces($cursor)) { $value .= ' '; } } - if ($this->hasMoreLines()) { $cursor = 0; } } while ($this->moveToNextLine()); - throw new ParseException('Malformed inline YAML string.'); } - - private function consumeWhitespaces(int &$cursor): bool + private function consumeWhitespaces(int &$cursor) : bool { $whitespacesConsumed = 0; - do { $whitespaceOnlyTokenLength = strspn($this->currentLine, " \t", $cursor); $whitespacesConsumed += $whitespaceOnlyTokenLength; $cursor += $whitespaceOnlyTokenLength; - if (isset($this->currentLine[$cursor])) { return 0 < $whitespacesConsumed; } - if ($this->hasMoreLines()) { $cursor = 0; } } while ($this->moveToNextLine()); - return 0 < $whitespacesConsumed; } } diff --git a/vendor/prefixed/symfony/yaml/Resources/bin/yaml-lint b/vendor/prefixed/symfony/yaml/Resources/bin/yaml-lint new file mode 100755 index 0000000..1a84254 --- /dev/null +++ b/vendor/prefixed/symfony/yaml/Resources/bin/yaml-lint @@ -0,0 +1,35 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if ('cli' !== \PHP_SAPI) { + throw new \Exception('This script must be run from the command line.'); +} +/** + * Runs the Yaml lint command. + * + * @author Jan Schädlich + */ +use Symfony\Component\Console\Application; +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Command\LintCommand; +function includeIfExists(string $file) : bool +{ + return \file_exists($file) && (include $file); +} +if (!includeIfExists(__DIR__ . '/../../../../autoload.php') && !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php')) { + \fwrite(\STDERR, 'Install dependencies using Composer.' . \PHP_EOL); + exit(1); +} +if (!\class_exists(Application::class)) { + \fwrite(\STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.' . \PHP_EOL); + exit(1); +} +(new Application())->add($command = new LintCommand())->getApplication()->setDefaultCommand($command->getName(), \true)->run(); diff --git a/vendor/symfony/yaml/Tag/TaggedValue.php b/vendor/prefixed/symfony/yaml/Tag/TaggedValue.php similarity index 57% rename from vendor/symfony/yaml/Tag/TaggedValue.php rename to vendor/prefixed/symfony/yaml/Tag/TaggedValue.php index 3e09b93..db23b02 100644 --- a/vendor/symfony/yaml/Tag/TaggedValue.php +++ b/vendor/prefixed/symfony/yaml/Tag/TaggedValue.php @@ -8,8 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -namespace Symfony\Component\Yaml\Tag; +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Tag; /** * @author Nicolas Grekas @@ -17,21 +16,30 @@ */ final class TaggedValue { - private string $tag; - private mixed $value; - - public function __construct(string $tag, mixed $value) + /** + * @var string + */ + private $tag; + /** + * @var mixed + */ + private $value; + /** + * @param mixed $value + */ + public function __construct(string $tag, $value) { $this->tag = $tag; $this->value = $value; } - - public function getTag(): string + public function getTag() : string { return $this->tag; } - - public function getValue(): mixed + /** + * @return mixed + */ + public function getValue() { return $this->value; } diff --git a/vendor/prefixed/symfony/yaml/Unescaper.php b/vendor/prefixed/symfony/yaml/Unescaper.php new file mode 100644 index 0000000..0721b4c --- /dev/null +++ b/vendor/prefixed/symfony/yaml/Unescaper.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml; + +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception\ParseException; +/** + * Unescaper encapsulates unescaping rules for single and double-quoted + * YAML strings. + * + * @author Matthew Lewinski + * + * @internal + */ +class Unescaper +{ + /** + * Regex fragment that matches an escaped character in a double quoted string. + */ + public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; + /** + * Unescapes a single quoted string. + * + * @param string $value A single quoted string + */ + public function unescapeSingleQuotedString(string $value) : string + { + return str_replace('\'\'', '\'', $value); + } + /** + * Unescapes a double quoted string. + * + * @param string $value A double quoted string + */ + public function unescapeDoubleQuotedString(string $value) : string + { + $callback = function ($match) { + return $this->unescapeCharacter($match[0]); + }; + // evaluate the string + return preg_replace_callback('/' . self::REGEX_ESCAPED_CHARACTER . '/u', $callback, $value); + } + /** + * Unescapes a character that was found in a double-quoted string. + * + * @param string $value An escaped character + */ + private function unescapeCharacter(string $value) : string + { + switch ($value[1]) { + case '0': + return "\x00"; + case 'a': + return "\x07"; + case 'b': + return "\x08"; + case 't': + return "\t"; + case "\t": + return "\t"; + case 'n': + return "\n"; + case 'v': + return "\v"; + case 'f': + return "\f"; + case 'r': + return "\r"; + case 'e': + return "\x1b"; + case ' ': + return ' '; + case '"': + return '"'; + case '/': + return '/'; + case '\\': + return '\\'; + case 'N': + return "…"; + case '_': + return " "; + case 'L': + return "
"; + case 'P': + return "
"; + case 'x': + return self::utf8chr(hexdec(substr($value, 2, 2))); + case 'u': + return self::utf8chr(hexdec(substr($value, 2, 4))); + case 'U': + return self::utf8chr(hexdec(substr($value, 2, 8))); + default: + throw new ParseException(\sprintf('Found unknown escape character "%s".', $value)); + } + } + /** + * Get the UTF-8 character for the given code point. + */ + private static function utf8chr(int $c) : string + { + if (0x80 > ($c %= 0x200000)) { + return \chr($c); + } + if (0x800 > $c) { + return \chr(0xc0 | $c >> 6) . \chr(0x80 | $c & 0x3f); + } + if (0x10000 > $c) { + return \chr(0xe0 | $c >> 12) . \chr(0x80 | $c >> 6 & 0x3f) . \chr(0x80 | $c & 0x3f); + } + return \chr(0xf0 | $c >> 18) . \chr(0x80 | $c >> 12 & 0x3f) . \chr(0x80 | $c >> 6 & 0x3f) . \chr(0x80 | $c & 0x3f); + } +} diff --git a/vendor/symfony/yaml/Yaml.php b/vendor/prefixed/symfony/yaml/Yaml.php similarity index 61% rename from vendor/symfony/yaml/Yaml.php rename to vendor/prefixed/symfony/yaml/Yaml.php index e2d2af7..b684451 100644 --- a/vendor/symfony/yaml/Yaml.php +++ b/vendor/prefixed/symfony/yaml/Yaml.php @@ -8,11 +8,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml; -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - +use Matomo\Dependencies\OpenApiDocs\Symfony\Component\Yaml\Exception\ParseException; /** * Yaml offers convenience methods to load and dump YAML. * @@ -35,7 +33,9 @@ class Yaml public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; public const DUMP_NULL_AS_TILDE = 2048; public const DUMP_NUMERIC_KEY_AS_STRING = 4096; - + public const DUMP_NULL_AS_EMPTY = 8192; + public const DUMP_COMPACT_NESTED_MAPPING = 16384; + public const DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES = 32768; /** * Parses a YAML file into a PHP value. * @@ -44,18 +44,17 @@ class Yaml * $array = Yaml::parseFile('config.yml'); * print_r($array); * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param string $filename The path to the YAML file to be parsed + * @param int-mask-of $flags A bit field of PARSE_* constants to customize the YAML parser behavior * * @throws ParseException If the file could not be read or the YAML is not valid + * @return mixed */ - public static function parseFile(string $filename, int $flags = 0): mixed + public static function parseFile(string $filename, int $flags = 0) { $yaml = new Parser(); - return $yaml->parseFile($filename, $flags); } - /** * Parses YAML into a PHP value. * @@ -65,33 +64,31 @@ public static function parseFile(string $filename, int $flags = 0): mixed * print_r($array); * * - * @param string $input A string containing YAML - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * @param string $input A string containing YAML + * @param int-mask-of $flags A bit field of PARSE_* constants to customize the YAML parser behavior * * @throws ParseException If the YAML is not valid + * @return mixed */ - public static function parse(string $input, int $flags = 0): mixed + public static function parse(string $input, int $flags = 0) { $yaml = new Parser(); - return $yaml->parse($input, $flags); } - /** * Dumps a PHP value to a YAML string. * * The dump method, when supplied with an array, will do its best * to convert the array into friendly YAML. * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The amount of spaces to use for indentation of nested nodes - * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string + * @param mixed $input The PHP value + * @param int $inline The level where you switch to inline YAML + * @param int $indent The amount of spaces to use for indentation of nested nodes + * @param int-mask-of $flags A bit field of DUMP_* constants to customize the dumped YAML string */ - public static function dump(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0): string + public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0) : string { $yaml = new Dumper($indent); - return $yaml->dump($input, $inline, 0, $flags); } } diff --git a/vendor/prefixed/vendor/autoload.php b/vendor/prefixed/vendor/autoload.php new file mode 100644 index 0000000..1f6bfd5 --- /dev/null +++ b/vendor/prefixed/vendor/autoload.php @@ -0,0 +1,25 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ + private $prefixesPsr0 = array(); + /** + * @var list + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/prefixed/vendor/composer/LICENSE similarity index 83% rename from vendor/psr/cache/LICENSE.txt rename to vendor/prefixed/vendor/composer/LICENSE index b1c2c97..f27399a 100644 --- a/vendor/psr/cache/LICENSE.txt +++ b/vendor/prefixed/vendor/composer/LICENSE @@ -1,14 +1,15 @@ -Copyright (c) 2015 PHP Framework Interoperability Group + +Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -17,3 +18,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/vendor/prefixed/vendor/composer/autoload_classmap.php b/vendor/prefixed/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..2c053ae --- /dev/null +++ b/vendor/prefixed/vendor/composer/autoload_classmap.php @@ -0,0 +1,445 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnalyserInterface' => $baseDir . '/zircote/swagger-php/src/Analysers/AnalyserInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnnotationFactoryInterface' => $baseDir . '/zircote/swagger-php/src/Analysers/AnnotationFactoryInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AttributeAnnotationFactory' => $baseDir . '/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\ComposerAutoloaderScanner' => $baseDir . '/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\DocBlockAnnotationFactory' => $baseDir . '/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\DocBlockParser' => $baseDir . '/zircote/swagger-php/src/Analysers/DocBlockParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\ReflectionAnalyser' => $baseDir . '/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\TokenScanner' => $baseDir . '/zircote/swagger-php/src/Analysers/TokenScanner.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysis' => $baseDir . '/zircote/swagger-php/src/Analysis.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\AbstractAnnotation' => $baseDir . '/zircote/swagger-php/src/Annotations/AbstractAnnotation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\AdditionalProperties' => $baseDir . '/zircote/swagger-php/src/Annotations/AdditionalProperties.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Attachable' => $baseDir . '/zircote/swagger-php/src/Annotations/Attachable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Components' => $baseDir . '/zircote/swagger-php/src/Annotations/Components.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Contact' => $baseDir . '/zircote/swagger-php/src/Annotations/Contact.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\CookieParameter' => $baseDir . '/zircote/swagger-php/src/Annotations/CookieParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Delete' => $baseDir . '/zircote/swagger-php/src/Annotations/Delete.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Discriminator' => $baseDir . '/zircote/swagger-php/src/Annotations/Discriminator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Examples' => $baseDir . '/zircote/swagger-php/src/Annotations/Examples.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\ExternalDocumentation' => $baseDir . '/zircote/swagger-php/src/Annotations/ExternalDocumentation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Flow' => $baseDir . '/zircote/swagger-php/src/Annotations/Flow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Get' => $baseDir . '/zircote/swagger-php/src/Annotations/Get.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Head' => $baseDir . '/zircote/swagger-php/src/Annotations/Head.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Header' => $baseDir . '/zircote/swagger-php/src/Annotations/Header.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\HeaderParameter' => $baseDir . '/zircote/swagger-php/src/Annotations/HeaderParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Info' => $baseDir . '/zircote/swagger-php/src/Annotations/Info.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Items' => $baseDir . '/zircote/swagger-php/src/Annotations/Items.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\JsonContent' => $baseDir . '/zircote/swagger-php/src/Annotations/JsonContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\License' => $baseDir . '/zircote/swagger-php/src/Annotations/License.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Link' => $baseDir . '/zircote/swagger-php/src/Annotations/Link.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\MediaType' => $baseDir . '/zircote/swagger-php/src/Annotations/MediaType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\OpenApi' => $baseDir . '/zircote/swagger-php/src/Annotations/OpenApi.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Operation' => $baseDir . '/zircote/swagger-php/src/Annotations/Operation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Options' => $baseDir . '/zircote/swagger-php/src/Annotations/Options.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Parameter' => $baseDir . '/zircote/swagger-php/src/Annotations/Parameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Patch' => $baseDir . '/zircote/swagger-php/src/Annotations/Patch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\PathItem' => $baseDir . '/zircote/swagger-php/src/Annotations/PathItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\PathParameter' => $baseDir . '/zircote/swagger-php/src/Annotations/PathParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Post' => $baseDir . '/zircote/swagger-php/src/Annotations/Post.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Property' => $baseDir . '/zircote/swagger-php/src/Annotations/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Put' => $baseDir . '/zircote/swagger-php/src/Annotations/Put.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\QueryParameter' => $baseDir . '/zircote/swagger-php/src/Annotations/QueryParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\RequestBody' => $baseDir . '/zircote/swagger-php/src/Annotations/RequestBody.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Response' => $baseDir . '/zircote/swagger-php/src/Annotations/Response.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Schema' => $baseDir . '/zircote/swagger-php/src/Annotations/Schema.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\SecurityScheme' => $baseDir . '/zircote/swagger-php/src/Annotations/SecurityScheme.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Server' => $baseDir . '/zircote/swagger-php/src/Annotations/Server.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\ServerVariable' => $baseDir . '/zircote/swagger-php/src/Annotations/ServerVariable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Tag' => $baseDir . '/zircote/swagger-php/src/Annotations/Tag.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Trace' => $baseDir . '/zircote/swagger-php/src/Annotations/Trace.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Webhook' => $baseDir . '/zircote/swagger-php/src/Annotations/Webhook.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Xml' => $baseDir . '/zircote/swagger-php/src/Annotations/Xml.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\XmlContent' => $baseDir . '/zircote/swagger-php/src/Annotations/XmlContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\AdditionalProperties' => $baseDir . '/zircote/swagger-php/src/Attributes/AdditionalProperties.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Attachable' => $baseDir . '/zircote/swagger-php/src/Attributes/Attachable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Components' => $baseDir . '/zircote/swagger-php/src/Attributes/Components.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Contact' => $baseDir . '/zircote/swagger-php/src/Attributes/Contact.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\CookieParameter' => $baseDir . '/zircote/swagger-php/src/Attributes/CookieParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Delete' => $baseDir . '/zircote/swagger-php/src/Attributes/Delete.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Discriminator' => $baseDir . '/zircote/swagger-php/src/Attributes/Discriminator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Examples' => $baseDir . '/zircote/swagger-php/src/Attributes/Examples.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\ExternalDocumentation' => $baseDir . '/zircote/swagger-php/src/Attributes/ExternalDocumentation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Flow' => $baseDir . '/zircote/swagger-php/src/Attributes/Flow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Get' => $baseDir . '/zircote/swagger-php/src/Attributes/Get.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Head' => $baseDir . '/zircote/swagger-php/src/Attributes/Head.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Header' => $baseDir . '/zircote/swagger-php/src/Attributes/Header.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\HeaderParameter' => $baseDir . '/zircote/swagger-php/src/Attributes/HeaderParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Info' => $baseDir . '/zircote/swagger-php/src/Attributes/Info.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Items' => $baseDir . '/zircote/swagger-php/src/Attributes/Items.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\JsonContent' => $baseDir . '/zircote/swagger-php/src/Attributes/JsonContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\License' => $baseDir . '/zircote/swagger-php/src/Attributes/License.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Link' => $baseDir . '/zircote/swagger-php/src/Attributes/Link.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\MediaType' => $baseDir . '/zircote/swagger-php/src/Attributes/MediaType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\OpenApi' => $baseDir . '/zircote/swagger-php/src/Attributes/OpenApi.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\OperationTrait' => $baseDir . '/zircote/swagger-php/src/Attributes/OperationTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Options' => $baseDir . '/zircote/swagger-php/src/Attributes/Options.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Parameter' => $baseDir . '/zircote/swagger-php/src/Attributes/Parameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\ParameterTrait' => $baseDir . '/zircote/swagger-php/src/Attributes/ParameterTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Patch' => $baseDir . '/zircote/swagger-php/src/Attributes/Patch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\PathItem' => $baseDir . '/zircote/swagger-php/src/Attributes/PathItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\PathParameter' => $baseDir . '/zircote/swagger-php/src/Attributes/PathParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Post' => $baseDir . '/zircote/swagger-php/src/Attributes/Post.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Property' => $baseDir . '/zircote/swagger-php/src/Attributes/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Put' => $baseDir . '/zircote/swagger-php/src/Attributes/Put.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\QueryParameter' => $baseDir . '/zircote/swagger-php/src/Attributes/QueryParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\RequestBody' => $baseDir . '/zircote/swagger-php/src/Attributes/RequestBody.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Response' => $baseDir . '/zircote/swagger-php/src/Attributes/Response.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Schema' => $baseDir . '/zircote/swagger-php/src/Attributes/Schema.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\SecurityScheme' => $baseDir . '/zircote/swagger-php/src/Attributes/SecurityScheme.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Server' => $baseDir . '/zircote/swagger-php/src/Attributes/Server.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\ServerVariable' => $baseDir . '/zircote/swagger-php/src/Attributes/ServerVariable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Tag' => $baseDir . '/zircote/swagger-php/src/Attributes/Tag.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Trace' => $baseDir . '/zircote/swagger-php/src/Attributes/Trace.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Webhook' => $baseDir . '/zircote/swagger-php/src/Attributes/Webhook.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Xml' => $baseDir . '/zircote/swagger-php/src/Attributes/Xml.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\XmlContent' => $baseDir . '/zircote/swagger-php/src/Attributes/XmlContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Context' => $baseDir . '/zircote/swagger-php/src/Context.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Generator' => $baseDir . '/zircote/swagger-php/src/Generator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\GeneratorAwareInterface' => $baseDir . '/zircote/swagger-php/src/GeneratorAwareInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\GeneratorAwareTrait' => $baseDir . '/zircote/swagger-php/src/GeneratorAwareTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Loggers\\ConsoleLogger' => $baseDir . '/zircote/swagger-php/src/Loggers/ConsoleLogger.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Loggers\\DefaultLogger' => $baseDir . '/zircote/swagger-php/src/Loggers/DefaultLogger.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\OpenApiException' => $baseDir . '/zircote/swagger-php/src/OpenApiException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Pipeline' => $baseDir . '/zircote/swagger-php/src/Pipeline.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentDiscriminators' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentDiscriminators.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentParameters' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentParameters.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentProperties' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentProperties.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentRefs' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentRefs.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentRequestBody' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentRequestBody.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentSchemas' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentSchemas.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentTags' => $baseDir . '/zircote/swagger-php/src/Processors/AugmentTags.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\BuildPaths' => $baseDir . '/zircote/swagger-php/src/Processors/BuildPaths.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\CleanUnmerged' => $baseDir . '/zircote/swagger-php/src/Processors/CleanUnmerged.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\CleanUnusedComponents' => $baseDir . '/zircote/swagger-php/src/Processors/CleanUnusedComponents.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\AnnotationTrait' => $baseDir . '/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\DocblockTrait' => $baseDir . '/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\MergePropertiesTrait' => $baseDir . '/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\RefTrait' => $baseDir . '/zircote/swagger-php/src/Processors/Concerns/RefTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\TypesTrait' => $baseDir . '/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\DocBlockDescriptions' => $baseDir . '/zircote/swagger-php/src/Processors/DocBlockDescriptions.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandClasses' => $baseDir . '/zircote/swagger-php/src/Processors/ExpandClasses.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandEnums' => $baseDir . '/zircote/swagger-php/src/Processors/ExpandEnums.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandInterfaces' => $baseDir . '/zircote/swagger-php/src/Processors/ExpandInterfaces.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandTraits' => $baseDir . '/zircote/swagger-php/src/Processors/ExpandTraits.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeIntoComponents' => $baseDir . '/zircote/swagger-php/src/Processors/MergeIntoComponents.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeIntoOpenApi' => $baseDir . '/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeJsonContent' => $baseDir . '/zircote/swagger-php/src/Processors/MergeJsonContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeXmlContent' => $baseDir . '/zircote/swagger-php/src/Processors/MergeXmlContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\OperationId' => $baseDir . '/zircote/swagger-php/src/Processors/OperationId.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\PathFilter' => $baseDir . '/zircote/swagger-php/src/Processors/PathFilter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Serializer' => $baseDir . '/zircote/swagger-php/src/Serializer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Util' => $baseDir . '/zircote/swagger-php/src/Util.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\BuilderFactory' => $baseDir . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\BuilderHelpers' => $baseDir . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\ClassConst' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Class_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Declaration' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\EnumCase' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Enum_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\FunctionLike' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Function_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Interface_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Method' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Namespace_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Param' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Property' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\TraitUse' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\TraitUseAdaptation' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Trait_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Use_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Comment' => $baseDir . '/nikic/php-parser/lib/PhpParser/Comment.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Comment\\Doc' => $baseDir . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ConstExprEvaluationException' => $baseDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ConstExprEvaluator' => $baseDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Error' => $baseDir . '/nikic/php-parser/lib/PhpParser/Error.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ErrorHandler' => $baseDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ErrorHandler\\Collecting' => $baseDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ErrorHandler\\Throwing' => $baseDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\DiffElem' => $baseDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\Differ' => $baseDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\PrintableNewAnonClassNode' => $baseDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\TokenPolyfill' => $baseDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\TokenStream' => $baseDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\JsonDecoder' => $baseDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\Emulative' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\AsymmetricVisibilityTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\PipeOperatorEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\PropertyTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\VoidCastEmulator' => $baseDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Modifiers' => $baseDir . '/nikic/php-parser/lib/PhpParser/Modifiers.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NameContext' => $baseDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeAbstract' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeDumper' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeFinder' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeTraverser' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeTraverserInterface' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitorAbstract' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\CloningVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\FindingVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\FirstFindingVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\NameResolver' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $baseDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Arg' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\ArrayItem' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Attribute' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\AttributeGroup' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\ClosureUse' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\ComplexType' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Const_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\DeclareItem' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ArrayDimFetch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ArrayItem' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Array_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ArrowFunction' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Assign' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Concat' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Div' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Minus' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Mod' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Mul' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Plus' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Pow' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignRef' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Concat' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Div' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Equal' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Greater' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Identical' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Minus' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Mod' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Mul' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Pipe' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Plus' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Pow' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BitwiseNot' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BooleanNot' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\CallLike' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Array_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Bool_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Double' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Int_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Object_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\String_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Unset_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Void_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ClassConstFetch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Clone_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Closure' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ClosureUse' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ConstFetch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Empty_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Error' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ErrorSuppress' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Eval_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Exit_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\FuncCall' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Include_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Instanceof_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Isset_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\List_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Match_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\MethodCall' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\New_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\NullsafeMethodCall' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\NullsafePropertyFetch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PostDec' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PostInc' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PreDec' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PreInc' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Print_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PropertyFetch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ShellExec' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\StaticCall' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\StaticPropertyFetch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Ternary' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Throw_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\UnaryMinus' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\UnaryPlus' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Variable' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\YieldFrom' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Yield_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\FunctionLike' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Identifier' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\InterpolatedStringPart' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\IntersectionType' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\MatchArm' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Name' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Name\\FullyQualified' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Name\\Relative' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\NullableType' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Param' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\PropertyHook' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\PropertyItem' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\DNumber' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\Encapsed' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\EncapsedStringPart' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\Float_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\Int_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\InterpolatedString' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\LNumber' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\File' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Function_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Line' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Method' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Property' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\String_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\StaticVar' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Block' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Break_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Case_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Catch_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ClassConst' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ClassLike' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ClassMethod' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Class_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Const_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Continue_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\DeclareDeclare' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Declare_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Do_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Echo_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ElseIf_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Else_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\EnumCase' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Enum_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Expression' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Finally_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\For_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Foreach_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Function_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Global_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Goto_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\GroupUse' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\HaltCompiler' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\If_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\InlineHTML' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Interface_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Label' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Namespace_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Nop' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Property' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\PropertyProperty' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Return_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\StaticVar' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Static_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Switch_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUse' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Trait_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TryCatch' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Unset_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\UseUse' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Use_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\While_' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\UnionType' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\UseItem' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\VarLikeIdentifier' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\VariadicPlaceholder' => $baseDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Parser' => $baseDir . '/nikic/php-parser/lib/PhpParser/Parser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ParserAbstract' => $baseDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ParserFactory' => $baseDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Parser\\Php7' => $baseDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Parser\\Php8' => $baseDir . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PhpVersion' => $baseDir . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinter' => $baseDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinterAbstract' => $baseDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinter\\Standard' => $baseDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Token' => $baseDir . '/nikic/php-parser/lib/PhpParser/Token.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\Comparator' => $baseDir . '/symfony/finder/Comparator/Comparator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\DateComparator' => $baseDir . '/symfony/finder/Comparator/DateComparator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $baseDir . '/symfony/finder/Comparator/NumberComparator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $baseDir . '/symfony/finder/Exception/AccessDeniedException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => $baseDir . '/symfony/finder/Exception/DirectoryNotFoundException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Finder' => $baseDir . '/symfony/finder/Finder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Gitignore' => $baseDir . '/symfony/finder/Gitignore.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Glob' => $baseDir . '/symfony/finder/Glob.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $baseDir . '/symfony/finder/Iterator/CustomFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $baseDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $baseDir . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $baseDir . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $baseDir . '/symfony/finder/Iterator/FileTypeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $baseDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $baseDir . '/symfony/finder/Iterator/FilenameFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\LazyIterator' => $baseDir . '/symfony/finder/Iterator/LazyIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $baseDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $baseDir . '/symfony/finder/Iterator/PathFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $baseDir . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $baseDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $baseDir . '/symfony/finder/Iterator/SortableIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => $baseDir . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\SplFileInfo' => $baseDir . '/symfony/finder/SplFileInfo.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Command\\LintCommand' => $baseDir . '/symfony/yaml/Command/LintCommand.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Dumper' => $baseDir . '/symfony/yaml/Dumper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Escaper' => $baseDir . '/symfony/yaml/Escaper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\DumpException' => $baseDir . '/symfony/yaml/Exception/DumpException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => $baseDir . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\ParseException' => $baseDir . '/symfony/yaml/Exception/ParseException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\RuntimeException' => $baseDir . '/symfony/yaml/Exception/RuntimeException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Inline' => $baseDir . '/symfony/yaml/Inline.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Parser' => $baseDir . '/symfony/yaml/Parser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Tag\\TaggedValue' => $baseDir . '/symfony/yaml/Tag/TaggedValue.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Unescaper' => $baseDir . '/symfony/yaml/Unescaper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Yaml' => $baseDir . '/symfony/yaml/Yaml.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Polyfill\\Ctype\\Ctype' => $baseDir . '/symfony/polyfill-ctype/Ctype.php', +); diff --git a/vendor/prefixed/vendor/composer/autoload_files.php b/vendor/prefixed/vendor/composer/autoload_files.php new file mode 100644 index 0000000..2d5b5f5 --- /dev/null +++ b/vendor/prefixed/vendor/composer/autoload_files.php @@ -0,0 +1,11 @@ + $baseDir . '/symfony/deprecation-contracts/function.php', + '8297c8aac33b35b8c89efd974dd6812c' => $baseDir . '/symfony/polyfill-ctype/bootstrap.php', +); diff --git a/vendor/prefixed/vendor/composer/autoload_namespaces.php b/vendor/prefixed/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..15a2ff3 --- /dev/null +++ b/vendor/prefixed/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ +register(true); + + $filesToLoad = \Composer\Autoload\ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); + } + + return $loader; + } +} diff --git a/vendor/prefixed/vendor/composer/autoload_static.php b/vendor/prefixed/vendor/composer/autoload_static.php new file mode 100644 index 0000000..9a2d7bc --- /dev/null +++ b/vendor/prefixed/vendor/composer/autoload_static.php @@ -0,0 +1,460 @@ + __DIR__ . '/../..' . '/symfony/deprecation-contracts/function.php', + '8297c8aac33b35b8c89efd974dd6812c' => __DIR__ . '/../..' . '/symfony/polyfill-ctype/bootstrap.php', + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnalyserInterface' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/AnalyserInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnnotationFactoryInterface' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/AnnotationFactoryInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AttributeAnnotationFactory' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\ComposerAutoloaderScanner' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\DocBlockAnnotationFactory' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\DocBlockParser' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/DocBlockParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\ReflectionAnalyser' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\TokenScanner' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/TokenScanner.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysis' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysis.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\AbstractAnnotation' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/AbstractAnnotation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\AdditionalProperties' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/AdditionalProperties.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Attachable' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Attachable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Components' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Components.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Contact' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Contact.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\CookieParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/CookieParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Delete' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Delete.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Discriminator' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Discriminator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Examples' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Examples.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\ExternalDocumentation' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/ExternalDocumentation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Flow' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Flow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Get' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Get.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Head' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Head.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Header' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Header.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\HeaderParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/HeaderParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Info' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Info.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Items' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Items.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\JsonContent' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/JsonContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\License' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/License.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Link' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Link.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\MediaType' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/MediaType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\OpenApi' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/OpenApi.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Operation' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Operation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Options' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Options.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Parameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Parameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Patch' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Patch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\PathItem' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/PathItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\PathParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/PathParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Post' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Post.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Property' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Put' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Put.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\QueryParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/QueryParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\RequestBody' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/RequestBody.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Response' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Response.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Schema' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Schema.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\SecurityScheme' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/SecurityScheme.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Server' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Server.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\ServerVariable' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/ServerVariable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Tag' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Tag.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Trace' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Trace.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Webhook' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Webhook.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\Xml' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/Xml.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\XmlContent' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Annotations/XmlContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\AdditionalProperties' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/AdditionalProperties.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Attachable' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Attachable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Components' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Components.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Contact' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Contact.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\CookieParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/CookieParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Delete' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Delete.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Discriminator' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Discriminator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Examples' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Examples.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\ExternalDocumentation' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/ExternalDocumentation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Flow' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Flow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Get' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Get.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Head' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Head.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Header' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Header.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\HeaderParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/HeaderParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Info' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Info.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Items' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Items.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\JsonContent' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/JsonContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\License' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/License.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Link' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Link.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\MediaType' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/MediaType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\OpenApi' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/OpenApi.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\OperationTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/OperationTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Options' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Options.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Parameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Parameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\ParameterTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/ParameterTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Patch' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Patch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\PathItem' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/PathItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\PathParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/PathParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Post' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Post.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Property' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Put' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Put.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\QueryParameter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/QueryParameter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\RequestBody' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/RequestBody.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Response' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Response.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Schema' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Schema.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\SecurityScheme' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/SecurityScheme.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Server' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Server.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\ServerVariable' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/ServerVariable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Tag' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Tag.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Trace' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Trace.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Webhook' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Webhook.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\Xml' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/Xml.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Attributes\\XmlContent' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Attributes/XmlContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Context' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Context.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Generator' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Generator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\GeneratorAwareInterface' => __DIR__ . '/../..' . '/zircote/swagger-php/src/GeneratorAwareInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\GeneratorAwareTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/GeneratorAwareTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Loggers\\ConsoleLogger' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Loggers/ConsoleLogger.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Loggers\\DefaultLogger' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Loggers/DefaultLogger.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\OpenApiException' => __DIR__ . '/../..' . '/zircote/swagger-php/src/OpenApiException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Pipeline' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Pipeline.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentDiscriminators' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentDiscriminators.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentParameters' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentParameters.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentProperties' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentProperties.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentRefs' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentRefs.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentRequestBody' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentRequestBody.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentSchemas' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentSchemas.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\AugmentTags' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/AugmentTags.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\BuildPaths' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/BuildPaths.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\CleanUnmerged' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/CleanUnmerged.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\CleanUnusedComponents' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/CleanUnusedComponents.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\AnnotationTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\DocblockTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\MergePropertiesTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\RefTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/Concerns/RefTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\Concerns\\TypesTrait' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\DocBlockDescriptions' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/DocBlockDescriptions.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandClasses' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/ExpandClasses.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandEnums' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/ExpandEnums.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandInterfaces' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/ExpandInterfaces.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\ExpandTraits' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/ExpandTraits.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeIntoComponents' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/MergeIntoComponents.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeIntoOpenApi' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeJsonContent' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/MergeJsonContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\MergeXmlContent' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/MergeXmlContent.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\OperationId' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/OperationId.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Processors\\PathFilter' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Processors/PathFilter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Serializer' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Serializer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Util' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Util.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\BuilderFactory' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\BuilderHelpers' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\ClassConst' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Class_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Declaration' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\EnumCase' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Enum_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\FunctionLike' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Function_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Interface_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Method' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Namespace_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Param' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Property' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\TraitUse' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\TraitUseAdaptation' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Trait_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Builder\\Use_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Comment' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Comment.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Comment\\Doc' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ConstExprEvaluationException' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ConstExprEvaluator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Error' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Error.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ErrorHandler' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ErrorHandler\\Collecting' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ErrorHandler\\Throwing' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\DiffElem' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\Differ' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\TokenPolyfill' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Internal\\TokenStream' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\JsonDecoder' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\Emulative' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\AsymmetricVisibilityTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\PipeOperatorEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\PropertyTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Lexer\\TokenEmulator\\VoidCastEmulator' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Modifiers' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Modifiers.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NameContext' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeAbstract' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeDumper' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeFinder' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeTraverser' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeTraverserInterface' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitorAbstract' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Arg' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\ArrayItem' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Attribute' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\AttributeGroup' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\ClosureUse' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\ComplexType' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Const_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\DeclareItem' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Mod' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Mul' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Plus' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\Pow' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\AssignRef' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Concat' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Div' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Equal' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Greater' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Identical' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Minus' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Mod' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Mul' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Pipe' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Plus' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Pow' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\CallLike' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Double' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Int_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Object_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\String_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Unset_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Cast\\Void_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Error' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ErrorSuppress' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Eval_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Exit_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\FuncCall' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Include_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Instanceof_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Isset_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\List_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Match_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\MethodCall' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\New_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\NullsafeMethodCall' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\NullsafePropertyFetch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PostDec' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PostInc' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PreDec' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PreInc' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Print_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\PropertyFetch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\ShellExec' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\StaticCall' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\StaticPropertyFetch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Ternary' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Throw_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\UnaryMinus' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\UnaryPlus' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Variable' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\YieldFrom' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\FunctionLike' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Identifier' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\InterpolatedStringPart' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\IntersectionType' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\MatchArm' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Name' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Name\\Relative' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\NullableType' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Param' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\PropertyHook' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\PropertyItem' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\Float_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\Int_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\InterpolatedString' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\File' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Function_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Line' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Method' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Property' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\StaticVar' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Block' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ClassConst' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ClassLike' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ClassMethod' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\ElseIf_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Else_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\EnumCase' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Enum_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Expression' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Finally_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\For_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Foreach_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Function_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Global_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Goto_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\GroupUse' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\HaltCompiler' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\If_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\InlineHTML' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Interface_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Label' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\UnionType' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\UseItem' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Parser' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Parser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ParserAbstract' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\ParserFactory' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Parser\\Php7' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Parser\\Php8' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PhpVersion' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinter' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Token' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Token.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/../..' . '/symfony/finder/Comparator/Comparator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/../..' . '/symfony/finder/Comparator/DateComparator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/../..' . '/symfony/finder/Comparator/NumberComparator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/../..' . '/symfony/finder/Exception/AccessDeniedException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => __DIR__ . '/../..' . '/symfony/finder/Exception/DirectoryNotFoundException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Finder' => __DIR__ . '/../..' . '/symfony/finder/Finder.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Gitignore' => __DIR__ . '/../..' . '/symfony/finder/Gitignore.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Glob' => __DIR__ . '/../..' . '/symfony/finder/Glob.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/CustomFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/FileTypeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/FilenameFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\LazyIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/LazyIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/PathFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/SortableIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => __DIR__ . '/../..' . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/../..' . '/symfony/finder/SplFileInfo.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Command\\LintCommand' => __DIR__ . '/../..' . '/symfony/yaml/Command/LintCommand.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/../..' . '/symfony/yaml/Dumper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/../..' . '/symfony/yaml/Escaper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/../..' . '/symfony/yaml/Exception/DumpException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/../..' . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/../..' . '/symfony/yaml/Exception/ParseException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/../..' . '/symfony/yaml/Exception/RuntimeException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/../..' . '/symfony/yaml/Inline.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/../..' . '/symfony/yaml/Parser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Tag\\TaggedValue' => __DIR__ . '/../..' . '/symfony/yaml/Tag/TaggedValue.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/../..' . '/symfony/yaml/Unescaper.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/../..' . '/symfony/yaml/Yaml.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/../..' . '/symfony/polyfill-ctype/Ctype.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->classMap = ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/zircote/swagger-php/LICENSE b/vendor/prefixed/zircote/swagger-php/LICENSE similarity index 100% rename from vendor/zircote/swagger-php/LICENSE rename to vendor/prefixed/zircote/swagger-php/LICENSE diff --git a/vendor/zircote/swagger-php/NOTICE b/vendor/prefixed/zircote/swagger-php/NOTICE similarity index 100% rename from vendor/zircote/swagger-php/NOTICE rename to vendor/prefixed/zircote/swagger-php/NOTICE diff --git a/vendor/prefixed/zircote/swagger-php/bin/openapi b/vendor/prefixed/zircote/swagger-php/bin/openapi new file mode 100755 index 0000000..421167e --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/bin/openapi @@ -0,0 +1,181 @@ +#!/usr/bin/env php + [], 'output' => \false, 'format' => 'auto', 'exclude' => [], 'pattern' => '*.php', 'bootstrap' => [], 'help' => \false, 'debug' => \false, 'processor' => [], 'version' => null]; +$aliases = ['c' => 'config', 'o' => 'output', 'e' => 'exclude', 'n' => 'pattern', 'b' => 'bootstrap', 'h' => 'help', 'd' => 'debug', 'p' => 'processor', 'f' => 'format']; +$needsArgument = ['config', 'output', 'format', 'exclude', 'pattern', 'bootstrap', 'processor', 'version']; +$paths = []; +$error = \false; +try { + // Parse cli arguments + for ($i = 1; $i < $argc; $i++) { + $arg = $argv[$i]; + if (\substr($arg, 0, 2) === '--') { + // longopt + $option = \substr($arg, 2); + } elseif ($arg[0] === '-') { + // shortopt + if (\array_key_exists(\substr($arg, 1), $aliases)) { + $option = $aliases[$arg[1]]; + } else { + throw new \Exception('Unknown option: "' . $arg . '"'); + } + } else { + $paths[] = $arg; + continue; + } + if (\array_key_exists($option, $options) === \false) { + throw new \Exception('Unknown option: "' . $arg . '"'); + } + if (\in_array($option, $needsArgument)) { + if (empty($argv[$i + 1]) || $argv[$i + 1][0] === '-') { + throw new \Exception('Missing argument for "' . $arg . '"'); + } + if (\is_array($options[$option])) { + $options[$option][] = $argv[$i + 1]; + } else { + $options[$option] = $argv[$i + 1]; + } + $i++; + } else { + $options[$option] = \true; + } + } +} catch (\Exception $e) { + $error = $e->getMessage(); +} +$logger = new ConsoleLogger($options['debug']); +if (!$error && $options['bootstrap']) { + foreach ($options['bootstrap'] as $bootstrap) { + $filenames = \glob($bootstrap); + if (\false === $filenames) { + $error = 'Invalid `--bootstrap` value: "' . $bootstrap . '"'; + break; + } + foreach ($filenames as $filename) { + if ($options['debug']) { + $logger->debug('Bootstrapping: ' . $filename); + } + require_once $filename; + } + } +} +if (\count($paths) === 0) { + $error = 'Specify at least one path.'; +} +if ($options['help'] === \false && $error) { + $logger->error('', ['prefix' => '']); + $logger->error($error); + // Show help + $options['help'] = \true; +} +$defaultVersion = OpenApi::DEFAULT_VERSION; +if ($options['help']) { + $help = <<info($help); + exit(1); +} +$errorTypes = [\E_ERROR => 'Error', \E_WARNING => 'Warning', \E_PARSE => 'Parser error', \E_NOTICE => 'Notice', \E_DEPRECATED => 'Deprecated', \E_CORE_ERROR => 'Error(Core)', \E_CORE_WARNING => 'Warning(Core)', \E_COMPILE_ERROR => 'Error(compile)', \E_COMPILE_WARNING => 'Warning(Compile)', \E_RECOVERABLE_ERROR => 'Error(Recoverable)', \E_USER_ERROR => 'Error', \E_USER_WARNING => 'Warning', \E_USER_NOTICE => 'Notice', \E_USER_DEPRECATED => 'Deprecated']; +\set_error_handler(function ($errno, $errstr, $file, $line) use($errorTypes, $options, $logger) { + if (!(\error_reporting() & $errno)) { + // This error code is not included in error_reporting + return; + } + $type = \array_key_exists($errno, $errorTypes) ? $errorTypes[$errno] : 'Error'; + if ($type === 'Deprecated') { + $logger->info($errstr, ['prefix' => $type . ': ']); + } else { + $logger->error($errstr, ['prefix' => $type . ': ']); + } + if ($options['debug']) { + $logger->info(' in ' . $file . ' on line ' . $line); + } + if (\substr($type, 0, 5) === 'Error') { + exit($errno); + } +}); +\set_exception_handler(function ($exception) use($logger) { + $logger->error($exception); + exit($exception->getCode() ?: 1); +}); +$exclude = null; +if ($options['exclude']) { + $exclude = $options['exclude']; + if (\strpos($exclude[0], ',') !== \false) { + $exploded = \explode(',', $exclude[0]); + $logger->error('Comma-separated exclude paths are deprecated, use multiple --exclude statements: --exclude ' . $exploded[0] . ' --exclude ' . $exploded[1]); + $exclude[0] = \array_shift($exploded); + $exclude = \array_merge($exclude, $exploded); + } +} +$pattern = "*.php"; +if ($options['pattern']) { + $pattern = $options['pattern']; +} +$generator = new Generator($logger); +foreach ($options["processor"] as $processor) { + $class = '\\OpenApi\\Processors\\' . $processor; + if (\class_exists($class)) { + $processor = new $class(); + } elseif (\class_exists($processor)) { + $processor = new $processor(); + } + $generator->getProcessorPipeline()->add($processor); +} +$analyser = new ReflectionAnalyser([new DocBlockAnnotationFactory(), new AttributeAnnotationFactory()]); +$analyser->setGenerator($generator); +$openapi = $generator->setVersion($options['version'])->setConfig($options['config'])->setAnalyser($analyser)->generate(Util::finder($paths, $exclude, $pattern)); +if ($options['output'] === \false) { + if (\strtolower($options['format']) === 'json') { + echo $openapi->toJson(); + } else { + echo $openapi->toYaml(); + } + echo "\n"; +} else { + if (\is_dir($options['output'])) { + $options['output'] .= '/openapi.yaml'; + } + $openapi->saveAs($options['output'], $options['format']); +} +exit($logger->loggedMessageAboveNotice() ? 1 : 0); diff --git a/vendor/zircote/swagger-php/package.json b/vendor/prefixed/zircote/swagger-php/package.json similarity index 100% rename from vendor/zircote/swagger-php/package.json rename to vendor/prefixed/zircote/swagger-php/package.json diff --git a/vendor/prefixed/zircote/swagger-php/rector.php b/vendor/prefixed/zircote/swagger-php/rector.php new file mode 100644 index 0000000..d075b99 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/rector.php @@ -0,0 +1,18 @@ +withSkip([CombineIfRector::class, ExplicitBoolCompareRector::class, ForRepeatedCountToOwnVariableRector::class, RemoveAlwaysTrueIfConditionRector::class => [__DIR__ . '/src/Processors/ExpandEnums.php'], RemoveDeadInstanceOfRector::class => [__DIR__ . '/src/Processors/ExpandEnums.php'], ShortenElseIfRector::class, NewlineAfterStatementRector::class, NullableCompareToNullRector::class, StringClassNameToClassConstantRector::class => [__DIR__ . '/src/Analysers/DocBlockParser.php'], EncapsedStringsToSprintfRector::class, ParamTypeByMethodCallTypeRector::class => [__DIR__ . '/src/Serializer.php']])->withPreparedSets(\true, \true, \true, \true)->withPhpVersion(PhpVersion::PHP_74)->withPhpSets(); diff --git a/vendor/prefixed/zircote/swagger-php/src/Analysers/AnalyserInterface.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/AnalyserInterface.php new file mode 100644 index 0000000..409170a --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/AnalyserInterface.php @@ -0,0 +1,15 @@ + top level annotations */ - public function build(\Reflector $reflector, Context $context): array; + public function build(\Reflector $reflector, Context $context) : array; } diff --git a/vendor/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php similarity index 73% rename from vendor/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php rename to vendor/prefixed/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php index d9c8e32..b151dae 100644 --- a/vendor/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php @@ -1,60 +1,52 @@ -ignoreOtherAttributes = $ignoreOtherAttributes; } - - public function isSupported(): bool + public function isSupported() : bool { return \PHP_VERSION_ID >= 80100; } - - public function build(\Reflector $reflector, Context $context): array + public function build(\Reflector $reflector, Context $context) : array { if (!$this->isSupported() || !method_exists($reflector, 'getAttributes')) { return []; } - if ($reflector instanceof \ReflectionProperty && method_exists($reflector, 'isPromoted') && $reflector->isPromoted()) { // handled via __construct() parameter return []; } - // no proper way to inject Generator::$context = $context; - /** @var OA\AbstractAnnotation[] $annotations */ $annotations = []; try { - $attributeName = $this->ignoreOtherAttributes - ? [OA\AbstractAnnotation::class, \ReflectionAttribute::IS_INSTANCEOF] - : []; - - foreach ($reflector->getAttributes(...$attributeName) as $attribute) { + $attributeName = $this->ignoreOtherAttributes ? [OA\AbstractAnnotation::class, \ReflectionAttribute::IS_INSTANCEOF] : []; + foreach (method_exists($reflector, 'getAttributes') ? $reflector->getAttributes(...$attributeName) : [] as $attribute) { if (class_exists($attribute->getName())) { $instance = $attribute->newInstance(); if ($instance instanceof OA\AbstractAnnotation) { $annotations[] = $instance; } else { - if ($context->is('other') === false) { + if ($context->is('other') === \false) { $context->other = []; } $context->other[] = $instance; @@ -63,19 +55,16 @@ public function build(\Reflector $reflector, Context $context): array $context->logger->debug(sprintf('Could not instantiate attribute "%s"; class not found.', $attribute->getName())); } } - if ($reflector instanceof \ReflectionMethod) { // also look at parameter attributes foreach ($reflector->getParameters() as $rp) { foreach ([OA\Property::class, OA\Parameter::class, OA\RequestBody::class] as $attributeName) { - foreach ($rp->getAttributes($attributeName, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { + foreach (method_exists($rp, 'getAttributes') ? $rp->getAttributes($attributeName, \ReflectionAttribute::IS_INSTANCEOF) : [] as $attribute) { /** @var OA\Property|OA\Parameter|OA\RequestBody $instance */ $instance = $attribute->newInstance(); - $instance->_context = new Context(['nested' => false], $context); - - $type = (($rnt = $rp->getType()) && $rnt instanceof \ReflectionNamedType) ? $rnt->getName() : Generator::UNDEFINED; - $nullable = $rnt ? $rnt->allowsNull() : true; - + $instance->_context = new Context(['nested' => \false, 'reflector' => $rp], $context); + $type = ($rnt = $rp->getType()) && $rnt instanceof \ReflectionNamedType ? $rnt->getName() : Generator::UNDEFINED; + $nullable = $rnt ? $rnt->allowsNull() : \true; if ($instance instanceof OA\RequestBody) { $instance->required = !$nullable; } elseif ($instance instanceof OA\Property) { @@ -85,12 +74,12 @@ public function build(\Reflector $reflector, Context $context): array if (Generator::isDefault($instance->type)) { $instance->type = $type; } - $instance->nullable = $nullable ?: Generator::UNDEFINED; - + if (Generator::isDefault($instance->nullable)) { + $instance->nullable = $nullable ?: Generator::UNDEFINED; + } if ($rp->isPromoted()) { // ensure each property has its own context - $instance->_context = new Context(['generated' => true, 'annotations' => [$instance]], $context); - + $instance->_context = new Context(['generated' => \true, 'annotations' => [$instance], 'reflector' => $rp], $context); // promoted parameter - docblock is available via class/property if ($comment = $rp->getDeclaringClass()->getProperty($rp->getName())->getDocComment()) { $instance->_context->comment = $comment; @@ -101,7 +90,7 @@ public function build(\Reflector $reflector, Context $context): array $instance->name = $rp->getName(); } $instance->required = !$nullable; - $context = new Context(['nested' => $this], $context); + $context = new Context(['nested' => $this, 'reflector' => $rp], $context); $context->comment = null; $instance->merge([new OA\Schema(['type' => $type, '_context' => $context])]); } @@ -109,12 +98,12 @@ public function build(\Reflector $reflector, Context $context): array } } } - if (($rrt = $reflector->getReturnType()) && $rrt instanceof \ReflectionNamedType) { foreach ($annotations as $annotation) { if ($annotation instanceof OA\Property && Generator::isDefault($annotation->type)) { // pick up simple return types $annotation->type = $rrt->getName(); + $annotation->_context->reflector = $rrt; } } } @@ -122,51 +111,44 @@ public function build(\Reflector $reflector, Context $context): array } finally { Generator::$context = null; } - // merge backwards into parents... - $isParent = function (OA\AbstractAnnotation $annotation, OA\AbstractAnnotation $possibleParent): bool { + $isParent = function (OA\AbstractAnnotation $annotation, OA\AbstractAnnotation $possibleParent) : bool { // regular annotation hierarchy $explicitParent = null !== $possibleParent->matchNested($annotation) && !$annotation instanceof OA\Attachable; - - $isParentAllowed = false; + $isParentAllowed = \false; // support Attachable subclasses if ($isAttachable = $annotation instanceof OA\Attachable) { - if (!$isParentAllowed = (null === $annotation->allowedParents())) { + if (!($isParentAllowed = null === $annotation->allowedParents())) { // check for allowed parents foreach ($annotation->allowedParents() as $allowedParent) { if ($possibleParent instanceof $allowedParent) { - $isParentAllowed = true; + $isParentAllowed = \true; break; } } } } - // Attachables can always be nested (unless explicitly restricted) - return ($isAttachable && $isParentAllowed) - || ($annotation->getRoot() !== $possibleParent->getRoot() && $explicitParent); + return $isAttachable && $isParentAllowed || $annotation->getRoot() !== $possibleParent->getRoot() && $explicitParent; }; - $annotationsWithoutParent = []; foreach ($annotations as $index => $annotation) { - $mergedIntoParent = false; - + $mergedIntoParent = \false; for ($ii = 0; $ii < count($annotations); ++$ii) { if ($ii === $index) { continue; } $possibleParent = $annotations[$ii]; if ($isParent($annotation, $possibleParent)) { - $mergedIntoParent = true; // + $mergedIntoParent = \true; + // $possibleParent->merge([$annotation]); } } - if (!$mergedIntoParent) { $annotationsWithoutParent[] = $annotation; } } - return $annotationsWithoutParent; } } diff --git a/vendor/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php similarity index 78% rename from vendor/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php rename to vendor/prefixed/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php index 4d5b7c5..6d5a036 100644 --- a/vendor/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/ComposerAutoloaderScanner.php @@ -1,13 +1,12 @@ - */ - public function scan(array $namespaces): array + public function scan(array $namespaces) : array { $units = []; - if ($autoloader = $this->getComposerAutoloader()) { + if ($autoloader = static::getComposerAutoloader()) { foreach (array_keys($autoloader->getClassMap()) as $unit) { foreach ($namespaces as $namespace) { if (0 === strpos($unit, $namespace)) { @@ -36,18 +35,15 @@ public function scan(array $namespaces): array } } } - return $units; } - - public static function getComposerAutoloader(): ?ClassLoader + public static function getComposerAutoloader() : ?ClassLoader { foreach (spl_autoload_functions() as $fkt) { if (is_array($fkt) && $fkt[0] instanceof ClassLoader) { return $fkt[0]; } } - return null; } } diff --git a/vendor/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php similarity index 74% rename from vendor/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php rename to vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php index 59bbe73..5dc1b9d 100644 --- a/vendor/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockAnnotationFactory.php @@ -1,49 +1,42 @@ -docBlockParser = $docBlockParser ?: new DocBlockParser(); } - - public function isSupported(): bool + public function isSupported() : bool { return DocBlockParser::isEnabled(); } - - public function setGenerator(Generator $generator) + public function setGenerator(Generator $generator) : self { $this->generator = $generator; - $this->docBlockParser->setAliases($generator->getAliases()); - return $this; } - - public function build(\Reflector $reflector, Context $context): array + public function build(\Reflector $reflector, Context $context) : array { $aliases = $this->generator ? $this->generator->getAliases() : []; - if (method_exists($reflector, 'getShortName') && method_exists($reflector, 'getName')) { $aliases[strtolower($reflector->getShortName())] = $reflector->getName(); } - if ($context->with('scanned')) { $details = $context->scanned; foreach ($details['uses'] as $alias => $name) { @@ -55,23 +48,20 @@ public function build(\Reflector $reflector, Context $context): array } } $this->docBlockParser->setAliases($aliases); - if (method_exists($reflector, 'getDocComment') && ($comment = $reflector->getDocComment())) { $annotations = []; foreach ($this->docBlockParser->fromComment($comment, $context) as $instance) { if ($instance instanceof OA\AbstractAnnotation) { $annotations[] = $instance; } else { - if ($context->is('other') === false) { + if ($context->is('other') === \false) { $context->other = []; } $context->other[] = $instance; } } - return $annotations; } - return []; } } diff --git a/vendor/zircote/swagger-php/src/Analysers/DocBlockParser.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php similarity index 66% rename from vendor/zircote/swagger-php/src/Analysers/DocBlockParser.php rename to vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php index a4045fc..dc8e728 100644 --- a/vendor/zircote/swagger-php/src/Analysers/DocBlockParser.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php @@ -1,23 +1,24 @@ - $aliases */ @@ -25,28 +26,25 @@ public function __construct(array $aliases = []) { if (DocBlockParser::isEnabled()) { $docParser = new DocParser(); - $docParser->setIgnoreNotImportedAnnotations(true); + $docParser->setIgnoreNotImportedAnnotations(\true); $docParser->setImports($aliases); $this->docParser = $docParser; } } - /** * Check if we can process annotations. */ - public static function isEnabled(): bool + public static function isEnabled() : bool { return class_exists('Doctrine\\Common\\Annotations\\DocParser'); } - /** * @param array $aliases */ - public function setAliases(array $aliases): void + public function setAliases(array $aliases) : void { $this->docParser->setImports($aliases); } - /** * Use doctrine to parse the comment block and return the detected annotations. * @@ -54,33 +52,28 @@ public function setAliases(array $aliases): void * * @return array */ - public function fromComment(string $comment, Context $context): array + public function fromComment(string $comment, Context $context) : array { $context->comment = $comment; - try { Generator::$context = $context; - if ($context->is('annotations') === false) { + if ($context->is('annotations') === \false) { $context->annotations = []; } - return $this->docParser->parse($comment, $context->getDebugLocation()); - } catch (\Exception $e) { - if (preg_match('/^(.+) at position ([0-9]+) in ' . preg_quote((string) $context, '/') . '\.$/', $e->getMessage(), $matches)) { + } catch (\Exception $exception) { + if (preg_match('/^(.+) at position ([0-9]+) in ' . preg_quote((string) $context, '/') . '\\.$/', $exception->getMessage(), $matches)) { $errorMessage = $matches[1]; $errorPos = (int) $matches[2]; $atPos = strpos($comment, '@'); $context->line -= substr_count($comment, "\n", $atPos + $errorPos) + 1; $lines = explode("\n", substr($comment, $atPos, $errorPos)); - $context->character = strlen(array_pop($lines)) + 1; // position starts at 0 character starts at 1 - $context->logger->error($errorMessage . ' in ' . $context, ['exception' => $e]); + $context->character = strlen(array_pop($lines)) + 1; + // position starts at 0 character starts at 1 + $context->logger->error($errorMessage . ' in ' . $context, ['exception' => $exception]); } else { - $context->logger->error( - $e->getMessage() . ($context->filename ? ('; file=' . $context->filename) : ''), - ['exception' => $e] - ); + $context->logger->error($exception->getMessage() . ($context->filename ? '; file=' . $context->filename : ''), ['exception' => $exception]); } - return []; } finally { Generator::$context = null; diff --git a/vendor/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php similarity index 68% rename from vendor/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php rename to vendor/prefixed/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php index b677207..0ee1817 100644 --- a/vendor/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php @@ -1,18 +1,17 @@ - $annotationFactories */ @@ -42,113 +39,71 @@ public function __construct(array $annotationFactories = []) throw new OpenApiException('No suitable annotation factory found. At least one of "Doctrine Annotations" or PHP 8.1 are required'); } } - - public function setGenerator(Generator $generator): void + public function setGenerator(Generator $generator) : void { $this->generator = $generator; - foreach ($this->annotationFactories as $annotationFactory) { $annotationFactory->setGenerator($generator); } } - - public function fromFile(string $filename, Context $context): Analysis + public function fromFile(string $filename, Context $context) : Analysis { $scanner = new TokenScanner(); $fileDetails = $scanner->scanFile($filename); - $analysis = new Analysis([], $context); foreach ($fileDetails as $fqdn => $details) { $this->analyzeFqdn($fqdn, $analysis, $details); } - return $analysis; } - - public function fromFqdn(string $fqdn, Analysis $analysis): Analysis + public function fromFqdn(string $fqdn, Analysis $analysis) : Analysis { $fqdn = ltrim($fqdn, '\\'); - $rc = new \ReflectionClass($fqdn); - if (!$filename = $rc->getFileName()) { + if (!($filename = $rc->getFileName())) { return $analysis; } - $scanner = new TokenScanner(); $fileDetails = $scanner->scanFile($filename); - $this->analyzeFqdn($fqdn, $analysis, $fileDetails[$fqdn]); - return $analysis; } - - protected function analyzeFqdn(string $fqdn, Analysis $analysis, array $details): Analysis + protected function analyzeFqdn(string $fqdn, Analysis $analysis, array $details) : Analysis { - if (!class_exists($fqdn) && !interface_exists($fqdn) && !trait_exists($fqdn) && (!function_exists('enum_exists') || !enum_exists($fqdn))) { + if (!class_exists($fqdn) && !interface_exists($fqdn) && !trait_exists($fqdn) && (!function_exists('enum_exists') || !class_exists($fqdn))) { $analysis->context->logger->warning('Skipping unknown ' . $fqdn); - return $analysis; } - $rc = new \ReflectionClass($fqdn); - $contextType = $rc->isInterface() ? 'interface' : ($rc->isTrait() ? 'trait' : ((method_exists($rc, 'isEnum') && $rc->isEnum()) ? 'enum' : 'class')); - $context = new Context([ - $contextType => $rc->getShortName(), - 'namespace' => $rc->getNamespaceName() ?: null, - 'uses' => $details['uses'], - 'comment' => $rc->getDocComment() ?: null, - 'filename' => $rc->getFileName() ?: null, - 'line' => $rc->getStartLine(), - 'annotations' => [], - 'scanned' => $details, - ], $analysis->context); - - $definition = [ - $contextType => $rc->getShortName(), - 'extends' => null, - 'implements' => [], - 'traits' => [], - 'properties' => [], - 'methods' => [], - 'context' => $context, - ]; - $normaliseClass = fn (string $name): string => '\\' . ltrim($name, '\\'); + $contextType = $rc->isInterface() ? 'interface' : ($rc->isTrait() ? 'trait' : (method_exists($rc, 'isEnum') && (method_exists($rc, 'isEnum') ? $rc->isEnum() : false) ? 'enum' : 'class')); + $context = new Context([$contextType => $rc->getShortName(), 'namespace' => $rc->getNamespaceName() ?: null, 'uses' => $details['uses'], 'comment' => $rc->getDocComment() ?: null, 'filename' => $rc->getFileName() ?: null, 'line' => $rc->getStartLine(), 'annotations' => [], 'scanned' => $details, 'reflector' => $rc], $analysis->context); + $definition = [$contextType => $rc->getShortName(), 'extends' => null, 'implements' => [], 'traits' => [], 'properties' => [], 'methods' => [], 'context' => $context]; + $normaliseClass = function (string $name) : string { + return '\\' . ltrim($name, '\\'); + }; if ($parentClass = $rc->getParentClass()) { $definition['extends'] = $normaliseClass($parentClass->getName()); } $definition[$contextType === 'class' ? 'implements' : 'extends'] = array_map($normaliseClass, $details['interfaces']); $definition['traits'] = array_map($normaliseClass, $details['traits']); - foreach ($this->annotationFactories as $annotationFactory) { $analysis->addAnnotations($annotationFactory->build($rc, $context), $context); } - foreach ($rc->getMethods() as $method) { if (in_array($method->name, $details['methods'])) { - $definition['methods'][$method->getName()] = $ctx = new Context([ - 'method' => $method->getName(), - 'comment' => $method->getDocComment() ?: null, - 'filename' => $method->getFileName() ?: null, - 'line' => $method->getStartLine(), - 'annotations' => [], - ], $context); + $definition['methods'][$method->getName()] = $ctx = new Context(['method' => $method->getName(), 'comment' => $method->getDocComment() ?: null, 'filename' => $method->getFileName() ?: null, 'line' => $method->getStartLine(), 'annotations' => [], 'reflector' => $method], $context); foreach ($this->annotationFactories as $annotationFactory) { $analysis->addAnnotations($annotationFactory->build($method, $ctx), $ctx); } } } - foreach ($rc->getProperties() as $property) { if (in_array($property->name, $details['properties'])) { - $definition['properties'][$property->getName()] = $ctx = new Context([ - 'property' => $property->getName(), - 'comment' => $property->getDocComment() ?: null, - 'annotations' => [], - ], $context); + $definition['properties'][$property->getName()] = $ctx = new Context(['property' => $property->getName(), 'comment' => $property->getDocComment() ?: null, 'annotations' => [], 'reflector' => $property], $context); if ($property->isStatic()) { - $ctx->static = true; + $ctx->static = \true; } - if ($type = $property->getType()) { + if ($type = method_exists($property, 'getType') ? $property->getType() : null) { $ctx->nullable = $type->allowsNull(); if ($type instanceof \ReflectionNamedType) { $ctx->type = $type->getName(); @@ -163,14 +118,9 @@ protected function analyzeFqdn(string $fqdn, Analysis $analysis, array $details) } } } - foreach ($rc->getReflectionConstants() as $constant) { foreach ($this->annotationFactories as $annotationFactory) { - $definition['constants'][$constant->getName()] = $ctx = new Context([ - 'constant' => $constant->getName(), - 'comment' => $constant->getDocComment() ?: null, - 'annotations' => [], - ], $context); + $definition['constants'][$constant->getName()] = $ctx = new Context(['constant' => $constant->getName(), 'comment' => $constant->getDocComment() ?: null, 'annotations' => [], 'reflector' => $constant], $context); foreach ($annotationFactory->build($constant, $ctx) as $annotation) { if ($annotation instanceof OA\Property) { if (Generator::isDefault($annotation->property)) { @@ -184,10 +134,8 @@ protected function analyzeFqdn(string $fqdn, Analysis $analysis, array $details) } } } - $addDefinition = 'add' . ucfirst($contextType) . 'Definition'; $analysis->{$addDefinition}($definition); - return $analysis; } } diff --git a/vendor/zircote/swagger-php/src/Analysers/TokenScanner.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/TokenScanner.php similarity index 71% rename from vendor/zircote/swagger-php/src/Analysers/TokenScanner.php rename to vendor/prefixed/zircote/swagger-php/src/Analysers/TokenScanner.php index 3f4896a..281c765 100644 --- a/vendor/zircote/swagger-php/src/Analysers/TokenScanner.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/TokenScanner.php @@ -1,21 +1,20 @@ -createForNewestSupportedVersion(); try { $stmts = $parser->parse(file_get_contents($filename)); - } catch (Error $e) { - throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); + } catch (Error $error) { + throw new \RuntimeException($error->getMessage(), $error->getCode(), $error); } - $result = []; $result += $this->collect_stmts($stmts, ''); foreach ($stmts as $stmt) { if ($stmt instanceof Namespace_) { $namespace = (string) $stmt->name; - $result += $this->collect_stmts($stmt->stmts, $namespace); } } - return $result; } - - protected function collect_stmts(array $stmts, string $namespace): array + protected function collect_stmts(array $stmts, string $namespace) : array { /** @var array $uses */ $uses = []; - $resolve = function (string $name) use ($namespace, &$uses) { + $resolve = function (string $name) use($namespace, &$uses) { if (array_key_exists($name, $uses)) { return $uses[$name]; } - return $namespace . '\\' . $name; }; - $details = function () use (&$uses) { - return [ - 'uses' => $uses, - 'interfaces' => [], - 'traits' => [], - 'enums' => [], - 'methods' => [], - 'properties' => [], - ]; + $details = function () use(&$uses) : array { + return ['uses' => $uses, 'interfaces' => [], 'traits' => [], 'enums' => [], 'methods' => [], 'properties' => []]; }; $result = []; foreach ($stmts as $stmt) { @@ -87,50 +74,38 @@ protected function collect_stmts(array $stmts, string $namespace): array break; } } - return $result; } - - protected function collect_uses(Use_ $stmt): array + protected function collect_uses(Use_ $stmt) : array { $uses = []; - foreach ($stmt->uses as $use) { $uses[(string) $use->getAlias()] = (string) $use->name; } - return $uses; } - - protected function collect_classlike(ClassLike $stmt, array $details, callable $resolve): array + protected function collect_classlike(ClassLike $stmt, array $details, callable $resolve) : array { foreach ($stmt->getProperties() as $properties) { foreach ($properties->props as $prop) { $details['properties'][] = (string) $prop->name; } } - foreach ($stmt->getMethods() as $method) { $details['methods'][] = (string) $method->name; } - foreach ($stmt->getTraitUses() as $traitUse) { foreach ($traitUse->traits as $trait) { $details['traits'][] = $resolve((string) $trait); } } - - return [ - $resolve($stmt->name->name) => $details, - ]; + return [$resolve($stmt->name->name) => $details]; } - - protected function collect_class(Class_ $stmt, array $details, callable $resolve): array + protected function collect_class(Class_ $stmt, array $details, callable $resolve) : array { foreach ($stmt->implements as $implement) { $details['interfaces'][] = $resolve((string) $implement); } - // promoted properties if ($ctor = $stmt->getMethod('__construct')) { foreach ($ctor->getParams() as $param) { @@ -139,16 +114,13 @@ protected function collect_class(Class_ $stmt, array $details, callable $resolve } } } - return $this->collect_classlike($stmt, $details, $resolve); } - - protected function collect_interface(Interface_ $stmt, array $details, callable $resolve): array + protected function collect_interface(Interface_ $stmt, array $details, callable $resolve) : array { foreach ($stmt->extends as $extend) { $details['interfaces'][] = $resolve((string) $extend); } - return $this->collect_classlike($stmt, $details, $resolve); } } diff --git a/vendor/zircote/swagger-php/src/Analysis.php b/vendor/prefixed/zircote/swagger-php/src/Analysis.php similarity index 86% rename from vendor/zircote/swagger-php/src/Analysis.php rename to vendor/prefixed/zircote/swagger-php/src/Analysis.php index 8451069..46f79bc 100644 --- a/vendor/zircote/swagger-php/src/Analysis.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysis.php @@ -1,13 +1,12 @@ -annotations = new \SplObjectStorage(); $this->context = $context; - $this->addAnnotations($annotations, $context); } - - public function addAnnotation(object $annotation, Context $context): void + public function addAnnotation(object $annotation, Context $context) : void { if ($this->annotations->contains($annotation)) { return; } - $context->ensureRoot($this->context); - if ($annotation instanceof OA\OpenApi) { $this->openapi = $this->openapi ?: $annotation; } else { - if ($context->is('annotations') === false) { + if ($context->is('annotations') === \false) { $context->annotations = []; } - - if (in_array($annotation, $context->annotations, true) === false) { + if (in_array($annotation, $context->annotations, \true) === \false) { $context->annotations[] = $annotation; } } @@ -92,39 +90,33 @@ public function addAnnotation(object $annotation, Context $context): void } } } - - public function addAnnotations(array $annotations, Context $context): void + public function addAnnotations(array $annotations, Context $context) : void { foreach ($annotations as $annotation) { $this->addAnnotation($annotation, $context); } } - - public function addClassDefinition(array $definition): void + public function addClassDefinition(array $definition) : void { $class = $definition['context']->fullyQualifiedName($definition['class']); $this->classes[$class] = $definition; } - - public function addInterfaceDefinition(array $definition): void + public function addInterfaceDefinition(array $definition) : void { $interface = $definition['context']->fullyQualifiedName($definition['interface']); $this->interfaces[$interface] = $definition; } - - public function addTraitDefinition(array $definition): void + public function addTraitDefinition(array $definition) : void { $trait = $definition['context']->fullyQualifiedName($definition['trait']); $this->traits[$trait] = $definition; } - - public function addEnumDefinition(array $definition): void + public function addEnumDefinition(array $definition) : void { $enum = $definition['context']->fullyQualifiedName($definition['enum']); $this->enums[$enum] = $definition; } - - public function addAnalysis(Analysis $analysis): void + public function addAnalysis(Analysis $analysis) : void { foreach ($analysis->annotations as $annotation) { $this->addAnnotation($annotation, $analysis->annotations[$annotation]); @@ -137,7 +129,6 @@ public function addAnalysis(Analysis $analysis): void $this->openapi = $analysis->openapi; } } - /** * Get all subclasses of the given parent class. * @@ -145,7 +136,7 @@ public function addAnalysis(Analysis $analysis): void * * @return array map of class => definition pairs of sub-classes */ - public function getSubClasses(string $parent): array + public function getSubClasses(string $parent) : array { $definitions = []; foreach ($this->classes as $class => $classDefinition) { @@ -154,10 +145,8 @@ public function getSubClasses(string $parent): array $definitions = array_merge($definitions, $this->getSubClasses($class)); } } - return $definitions; } - /** * Get a list of all super classes for the given class. * @@ -166,29 +155,24 @@ public function getSubClasses(string $parent): array * * @return array map of class => definition pairs of parent classes */ - public function getSuperClasses(string $class, bool $direct = false): array + public function getSuperClasses(string $class, bool $direct = \false) : array { $classDefinition = $this->classes[$class] ?? null; if (!$classDefinition || empty($classDefinition['extends'])) { // unknown class, or no inheritance return []; } - $extends = $classDefinition['extends']; $extendsDefinition = $this->classes[$extends] ?? null; if (!$extendsDefinition) { return []; } - $parentDetails = [$extends => $extendsDefinition]; - if ($direct) { return $parentDetails; } - return array_merge($parentDetails, $this->getSuperClasses($extends)); } - /** * Get the list of interfaces used by the given class or by classes which it extends. * @@ -197,12 +181,11 @@ public function getSuperClasses(string $class, bool $direct = false): array * * @return array map of class => definition pairs of interfaces */ - public function getInterfacesOfClass(string $class, bool $direct = false): array + public function getInterfacesOfClass(string $class, bool $direct = \false) : array { $classes = $direct ? [] : array_keys($this->getSuperClasses($class)); // add self $classes[] = $class; - $definitions = []; foreach ($classes as $clazz) { if (isset($this->classes[$clazz])) { @@ -216,10 +199,9 @@ public function getInterfacesOfClass(string $class, bool $direct = false): array } } } - if (!$direct) { // expand recursively for interfaces extending other interfaces - $collect = function ($interfaces, $cb) use (&$definitions): void { + $collect = function ($interfaces, $cb) use(&$definitions) : void { foreach ($interfaces as $interface) { if (isset($this->interfaces[$interface]['extends'])) { $cb($this->interfaces[$interface]['extends'], $cb); @@ -231,10 +213,8 @@ public function getInterfacesOfClass(string $class, bool $direct = false): array }; $collect(array_keys($definitions), $collect); } - return $definitions; } - /** * Get the list of traits used by the given class/trait or by classes which it extends. * @@ -243,12 +223,11 @@ public function getInterfacesOfClass(string $class, bool $direct = false): array * * @return array map of class => definition pairs of traits */ - public function getTraitsOfClass(string $source, bool $direct = false): array + public function getTraitsOfClass(string $source, bool $direct = \false) : array { $sources = $direct ? [] : array_keys($this->getSuperClasses($source)); // add self $sources[] = $source; - $definitions = []; foreach ($sources as $sourze) { if (isset($this->classes[$sourze]) || isset($this->traits[$sourze])) { @@ -262,10 +241,9 @@ public function getTraitsOfClass(string $source, bool $direct = false): array } } } - if (!$direct) { // expand recursively for traits using other traits - $collect = function ($traits, $cb) use (&$definitions): void { + $collect = function ($traits, $cb) use(&$definitions) : void { foreach ($traits as $trait) { if (isset($this->traits[$trait]['traits'])) { $cb($this->traits[$trait]['traits'], $cb); @@ -277,42 +255,36 @@ public function getTraitsOfClass(string $source, bool $direct = false): array }; $collect(array_keys($definitions), $collect); } - return $definitions; } - /** * @param class-string|array $classes one or more class names * @param bool $strict in non-strict mode child classes are also detected * * @return OA\AbstractAnnotation[] */ - public function getAnnotationsOfType($classes, bool $strict = false): array + public function getAnnotationsOfType($classes, bool $strict = \false) : array { $unique = new \SplObjectStorage(); $annotations = []; - foreach ((array) $classes as $class) { /** @var OA\AbstractAnnotation $annotation */ foreach ($this->annotations as $annotation) { - if ($annotation instanceof $class && (!$strict || ($annotation->isRoot($class) && !$unique->contains($annotation)))) { + if ($annotation instanceof $class && (!$strict || $annotation->isRoot($class) && !$unique->contains($annotation))) { $unique->attach($annotation); $annotations[] = $annotation; } } } - return $annotations; } - /** * @param string $fqdn the source class/interface/trait */ - public function getSchemaForSource(string $fqdn): ?OA\Schema + public function getSchemaForSource(string $fqdn) : ?OA\Schema { return $this->getAnnotationForSource($fqdn, OA\Schema::class); } - /** * @template T of OA\AbstractAnnotation * @@ -320,10 +292,9 @@ public function getSchemaForSource(string $fqdn): ?OA\Schema * @param class-string $class * @return T|null */ - public function getAnnotationForSource(string $fqdn, string $class): ?OA\AbstractAnnotation + public function getAnnotationForSource(string $fqdn, string $class) : ?OA\AbstractAnnotation { $fqdn = '\\' . ltrim($fqdn, '\\'); - foreach ([$this->classes, $this->interfaces, $this->traits, $this->enums] as $definitions) { if (array_key_exists($fqdn, $definitions)) { $definition = $definitions[$fqdn]; @@ -337,30 +308,26 @@ public function getAnnotationForSource(string $fqdn, string $class): ?OA\Abstrac } } } - return null; } - - public function getContext(object $annotation): ?Context + public function getContext(object $annotation) : ?Context { if ($annotation instanceof OA\AbstractAnnotation) { return $annotation->_context; } - if ($this->annotations->contains($annotation) === false) { + if ($this->annotations->contains($annotation) === \false) { throw new OpenApiException('Annotation not found'); } $context = $this->annotations[$annotation]; if ($context instanceof Context) { return $context; } - throw new OpenApiException('Annotation has no context - did you use addAnnotation()/addAnnotations()'); } - /** * Build an analysis with only the annotations that are merged into the OpenAPI annotation. */ - public function merged(): Analysis + public function merged() : Analysis { if (!$this->openapi instanceof OA\OpenApi) { throw new OpenApiException('No openapi target set. Run the MergeIntoOpenApi processor'); @@ -369,62 +336,53 @@ public function merged(): Analysis $this->openapi->_unmerged = []; $analysis = new Analysis([$this->openapi], $this->context); $this->openapi->_unmerged = $unmerged; - return $analysis; } - /** * Analysis with only the annotations that not merged. */ - public function unmerged(): Analysis + public function unmerged() : Analysis { return $this->split()->unmerged; } - /** * Split the annotation into two analysis. * One with annotations that are merged and one with annotations that are not merged. * * @return \stdClass {merged: Analysis, unmerged: Analysis} */ - public function split() + public function split() : \stdClass { $result = new \stdClass(); $result->merged = $this->merged(); $result->unmerged = new Analysis([], $this->context); foreach ($this->annotations as $annotation) { - if ($result->merged->annotations->contains($annotation) === false) { + if ($result->merged->annotations->contains($annotation) === \false) { $result->unmerged->annotations->attach($annotation, $this->annotations[$annotation]); } } - return $result; } - /** * Apply the processor(s). * * @param callable|array $processors One or more processors */ - public function process($processors = null): void + public function process($processors = null) : void { - if (false === is_array($processors) && is_callable($processors)) { + if (\false === is_array($processors) && is_callable($processors)) { $processors = [$processors]; } - foreach ($processors as $processor) { $processor($this); } } - - public function validate(): bool + public function validate() : bool { if ($this->openapi instanceof OA\OpenApi) { return $this->openapi->validate(); } - $this->context->logger->warning('No openapi target set. Run the MergeIntoOpenApi processor before validate()'); - - return false; + return \false; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php similarity index 85% rename from vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php index 60d21ec..ac3fabc 100644 --- a/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php @@ -1,18 +1,17 @@ - */ public $x = Generator::UNDEFINED; - /** * Arbitrary attachables for this annotation. * These will be ignored but can be used for custom processing. @@ -34,26 +32,22 @@ abstract class AbstractAnnotation implements \JsonSerializable * @var array */ public $attachables = Generator::UNDEFINED; - /** * @var Context|null */ public $_context; - /** * Annotations that couldn't be merged by mapping or postprocessing. * * @var array */ public $_unmerged = []; - /** * The properties which are required by [the spec](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md). * * @var string[] */ public static $_required = []; - /** * Specify the type of the property. * @@ -67,32 +61,29 @@ abstract class AbstractAnnotation implements \JsonSerializable * @var array> */ public static $_types = []; - /** * Declarative mapping of Annotation types to properties. + * * Examples: - * Info::clas => 'info', // Set @OA\Info annotation as the info property. - * Parameter::clas => ['parameters'], // Append @OA\Parameter annotations the parameters array. - * PathItem::clas => ['paths', 'path'], // Append @OA\PathItem annotations the paths array and use path as key. + * Info::clas => 'info', // Set @OA\Info annotation as the info property. + * Parameter::clas => ['parameters'], // Append @OA\Parameter annotations the parameters array. + * PathItem::clas => ['paths', 'path'], // Append @OA\PathItem annotations the paths array and use path as key. * * @var array,string|array> */ public static $_nested = []; - /** * Reverse mapping of $_nested with the allowed parent annotations. * * @var array> */ public static $_parents = []; - /** * List of properties are blacklisted from the JSON output. * * @var array */ public static $_blacklist = ['_context', '_unmerged', '_analysis', 'attachables']; - public function __construct(array $properties) { if (isset($properties['_context'])) { @@ -101,13 +92,11 @@ public function __construct(array $properties) } elseif (Generator::$context) { $this->_context = Generator::$context; } else { - $this->_context = new Context(['generated' => true]); + $this->_context = new Context(['generated' => \true]); } - - if ($this->_context->is('annotations') === false) { + if ($this->_context->is('annotations') === \false) { $this->_context->annotations = []; } - $this->_context->annotations[] = $this; $nestedContext = new Context(['nested' => $this], $this->_context); foreach ($properties as $property => $value) { @@ -140,7 +129,6 @@ public function __construct(array $properties) } } } - if ($this instanceof OpenApi) { if ($this->_context->root()->version) { // override via `Generator::setVersion()` @@ -150,14 +138,12 @@ public function __construct(array $properties) } } } - public function __get(string $property) { $properties = get_object_vars($this); $this->_context->logger->warning('Property "' . $property . '" doesn\'t exist in a ' . $this->identity() . ', existing properties: "' . implode('", "', array_keys($properties)) . '" in ' . $this->_context); } - - public function __set(string $property, $value): void + public function __set(string $property, $value) : void { $fields = get_object_vars($this); foreach (static::$_blacklist as $_property) { @@ -165,7 +151,6 @@ public function __set(string $property, $value): void } $this->_context->logger->warning('Ignoring unexpected property "' . $property . '" for ' . $this->identity() . ', expecting "' . implode('", "', array_keys($fields)) . '" in ' . $this->_context); } - /** * Merge given annotations to their mapped properties configured in static::$_nested. * @@ -176,13 +161,12 @@ public function __set(string $property, $value): void * * @return AbstractAnnotation[] The unmerged annotations */ - public function merge(array $annotations, bool $ignore = false): array + public function merge(array $annotations, bool $ignore = \false) : array { $unmerged = []; $nestedContext = new Context(['nested' => $this], $this->_context); - foreach ($annotations as $annotation) { - $mapped = false; + $mapped = \false; if ($details = $this->matchNested($annotation)) { $property = $details->value; if (is_array($property)) { @@ -191,11 +175,11 @@ public function merge(array $annotations, bool $ignore = false): array $this->{$property} = []; } $this->{$property}[] = $this->nested($annotation, $nestedContext); - $mapped = true; + $mapped = \true; } elseif (Generator::isDefault($this->{$property})) { // ignore duplicate nested if only one expected $this->{$property} = $this->nested($annotation, $nestedContext); - $mapped = true; + $mapped = \true; } } if (!$mapped) { @@ -207,17 +191,15 @@ public function merge(array $annotations, bool $ignore = false): array $this->_unmerged[] = $this->nested($annotation, $nestedContext); } } - return $unmerged; } - /** * Merge the properties from the given object into this annotation. * Prevents overwriting properties that are already configured. * * @param object $object */ - public function mergeProperties($object): void + public function mergeProperties($object) : void { $currentValues = get_object_vars($this); foreach ($object as $property => $value) { @@ -248,33 +230,28 @@ public function mergeProperties($object): void } } } - /** * Generate the documentation in YAML format. * * @param int-mask-of|null $flags A bit field of PARSE_* constants to customize the YAML parser behavior */ - public function toYaml(?int $flags = null): string + public function toYaml(?int $flags = null) : string { if ($flags === null) { $flags = Yaml::DUMP_OBJECT_AS_MAP ^ Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE; } - - return Yaml::dump(json_decode($this->toJson(JSON_INVALID_UTF8_IGNORE)), 10, 2, $flags); + return Yaml::dump(json_decode($this->toJson(\JSON_INVALID_UTF8_IGNORE)), 10, 2, $flags); } - /** * Generate the documentation in JSON format. */ - public function toJson(?int $flags = null): string + public function toJson(?int $flags = null) : string { if ($flags === null) { - $flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_IGNORE; + $flags = \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE | \JSON_INVALID_UTF8_IGNORE; } - return json_encode($this, $flags); } - public function __debugInfo() { $properties = []; @@ -283,10 +260,8 @@ public function __debugInfo() $properties[$property] = $value; } } - return $properties; } - /** * @return mixed */ @@ -294,26 +269,22 @@ public function __debugInfo() public function jsonSerialize() { $data = new \stdClass(); - // Strip undefined values. foreach (get_object_vars($this) as $property => $value) { if (!Generator::isDefault($value)) { $data->{$property} = $value; } } - // Strip properties that are for internal (swagger-php) use. foreach (static::$_blacklist as $property) { unset($data->{$property}); } - // Correct empty array to empty objects. foreach (static::$_types as $property => $type) { if ($type === 'object' && is_array($data->{$property}) && $data->{$property} === []) { $data->{$property} = new \stdClass(); } } - // Inject vendor properties. unset($data->x); if (is_array($this->x)) { @@ -322,7 +293,6 @@ public function jsonSerialize() $data->{$prefixed} = $value; } } - // Map nested keys foreach (static::$_nested as $nested) { if (is_string($nested) || count($nested) === 1) { @@ -335,7 +305,7 @@ public function jsonSerialize() $keyField = $nested[1]; $object = new \stdClass(); foreach ($this->{$property} as $key => $item) { - if (is_numeric($key) === false && is_array($item)) { + if (is_numeric($key) === \false && is_array($item)) { $object->{$key} = $item; } else { $key = $item->{$keyField}; @@ -347,27 +317,25 @@ public function jsonSerialize() } $data->{$property} = $object; } - // $ref if (isset($data->ref)) { // Only specific https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/versions/3.1.0.md#reference-object $ref = ['$ref' => $data->ref]; - if ($this->_context->isVersion(OpenApi::VERSION_3_1_0)) { + if ($this->_context->isVersion('3.1.x')) { foreach (['summary', 'description'] as $prop) { if (property_exists($data, $prop)) { $ref[$prop] = $data->{$prop}; } } } - if (property_exists($this, 'nullable') && $this->nullable === true) { + if (property_exists($this, 'nullable') && $this->nullable === \true) { $ref = ['oneOf' => [$ref]]; - if ($this->_context->isVersion(OpenApi::VERSION_3_1_0)) { + if ($this->_context->isVersion('3.1.x')) { $ref['oneOf'][] = ['type' => 'null']; } else { $ref['nullable'] = $data->nullable; } unset($data->ref, $data->nullable); - // preserve other properties foreach (get_object_vars($data) as $property => $value) { $ref[$property] = $value; @@ -375,21 +343,30 @@ public function jsonSerialize() } $data = (object) $ref; } - - if ($this->_context->isVersion(OpenApi::VERSION_3_0_0)) { + if ($this->_context->isVersion('3.0.x')) { if (isset($data->exclusiveMinimum) && is_numeric($data->exclusiveMinimum)) { $data->minimum = $data->exclusiveMinimum; - $data->exclusiveMinimum = true; + $data->exclusiveMinimum = \true; } if (isset($data->exclusiveMaximum) && is_numeric($data->exclusiveMaximum)) { $data->maximum = $data->exclusiveMaximum; - $data->exclusiveMaximum = true; + $data->exclusiveMaximum = \true; + } + if (isset($data->type) && is_array($data->type)) { + if (in_array('null', $data->type)) { + $data->nullable = \true; + $data->type = array_filter($data->type, function ($v) : bool { + return $v !== 'null'; + }); + if (1 === count($data->type)) { + $data->type = array_pop($data->type); + } + } } } - - if ($this->_context->isVersion(OpenApi::VERSION_3_1_0)) { + if ($this->_context->isVersion('3.1.x')) { if (isset($data->nullable)) { - if (true === $data->nullable) { + if (\true === $data->nullable) { if (isset($data->oneOf)) { $data->oneOf[] = ['type' => 'null']; } elseif (isset($data->anyOf)) { @@ -403,29 +380,25 @@ public function jsonSerialize() } unset($data->nullable); } - if (isset($data->minimum) && isset($data->exclusiveMinimum)) { - if (true === $data->exclusiveMinimum) { + if (\true === $data->exclusiveMinimum) { $data->exclusiveMinimum = $data->minimum; unset($data->minimum); - } elseif (false === $data->exclusiveMinimum) { + } elseif (\false === $data->exclusiveMinimum) { unset($data->exclusiveMinimum); } } - if (isset($data->maximum) && isset($data->exclusiveMaximum)) { - if (true === $data->exclusiveMaximum) { + if (\true === $data->exclusiveMaximum) { $data->exclusiveMaximum = $data->maximum; unset($data->maximum); - } elseif (false === $data->exclusiveMaximum) { + } elseif (\false === $data->exclusiveMaximum) { unset($data->exclusiveMaximum); } } } - return $data; } - /** * Validate annotation tree, and log notices & warnings. * @@ -434,21 +407,18 @@ public function jsonSerialize() * @param string $ref Current ref path? * @param object $context a free-form context contains */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool { - if (in_array($this, $skip, true)) { - return true; + if (in_array($this, $skip, \true)) { + return \true; } - - $valid = true; - + $valid = \true; // Report orphaned annotations foreach ($this->_unmerged as $annotation) { if (!is_object($annotation)) { $this->_context->logger->warning('Unexpected type: "' . gettype($annotation) . '" in ' . $this->identity() . '->_unmerged, expecting a Annotation object'); break; } - /** @var class-string $class */ $class = get_class($annotation); if ($details = $this->matchNested($annotation)) { @@ -465,9 +435,8 @@ public function validate(array $stack = [], array $skip = [], string $ref = '', } $this->_context->logger->warning($message . ' in ' . $annotation->_context); } - $valid = false; + $valid = \false; } - // Report conflicting key foreach (static::$_nested as $annotationClass => $nested) { if (is_string($nested) || count($nested) === 1) { @@ -480,7 +449,7 @@ public function validate(array $stack = [], array $skip = [], string $ref = '', $keys = []; $keyField = $nested[1]; foreach ($this->{$property} as $key => $item) { - if (is_array($item) && is_numeric($key) === false) { + if (is_array($item) && is_numeric($key) === \false) { $this->_context->logger->warning($this->identity() . '->' . $property . ' is an object literal, use nested ' . Util::shorten($annotationClass) . '() annotation(s) in ' . $this->_context); $keys[$key] = $item; } elseif (Generator::isDefault($item->{$keyField})) { @@ -492,7 +461,6 @@ public function validate(array $stack = [], array $skip = [], string $ref = '', } } } - if (property_exists($this, 'ref') && !Generator::isDefault($this->ref) && is_string($this->ref)) { if (substr($this->ref, 0, 2) === '#/' && $stack !== [] && $stack[0] instanceof OpenApi) { // Internal reference @@ -524,7 +492,6 @@ public function validate(array $stack = [], array $skip = [], string $ref = '', } } } - // Report invalid types foreach (static::$_types as $property => $type) { $value = $this->{$property}; @@ -532,12 +499,13 @@ public function validate(array $stack = [], array $skip = [], string $ref = '', continue; } if (is_string($type)) { - if ($this->validateType($type, $value) === false) { - $valid = false; + if ($this->validateType($type, $value) === \false) { + $valid = \false; $this->_context->logger->warning($this->identity() . '->' . $property . ' is a "' . gettype($value) . '", expecting a "' . $type . '" in ' . $this->_context); } - } elseif (is_array($type)) { // enum? - if (in_array($value, $type) === false) { + } elseif (is_array($type)) { + // enum? + if (in_array($value, $type) === \false) { $this->_context->logger->warning($this->identity() . '->' . $property . ' "' . $value . '" is invalid, expecting "' . implode('", "', $type) . '" in ' . $this->_context); } } else { @@ -545,34 +513,30 @@ public function validate(array $stack = [], array $skip = [], string $ref = '', } } $stack[] = $this; - if (property_exists($this, 'example') && property_exists($this, 'examples')) { if (!Generator::isDefault($this->example) && !Generator::isDefault($this->examples)) { - $valid = false; + $valid = \false; $this->_context->logger->warning($this->identity() . ': "example" and "examples" are mutually exclusive'); } } - return self::_validate($this, $stack, $skip, $ref, $context) && $valid; } - /** * Recursively validate all annotation properties. * * @param array|object $fields */ - private static function _validate($fields, array $stack, array $skip, string $baseRef, ?object $context): bool + private static function _validate($fields, array $stack, array $skip, string $baseRef, ?object $context) : bool { - $valid = true; + $valid = \true; $blacklist = []; if (is_object($fields)) { - if (in_array($fields, $skip, true)) { - return true; + if (in_array($fields, $skip, \true)) { + return \true; } $skip[] = $fields; $blacklist = property_exists($fields, '_blacklist') ? $fields::$_blacklist : []; } - foreach ($fields as $field => $value) { if ($value === null || is_scalar($value) || in_array($field, $blacklist)) { continue; @@ -581,24 +545,22 @@ private static function _validate($fields, array $stack, array $skip, string $ba if (is_object($value)) { if (method_exists($value, 'validate')) { if (!$value->validate($stack, $skip, $ref, $context)) { - $valid = false; + $valid = \false; } } elseif (!self::_validate($value, $stack, $skip, $ref, $context)) { - $valid = false; + $valid = \false; } } elseif (is_array($value) && !self::_validate($value, $stack, $skip, $ref, $context)) { - $valid = false; + $valid = \false; } } - return $valid; } - /** * Return a identity for easy debugging. * Example: "@OA\Get(path="/pets")". */ - public function identity(): string + public function identity() : string { $class = get_class($this); $properties = []; @@ -611,10 +573,8 @@ public function identity(): string } } } - return $this->_identity($properties); } - /** * Check if $other can be nested and if so return details about where/how. * @@ -627,10 +587,8 @@ public function matchNested($other) if ($other instanceof AbstractAnnotation && array_key_exists($root = $other->getRoot(), static::$_nested)) { return (object) ['key' => $root, 'value' => static::$_nested[$root]]; } - return null; } - /** * Get the root annotation. * @@ -639,33 +597,29 @@ public function matchNested($other) * * @return class-string the root annotation class in the OpenApi\\Annotations namespace */ - public function getRoot(): string + public function getRoot() : string { $class = get_class($this); - do { if (0 === strpos($class, 'OpenApi\\Annotations\\')) { break; } } while ($class = get_parent_class($class)); - return $class; } - /** * Match the annotation root. * * @param class-string $rootClass the root class to match */ - public function isRoot(string $rootClass): bool + public function isRoot(string $rootClass) : bool { return get_class($this) === $rootClass || $this->getRoot() === $rootClass; } - /** * Helper for generating the identity(). */ - protected function _identity(array $properties): string + protected function _identity(array $properties) : string { $fields = []; foreach ($properties as $property) { @@ -674,58 +628,51 @@ protected function _identity(array $properties): string $fields[] = $property . '=' . (is_string($value) ? '"' . $value . '"' : $value); } } - return Util::shorten(get_class($this)) . '(' . implode(',', $fields) . ')'; } - /** * Validates the matching of the property value to a annotation type. * * @param string $type The annotations property type * @param mixed $value The property value */ - private function validateType(string $type, $value): bool + private function validateType(string $type, $value) : bool { - if (substr($type, 0, 1) === '[' && substr($type, -1) === ']') { // Array of a specified type? - if ($this->validateType('array', $value) === false) { - return false; + if (substr($type, 0, 1) === '[' && substr($type, -1) === ']') { + // Array of a specified type? + if ($this->validateType('array', $value) === \false) { + return \false; } $itemType = substr($type, 1, -1); foreach ($value as $item) { - if ($this->validateType($itemType, $item) === false) { - return false; + if ($this->validateType($itemType, $item) === \false) { + return \false; } } - - return true; + return \true; } - if (is_subclass_of($type, AbstractAnnotation::class)) { $type = 'object'; } - return $this->validateDefaultTypes($type, $value); } - /** * Validates default Open Api types. * * @param string $type The property type * @param mixed $value The value to validate */ - private function validateDefaultTypes(string $type, $value): bool + private function validateDefaultTypes(string $type, $value) : bool { - if (str_contains($type, '|')) { + if (strpos($type, '|') !== false) { $types = explode('|', $type); foreach ($types as $type) { if ($this->validateDefaultTypes($type, $value)) { - return true; + return \true; } } - - return false; + return \false; } - switch ($type) { case 'string': return is_string($value); @@ -740,32 +687,29 @@ private function validateDefaultTypes(string $type, $value): bool case 'array': return $this->validateArrayType($value); case 'scheme': - return in_array($value, ['http', 'https', 'ws', 'wss'], true); + return in_array($value, ['http', 'https', 'ws', 'wss'], \true); default: throw new OpenApiException('Invalid type "' . $type . '"'); } } - /** * Validate array type. */ - private function validateArrayType($value): bool + private function validateArrayType($value) : bool { - if (is_array($value) === false) { - return false; + if (is_array($value) === \false) { + return \false; } $count = 0; foreach (array_keys($value) as $i) { // not a array, but a hash/map if ($count !== $i) { - return false; + return \false; } $count++; } - - return true; + return \true; } - /** * Wrap the context with a reference to the annotation it is nested in. * @@ -777,11 +721,9 @@ protected function nested(AbstractAnnotation $annotation, Context $nestedContext if (property_exists($annotation, '_context') && $annotation->_context === $this->_context) { $annotation->_context = $nestedContext; } - return $annotation; } - - protected function combine(...$args): array + protected function combine(...$args) : array { $combined = []; foreach ($args as $arg) { @@ -791,7 +733,8 @@ protected function combine(...$args): array $combined[] = $arg; } } - - return array_filter($combined, fn ($value) => !Generator::isDefault($value) && $value !== null); + return array_filter($combined, function ($value) : bool { + return !Generator::isDefault($value) && $value !== null; + }); } } diff --git a/vendor/prefixed/zircote/swagger-php/src/Annotations/AdditionalProperties.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/AdditionalProperties.php new file mode 100644 index 0000000..a12c906 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/AdditionalProperties.php @@ -0,0 +1,22 @@ + 'discriminator', Items::class => 'items', Property::class => ['properties', 'property'], ExternalDocumentation::class => 'externalDocs', Xml::class => 'xml', AdditionalProperties::class => 'additionalProperties', Attachable::class => ['attachables']]; +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Annotations/Attachable.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Attachable.php new file mode 100644 index 0000000..0f5ae7d --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Attachable.php @@ -0,0 +1,34 @@ +|null List of valid parent annotation classes. If null, the default nesting rules apply. + */ + public function allowedParents() : ?array + { + return null; + } +} diff --git a/vendor/zircote/swagger-php/src/Annotations/Components.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Components.php similarity index 73% rename from vendor/zircote/swagger-php/src/Annotations/Components.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Components.php index 3892569..4c246c1 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Components.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Components.php @@ -1,14 +1,13 @@ - */ public $schemas = Generator::UNDEFINED; - /** * Reusable Responses. * * @var Response[] */ public $responses = Generator::UNDEFINED; - /** * Reusable Parameters. * * @var Parameter[] */ public $parameters = Generator::UNDEFINED; - /** * Reusable Examples. * * @var array */ public $examples = Generator::UNDEFINED; - /** * Reusable Request Bodies. * * @var RequestBody[] */ public $requestBodies = Generator::UNDEFINED; - /** * Reusable Headers. * * @var Header[] */ public $headers = Generator::UNDEFINED; - /** * Reusable Security Schemes. * * @var SecurityScheme[] */ public $securitySchemes = Generator::UNDEFINED; - /** * Reusable Links. * * @var Link[] */ public $links = Generator::UNDEFINED; - /** * Reusable Callbacks. * * @var array */ public $callbacks = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_parents = [ - OpenApi::class, - ]; - + public static $_parents = [OpenApi::class]; /** * @inheritdoc */ - public static $_nested = [ - Response::class => ['responses', 'response'], - Parameter::class => ['parameters', 'parameter'], - PathParameter::class => ['parameters', 'parameter'], - RequestBody::class => ['requestBodies', 'request'], - Examples::class => ['examples', 'example'], - Header::class => ['headers', 'header'], - SecurityScheme::class => ['securitySchemes', 'securityScheme'], - Link::class => ['links', 'link'], - Schema::class => ['schemas', 'schema'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Response::class => ['responses', 'response'], Parameter::class => ['parameters', 'parameter'], PathParameter::class => ['parameters', 'parameter'], RequestBody::class => ['requestBodies', 'request'], Examples::class => ['examples', 'example'], Header::class => ['headers', 'header'], SecurityScheme::class => ['securitySchemes', 'securityScheme'], Link::class => ['links', 'link'], Schema::class => ['schemas', 'schema'], Attachable::class => ['attachables']]; /** * Returns a list of component annotation types. * * Each may be used as a root to resolve component refs */ - public static function componentTypes(): array + public static function componentTypes() : array { - return array_filter(array_keys(self::$_nested), fn ($value) => $value !== Attachable::class); + return array_filter(array_keys(self::$_nested), function (string $value) : bool { + return $value !== Attachable::class; + }); } - /** * Generate a #/components/... reference for the given annotation. * @@ -133,7 +107,7 @@ public static function componentTypes(): array * * @param AbstractAnnotation|string $component */ - public static function ref($component, bool $encode = true): string + public static function ref($component, bool $encode = \true) : string { if ($component instanceof AbstractAnnotation) { foreach (Components::$_nested as $type => $nested) { @@ -150,7 +124,6 @@ public static function ref($component, bool $encode = true): string $type = 'schemas'; $name = $component; } - return self::COMPONENTS_PREFIX . $type . '/' . ($encode ? Util::refEncode((string) $name) : $name); } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Contact.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Contact.php similarity index 68% rename from vendor/zircote/swagger-php/src/Annotations/Contact.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Contact.php index ecc2ced..b91fefb 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Contact.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Contact.php @@ -1,13 +1,12 @@ - 'string', - 'url' => 'string', - 'email' => 'string', - ]; - + public static $_types = ['name' => 'string', 'url' => 'string', 'email' => 'string']; /** * @inheritdoc */ - public static $_parents = [ - Info::class, - ]; - + public static $_parents = [Info::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; + public static $_nested = [Attachable::class => ['attachables']]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/CookieParameter.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/CookieParameter.php similarity index 73% rename from vendor/zircote/swagger-php/src/Annotations/CookieParameter.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/CookieParameter.php index 807f6b4..2365f43 100644 --- a/vendor/zircote/swagger-php/src/Annotations/CookieParameter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/CookieParameter.php @@ -1,10 +1,10 @@ -@OA\Request cookie parameter. diff --git a/vendor/zircote/swagger-php/src/Annotations/Delete.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Delete.php similarity index 57% rename from vendor/zircote/swagger-php/src/Annotations/Delete.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Delete.php index 8c3a54f..100c0b2 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Delete.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Delete.php @@ -1,10 +1,10 @@ - 'string', - ]; - + public static $_types = ['propertyName' => 'string']; /** * @inheritdoc */ - public static $_parents = [ - Schema::class, - Property::class, - AdditionalProperties::class, - Items::class, - JsonContent::class, - XmlContent::class, - ]; - + public static $_parents = [Schema::class, Property::class, AdditionalProperties::class, Items::class, JsonContent::class, XmlContent::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; + public static $_nested = [Attachable::class => ['attachables']]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/Examples.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Examples.php similarity index 76% rename from vendor/zircote/swagger-php/src/Annotations/Examples.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Examples.php index eed671a..8b18481 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Examples.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Examples.php @@ -1,13 +1,12 @@ -#/components/examples. * * @var string */ public $example = Generator::UNDEFINED; - /** * Short description for the example. * * @var string */ public $summary = Generator::UNDEFINED; - /** * Embedded literal example. * @@ -47,7 +43,6 @@ class Examples extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * Embedded literal example. * @@ -59,7 +54,6 @@ class Examples extends AbstractAnnotation * @var int|string|array */ public $value = Generator::UNDEFINED; - /** * An URL that points to the literal example. * @@ -71,29 +65,11 @@ class Examples extends AbstractAnnotation * @var string */ public $externalValue = Generator::UNDEFINED; - - public static $_types = [ - 'summary' => 'string', - 'description' => 'string', - 'externalValue' => 'string', - ]; - + public static $_types = ['summary' => 'string', 'description' => 'string', 'externalValue' => 'string']; public static $_required = ['summary']; - - public static $_parents = [ - Components::class, - Schema::class, - Parameter::class, - PathParameter::class, - MediaType::class, - JsonContent::class, - XmlContent::class, - ]; - + public static $_parents = [Components::class, Schema::class, Parameter::class, PathParameter::class, MediaType::class, JsonContent::class, XmlContent::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; + public static $_nested = [Attachable::class => ['attachables']]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/ExternalDocumentation.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/ExternalDocumentation.php similarity index 53% rename from vendor/zircote/swagger-php/src/Annotations/ExternalDocumentation.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/ExternalDocumentation.php index 350e9a0..19b0457 100644 --- a/vendor/zircote/swagger-php/src/Annotations/ExternalDocumentation.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/ExternalDocumentation.php @@ -1,13 +1,12 @@ - 'string', - 'url' => 'string', - ]; - + public static $_types = ['description' => 'string', 'url' => 'string']; /** * @inheritdoc */ public static $_required = ['url']; - /** * @inheritdoc */ - public static $_parents = [ - OpenApi::class, - Tag::class, - Schema::class, - AdditionalProperties::class, - Property::class, - Operation::class, - Get::class, - Post::class, - Put::class, - Delete::class, - Patch::class, - Head::class, - Options::class, - Trace::class, - Items::class, - JsonContent::class, - XmlContent::class, - ]; - + public static $_parents = [OpenApi::class, Tag::class, Schema::class, AdditionalProperties::class, Property::class, Operation::class, Get::class, Post::class, Put::class, Delete::class, Patch::class, Head::class, Options::class, Trace::class, Items::class, JsonContent::class, XmlContent::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; + public static $_nested = [Attachable::class => ['attachables']]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/Flow.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Flow.php similarity index 78% rename from vendor/zircote/swagger-php/src/Annotations/Flow.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Flow.php index 83f01a8..4bc8781 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Flow.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Flow.php @@ -1,13 +1,12 @@ - ['implicit', 'password', 'authorizationCode', 'clientCredentials'], - 'refreshUrl' => 'string', - 'authorizationUrl' => 'string', - 'tokenUrl' => 'string', - ]; - + public static $_types = ['flow' => ['implicit', 'password', 'authorizationCode', 'clientCredentials'], 'refreshUrl' => 'string', 'authorizationUrl' => 'string', 'tokenUrl' => 'string']; /** * @inheritdoc */ - public static $_parents = [ - SecurityScheme::class, - ]; - + public static $_parents = [SecurityScheme::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Attachable::class => ['attachables']]; /** * @inheritdoc */ @@ -100,7 +81,6 @@ public function jsonSerialize() if ($this->scopes === []) { $this->scopes = new \stdClass(); } - return parent::jsonSerialize(); } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Get.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Get.php similarity index 56% rename from vendor/zircote/swagger-php/src/Annotations/Get.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Get.php index c0ff442..00e8cb9 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Get.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Get.php @@ -1,10 +1,10 @@ - 'string', - 'description' => 'string', - ]; - + public static $_types = ['header' => 'string', 'description' => 'string']; /** * @inheritdoc */ - public static $_nested = [ - Schema::class => 'schema', - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Schema::class => 'schema', Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Components::class, - Response::class, - ]; + public static $_parents = [Components::class, Response::class]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/HeaderParameter.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/HeaderParameter.php similarity index 62% rename from vendor/zircote/swagger-php/src/Annotations/HeaderParameter.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/HeaderParameter.php index 27e6080..01dd454 100644 --- a/vendor/zircote/swagger-php/src/Annotations/HeaderParameter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/HeaderParameter.php @@ -1,13 +1,12 @@ -@OA\Request header parameter. * diff --git a/vendor/zircote/swagger-php/src/Annotations/Info.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Info.php similarity index 76% rename from vendor/zircote/swagger-php/src/Annotations/Info.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Info.php index f697eb1..98af3ed 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Info.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Info.php @@ -1,13 +1,12 @@ - 'string', - 'version' => 'string', - 'description' => 'string', - 'termsOfService' => 'string', - ]; - + public static $_types = ['title' => 'string', 'version' => 'string', 'description' => 'string', 'termsOfService' => 'string']; /** * @inheritdoc */ - public static $_nested = [ - Contact::class => 'contact', - License::class => 'license', - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Contact::class => 'contact', License::class => 'license', Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - OpenApi::class, - ]; + public static $_parents = [OpenApi::class]; } diff --git a/vendor/prefixed/zircote/swagger-php/src/Annotations/Items.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Items.php new file mode 100644 index 0000000..dfb334d --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Items.php @@ -0,0 +1,41 @@ +array. + * + * @Annotation + */ +class Items extends Schema +{ + /** + * @inheritdoc + */ + public static $_nested = [Discriminator::class => 'discriminator', Items::class => 'items', Property::class => ['properties', 'property'], ExternalDocumentation::class => 'externalDocs', Xml::class => 'xml', AdditionalProperties::class => 'additionalProperties', Attachable::class => ['attachables']]; + /** + * @inheritdoc + */ + public static $_parents = [Property::class, AdditionalProperties::class, Schema::class, JsonContent::class, XmlContent::class, Items::class]; + /** + * @inheritdoc + */ + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool + { + if (in_array($this, $skip, \true)) { + return \true; + } + $valid = parent::validate($stack, $skip, $ref, $context); + $parent = end($stack); + // type might be array in 3.1.0 + if ($parent instanceof Schema && ($parent->type !== 'array' && !(is_array($parent->type) && in_array('array', $parent->type)))) { + $this->_context->logger->warning('@OA\\Items() parent type must be "array" in ' . $this->_context); + $valid = \false; + } + return $valid; + } +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Annotations/JsonContent.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/JsonContent.php new file mode 100644 index 0000000..5fe1cdc --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/JsonContent.php @@ -0,0 +1,41 @@ + 'discriminator', Items::class => 'items', Property::class => ['properties', 'property'], ExternalDocumentation::class => 'externalDocs', AdditionalProperties::class => 'additionalProperties', Examples::class => ['examples', 'example'], Attachable::class => ['attachables']]; +} diff --git a/vendor/zircote/swagger-php/src/Annotations/License.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/License.php similarity index 74% rename from vendor/zircote/swagger-php/src/Annotations/License.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/License.php index 6e71a1b..bf0a2c3 100644 --- a/vendor/zircote/swagger-php/src/Annotations/License.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/License.php @@ -1,13 +1,12 @@ -identifier field is mutually exclusive of the url field. * * @var string */ public $identifier = Generator::UNDEFINED; - /** * A URL to the license used for the API. This MUST be in the form of a URL. * @@ -39,35 +36,22 @@ class License extends AbstractAnnotation * @var string */ public $url = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_types = [ - 'name' => 'string', - 'identifier' => 'string', - 'url' => 'string', - ]; - + public static $_types = ['name' => 'string', 'identifier' => 'string', 'url' => 'string']; /** * @inheritdoc */ public static $_required = ['name']; - /** * @inheritdoc */ - public static $_parents = [ - Info::class, - ]; - + public static $_parents = [Info::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Attachable::class => ['attachables']]; /** * @inheritdoc */ @@ -75,28 +59,23 @@ class License extends AbstractAnnotation public function jsonSerialize() { $data = parent::jsonSerialize(); - - if ($this->_context->isVersion(OpenApi::VERSION_3_0_0)) { + if ($this->_context->isVersion('3.0.x')) { unset($data->identifier); } - return $data; } - /** * @inheritdoc */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool { $valid = parent::validate($stack, $skip, $ref, $context); - - if ($this->_context->isVersion(OpenApi::VERSION_3_1_0)) { + if ($this->_context->isVersion('3.1.x')) { if (!Generator::isDefault($this->url) && $this->identifier !== Generator::UNDEFINED) { $this->_context->logger->warning($this->identity() . ' url and identifier are mutually exclusive'); - $valid = false; + $valid = \false; } } - return $valid; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Link.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Link.php similarity index 90% rename from vendor/zircote/swagger-php/src/Annotations/Link.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Link.php index 67199b2..d1181fd 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Link.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Link.php @@ -1,13 +1,12 @@ -links array. * * @var string */ public $link = Generator::UNDEFINED; - /** * A relative or absolute reference to an OA operation. * @@ -50,7 +47,6 @@ class Link extends AbstractAnnotation * @var string */ public $operationRef = Generator::UNDEFINED; - /** * The name of an existing, resolvable OA operation, as defined with a unique operationId. * @@ -59,7 +55,6 @@ class Link extends AbstractAnnotation * @var string */ public $operationId = Generator::UNDEFINED; - /** * A map representing parameters to pass to an operation as specified with operationId or identified via * operationRef. @@ -72,12 +67,10 @@ class Link extends AbstractAnnotation * @var array */ public $parameters = Generator::UNDEFINED; - /** * A literal value or {expression} to use as a request body when calling the target operation. */ public $requestBody = Generator::UNDEFINED; - /** * A description of the link. * @@ -86,27 +79,18 @@ class Link extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * A server object to be used by the target operation. * * @var Server */ public $server = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_nested = [ - Server::class => 'server', - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Server::class => 'server', Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Components::class, - Response::class, - ]; + public static $_parents = [Components::class, Response::class]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/MediaType.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/MediaType.php similarity index 84% rename from vendor/zircote/swagger-php/src/Annotations/MediaType.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/MediaType.php index dc46797..0e65bb4 100644 --- a/vendor/zircote/swagger-php/src/Annotations/MediaType.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/MediaType.php @@ -1,13 +1,12 @@ - */ public $examples = Generator::UNDEFINED; - /** * A map between a property name and its encoding information. * @@ -64,21 +59,12 @@ class MediaType extends AbstractAnnotation * @var array */ public $encoding = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_nested = [ - Schema::class => 'schema', - Examples::class => ['examples', 'example'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Schema::class => 'schema', Examples::class => ['examples', 'example'], Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Response::class, - RequestBody::class, - ]; + public static $_parents = [Response::class, RequestBody::class]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/OpenApi.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/OpenApi.php similarity index 64% rename from vendor/zircote/swagger-php/src/Annotations/OpenApi.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/OpenApi.php index c1ab6f2..4ac894b 100644 --- a/vendor/zircote/swagger-php/src/Annotations/OpenApi.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/OpenApi.php @@ -1,16 +1,15 @@ -Generator::setVersion() will overwrite this value. * - * This is not related to the API info::version string. + * NOTE: This is not related to the API info::version string. * - * @var '3.0.0'|'3.1.0' + * @var string */ public $openapi = self::DEFAULT_VERSION; - /** * Provides metadata about the API. The metadata may be used by tooling as required. * * @var Info */ public $info = Generator::UNDEFINED; - /** * An array of @Server objects, which provide connectivity information to a target server. * @@ -53,21 +49,18 @@ class OpenApi extends AbstractAnnotation * @var Server[] */ public $servers = Generator::UNDEFINED; - /** * The available paths and operations for the API. * * @var PathItem[] */ public $paths = Generator::UNDEFINED; - /** * An element to hold various components for the specification. * * @var Components */ public $components = Generator::UNDEFINED; - /** * A declaration of which security mechanisms can be used across the API. * @@ -79,7 +72,6 @@ class OpenApi extends AbstractAnnotation * @var array */ public $security = Generator::UNDEFINED; - /** * A list of tags used by the specification with additional metadata. * @@ -91,101 +83,90 @@ class OpenApi extends AbstractAnnotation * @var Tag[] */ public $tags = Generator::UNDEFINED; - /** * Additional external documentation. * * @var ExternalDocumentation */ public $externalDocs = Generator::UNDEFINED; - /** * The available webhooks for the API. * * @var Webhook[] */ public $webhooks = Generator::UNDEFINED; - /** * @var Analysis */ public $_analysis = Generator::UNDEFINED; - /** * @inheritdoc */ public static $_required = ['openapi', 'info']; - /** * @inheritdoc */ - public static $_nested = [ - Info::class => 'info', - Server::class => ['servers'], - PathItem::class => ['paths', 'path'], - Components::class => 'components', - Tag::class => ['tags'], - ExternalDocumentation::class => 'externalDocs', - Webhook::class => ['webhooks', 'webhook'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Info::class => 'info', Server::class => ['servers'], PathItem::class => ['paths', 'path'], Components::class => 'components', Tag::class => ['tags'], ExternalDocumentation::class => 'externalDocs', Webhook::class => ['webhooks', 'webhook'], Attachable::class => ['attachables']]; /** * @inheritdoc */ public static $_types = []; - /** * @inheritdoc */ - public function validate(?array $stack = null, ?array $skip = null, string $ref = '', $context = null): bool + public function validate(?array $stack = null, ?array $skip = null, string $ref = '', $context = null) : bool { if ($stack !== null || $skip !== null || $ref !== '') { $this->_context->logger->warning('Nested validation for ' . $this->identity() . ' not allowed'); - - return false; + return \false; } - if (!in_array($this->openapi, self::SUPPORTED_VERSIONS)) { $this->_context->logger->warning('Unsupported OpenAPI version "' . $this->openapi . '". Allowed versions are: ' . implode(', ', self::SUPPORTED_VERSIONS)); - - return false; + return \false; } - - /* paths is optional in 3.1.0 */ - if ($this->openapi === self::VERSION_3_0_0 && Generator::isDefault($this->paths)) { - $this->_context->logger->warning('Required @OA\PathItem() not found'); + /* paths is optional in 3.1.x */ + if (self::versionMatch($this->openapi, '3.0.x') && Generator::isDefault($this->paths)) { + $this->_context->logger->warning('Required @OA\\PathItem() not found'); } - - if ($this->openapi === self::VERSION_3_1_0 - && Generator::isDefault($this->paths) - && Generator::isDefault($this->webhooks) - && Generator::isDefault($this->components) - ) { - $this->_context->logger->warning("At least one of 'Required @OA\PathItem(), @OA\Components() or @OA\Webhook() not found'"); - - return false; + if (self::versionMatch($this->openapi, '3.1.x') && Generator::isDefault($this->paths) && Generator::isDefault($this->webhooks) && Generator::isDefault($this->components)) { + $this->_context->logger->warning("At least one of 'Required @OA\\PathItem(), @OA\\Components() or @OA\\Webhook() not found'"); + return \false; } - return parent::validate([], [], '#', new \stdClass()); } - + /** + * Compare OpenApi version numbers. + * + * Allows patch version placeholder `x`; e.g. `3.1.x`. + */ + public static function versionMatch(string $version1, string $version2) : bool + { + $expand = function (string $v) : array { + if (substr_compare($v, '.x', -strlen('.x')) !== 0) { + return [$v]; + } + $minor = str_replace('.x', '', $v); + return array_filter(self::SUPPORTED_VERSIONS, function (string $sv) use ($minor) : bool { + return strncmp($sv, $minor, strlen($minor)) === 0; + }); + }; + $versions1 = $expand($version1); + $versions2 = $expand($version2); + return array_intersect($versions1, $versions2) !== []; + } /** * Save the OpenAPI documentation to a file. */ - public function saveAs(string $filename, string $format = 'auto'): void + public function saveAs(string $filename, string $format = 'auto') : void { if ($format === 'auto') { $format = strtolower(substr($filename, -5)) === '.json' ? 'json' : 'yaml'; } - $content = strtolower($format) === 'json' ? $this->toJson() : $this->toYaml(); - - if (file_put_contents($filename, $content) === false) { + if (file_put_contents($filename, $content) === \false) { throw new OpenApiException('Failed to saveAs("' . $filename . '", "' . $format . '")'); } } - /** * Look up an annotation with a $ref url. * @@ -197,14 +178,13 @@ public function ref(string $ref) // @todo Add support for external (http) refs? throw new OpenApiException('Unsupported $ref "' . $ref . '", it should start with "#/"'); } - - return $this->resolveRef($ref, '#/', $this, []); + return self::resolveRef($ref, '#/', $this, []); } - /** * Recursive helper for ref(). * - * @param array|AbstractAnnotation $container + * @param array|AbstractAnnotation $container + * @param array,string|array> $mapping */ private static function resolveRef(string $ref, string $resolved, $container, array $mapping) { @@ -213,26 +193,31 @@ private static function resolveRef(string $ref, string $resolved, $container, ar } $path = substr($ref, strlen($resolved)); $slash = strpos($path, '/'); - - $subpath = $slash === false ? $path : substr($path, 0, $slash); + $subpath = $slash === \false ? $path : substr($path, 0, $slash); $property = Util::refDecode($subpath); - $unresolved = $slash === false ? $resolved . $subpath : $resolved . $subpath . '/'; - + $unresolved = $slash === \false ? $resolved . $subpath : $resolved . $subpath . '/'; if (is_object($container)) { - if (property_exists($container, $property) === false) { + // support use x-* in ref + $xKey = strpos($property, 'x-') === 0 ? substr($property, 2) : null; + if ($xKey) { + if (!is_array($container->x) || !array_key_exists($xKey, $container->x)) { + $xKey = null; + } + } + if (property_exists($container, $property) === \false && !$xKey) { throw new OpenApiException('$ref "' . $ref . '" not found'); } - if ($slash === false) { - return $container->{$property}; + $nextContainer = $xKey ? $container->x[$xKey] : $container->{$property}; + if ($slash === \false) { + return $nextContainer; } $mapping = []; foreach ($container::$_nested as $nestedClass => $nested) { - if (is_string($nested) === false && count($nested) === 2 && $nested[0] === $property) { + if (is_string($nested) === \false && count($nested) === 2 && $nested[0] === $property) { $mapping[$nestedClass] = $nested[1]; } } - - return self::resolveRef($ref, $unresolved, $container->{$property}, $mapping); + return self::resolveRef($ref, $unresolved, $nextContainer, $mapping); } elseif (is_array($container)) { if (array_key_exists($property, $container)) { return self::resolveRef($ref, $unresolved, $container[$property], []); @@ -245,10 +230,8 @@ private static function resolveRef(string $ref, string $resolved, $container, ar } } } - throw new OpenApiException('$ref "' . $unresolved . '" not found'); } - /** * @inheritdoc */ @@ -256,11 +239,9 @@ private static function resolveRef(string $ref, string $resolved, $container, ar public function jsonSerialize() { $data = parent::jsonSerialize(); - - if (!$this->_context->isVersion(OpenApi::VERSION_3_1_0)) { + if (!$this->_context->isVersion('3.1.x')) { unset($data->webhooks); } - return $data; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Operation.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Operation.php similarity index 86% rename from vendor/zircote/swagger-php/src/Annotations/Operation.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Operation.php index f26d471..380d200 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Operation.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Operation.php @@ -1,14 +1,13 @@ -@OA\Get, @OA\Post, @OA\Put, etc. * @@ -26,7 +25,6 @@ abstract class Operation extends AbstractAnnotation * @var string */ public $path = Generator::UNDEFINED; - /** * A list of tags for API documentation control. * @@ -35,7 +33,6 @@ abstract class Operation extends AbstractAnnotation * @var string[] */ public $tags = Generator::UNDEFINED; - /** * Key in the OpenApi "Path Item Object" for this operation. * @@ -44,14 +41,12 @@ abstract class Operation extends AbstractAnnotation * @var string */ public $method = Generator::UNDEFINED; - /** * A short summary of what the operation does. * * @var string */ public $summary = Generator::UNDEFINED; - /** * A verbose explanation of the operation behavior. * @@ -60,14 +55,12 @@ abstract class Operation extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * Additional external documentation for this operation. * * @var ExternalDocumentation */ public $externalDocs = Generator::UNDEFINED; - /** * Unique string used to identify the operation. * @@ -78,7 +71,6 @@ abstract class Operation extends AbstractAnnotation * @var string */ public $operationId = Generator::UNDEFINED; - /** * A list of parameters that are applicable for this operation. * @@ -93,7 +85,6 @@ abstract class Operation extends AbstractAnnotation * @var Parameter[] */ public $parameters = Generator::UNDEFINED; - /** * The request body applicable for this operation. * @@ -104,14 +95,12 @@ abstract class Operation extends AbstractAnnotation * @var RequestBody */ public $requestBody = Generator::UNDEFINED; - /** * The list of possible responses as they are returned from executing this operation. * * @var Response[] */ public $responses = Generator::UNDEFINED; - /** * A map of possible out-of band callbacks related to the parent operation. * @@ -124,7 +113,6 @@ abstract class Operation extends AbstractAnnotation * @var array */ public $callbacks = Generator::UNDEFINED; - /** * Declares this operation to be deprecated. * @@ -135,7 +123,6 @@ abstract class Operation extends AbstractAnnotation * @var bool */ public $deprecated = Generator::UNDEFINED; - /** * A declaration of which security mechanisms can be used for this operation. * @@ -149,7 +136,6 @@ abstract class Operation extends AbstractAnnotation * @var array */ public $security = Generator::UNDEFINED; - /** * An alternative server array to service this operation. * @@ -159,37 +145,18 @@ abstract class Operation extends AbstractAnnotation * @var Server[] */ public $servers = Generator::UNDEFINED; - /** * @inheritdoc */ public static $_required = ['responses']; - /** * @inheritdoc */ - public static $_types = [ - 'path' => 'string', - 'method' => 'string', - 'tags' => '[string]', - 'summary' => 'string', - 'description' => 'string', - 'deprecated' => 'boolean', - ]; - + public static $_types = ['path' => 'string', 'method' => 'string', 'tags' => '[string]', 'summary' => 'string', 'description' => 'string', 'deprecated' => 'boolean']; /** * @inheritdoc */ - public static $_nested = [ - Parameter::class => ['parameters'], - PathParameter::class => ['parameters'], - Response::class => ['responses', 'response'], - ExternalDocumentation::class => 'externalDocs', - Server::class => ['servers'], - RequestBody::class => 'requestBody', - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Parameter::class => ['parameters'], PathParameter::class => ['parameters'], Response::class => ['responses', 'response'], ExternalDocumentation::class => 'externalDocs', Server::class => ['servers'], RequestBody::class => 'requestBody', Attachable::class => ['attachables']]; /** * @inheritdoc */ @@ -197,53 +164,43 @@ abstract class Operation extends AbstractAnnotation public function jsonSerialize() { $data = parent::jsonSerialize(); - unset($data->method); unset($data->path); - // ensure security elements are object if (isset($data->security) && is_array($data->security)) { foreach ($data->security as $key => $scheme) { $data->security[$key] = (object) $scheme; } } - return $data; } - /** * @inheritdoc */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool { - if (in_array($this, $skip, true)) { - return true; + if (in_array($this, $skip, \true)) { + return \true; } - $valid = parent::validate($stack, $skip, $ref, $context); - if (!Generator::isDefault($this->responses)) { foreach ($this->responses as $response) { - if (!Generator::isDefault($response->response) && $response->response !== 'default' && preg_match('/^([12345]{1}\d{2})|([12345]{1}XX)$/', (string) $response->response) === 0) { + if (!Generator::isDefault($response->response) && $response->response !== 'default' && preg_match('/^([12345]{1}\\d{2})|([12345]{1}XX)$/', (string) $response->response) === 0) { $this->_context->logger->warning('Invalid value "' . $response->response . '" for ' . $response->_identity([]) . '->response, expecting "default", a HTTP Status Code or HTTP Status Code range definition in ' . $response->_context); - $valid = false; + $valid = \false; } } } - if (is_object($context) && !Generator::isDefault($this->operationId)) { if (!property_exists($context, 'operationIds')) { $context->operationIds = []; } - if (in_array($this->operationId, $context->operationIds)) { $this->_context->logger->warning('operationId must be unique. Duplicate value found: "' . $this->operationId . '"'); - $valid = false; + $valid = \false; } - $context->operationIds[] = $this->operationId; } - return $valid; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Options.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Options.php similarity index 57% rename from vendor/zircote/swagger-php/src/Annotations/Options.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Options.php index 312505e..2397d64 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Options.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Options.php @@ -1,10 +1,10 @@ -Components::parameters or PathItem::parameters array. * * @var string */ public $parameter = Generator::UNDEFINED; - /** * The (case-sensitive) name of the parameter. * @@ -46,7 +43,6 @@ class Parameter extends AbstractAnnotation * @var string */ public $name = Generator::UNDEFINED; - /** * The location of the parameter. * @@ -55,7 +51,6 @@ class Parameter extends AbstractAnnotation * @var string */ public $in = Generator::UNDEFINED; - /** * A brief description of the parameter. * @@ -66,7 +61,6 @@ class Parameter extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * Determines whether this parameter is mandatory. * @@ -76,14 +70,12 @@ class Parameter extends AbstractAnnotation * @var bool */ public $required = Generator::UNDEFINED; - /** * Specifies that a parameter is deprecated and should be transitioned out of usage. * * @var bool */ public $deprecated = Generator::UNDEFINED; - /** * Sets the ability to pass empty-valued parameters. * @@ -96,7 +88,6 @@ class Parameter extends AbstractAnnotation * @var bool */ public $allowEmptyValue = Generator::UNDEFINED; - /** * Describes how the parameter value will be serialized depending on the type of the parameter value. * @@ -105,7 +96,6 @@ class Parameter extends AbstractAnnotation * @var string */ public $style = Generator::UNDEFINED; - /** * When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. * @@ -117,7 +107,6 @@ class Parameter extends AbstractAnnotation * @var bool */ public $explode = Generator::UNDEFINED; - /** * Determines whether the parameter value should allow reserved characters, as defined by RFC3986 :/?#[]@!$&'()*+,;= to be included without percent-encoding. * @@ -128,14 +117,12 @@ class Parameter extends AbstractAnnotation * @var bool */ public $allowReserved = Generator::UNDEFINED; - /** * The schema defining the type used for the parameter. * * @var Schema */ public $schema = Generator::UNDEFINED; - /** * Example of the media type. * @@ -145,7 +132,6 @@ class Parameter extends AbstractAnnotation * To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. */ public $example = Generator::UNDEFINED; - /** * Examples of the parameter. * @@ -156,7 +142,6 @@ class Parameter extends AbstractAnnotation * @var array */ public $examples = Generator::UNDEFINED; - /** * A map containing the representations for the parameter. * @@ -166,21 +151,18 @@ class Parameter extends AbstractAnnotation * @var array|JsonContent|XmlContent|Attachable */ public $content = Generator::UNDEFINED; - /** * Path-style parameters defined by RFC6570. * * @see [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7) */ public $matrix = Generator::UNDEFINED; - /** * Label style parameters defined by RFC6570. * * @see [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5) */ public $label = Generator::UNDEFINED; - /** * Form style parameters defined by RFC6570. * @@ -189,7 +171,6 @@ class Parameter extends AbstractAnnotation * @see [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8) */ public $form = Generator::UNDEFINED; - /** * Simple style parameters defined by RFC6570. * @@ -200,7 +181,6 @@ class Parameter extends AbstractAnnotation * @var array */ public $simple = Generator::UNDEFINED; - /** * Space separated array values. * @@ -209,7 +189,6 @@ class Parameter extends AbstractAnnotation * @var array */ public $spaceDelimited = Generator::UNDEFINED; - /** * Pipe separated array values. * @@ -218,81 +197,49 @@ class Parameter extends AbstractAnnotation * @var array */ public $pipeDelimited = Generator::UNDEFINED; - /** * Provides a simple way of rendering nested objects using form parameters. */ public $deepObject = Generator::UNDEFINED; - /** * @inheritdoc */ public static $_required = ['name', 'in']; - /** * @inheritdoc */ - public static $_types = [ - 'name' => 'string', - 'in' => ['query', 'header', 'path', 'cookie'], - 'description' => 'string', - 'style' => ['matrix', 'label', 'form', 'simple', 'spaceDelimited', 'pipeDelimited', 'deepObject'], - 'required' => 'boolean', - ]; - + public static $_types = ['name' => 'string', 'in' => ['query', 'header', 'path', 'cookie'], 'description' => 'string', 'style' => ['matrix', 'label', 'form', 'simple', 'spaceDelimited', 'pipeDelimited', 'deepObject'], 'required' => 'boolean']; /** * @inheritdoc */ - public static $_nested = [ - Schema::class => 'schema', - Examples::class => ['examples', 'example'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Schema::class => 'schema', Examples::class => ['examples', 'example'], Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Components::class, - PathItem::class, - Operation::class, - Get::class, - Post::class, - Put::class, - Delete::class, - Patch::class, - Head::class, - Options::class, - Trace::class, - ]; - + public static $_parents = [Components::class, PathItem::class, Operation::class, Get::class, Post::class, Put::class, Delete::class, Patch::class, Head::class, Options::class, Trace::class]; /** * @inheritdoc */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool { - if (in_array($this, $skip, true)) { - return true; + if (in_array($this, $skip, \true)) { + return \true; } - $valid = parent::validate($stack, $skip, $ref, $context); - if (Generator::isDefault($this->ref)) { if ($this->in === 'body') { if (Generator::isDefault($this->schema)) { $this->_context->logger->warning('Field "schema" is required when ' . $this->identity() . ' is in "' . $this->in . '" in ' . $this->_context); - $valid = false; + $valid = \false; } } } - return $valid; } - /** * @inheritdoc */ - public function identity(): string + public function identity() : string { return parent::_identity(['name', 'in']); } diff --git a/vendor/zircote/swagger-php/src/Annotations/Patch.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Patch.php similarity index 56% rename from vendor/zircote/swagger-php/src/Annotations/Patch.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Patch.php index 7972f3b..60ba345 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Patch.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Patch.php @@ -1,10 +1,10 @@ -paths array). * * @var string */ public $path = Generator::UNDEFINED; - /** * A definition of a GET operation on this path. * * @var Get */ public $get = Generator::UNDEFINED; - /** * A definition of a PUT operation on this path. * * @var Put */ public $put = Generator::UNDEFINED; - /** * A definition of a POST operation on this path. * * @var Post */ public $post = Generator::UNDEFINED; - /** * A definition of a DELETE operation on this path. * * @var Delete */ public $delete = Generator::UNDEFINED; - /** * A definition of a OPTIONS operation on this path. * * @var Options */ public $options = Generator::UNDEFINED; - /** * A definition of a HEAD operation on this path. * * @var Head */ public $head = Generator::UNDEFINED; - /** * A definition of a PATCH operation on this path. * * @var Patch */ public $patch = Generator::UNDEFINED; - /** * A definition of a TRACE operation on this path. * * @var Trace */ public $trace = Generator::UNDEFINED; - /** * An alternative server array to service all operations in this path. * * @var Server[] */ public $servers = Generator::UNDEFINED; - /** * A list of parameters that are applicable for all the operations described under this path. * @@ -122,46 +108,24 @@ class PathItem extends AbstractAnnotation * @var Parameter[] */ public $parameters = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_types = [ - 'path' => 'string', - 'summary' => 'string', - ]; - + public static $_types = ['path' => 'string', 'summary' => 'string']; /** * @inheritdoc */ - public static $_nested = [ - Get::class => 'get', - Post::class => 'post', - Put::class => 'put', - Delete::class => 'delete', - Patch::class => 'patch', - Trace::class => 'trace', - Head::class => 'head', - Options::class => 'options', - Parameter::class => ['parameters'], - PathParameter::class => ['parameters'], - Server::class => ['servers'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Get::class => 'get', Post::class => 'post', Put::class => 'put', Delete::class => 'delete', Patch::class => 'patch', Trace::class => 'trace', Head::class => 'head', Options::class => 'options', Parameter::class => ['parameters'], PathParameter::class => ['parameters'], Server::class => ['servers'], Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - OpenApi::class, - ]; - + public static $_parents = [OpenApi::class]; /** * Returns a list of all operations (all methods) for this path item. * * @return Operation[] */ - public function operations(): array + public function operations() : array { $operations = []; foreach (PathItem::$_nested as $className => $property) { @@ -169,7 +133,6 @@ public function operations(): array $operations[] = $this->{$property}; } } - return $operations; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/PathParameter.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/PathParameter.php similarity index 66% rename from vendor/zircote/swagger-php/src/Annotations/PathParameter.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/PathParameter.php index 6529d25..576a581 100644 --- a/vendor/zircote/swagger-php/src/Annotations/PathParameter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/PathParameter.php @@ -1,13 +1,12 @@ -@OA\Request path parameter. * @@ -20,12 +19,10 @@ class PathParameter extends Parameter * This takes 'path' as the default location. */ public $in = 'path'; - /** * @inheritdoc */ - public $required = true; - + public $required = \true; /** * @inheritdoc */ diff --git a/vendor/zircote/swagger-php/src/Annotations/Post.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Post.php similarity index 56% rename from vendor/zircote/swagger-php/src/Annotations/Post.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Post.php index 6d35855..69145ce 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Post.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Post.php @@ -1,10 +1,10 @@ -properties array. + * + * @var string + */ + public $property = Generator::UNDEFINED; + /** + * @inheritdoc + */ + public static $_parents = [AdditionalProperties::class, Schema::class, JsonContent::class, XmlContent::class, Property::class, Items::class]; + /** + * @inheritdoc + */ + public static $_nested = [Discriminator::class => 'discriminator', Items::class => 'items', Property::class => ['properties', 'property'], ExternalDocumentation::class => 'externalDocs', Xml::class => 'xml', AdditionalProperties::class => 'additionalProperties', Attachable::class => ['attachables']]; +} diff --git a/vendor/zircote/swagger-php/src/Annotations/Put.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Put.php similarity index 56% rename from vendor/zircote/swagger-php/src/Annotations/Put.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Put.php index a0a0303..87cc493 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Put.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Put.php @@ -1,10 +1,10 @@ -@OA\Request query parameter. * diff --git a/vendor/zircote/swagger-php/src/Annotations/RequestBody.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/RequestBody.php similarity index 72% rename from vendor/zircote/swagger-php/src/Annotations/RequestBody.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/RequestBody.php index 6c55bb3..e6d3ac8 100644 --- a/vendor/zircote/swagger-php/src/Annotations/RequestBody.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/RequestBody.php @@ -1,15 +1,14 @@ -requestBodies array. * * @var string */ public $request = Generator::UNDEFINED; - /** * A brief description of the parameter. * @@ -45,7 +42,6 @@ class RequestBody extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * Determines whether this parameter is mandatory. * @@ -55,7 +51,6 @@ class RequestBody extends AbstractAnnotation * @var bool */ public $required = Generator::UNDEFINED; - /** * The content of the request body. * @@ -65,37 +60,15 @@ class RequestBody extends AbstractAnnotation * @var array|MediaType|JsonContent|XmlContent|Attachable */ public $content = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_types = [ - 'description' => 'string', - 'required' => 'boolean', - 'request' => 'string', - ]; - - public static $_parents = [ - Components::class, - Delete::class, - Get::class, - Head::class, - Operation::class, - Options::class, - Patch::class, - Post::class, - Trace::class, - Put::class, - ]; - + public static $_types = ['description' => 'string', 'required' => 'boolean', 'request' => 'string']; + public static $_parents = [Components::class, Delete::class, Get::class, Head::class, Operation::class, Options::class, Patch::class, Post::class, Trace::class, Put::class]; /** * @inheritdoc */ - public static $_nested = [ - MediaType::class => ['content', 'mediaType'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [MediaType::class => ['content', 'mediaType'], Attachable::class => ['attachables']]; /** * @inheritdoc */ @@ -103,9 +76,7 @@ class RequestBody extends AbstractAnnotation public function jsonSerialize() { $data = parent::jsonSerialize(); - unset($data->request); - return $data; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Response.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Response.php similarity index 78% rename from vendor/zircote/swagger-php/src/Annotations/Response.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Response.php index fc6d2a0..a19b166 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Response.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Response.php @@ -1,13 +1,12 @@ -responses array. * @@ -35,7 +33,6 @@ class Response extends AbstractAnnotation * @var string|int */ public $response = Generator::UNDEFINED; - /** * A short description of the response. * @@ -44,7 +41,6 @@ class Response extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * Maps a header name to its definition. * @@ -57,7 +53,6 @@ class Response extends AbstractAnnotation * @var Header[] */ public $headers = Generator::UNDEFINED; - /** * A map containing descriptions of potential response payloads. * @@ -69,7 +64,6 @@ class Response extends AbstractAnnotation * @var MediaType|JsonContent|XmlContent|Attachable|array */ public $content = Generator::UNDEFINED; - /** * A map of operations links that can be followed from the response. * @@ -79,52 +73,28 @@ class Response extends AbstractAnnotation * @var Link[] */ public $links = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_types = [ - 'description' => 'string', - ]; - + public static $_types = ['description' => 'string']; /** * @inheritdoc */ - public static $_nested = [ - MediaType::class => ['content', 'mediaType'], - Header::class => ['headers', 'header'], - Link::class => ['links', 'link'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [MediaType::class => ['content', 'mediaType'], Header::class => ['headers', 'header'], Link::class => ['links', 'link'], Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Components::class, - Operation::class, - Get::class, - Post::class, - Put::class, - Patch::class, - Delete::class, - Head::class, - Options::class, - Trace::class, - ]; - + public static $_parents = [Components::class, Operation::class, Get::class, Post::class, Put::class, Patch::class, Delete::class, Head::class, Options::class, Trace::class]; /** * @inheritdoc */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool { $valid = parent::validate($stack, $skip, $ref, $context); - if (Generator::isDefault($this->description) && Generator::isDefault($this->ref)) { $this->_context->logger->warning($this->identity() . ' One of description or ref is required in ' . $this->_context->getDebugLocation()); - $valid = false; + $valid = \false; } - return $valid; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Schema.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Schema.php similarity index 89% rename from vendor/zircote/swagger-php/src/Annotations/Schema.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Schema.php index 505a539..86b3e17 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Schema.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Schema.php @@ -1,13 +1,12 @@ -schemas array. * * @var string */ public $schema = Generator::UNDEFINED; - /** * Can be used to decorate a user interface with information about the data produced by this user interface. * @@ -47,14 +44,12 @@ class Schema extends AbstractAnnotation * @var string */ public $title = Generator::UNDEFINED; - /** * A description will provide explanation about the purpose of the instance described by this schema. * * @var string */ public $description = Generator::UNDEFINED; - /** * The maximum number of properties allowed in an object instance. * An object instance is valid against this property if its number of properties is less than, or equal to, the @@ -63,7 +58,6 @@ class Schema extends AbstractAnnotation * @var int */ public $maxProperties = Generator::UNDEFINED; - /** * The minimum number of properties allowed in an object instance. * An object instance is valid against this property if its number of properties is greater than, or equal to, the @@ -72,7 +66,6 @@ class Schema extends AbstractAnnotation * @var int */ public $minProperties = Generator::UNDEFINED; - /** * An object instance is valid against this property if its property set contains all elements in this property's * array value. @@ -80,7 +73,6 @@ class Schema extends AbstractAnnotation * @var string[] */ public $required = Generator::UNDEFINED; - /** * A collection of properties to define for an object. * @@ -89,7 +81,6 @@ class Schema extends AbstractAnnotation * @var Property[] */ public $properties = Generator::UNDEFINED; - /** * The type of the schema/property. * @@ -100,7 +91,6 @@ class Schema extends AbstractAnnotation * @var string|non-empty-array */ public $type = Generator::UNDEFINED; - /** * The extending format for the previously mentioned type. * @@ -109,14 +99,12 @@ class Schema extends AbstractAnnotation * @var string */ public $format = Generator::UNDEFINED; - /** * Required if type is "array". Describes the type of items in the array. * * @var Items */ public $items = Generator::UNDEFINED; - /** * Determines the format of the array if type array is used. * @@ -132,14 +120,12 @@ class Schema extends AbstractAnnotation * @var string */ public $collectionFormat = Generator::UNDEFINED; - /** * Sets a default value to the parameter. The type of the value depends on the defined type. * * @see [JSON schema validation](http://json-schema.org/latest/json-schema-validation.html#anchor101) */ public $default = Generator::UNDEFINED; - /** * The maximum value allowed for a numeric property. This value must be a number. * @@ -148,7 +134,6 @@ class Schema extends AbstractAnnotation * @var int|float */ public $maximum = Generator::UNDEFINED; - /** * A boolean indicating whether the maximum value is excluded from the set of valid values. * @@ -159,7 +144,6 @@ class Schema extends AbstractAnnotation * @var bool|int|float */ public $exclusiveMaximum = Generator::UNDEFINED; - /** * The minimum value allowed for a numeric property. This value must be a number. * @@ -168,7 +152,6 @@ class Schema extends AbstractAnnotation * @var int|float */ public $minimum = Generator::UNDEFINED; - /** * A boolean indicating whether the minimum value is excluded from the set of valid values. * @@ -179,7 +162,6 @@ class Schema extends AbstractAnnotation * @var bool|int|float */ public $exclusiveMinimum = Generator::UNDEFINED; - /** * The maximum length of a string property. * @@ -191,7 +173,6 @@ class Schema extends AbstractAnnotation * @var int */ public $maxLength = Generator::UNDEFINED; - /** * The minimum length of a string property. * @@ -203,14 +184,12 @@ class Schema extends AbstractAnnotation * @var int */ public $minLength = Generator::UNDEFINED; - /** * A string instance is considered valid if the regular expression matches the instance successfully. * * @var string */ public $pattern = Generator::UNDEFINED; - /** * The maximum number of items allowed in an array property. * @@ -222,7 +201,6 @@ class Schema extends AbstractAnnotation * @var int */ public $maxItems = Generator::UNDEFINED; - /** * The minimum number of items allowed in an array property. * @@ -234,7 +212,6 @@ class Schema extends AbstractAnnotation * @var int */ public $minItems = Generator::UNDEFINED; - /** * A boolean value indicating whether all items in an array property must be unique. * @@ -245,7 +222,6 @@ class Schema extends AbstractAnnotation * @var bool */ public $uniqueItems = Generator::UNDEFINED; - /** * A collection of allowable values for a property. * @@ -257,7 +233,6 @@ class Schema extends AbstractAnnotation * @var array|class-string */ public $enum = Generator::UNDEFINED; - /** * A numeric instance is valid against "multipleOf" if the result of the division of the instance by this * property's value is an integer. @@ -265,7 +240,6 @@ class Schema extends AbstractAnnotation * @var int|float */ public $multipleOf = Generator::UNDEFINED; - /** * Adds support for polymorphism. * @@ -275,7 +249,6 @@ class Schema extends AbstractAnnotation * @var Discriminator */ public $discriminator = Generator::UNDEFINED; - /** * Declares the property as "read only". * @@ -289,7 +262,6 @@ class Schema extends AbstractAnnotation * @var bool */ public $readOnly = Generator::UNDEFINED; - /** * Declares the property as "write only". * @@ -302,7 +274,6 @@ class Schema extends AbstractAnnotation * @var bool */ public $writeOnly = Generator::UNDEFINED; - /** * This may be used only on properties schemas. * @@ -312,14 +283,12 @@ class Schema extends AbstractAnnotation * @var Xml */ public $xml = Generator::UNDEFINED; - /** * Additional external documentation for this schema. * * @var ExternalDocumentation */ public $externalDocs = Generator::UNDEFINED; - /** * A free-form property to include an example of an instance for this schema. * @@ -327,7 +296,6 @@ class Schema extends AbstractAnnotation * contain the example with escaping where necessary. */ public $example = Generator::UNDEFINED; - /** * Examples of the schema. * @@ -340,7 +308,6 @@ class Schema extends AbstractAnnotation * @var array */ public $examples = Generator::UNDEFINED; - /** * Allows sending a null value for the defined schema. * Default value is false. @@ -353,7 +320,6 @@ class Schema extends AbstractAnnotation * @see https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0 */ public $nullable = Generator::UNDEFINED; - /** * Specifies that a schema is deprecated and should be transitioned out of usage. * Default value is false. @@ -361,7 +327,6 @@ class Schema extends AbstractAnnotation * @var bool */ public $deprecated = Generator::UNDEFINED; - /** * An instance validates successfully against this property if it validates successfully against all schemas * defined by this property's value. @@ -369,7 +334,6 @@ class Schema extends AbstractAnnotation * @var array */ public $allOf = Generator::UNDEFINED; - /** * An instance validates successfully against this property if it validates successfully against at least one * schema defined by this property's value. @@ -377,7 +341,6 @@ class Schema extends AbstractAnnotation * @var array */ public $anyOf = Generator::UNDEFINED; - /** * An instance validates successfully against this property if it validates successfully against exactly one schema * defined by this property's value. @@ -385,99 +348,52 @@ class Schema extends AbstractAnnotation * @var array */ public $oneOf = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.29. */ public $not = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#anchor64. * * @var bool|AdditionalProperties */ public $additionalProperties = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.10. */ public $additionalItems = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.14. */ public $contains = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.19. */ public $patternProperties = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.21. */ public $dependencies = Generator::UNDEFINED; - /** * http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.22. */ public $propertyNames = Generator::UNDEFINED; - /** * http://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.1.3. */ public $const = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_types = [ - 'title' => 'string', - 'description' => 'string', - 'required' => '[string]', - 'format' => 'string', - 'collectionFormat' => ['csv', 'ssv', 'tsv', 'pipes', 'multi'], - 'maximum' => 'number', - 'exclusiveMaximum' => 'boolean|integer|number', - 'minimum' => 'number', - 'exclusiveMinimum' => 'boolean|integer|number', - 'maxLength' => 'integer', - 'minLength' => 'integer', - 'pattern' => 'string', - 'maxItems' => 'integer', - 'minItems' => 'integer', - 'uniqueItems' => 'boolean', - 'multipleOf' => 'integer', - 'allOf' => '[' . Schema::class . ']', - 'oneOf' => '[' . Schema::class . ']', - 'anyOf' => '[' . Schema::class . ']', - ]; - + public static $_types = ['title' => 'string', 'description' => 'string', 'required' => '[string]', 'format' => 'string', 'collectionFormat' => ['csv', 'ssv', 'tsv', 'pipes', 'multi'], 'maximum' => 'number', 'exclusiveMaximum' => 'boolean|integer|number', 'minimum' => 'number', 'exclusiveMinimum' => 'boolean|integer|number', 'maxLength' => 'integer', 'minLength' => 'integer', 'pattern' => 'string', 'maxItems' => 'integer', 'minItems' => 'integer', 'uniqueItems' => 'boolean', 'multipleOf' => 'integer', 'allOf' => '[' . Schema::class . ']', 'oneOf' => '[' . Schema::class . ']', 'anyOf' => '[' . Schema::class . ']']; /** * @inheritdoc */ - public static $_nested = [ - Discriminator::class => 'discriminator', - Items::class => 'items', - Property::class => ['properties', 'property'], - ExternalDocumentation::class => 'externalDocs', - Examples::class => ['examples', 'example'], - Xml::class => 'xml', - AdditionalProperties::class => 'additionalProperties', - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Discriminator::class => 'discriminator', Items::class => 'items', Property::class => ['properties', 'property'], ExternalDocumentation::class => 'externalDocs', Examples::class => ['examples', 'example'], Xml::class => 'xml', AdditionalProperties::class => 'additionalProperties', Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Components::class, - Parameter::class, - PathParameter::class, - MediaType::class, - Header::class, - ]; - + public static $_parents = [Components::class, Parameter::class, PathParameter::class, MediaType::class, Header::class]; /** * @inheritdoc */ @@ -485,37 +401,30 @@ class Schema extends AbstractAnnotation public function jsonSerialize() { $data = parent::jsonSerialize(); - - if ($this->_context->isVersion(OpenApi::VERSION_3_0_0)) { + if ($this->_context->isVersion('3.0.x')) { unset($data->examples); if (isset($data->const)) { $data->enum = [$data->const]; unset($data->const); } } - return $data; } - /** * @inheritdoc */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool + public function validate(array $stack = [], array $skip = [], string $ref = '', ?object $context = null) : bool { if ($this->type === 'array' && Generator::isDefault($this->items)) { $this->_context->logger->warning('@OA\\Items() is required when ' . $this->identity() . ' has type "array" in ' . $this->_context); - - return false; + return \false; } - - if ($this->_context->isVersion(OpenApi::VERSION_3_0_0)) { + if ($this->_context->isVersion('3.0.x')) { if (!Generator::isDefault($this->examples)) { - $this->_context->logger->warning($this->identity() . ' is only allowed for ' . OpenApi::VERSION_3_1_0); - - return false; + $this->_context->logger->warning($this->identity() . ' is only allowed for 3.1.x'); + return \false; } } - return parent::validate($stack, $skip, $ref, $context); } } diff --git a/vendor/zircote/swagger-php/src/Annotations/SecurityScheme.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/SecurityScheme.php similarity index 79% rename from vendor/zircote/swagger-php/src/Annotations/SecurityScheme.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/SecurityScheme.php index 37ef7ef..85320ac 100644 --- a/vendor/zircote/swagger-php/src/Annotations/SecurityScheme.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/SecurityScheme.php @@ -1,13 +1,12 @@ -security array. * * @var string */ public $securityScheme = Generator::UNDEFINED; - /** * The type of the security scheme. * * @var string|non-empty-array */ public $type = Generator::UNDEFINED; - /** * A short description for security scheme. * * @var string */ public $description = Generator::UNDEFINED; - /** * The name of the header or query parameter to be used. * * @var string */ public $name = Generator::UNDEFINED; - /** * Required The location of the API key. * * @var string */ public $in = Generator::UNDEFINED; - /** * The flow used by the OAuth2 security scheme. * * @var Flow[] */ public $flows = Generator::UNDEFINED; - /** * A hint to the client to identify how the bearer token is formatted. * @@ -74,7 +66,6 @@ class SecurityScheme extends AbstractAnnotation * @var string */ public $bearerFormat = Generator::UNDEFINED; - /** * The name of the HTTP Authorization scheme. * @@ -83,56 +74,37 @@ class SecurityScheme extends AbstractAnnotation * @var string */ public $scheme = Generator::UNDEFINED; - /** * OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. * * @var string */ public $openIdConnectUrl = Generator::UNDEFINED; - /** * @inheritdoc */ public static $_required = ['securityScheme', 'type']; - /** * @inheritdoc */ - public static $_types = [ - 'type' => ['http', 'apiKey', 'oauth2', 'openIdConnect'], - 'description' => 'string', - 'name' => 'string', - 'bearerFormat' => 'string', - 'in' => ['query', 'header', 'cookie'], - ]; - + public static $_types = ['type' => ['http', 'apiKey', 'oauth2', 'openIdConnect'], 'description' => 'string', 'name' => 'string', 'bearerFormat' => 'string', 'in' => ['query', 'header', 'cookie']]; /** * @inheritdoc */ - public static $_nested = [ - Flow::class => ['flows', 'flow'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [Flow::class => ['flows', 'flow'], Attachable::class => ['attachables']]; /** * @inheritdoc */ - public static $_parents = [ - Components::class, - ]; - + public static $_parents = [Components::class]; /** * @inheritdoc */ - public function merge(array $annotations, bool $ignore = false): array + public function merge(array $annotations, bool $ignore = \false) : array { $unmerged = parent::merge($annotations, $ignore); - if ($this->type === 'oauth2') { $this->name = Generator::UNDEFINED; } - return $unmerged; } } diff --git a/vendor/zircote/swagger-php/src/Annotations/Server.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Server.php similarity index 65% rename from vendor/zircote/swagger-php/src/Annotations/Server.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Server.php index 9a807e5..af64fd0 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Server.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Server.php @@ -1,13 +1,12 @@ - ['variables', 'serverVariable'], - Attachable::class => ['attachables'], - ]; - + public static $_nested = [ServerVariable::class => ['variables', 'serverVariable'], Attachable::class => ['attachables']]; /** * @inheritdoc */ public static $_required = ['url']; - /** * @inheritdoc */ - public static $_types = [ - 'url' => 'string', - 'description' => 'string', - ]; + public static $_types = ['url' => 'string', 'description' => 'string']; } diff --git a/vendor/zircote/swagger-php/src/Annotations/ServerVariable.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/ServerVariable.php similarity index 81% rename from vendor/zircote/swagger-php/src/Annotations/ServerVariable.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/ServerVariable.php index d92a57e..ea99dfc 100644 --- a/vendor/zircote/swagger-php/src/Annotations/ServerVariable.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/ServerVariable.php @@ -1,13 +1,12 @@ -|class-string */ public $enum = Generator::UNDEFINED; - /** * The default value to use for substitution, and to send, if an alternate value is not supplied. * @@ -39,7 +36,6 @@ class ServerVariable extends AbstractAnnotation * @var string */ public $default = Generator::UNDEFINED; - /** * A map between a variable name and its value. * @@ -48,7 +44,6 @@ class ServerVariable extends AbstractAnnotation * @var array */ public $variables = Generator::UNDEFINED; - /** * An optional description for the server variable. * @@ -57,31 +52,20 @@ class ServerVariable extends AbstractAnnotation * @var string */ public $description = Generator::UNDEFINED; - /** * @inheritdoc */ - public static $_parents = [ - Server::class, - ]; - + public static $_parents = [Server::class]; /** * @inheritdoc */ public static $_required = ['default']; - /** * @inheritdoc */ - public static $_types = [ - 'default' => 'string', - 'description' => 'string', - ]; - + public static $_types = ['default' => 'string', 'description' => 'string']; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; + public static $_nested = [Attachable::class => ['attachables']]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/Tag.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Tag.php similarity index 67% rename from vendor/zircote/swagger-php/src/Annotations/Tag.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Tag.php index 94d6f23..45aabcd 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Tag.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Tag.php @@ -1,13 +1,12 @@ - 'string', - 'description' => 'string', - ]; - + public static $_types = ['name' => 'string', 'description' => 'string']; /** * @inheritdoc */ - public static $_parents = [ - OpenApi::class, - ]; - + public static $_parents = [OpenApi::class]; /** * @inheritdoc */ - public static $_nested = [ - ExternalDocumentation::class => 'externalDocs', - Attachable::class => ['attachables'], - ]; + public static $_nested = [ExternalDocumentation::class => 'externalDocs', Attachable::class => ['attachables']]; } diff --git a/vendor/zircote/swagger-php/src/Annotations/Trace.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Trace.php similarity index 56% rename from vendor/zircote/swagger-php/src/Annotations/Trace.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Trace.php index aac2820..257b14b 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Trace.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Trace.php @@ -1,10 +1,10 @@ -PathItem with the main difference being that it requires webhook instead of path. * @@ -21,23 +20,16 @@ class Webhook extends PathItem * @var string */ public $webhook = Generator::UNDEFINED; - /** * @inheritdoc */ public static $_required = ['webhook']; - /** * @inheritdoc */ - public static $_parents = [ - OpenApi::class, - ]; - + public static $_parents = [OpenApi::class]; /** * @inheritdoc */ - public static $_types = [ - 'webhook' => 'string', - ]; + public static $_types = ['webhook' => 'string']; } diff --git a/vendor/zircote/swagger-php/src/Annotations/Xml.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/Xml.php similarity index 75% rename from vendor/zircote/swagger-php/src/Annotations/Xml.php rename to vendor/prefixed/zircote/swagger-php/src/Annotations/Xml.php index 2ff6a4e..3fd86f4 100644 --- a/vendor/zircote/swagger-php/src/Annotations/Xml.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/Xml.php @@ -1,13 +1,12 @@ - 'string', - 'namespace' => 'string', - 'prefix' => 'string', - 'attribute' => 'boolean', - 'wrapped' => 'boolean', - ]; - + public static $_types = ['name' => 'string', 'namespace' => 'string', 'prefix' => 'string', 'attribute' => 'boolean', 'wrapped' => 'boolean']; /** * @inheritdoc */ - public static $_parents = [ - AdditionalProperties::class, - Schema::class, - Property::class, - Schema::class, - Items::class, - XmlContent::class, - ]; - + public static $_parents = [AdditionalProperties::class, Schema::class, Property::class, Schema::class, Items::class, XmlContent::class]; /** * @inheritdoc */ - public static $_nested = [ - Attachable::class => ['attachables'], - ]; + public static $_nested = [Attachable::class => ['attachables']]; } diff --git a/vendor/prefixed/zircote/swagger-php/src/Annotations/XmlContent.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/XmlContent.php new file mode 100644 index 0000000..007c95a --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/XmlContent.php @@ -0,0 +1,27 @@ +@OA\Schema inside a Response and MediaType->'application/xml' will be generated. + * + * @Annotation + */ +class XmlContent extends Schema +{ + /** + * @inheritdoc + */ + public static $_parents = []; + /** + * @inheritdoc + */ + public static $_nested = [Discriminator::class => 'discriminator', Items::class => 'items', Property::class => ['properties', 'property'], ExternalDocumentation::class => 'externalDocs', Xml::class => 'xml', AdditionalProperties::class => 'additionalProperties', Examples::class => ['examples', 'example'], Attachable::class => ['attachables']]; +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/AdditionalProperties.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/AdditionalProperties.php new file mode 100644 index 0000000..600f8d2 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/AdditionalProperties.php @@ -0,0 +1,78 @@ +|null $type + * @param int|float $maximum + * @param int|float $minimum + * @param array|class-string|null $enum + * @param array $allOf + * @param array $anyOf + * @param array $oneOf + * @param array|null $x + * @param Attachable[]|null $attachables + * @param bool|int|float|null $exclusiveMaximum + * @param bool|int|float|null $exclusiveMinimum + * @param \Matomo\Dependencies\OpenApiDocs\OpenApi\Attributes\AdditionalProperties|bool|null $additionalProperties + * @param mixed $default + * @param mixed $example + */ + public function __construct( + // schema + $ref = null, + ?string $schema = null, + ?string $title = null, + ?string $description = null, + ?int $maxProperties = null, + ?int $minProperties = null, + ?array $required = null, + ?array $properties = null, + $type = null, + ?string $format = null, + ?Items $items = null, + ?string $collectionFormat = null, + $default = Generator::UNDEFINED, + $maximum = null, + $exclusiveMaximum = null, + $minimum = null, + $exclusiveMinimum = null, + ?int $maxLength = null, + ?int $minLength = null, + ?int $maxItems = null, + ?int $minItems = null, + ?bool $uniqueItems = null, + ?string $pattern = null, + $enum = null, + ?Discriminator $discriminator = null, + ?bool $readOnly = null, + ?bool $writeOnly = null, + ?Xml $xml = null, + ?ExternalDocumentation $externalDocs = null, + $example = Generator::UNDEFINED, + ?bool $nullable = null, + ?bool $deprecated = null, + ?array $allOf = null, + ?array $anyOf = null, + ?array $oneOf = null, + $additionalProperties = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['ref' => $ref ?? Generator::UNDEFINED, 'schema' => $schema ?? Generator::UNDEFINED, 'title' => $title ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'maxProperties' => $maxProperties ?? Generator::UNDEFINED, 'minProperties' => $minProperties ?? Generator::UNDEFINED, 'required' => $required ?? Generator::UNDEFINED, 'properties' => $properties ?? Generator::UNDEFINED, 'type' => $type ?? Generator::UNDEFINED, 'format' => $format ?? Generator::UNDEFINED, 'collectionFormat' => $collectionFormat ?? Generator::UNDEFINED, 'default' => $default, 'maximum' => $maximum ?? Generator::UNDEFINED, 'exclusiveMaximum' => $exclusiveMaximum ?? Generator::UNDEFINED, 'minimum' => $minimum ?? Generator::UNDEFINED, 'exclusiveMinimum' => $exclusiveMinimum ?? Generator::UNDEFINED, 'maxLength' => $maxLength ?? Generator::UNDEFINED, 'minLength' => $minLength ?? Generator::UNDEFINED, 'maxItems' => $maxItems ?? Generator::UNDEFINED, 'minItems' => $minItems ?? Generator::UNDEFINED, 'uniqueItems' => $uniqueItems ?? Generator::UNDEFINED, 'pattern' => $pattern ?? Generator::UNDEFINED, 'enum' => $enum ?? Generator::UNDEFINED, 'readOnly' => $readOnly ?? Generator::UNDEFINED, 'writeOnly' => $writeOnly ?? Generator::UNDEFINED, 'xml' => $xml ?? Generator::UNDEFINED, 'example' => $example, 'nullable' => $nullable ?? Generator::UNDEFINED, 'deprecated' => $deprecated ?? Generator::UNDEFINED, 'allOf' => $allOf ?? Generator::UNDEFINED, 'anyOf' => $anyOf ?? Generator::UNDEFINED, 'oneOf' => $oneOf ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($items, $discriminator, $externalDocs, $additionalProperties)]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/Attachable.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Attachable.php similarity index 61% rename from vendor/zircote/swagger-php/src/Attributes/Attachable.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Attachable.php index 4056db1..cd32ee8 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Attachable.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Attachable.php @@ -1,13 +1,12 @@ - $callbacks ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($schemas, $responses, $parameters, $examples, $requestBodies, $headers, $securitySchemes, $links), - ]); + ) + { + parent::__construct(['callbacks' => $callbacks ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($schemas, $responses, $parameters, $examples, $requestBodies, $headers, $securitySchemes, $links)]); } } diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/Contact.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Contact.php new file mode 100644 index 0000000..6e50367 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Contact.php @@ -0,0 +1,29 @@ +|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + ?string $name = null, + ?string $url = null, + ?string $email = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['name' => $name ?? Generator::UNDEFINED, 'url' => $url ?? Generator::UNDEFINED, 'email' => $email ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/CookieParameter.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/CookieParameter.php similarity index 75% rename from vendor/zircote/swagger-php/src/Attributes/CookieParameter.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/CookieParameter.php index f6297e4..d704c65 100644 --- a/vendor/zircote/swagger-php/src/Attributes/CookieParameter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/CookieParameter.php @@ -1,10 +1,10 @@ - $propertyName ?? Generator::UNDEFINED, - 'mapping' => $mapping ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); + ) + { + parent::__construct(['propertyName' => $propertyName ?? Generator::UNDEFINED, 'mapping' => $mapping ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); } } diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/Examples.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Examples.php new file mode 100644 index 0000000..24bf3d9 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Examples.php @@ -0,0 +1,34 @@ +|null $x + * @param Attachable[]|null $attachables + * @param int|string|mixed[]|null $value + */ + public function __construct( + ?string $example = null, + ?string $summary = null, + ?string $description = null, + $value = null, + ?string $externalValue = null, + $ref = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['example' => $example ?? Generator::UNDEFINED, 'summary' => $summary ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'value' => $value ?? Generator::UNDEFINED, 'externalValue' => $externalValue ?? Generator::UNDEFINED, 'ref' => $ref ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); + } +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/ExternalDocumentation.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/ExternalDocumentation.php new file mode 100644 index 0000000..7168afc --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/ExternalDocumentation.php @@ -0,0 +1,28 @@ +|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + ?string $description = null, + ?string $url = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['description' => $description ?? Generator::UNDEFINED, 'url' => $url ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/Flow.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Flow.php similarity index 52% rename from vendor/zircote/swagger-php/src/Attributes/Flow.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Flow.php index aee41ca..23a8f8a 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Flow.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Flow.php @@ -1,14 +1,13 @@ - $authorizationUrl ?? Generator::UNDEFINED, - 'tokenUrl' => $tokenUrl ?? Generator::UNDEFINED, - 'refreshUrl' => $refreshUrl ?? Generator::UNDEFINED, - 'flow' => $flow ?? Generator::UNDEFINED, - 'scopes' => $scopes ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); + ) + { + parent::__construct(['authorizationUrl' => $authorizationUrl ?? Generator::UNDEFINED, 'tokenUrl' => $tokenUrl ?? Generator::UNDEFINED, 'refreshUrl' => $refreshUrl ?? Generator::UNDEFINED, 'flow' => $flow ?? Generator::UNDEFINED, 'scopes' => $scopes ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); } } diff --git a/vendor/zircote/swagger-php/src/Attributes/Get.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Get.php similarity index 53% rename from vendor/zircote/swagger-php/src/Attributes/Get.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Get.php index 59de619..3834bc3 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Get.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Get.php @@ -1,13 +1,12 @@ -|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + $ref = null, + ?string $header = null, + ?string $description = null, + ?bool $required = null, + ?Schema $schema = null, + ?bool $deprecated = null, + ?bool $allowEmptyValue = null, + // annotation4 + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['ref' => $ref ?? Generator::UNDEFINED, 'header' => $header ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'required' => $required ?? Generator::UNDEFINED, 'deprecated' => $deprecated ?? Generator::UNDEFINED, 'allowEmptyValue' => $allowEmptyValue ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($schema)]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/HeaderParameter.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/HeaderParameter.php similarity index 75% rename from vendor/zircote/swagger-php/src/Attributes/HeaderParameter.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/HeaderParameter.php index 4f5c318..5416ad8 100644 --- a/vendor/zircote/swagger-php/src/Attributes/HeaderParameter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/HeaderParameter.php @@ -1,10 +1,10 @@ -|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + ?string $version = null, + ?string $description = null, + ?string $title = null, + ?string $termsOfService = null, + ?Contact $contact = null, + ?License $license = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['version' => $version ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'title' => $title ?? Generator::UNDEFINED, 'termsOfService' => $termsOfService ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($contact, $license)]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/Items.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Items.php similarity index 85% rename from vendor/zircote/swagger-php/src/Attributes/Items.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Items.php index 8487a0b..c74d76d 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Items.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Items.php @@ -1,14 +1,13 @@ - $oneOf * @param array|null $x * @param Attachable[]|null $attachables + * @param bool|int|float|null $exclusiveMaximum + * @param bool|int|float|null $exclusiveMinimum + * @param \Matomo\Dependencies\OpenApiDocs\OpenApi\Attributes\AdditionalProperties|bool|null $additionalProperties + * @param mixed $default + * @param mixed $example */ public function __construct( // schema - string|object|null $ref = null, + $ref = null, ?string $schema = null, ?string $title = null, ?string $description = null, @@ -36,38 +40,39 @@ public function __construct( ?int $minProperties = null, ?array $required = null, ?array $properties = null, - string|array|null $type = null, + $type = null, ?string $format = null, ?Items $items = null, ?string $collectionFormat = null, - mixed $default = Generator::UNDEFINED, + $default = Generator::UNDEFINED, $maximum = null, - bool|int|float|null $exclusiveMaximum = null, + $exclusiveMaximum = null, $minimum = null, - bool|int|float|null $exclusiveMinimum = null, + $exclusiveMinimum = null, ?int $maxLength = null, ?int $minLength = null, ?int $maxItems = null, ?int $minItems = null, ?bool $uniqueItems = null, ?string $pattern = null, - array|string|null $enum = null, + $enum = null, ?Discriminator $discriminator = null, ?bool $readOnly = null, ?bool $writeOnly = null, ?Xml $xml = null, ?ExternalDocumentation $externalDocs = null, - mixed $example = Generator::UNDEFINED, + $example = Generator::UNDEFINED, ?bool $nullable = null, ?bool $deprecated = null, ?array $allOf = null, ?array $anyOf = null, ?array $oneOf = null, - AdditionalProperties|bool|null $additionalProperties = null, + $additionalProperties = null, // annotation ?array $x = null, ?array $attachables = null - ) { + ) + { parent::__construct([ // schema 'ref' => $ref ?? Generator::UNDEFINED, diff --git a/vendor/zircote/swagger-php/src/Attributes/JsonContent.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/JsonContent.php similarity index 86% rename from vendor/zircote/swagger-php/src/Attributes/JsonContent.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/JsonContent.php index 07f7672..ab7671d 100644 --- a/vendor/zircote/swagger-php/src/Attributes/JsonContent.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/JsonContent.php @@ -1,14 +1,13 @@ - $oneOf * @param array|null $x * @param Attachable[]|null $attachables + * @param bool|int|float|null $exclusiveMaximum + * @param bool|int|float|null $exclusiveMinimum + * @param \Matomo\Dependencies\OpenApiDocs\OpenApi\Attributes\AdditionalProperties|bool|null $additionalProperties + * @param mixed $default + * @param mixed $example */ public function __construct( ?array $examples = null, // schema - string|object|null $ref = null, + $ref = null, ?string $schema = null, ?string $title = null, ?string $description = null, @@ -59,38 +63,39 @@ public function __construct( ?int $minProperties = null, ?array $required = null, ?array $properties = null, - string|array|null $type = null, + $type = null, ?string $format = null, ?Items $items = null, ?string $collectionFormat = null, - mixed $default = Generator::UNDEFINED, + $default = Generator::UNDEFINED, $maximum = null, - bool|int|float|null $exclusiveMaximum = null, + $exclusiveMaximum = null, $minimum = null, - bool|int|float|null $exclusiveMinimum = null, + $exclusiveMinimum = null, ?int $maxLength = null, ?int $minLength = null, ?int $maxItems = null, ?int $minItems = null, ?bool $uniqueItems = null, ?string $pattern = null, - array|string|null $enum = null, + $enum = null, ?Discriminator $discriminator = null, ?bool $readOnly = null, ?bool $writeOnly = null, ?Xml $xml = null, ?ExternalDocumentation $externalDocs = null, - mixed $example = Generator::UNDEFINED, + $example = Generator::UNDEFINED, ?bool $nullable = null, ?bool $deprecated = null, ?array $allOf = null, ?array $anyOf = null, ?array $oneOf = null, - AdditionalProperties|bool|null $additionalProperties = null, + $additionalProperties = null, // annotation ?array $x = null, ?array $attachables = null - ) { + ) + { parent::__construct([ 'examples' => $examples ?? Generator::UNDEFINED, // schema diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/License.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/License.php new file mode 100644 index 0000000..332321d --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/License.php @@ -0,0 +1,29 @@ +|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + ?string $name = null, + ?string $identifier = null, + ?string $url = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['name' => $name ?? Generator::UNDEFINED, 'identifier' => $identifier ?? Generator::UNDEFINED, 'url' => $url ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); + } +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/Link.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Link.php new file mode 100644 index 0000000..bf30131 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Link.php @@ -0,0 +1,37 @@ + $parameters + * @param array|null $x + * @param Attachable[]|null $attachables + * @param mixed $requestBody + */ + public function __construct( + ?string $link = null, + ?string $operationRef = null, + $ref = null, + ?string $operationId = null, + ?array $parameters = null, + $requestBody = null, + ?string $description = null, + ?Server $server = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['link' => $link ?? Generator::UNDEFINED, 'operationRef' => $operationRef ?? Generator::UNDEFINED, 'ref' => $ref ?? Generator::UNDEFINED, 'operationId' => $operationId ?? Generator::UNDEFINED, 'parameters' => $parameters ?? Generator::UNDEFINED, 'requestBody' => $requestBody ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($server)]); + } +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/MediaType.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/MediaType.php new file mode 100644 index 0000000..ab870b4 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/MediaType.php @@ -0,0 +1,34 @@ + $examples + * @param array $encoding + * @param array|null $x + * @param Attachable[]|null $attachables + * @param mixed $example + */ + public function __construct( + ?string $mediaType = null, + ?Schema $schema = null, + $example = Generator::UNDEFINED, + ?array $examples = null, + ?array $encoding = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['mediaType' => $mediaType ?? Generator::UNDEFINED, 'example' => $example, 'encoding' => $encoding ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($schema, $examples)]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/OpenApi.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/OpenApi.php similarity index 60% rename from vendor/zircote/swagger-php/src/Attributes/OpenApi.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/OpenApi.php index 798d7c1..fb2323a 100644 --- a/vendor/zircote/swagger-php/src/Attributes/OpenApi.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/OpenApi.php @@ -1,19 +1,17 @@ - $openapi, - 'security' => $security ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($info, $servers, $tags, $externalDocs, $paths, $components, $webhooks), - ]); + ) + { + parent::__construct(['openapi' => $openapi, 'security' => $security ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($info, $servers, $tags, $externalDocs, $paths, $components, $webhooks)]); } } diff --git a/vendor/zircote/swagger-php/src/Attributes/OperationTrait.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/OperationTrait.php similarity index 50% rename from vendor/zircote/swagger-php/src/Attributes/OperationTrait.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/OperationTrait.php index f3cad57..f4fab92 100644 --- a/vendor/zircote/swagger-php/src/Attributes/OperationTrait.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/OperationTrait.php @@ -1,13 +1,12 @@ - $path ?? Generator::UNDEFINED, - 'operationId' => $operationId ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'summary' => $summary ?? Generator::UNDEFINED, - 'security' => $security ?? Generator::UNDEFINED, - 'servers' => $servers ?? Generator::UNDEFINED, - 'tags' => $tags ?? Generator::UNDEFINED, - 'callbacks' => $callbacks ?? Generator::UNDEFINED, - 'deprecated' => $deprecated ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($requestBody, $responses, $parameters, $externalDocs), - ]); + ) + { + parent::__construct(['path' => $path ?? Generator::UNDEFINED, 'operationId' => $operationId ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'summary' => $summary ?? Generator::UNDEFINED, 'security' => $security ?? Generator::UNDEFINED, 'servers' => $servers ?? Generator::UNDEFINED, 'tags' => $tags ?? Generator::UNDEFINED, 'callbacks' => $callbacks ?? Generator::UNDEFINED, 'deprecated' => $deprecated ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($requestBody, $responses, $parameters, $externalDocs)]); } } diff --git a/vendor/zircote/swagger-php/src/Attributes/Options.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Options.php similarity index 54% rename from vendor/zircote/swagger-php/src/Attributes/Options.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Options.php index 36f8ab2..583de0b 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Options.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Options.php @@ -1,13 +1,12 @@ - $examples + * @param array|JsonContent|XmlContent|Attachable|null $content + * @param array|null $x + * @param Attachable[]|null $attachables + * @param mixed $example + */ + public function __construct( + ?string $parameter = null, + ?string $name = null, + ?string $description = null, + ?string $in = null, + ?bool $required = null, + ?bool $deprecated = null, + ?bool $allowEmptyValue = null, + $ref = null, + ?Schema $schema = null, + $example = Generator::UNDEFINED, + ?array $examples = null, + $content = null, + ?string $style = null, + ?bool $explode = null, + ?bool $allowReserved = null, + ?array $spaceDelimited = null, + ?array $pipeDelimited = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct([ + 'parameter' => $parameter ?? Generator::UNDEFINED, + 'name' => $name ?? Generator::UNDEFINED, + 'description' => $description ?? Generator::UNDEFINED, + // next two are special as we override the default value for specific Parameter subclasses + 'in' => $in ?? (Generator::isDefault($this->in) ? Generator::UNDEFINED : $this->in), + 'required' => $required ?? (Generator::isDefault($this->required) ? Generator::UNDEFINED : $this->required), + 'deprecated' => $deprecated ?? Generator::UNDEFINED, + 'allowEmptyValue' => $allowEmptyValue ?? Generator::UNDEFINED, + 'ref' => $ref ?? Generator::UNDEFINED, + 'example' => $example, + 'style' => $style ?? Generator::UNDEFINED, + 'explode' => $explode ?? Generator::UNDEFINED, + 'allowReserved' => $allowReserved ?? Generator::UNDEFINED, + 'spaceDelimited' => $spaceDelimited ?? Generator::UNDEFINED, + 'pipeDelimited' => $pipeDelimited ?? Generator::UNDEFINED, + 'x' => $x ?? Generator::UNDEFINED, + 'attachables' => $attachables ?? Generator::UNDEFINED, + 'value' => $this->combine($schema, $examples, $content), + ]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/Patch.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Patch.php similarity index 54% rename from vendor/zircote/swagger-php/src/Attributes/Patch.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Patch.php index 5cb95ec..b82db76 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Patch.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Patch.php @@ -1,13 +1,12 @@ - $path ?? Generator::UNDEFINED, - 'ref' => $ref ?? Generator::UNDEFINED, - 'summary' => $summary ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($get, $put, $post, $delete, $options, $head, $patch, $trace, $servers, $parameters), - ]); + ) + { + parent::__construct(['path' => $path ?? Generator::UNDEFINED, 'ref' => $ref ?? Generator::UNDEFINED, 'summary' => $summary ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($get, $put, $post, $delete, $options, $head, $patch, $trace, $servers, $parameters)]); } } diff --git a/vendor/zircote/swagger-php/src/Attributes/PathParameter.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/PathParameter.php similarity index 72% rename from vendor/zircote/swagger-php/src/Attributes/PathParameter.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/PathParameter.php index 02b98d9..4403622 100644 --- a/vendor/zircote/swagger-php/src/Attributes/PathParameter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/PathParameter.php @@ -1,10 +1,10 @@ - $oneOf * @param array|null $x * @param Attachable[]|null $attachables + * @param bool|int|float|null $exclusiveMaximum + * @param bool|int|float|null $exclusiveMinimum + * @param \Matomo\Dependencies\OpenApiDocs\OpenApi\Attributes\AdditionalProperties|bool|null $additionalProperties + * @param mixed $default + * @param mixed $example */ public function __construct( ?string $property = null, // schema - string|object|null $ref = null, + $ref = null, ?string $schema = null, ?string $title = null, ?string $description = null, @@ -37,38 +41,39 @@ public function __construct( ?int $minProperties = null, ?array $required = null, ?array $properties = null, - string|array|null $type = null, + $type = null, ?string $format = null, ?Items $items = null, ?string $collectionFormat = null, - mixed $default = Generator::UNDEFINED, + $default = Generator::UNDEFINED, $maximum = null, - bool|int|float|null $exclusiveMaximum = null, + $exclusiveMaximum = null, $minimum = null, - bool|int|float|null $exclusiveMinimum = null, + $exclusiveMinimum = null, ?int $maxLength = null, ?int $minLength = null, ?int $maxItems = null, ?int $minItems = null, ?bool $uniqueItems = null, ?string $pattern = null, - array|string|null $enum = null, + $enum = null, ?Discriminator $discriminator = null, ?bool $readOnly = null, ?bool $writeOnly = null, ?Xml $xml = null, ?ExternalDocumentation $externalDocs = null, - mixed $example = Generator::UNDEFINED, + $example = Generator::UNDEFINED, ?bool $nullable = null, ?bool $deprecated = null, ?array $allOf = null, ?array $anyOf = null, ?array $oneOf = null, - AdditionalProperties|bool|null $additionalProperties = null, + $additionalProperties = null, // annotation ?array $x = null, ?array $attachables = null - ) { + ) + { parent::__construct([ 'property' => $property ?? Generator::UNDEFINED, // schema diff --git a/vendor/zircote/swagger-php/src/Attributes/Put.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Put.php similarity index 53% rename from vendor/zircote/swagger-php/src/Attributes/Put.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Put.php index 42a3252..3191559 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Put.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Put.php @@ -1,13 +1,12 @@ - $ref ?? Generator::UNDEFINED, - 'request' => $request ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'required' => $required ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($content), - ]); + ) + { + parent::__construct(['ref' => $ref ?? Generator::UNDEFINED, 'request' => $request ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'required' => $required ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($content)]); } } diff --git a/vendor/zircote/swagger-php/src/Attributes/Response.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Response.php similarity index 61% rename from vendor/zircote/swagger-php/src/Attributes/Response.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Response.php index 440dfb3..e99a3df 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Response.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Response.php @@ -1,14 +1,13 @@ -|null $x * @param Attachable[]|null $attachables + * @param int|string|null $response */ public function __construct( - string|object|null $ref = null, - int|string|null $response = null, + $ref = null, + $response = null, ?string $description = null, ?array $headers = null, - MediaType|JsonContent|XmlContent|Attachable|array|null $content = null, + $content = null, ?array $links = null, // annotation ?array $x = null, ?array $attachables = null - ) { - parent::__construct([ - 'ref' => $ref ?? Generator::UNDEFINED, - 'response' => $response ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($headers, $content, $links), - ]); + ) + { + parent::__construct(['ref' => $ref ?? Generator::UNDEFINED, 'response' => $response ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($headers, $content, $links)]); } } diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/Schema.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Schema.php new file mode 100644 index 0000000..e661d1f --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Schema.php @@ -0,0 +1,82 @@ +|null $type + * @param int|float $maximum + * @param int|float $minimum + * @param array|class-string|null $enum + * @param array $examples + * @param array $allOf + * @param array $anyOf + * @param array $oneOf + * @param array|null $x + * @param Attachable[]|null $attachables + * @param bool|int|float|null $exclusiveMaximum + * @param bool|int|float|null $exclusiveMinimum + * @param \Matomo\Dependencies\OpenApiDocs\OpenApi\Attributes\AdditionalProperties|bool|null $additionalProperties + * @param mixed $default + * @param mixed $example + * @param mixed $const + */ + public function __construct( + // schema + $ref = null, + ?string $schema = null, + ?string $title = null, + ?string $description = null, + ?int $maxProperties = null, + ?int $minProperties = null, + ?array $required = null, + ?array $properties = null, + $type = null, + ?string $format = null, + ?Items $items = null, + ?string $collectionFormat = null, + $default = Generator::UNDEFINED, + $maximum = null, + $exclusiveMaximum = null, + $minimum = null, + $exclusiveMinimum = null, + ?int $maxLength = null, + ?int $minLength = null, + ?int $maxItems = null, + ?int $minItems = null, + ?bool $uniqueItems = null, + ?string $pattern = null, + $enum = null, + ?Discriminator $discriminator = null, + ?bool $readOnly = null, + ?bool $writeOnly = null, + ?Xml $xml = null, + ?ExternalDocumentation $externalDocs = null, + $example = Generator::UNDEFINED, + ?array $examples = null, + ?bool $nullable = null, + ?bool $deprecated = null, + ?array $allOf = null, + ?array $anyOf = null, + ?array $oneOf = null, + $additionalProperties = null, + $const = Generator::UNDEFINED, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['ref' => $ref ?? Generator::UNDEFINED, 'schema' => $schema ?? Generator::UNDEFINED, 'title' => $title ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'maxProperties' => $maxProperties ?? Generator::UNDEFINED, 'minProperties' => $minProperties ?? Generator::UNDEFINED, 'required' => $required ?? Generator::UNDEFINED, 'properties' => $properties ?? Generator::UNDEFINED, 'type' => $type ?? Generator::UNDEFINED, 'format' => $format ?? Generator::UNDEFINED, 'collectionFormat' => $collectionFormat ?? Generator::UNDEFINED, 'default' => $default, 'maximum' => $maximum ?? Generator::UNDEFINED, 'exclusiveMaximum' => $exclusiveMaximum ?? Generator::UNDEFINED, 'minimum' => $minimum ?? Generator::UNDEFINED, 'exclusiveMinimum' => $exclusiveMinimum ?? Generator::UNDEFINED, 'maxLength' => $maxLength ?? Generator::UNDEFINED, 'minLength' => $minLength ?? Generator::UNDEFINED, 'maxItems' => $maxItems ?? Generator::UNDEFINED, 'minItems' => $minItems ?? Generator::UNDEFINED, 'uniqueItems' => $uniqueItems ?? Generator::UNDEFINED, 'pattern' => $pattern ?? Generator::UNDEFINED, 'enum' => $enum ?? Generator::UNDEFINED, 'readOnly' => $readOnly ?? Generator::UNDEFINED, 'writeOnly' => $writeOnly ?? Generator::UNDEFINED, 'xml' => $xml ?? Generator::UNDEFINED, 'example' => $example, 'nullable' => $nullable ?? Generator::UNDEFINED, 'deprecated' => $deprecated ?? Generator::UNDEFINED, 'allOf' => $allOf ?? Generator::UNDEFINED, 'anyOf' => $anyOf ?? Generator::UNDEFINED, 'oneOf' => $oneOf ?? Generator::UNDEFINED, 'additionalProperties' => $additionalProperties ?? Generator::UNDEFINED, 'const' => $const, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($items, $discriminator, $externalDocs, $examples)]); + } +} diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/SecurityScheme.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/SecurityScheme.php new file mode 100644 index 0000000..ed9952b --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/SecurityScheme.php @@ -0,0 +1,39 @@ +|null $type + * @param Flow[] $flows + * @param array|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + $ref = null, + ?string $securityScheme = null, + $type = null, + ?string $description = null, + ?string $name = null, + ?string $in = null, + ?string $bearerFormat = null, + ?string $scheme = null, + ?string $openIdConnectUrl = null, + ?array $flows = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['ref' => $ref ?? Generator::UNDEFINED, 'securityScheme' => $securityScheme ?? Generator::UNDEFINED, 'type' => $type ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'name' => $name ?? Generator::UNDEFINED, 'in' => $in ?? Generator::UNDEFINED, 'bearerFormat' => $bearerFormat ?? Generator::UNDEFINED, 'scheme' => $scheme ?? Generator::UNDEFINED, 'openIdConnectUrl' => $openIdConnectUrl ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($flows)]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/Server.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Server.php similarity index 52% rename from vendor/zircote/swagger-php/src/Attributes/Server.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Server.php index 8ea9f95..3645825 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Server.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Server.php @@ -1,14 +1,13 @@ - $url ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($variables), - ]); + ) + { + parent::__construct(['url' => $url ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($variables)]); } } diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/ServerVariable.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/ServerVariable.php new file mode 100644 index 0000000..2e7a818 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/ServerVariable.php @@ -0,0 +1,32 @@ +|class-string|null $enum + * @param array|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + ?string $serverVariable = null, + ?string $description = null, + ?string $default = null, + $enum = null, + ?array $variables = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['serverVariable' => $serverVariable ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'default' => $default ?? Generator::UNDEFINED, 'enum' => $enum ?? Generator::UNDEFINED, 'variables' => $variables ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/Tag.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Tag.php similarity index 51% rename from vendor/zircote/swagger-php/src/Attributes/Tag.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Tag.php index b613527..98c0367 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Tag.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Tag.php @@ -1,14 +1,13 @@ - $name ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($externalDocs), - ]); + ) + { + parent::__construct(['name' => $name ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($externalDocs)]); } } diff --git a/vendor/zircote/swagger-php/src/Attributes/Trace.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Trace.php similarity index 54% rename from vendor/zircote/swagger-php/src/Attributes/Trace.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/Trace.php index 0e04dff..2d61f54 100644 --- a/vendor/zircote/swagger-php/src/Attributes/Trace.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Trace.php @@ -1,13 +1,12 @@ - $webhook ?? Generator::UNDEFINED, - 'path' => $path ?? Generator::UNDEFINED, - 'ref' => $ref ?? Generator::UNDEFINED, - 'summary' => $summary ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($get, $put, $post, $delete, $options, $head, $patch, $trace, $servers, $parameters), - ]); + ) + { + parent::__construct(['webhook' => $webhook ?? Generator::UNDEFINED, 'path' => $path ?? Generator::UNDEFINED, 'ref' => $ref ?? Generator::UNDEFINED, 'summary' => $summary ?? Generator::UNDEFINED, 'description' => $description ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED, 'value' => $this->combine($get, $put, $post, $delete, $options, $head, $patch, $trace, $servers, $parameters)]); } } diff --git a/vendor/prefixed/zircote/swagger-php/src/Attributes/Xml.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/Xml.php new file mode 100644 index 0000000..d29f4e8 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/Xml.php @@ -0,0 +1,31 @@ +|null $x + * @param Attachable[]|null $attachables + */ + public function __construct( + ?string $name = null, + ?string $namespace = null, + ?string $prefix = null, + ?bool $attribute = null, + ?bool $wrapped = null, + // annotation + ?array $x = null, + ?array $attachables = null + ) + { + parent::__construct(['name' => $name ?? Generator::UNDEFINED, 'namespace' => $namespace ?? Generator::UNDEFINED, 'prefix' => $prefix ?? Generator::UNDEFINED, 'attribute' => $attribute ?? Generator::UNDEFINED, 'wrapped' => $wrapped ?? Generator::UNDEFINED, 'x' => $x ?? Generator::UNDEFINED, 'attachables' => $attachables ?? Generator::UNDEFINED]); + } +} diff --git a/vendor/zircote/swagger-php/src/Attributes/XmlContent.php b/vendor/prefixed/zircote/swagger-php/src/Attributes/XmlContent.php similarity index 86% rename from vendor/zircote/swagger-php/src/Attributes/XmlContent.php rename to vendor/prefixed/zircote/swagger-php/src/Attributes/XmlContent.php index 8832b94..a3a6f59 100644 --- a/vendor/zircote/swagger-php/src/Attributes/XmlContent.php +++ b/vendor/prefixed/zircote/swagger-php/src/Attributes/XmlContent.php @@ -1,14 +1,13 @@ - $oneOf * @param array|null $x * @param Attachable[]|null $attachables + * @param bool|int|float|null $exclusiveMaximum + * @param bool|int|float|null $exclusiveMinimum + * @param \Matomo\Dependencies\OpenApiDocs\OpenApi\Attributes\AdditionalProperties|bool|null $additionalProperties + * @param mixed $default + * @param mixed $example */ public function __construct( ?array $examples = null, // schema - string|object|null $ref = null, + $ref = null, ?string $schema = null, ?string $title = null, ?string $description = null, @@ -38,38 +42,39 @@ public function __construct( ?int $minProperties = null, ?array $required = null, ?array $properties = null, - string|array|null $type = null, + $type = null, ?string $format = null, ?Items $items = null, ?string $collectionFormat = null, - mixed $default = Generator::UNDEFINED, + $default = Generator::UNDEFINED, $maximum = null, - bool|int|float|null $exclusiveMaximum = null, + $exclusiveMaximum = null, $minimum = null, - bool|int|float|null $exclusiveMinimum = null, + $exclusiveMinimum = null, ?int $maxLength = null, ?int $minLength = null, ?int $maxItems = null, ?int $minItems = null, ?bool $uniqueItems = null, ?string $pattern = null, - array|string|null $enum = null, + $enum = null, ?Discriminator $discriminator = null, ?bool $readOnly = null, ?bool $writeOnly = null, ?Xml $xml = null, ?ExternalDocumentation $externalDocs = null, - mixed $example = Generator::UNDEFINED, + $example = Generator::UNDEFINED, ?bool $nullable = null, ?bool $deprecated = null, ?array $allOf = null, ?array $anyOf = null, ?array $oneOf = null, - AdditionalProperties|bool|null $additionalProperties = null, + $additionalProperties = null, // annotation ?array $x = null, ?array $attachables = null - ) { + ) + { parent::__construct([ 'examples' => $examples ?? Generator::UNDEFINED, // schema diff --git a/vendor/zircote/swagger-php/src/Context.php b/vendor/prefixed/zircote/swagger-php/src/Context.php similarity index 79% rename from vendor/zircote/swagger-php/src/Context.php rename to vendor/prefixed/zircote/swagger-php/src/Context.php index f5b74ac..ca39ce1 100644 --- a/vendor/zircote/swagger-php/src/Context.php +++ b/vendor/prefixed/zircote/swagger-php/src/Context.php @@ -1,15 +1,14 @@ - $value) { $this->{$property} = $value; } $this->parent = $parent; - $this->logger = $this->logger ?: new DefaultLogger(); } - /** * Ensure this context is part of the context tree. */ - public function ensureRoot(?Context $rootContext): void + public function ensureRoot(?Context $rootContext) : void { if ($rootContext === $this) { return; } - if (!$this->parent) { // use root fallback for these... foreach (['logger', 'version'] as $property) { unset($this->{$property}); } - $this->parent = $rootContext; } } - /** * Check if a property is set directly on this context and not its parent context. * * Example: $c->is('method') or $c->is('class') */ - public function is(string $property): bool + public function is(string $property) : bool { return property_exists($this, $property); } - /** * Check if a property is NOT set directly on this context and its parent context. * * Example: $c->not('method') or $c->not('class') */ - public function not(string $property): bool + public function not(string $property) : bool { - return $this->is($property) === false; + return $this->is($property) === \false; } - /** * Return the context containing the specified property. */ - public function with(string $property): ?Context + public function with(string $property) : ?Context { if ($this->is($property)) { return $this; @@ -110,48 +103,42 @@ public function with(string $property): ?Context if ($this->parent instanceof Context) { return $this->parent->with($property); } - return null; } - /** * Get the root context. */ - public function root(): Context + public function root() : Context { if ($this->parent instanceof Context) { return $this->parent->root(); } - return $this; } - /** * Get the OpenApi version. * * This is a best guess and only final once parsing is complete. */ - public function getVersion(): string + public function getVersion() : string { return $this->root()->version ?: OA\OpenApi::DEFAULT_VERSION; } - /** * Check if one of the given version numbers matches the current OpenAPI version. * - * @param string|array $versions One or more version numbers + * @param string $version The version to compare. Allows patch version placeholder `x`; e.g. `3.1.x`. */ - public function isVersion($versions): bool + public function isVersion(string $version) : bool { - return in_array($this->getVersion(), (array) $versions); + return OA\OpenApi::versionMatch($this->getVersion(), $version); } - /** * Export location for debugging. * * @return string Example: "file1.php on line 12" */ - public function getDebugLocation(): string + public function getDebugLocation() : string { $location = ''; $fqn = $this->fullyQualifiedName($this->class ?? $this->interface ?? $this->trait ?? $this->enum); @@ -178,10 +165,21 @@ public function getDebugLocation(): string $location .= ':' . $this->character; } } - return $location; } - + public function __serialize() : array + { + return array_filter(get_object_vars($this), function ($value) : bool { + $rc = is_object($value) ? new \ReflectionClass($value) : null; + return (!$rc || !$rc->isAnonymous()) && !$value instanceof \Reflector && !$value instanceof \Closure; + }); + } + public function __unserialize(array $data) : void + { + foreach ($data as $name => $value) { + $this->{$name} = $value; + } + } /** * Traverse the context tree to get the property value. */ @@ -190,37 +188,31 @@ public function __get(string $property) if ($this->parent instanceof Context) { return $this->parent->{$property}; } - return null; } - - public function __toString() + public function __toString() : string { return $this->getDebugLocation(); } - public function __debugInfo() { return ['-' => $this->getDebugLocation()]; } - /** * Resolve the fully qualified name. */ - public function fullyQualifiedName(?string $source): string + public function fullyQualifiedName(?string $source) : string { if ($source === null) { return ''; } - $namespace = $this->namespace ? str_replace('\\\\', '\\', '\\' . $this->namespace . '\\') : '\\'; - $thisSource = $this->class ?? $this->interface ?? $this->trait; if ($thisSource && strcasecmp($source, $thisSource) === 0) { return $namespace . $thisSource; } $pos = strpos($source, '\\'); - if ($pos !== false) { + if ($pos !== \false) { if ($pos === 0) { // Fully qualified name (\Foo\Bar) return $source; @@ -243,7 +235,6 @@ public function fullyQualifiedName(?string $source): string } } } - return $namespace . $source; } } diff --git a/vendor/zircote/swagger-php/src/Generator.php b/vendor/prefixed/zircote/swagger-php/src/Generator.php similarity index 62% rename from vendor/zircote/swagger-php/src/Generator.php rename to vendor/prefixed/zircote/swagger-php/src/Generator.php index e8267b0..6a87352 100644 --- a/vendor/zircote/swagger-php/src/Generator.php +++ b/vendor/prefixed/zircote/swagger-php/src/Generator.php @@ -1,19 +1,18 @@ - */ - public const DEFAULT_ALIASES = ['oa' => 'OpenApi\\Annotations']; + public const DEFAULT_ALIASES = ['oa' => 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations']; /** @var array */ public const DEFAULT_NAMESPACES = ['OpenApi\\Annotations\\']; - /** @var array Map of namespace aliases to be supported by doctrine. */ - protected array $aliases; - + protected $aliases; /** @var array|null List of annotation namespaces to be autoloaded by doctrine. */ - protected ?array $namespaces; - - protected ?AnalyserInterface $analyser = null; - + protected $namespaces; + /** + * @var \Matomo\Dependencies\OpenApiDocs\OpenApi\Analysers\AnalyserInterface|null + */ + protected $analyser; /** @var array */ - protected array $config = []; - - protected ?Pipeline $processorPipeline = null; - - protected ?LoggerInterface $logger = null; - + protected $config = []; + /** + * @var \Matomo\Dependencies\OpenApiDocs\OpenApi\Pipeline|null + */ + protected $processorPipeline; + /** + * @var \Psr\Log\LoggerInterface|null + */ + protected $logger; /** * OpenApi version override. * @@ -59,104 +59,75 @@ class Generator * * Due to the order of processing, any conditional code using this (via Context::$version) * must come only after the analysis is finished. + * @var string|null */ - protected ?string $version = null; - + protected $version; public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger; - $this->setAliases(self::DEFAULT_ALIASES); $this->setNamespaces(self::DEFAULT_NAMESPACES); } - - public static function isDefault($value): bool + public static function isDefault($value) : bool { return $value === Generator::UNDEFINED; } - /** * @return array */ - public function getAliases(): array + public function getAliases() : array { return $this->aliases; } - - public function addAlias(string $alias, string $namespace): Generator + public function addAlias(string $alias, string $namespace) : Generator { $this->aliases[$alias] = $namespace; - return $this; } - - public function setAliases(array $aliases): Generator + public function setAliases(array $aliases) : Generator { $this->aliases = $aliases; - return $this; } - /** * @return array|null */ - public function getNamespaces(): ?array + public function getNamespaces() : ?array { return $this->namespaces; } - - public function addNamespace(string $namespace): Generator + public function addNamespace(string $namespace) : Generator { $namespaces = (array) $this->getNamespaces(); $namespaces[] = $namespace; - return $this->setNamespaces(array_unique($namespaces)); } - - public function setNamespaces(?array $namespaces): Generator + public function setNamespaces(?array $namespaces) : Generator { $this->namespaces = $namespaces; - return $this; } - - public function getAnalyser(): AnalyserInterface + public function getAnalyser() : AnalyserInterface { $generatorConfig = $this->getConfig()['generator']; - $this->analyser = $this->analyser ?: new ReflectionAnalyser([ - new AttributeAnnotationFactory($generatorConfig['ignoreOtherAttributes']), - new DocBlockAnnotationFactory(), - ]); + $this->analyser = $this->analyser ?: new ReflectionAnalyser([new AttributeAnnotationFactory($generatorConfig['ignoreOtherAttributes']), new DocBlockAnnotationFactory()]); $this->analyser->setGenerator($this); - return $this->analyser; } - - public function setAnalyser(?AnalyserInterface $analyser): Generator + public function setAnalyser(?AnalyserInterface $analyser) : Generator { $this->analyser = $analyser; - return $this; } - - public function getDefaultConfig(): array + public function getDefaultConfig() : array { - return [ - 'generator' => [ - 'ignoreOtherAttributes' => false, - ], - 'operationId' => [ - 'hash' => true, - ], - ]; + return ['generator' => ['ignoreOtherAttributes' => \false], 'operationId' => ['hash' => \true]]; } - - public function getConfig(): array + public function getConfig() : array { return $this->config + $this->getDefaultConfig(); } - - protected function normaliseConfig(array $config): array + protected function normaliseConfig(array $config) : array { $normalised = []; foreach ($config as $key => $value) { @@ -167,12 +138,10 @@ protected function normaliseConfig(array $config): array [$key, $value] = $token; } } - if (in_array($value, ['true', 'false'])) { $value = 'true' == $value; } - - if ($isList = ('[]' === substr($key, -2))) { + if ($isList = '[]' === substr($key, -2)) { $key = substr($key, 0, -2); } $token = explode('.', $key); @@ -192,54 +161,26 @@ protected function normaliseConfig(array $config): array } } } - return $normalised; } - /** * Set generator and/or processor config. * * @param array $config */ - public function setConfig(array $config): Generator + public function setConfig(array $config) : Generator { $this->config = $this->normaliseConfig($config) + $this->config; - return $this; } - - public function getProcessorPipeline(): Pipeline + public function getProcessorPipeline() : Pipeline { if (!$this->processorPipeline instanceof Pipeline) { - $this->processorPipeline = new Pipeline([ - new Processors\DocBlockDescriptions(), - new Processors\MergeIntoOpenApi(), - new Processors\MergeIntoComponents(), - new Processors\ExpandClasses(), - new Processors\ExpandInterfaces(), - new Processors\ExpandTraits(), - new Processors\ExpandEnums(), - new Processors\AugmentSchemas(), - new Processors\AugmentRequestBody(), - new Processors\AugmentProperties(), - new Processors\AugmentDiscriminators(), - new Processors\BuildPaths(), - new Processors\AugmentParameters(), - new Processors\AugmentRefs(), - new Processors\MergeJsonContent(), - new Processors\MergeXmlContent(), - new Processors\OperationId(), - new Processors\CleanUnmerged(), - new Processors\PathFilter(), - new Processors\CleanUnusedComponents(), - new Processors\AugmentTags(), - ]); + $this->processorPipeline = new Pipeline([new Processors\DocBlockDescriptions(), new Processors\MergeIntoOpenApi(), new Processors\MergeIntoComponents(), new Processors\ExpandClasses(), new Processors\ExpandInterfaces(), new Processors\ExpandTraits(), new Processors\ExpandEnums(), new Processors\AugmentSchemas(), new Processors\AugmentRequestBody(), new Processors\AugmentProperties(), new Processors\AugmentDiscriminators(), new Processors\BuildPaths(), new Processors\AugmentParameters(), new Processors\AugmentRefs(), new Processors\MergeJsonContent(), new Processors\MergeXmlContent(), new Processors\OperationId(), new Processors\CleanUnmerged(), new Processors\PathFilter(), new Processors\CleanUnusedComponents(), new Processors\AugmentTags()]); } - $config = $this->getConfig(); - $walker = function (callable $pipe) use ($config) { + $walker = function (callable $pipe) use($config) : void { $rc = new \ReflectionClass($pipe); - // apply config $processorKey = lcfirst($rc->getShortName()); if (array_key_exists($processorKey, $config)) { @@ -251,86 +192,53 @@ public function getProcessorPipeline(): Pipeline } } }; - return $this->processorPipeline->walk($walker); } - - public function setProcessorPipeline(?Pipeline $processor): Generator + public function setProcessorPipeline(?Pipeline $processor) : Generator { $this->processorPipeline = $processor; - return $this; } - /** * Chainable method that allows to modify the processor pipeline. * * @param callable $with callable with the current processor pipeline passed in */ - public function withProcessorPipeline(callable $with): Generator + public function withProcessorPipeline(callable $with) : Generator { $with($this->getProcessorPipeline()); - return $this; } - /** * @deprecated use `withProcessorPipeline()` instead */ - public function withProcessor(callable $with): Generator + public function withProcessor(callable $with) : Generator { return $this->withProcessorPipeline($with); } - - public function getLogger(): ?LoggerInterface + public function getLogger() : ?LoggerInterface { return $this->logger ?: new DefaultLogger(); } - - public function getVersion(): ?string + public function getVersion() : ?string { return $this->version; } - - public function setVersion(?string $version): Generator + public function setVersion(?string $version) : Generator { $this->version = $version; - return $this; } - /** * @deprecated use non-static `generate()` instead */ - public static function scan(iterable $sources, array $options = []): ?OA\OpenApi + public static function scan(iterable $sources, array $options = []) : ?OA\OpenApi { // merge with defaults - $config = $options + [ - 'aliases' => self::DEFAULT_ALIASES, - 'namespaces' => self::DEFAULT_NAMESPACES, - 'analyser' => null, - 'analysis' => null, - 'processor' => null, - 'processors' => null, - 'config' => [], - 'logger' => null, - 'validate' => true, - 'version' => null, - ]; - - $processorPipeline = $config['processor'] ?? - ($config['processors'] ? new Pipeline($config['processors']) : null); - - return (new Generator($config['logger'])) - ->setVersion($config['version']) - ->setAliases($config['aliases']) - ->setNamespaces($config['namespaces']) - ->setAnalyser($config['analyser']) - ->setProcessorPipeline($processorPipeline) - ->setConfig($config['config']) - ->generate($sources, $config['analysis'], $config['validate']); + $config = $options + ['aliases' => self::DEFAULT_ALIASES, 'namespaces' => self::DEFAULT_NAMESPACES, 'analyser' => null, 'analysis' => null, 'processor' => null, 'processors' => null, 'config' => [], 'logger' => null, 'validate' => \true, 'version' => null]; + $processorPipeline = $config['processor'] ?? ($config['processors'] ? new Pipeline($config['processors']) : null); + return (new Generator($config['logger']))->setVersion($config['version'])->setAliases($config['aliases'])->setNamespaces($config['namespaces'])->setAnalyser($config['analyser'])->setProcessorPipeline($processorPipeline)->setConfig($config['config'])->generate($sources, $config['analysis'], $config['validate']); } - /** * Run code in the context of this generator. * @@ -341,15 +249,10 @@ public static function scan(iterable $sources, array $options = []): ?OA\OpenApi */ public function withContext(callable $callable) { - $rootContext = new Context([ - 'version' => $this->getVersion(), - 'logger' => $this->getLogger(), - ]); + $rootContext = new Context(['version' => $this->getVersion(), 'logger' => $this->getLogger()]); $analysis = new Analysis([], $rootContext); - return $callable($this, $analysis, $rootContext); } - /** * Generate OpenAPI spec by scanning the given source files. * @@ -361,40 +264,29 @@ public function withContext(callable $callable) * @param null|Analysis $analysis custom analysis instance * @param bool $validate flag to enable/disable validation of the returned spec */ - public function generate(iterable $sources, ?Analysis $analysis = null, bool $validate = true): ?OA\OpenApi + public function generate(iterable $sources, ?Analysis $analysis = null, bool $validate = \true) : ?OA\OpenApi { - $rootContext = new Context([ - 'version' => $this->getVersion(), - 'logger' => $this->getLogger(), - ]); - + $rootContext = new Context(['version' => $this->getVersion(), 'logger' => $this->getLogger()]); $analysis = $analysis ?: new Analysis([], $rootContext); $analysis->context = $analysis->context ?: $rootContext; - $this->scanSources($sources, $analysis, $rootContext); - // post-processing $this->getProcessorPipeline()->process($analysis); - if ($analysis->openapi) { // overwrite default/annotated version $analysis->openapi->openapi = $this->getVersion() ?: $analysis->openapi->openapi; // update context to provide the same to validation/serialisation code $rootContext->version = $analysis->openapi->openapi; } - // validation if ($validate) { $analysis->validate(); } - return $analysis->openapi; } - - protected function scanSources(iterable $sources, Analysis $analysis, Context $rootContext): void + protected function scanSources(iterable $sources, Analysis $analysis, Context $rootContext) : void { $analyser = $this->getAnalyser(); - foreach ($sources as $source) { if (is_iterable($source)) { $this->scanSources($source, $analysis, $rootContext); diff --git a/vendor/zircote/swagger-php/src/GeneratorAwareInterface.php b/vendor/prefixed/zircote/swagger-php/src/GeneratorAwareInterface.php similarity index 60% rename from vendor/zircote/swagger-php/src/GeneratorAwareInterface.php rename to vendor/prefixed/zircote/swagger-php/src/GeneratorAwareInterface.php index e13ea69..3a0358e 100644 --- a/vendor/zircote/swagger-php/src/GeneratorAwareInterface.php +++ b/vendor/prefixed/zircote/swagger-php/src/GeneratorAwareInterface.php @@ -1,10 +1,10 @@ -generator = $generator; + return $this; + } +} diff --git a/vendor/zircote/swagger-php/src/Loggers/ConsoleLogger.php b/vendor/prefixed/zircote/swagger-php/src/Loggers/ConsoleLogger.php similarity index 67% rename from vendor/zircote/swagger-php/src/Loggers/ConsoleLogger.php rename to vendor/prefixed/zircote/swagger-php/src/Loggers/ConsoleLogger.php index 0a43dc7..5edfa38 100644 --- a/vendor/zircote/swagger-php/src/Loggers/ConsoleLogger.php +++ b/vendor/prefixed/zircote/swagger-php/src/Loggers/ConsoleLogger.php @@ -1,48 +1,40 @@ -debug = $debug; } - - public function loggedMessageAboveNotice(): bool + public function loggedMessageAboveNotice() : bool { return $this->loggedMessageAboveNotice; } - /** * @param string $level * @param string|\Exception $message * @param array $context additional details; supports custom prefix and exception */ - public function log($level, $message, array $context = []): void + public function log($level, $message, array $context = []) : void { $prefix = ''; $color = ''; @@ -53,9 +45,9 @@ public function log($level, $message, array $context = []): void return; } $prefix = 'Debug: '; - // no break + // no break case LogLevel::WARNING: - $prefix = $prefix ?: ($context['prefix'] ?? 'Warning: '); + $prefix = $prefix ?: $context['prefix'] ?? 'Warning: '; $color = static::COLOR_WARNING; break; case LogLevel::ERROR: @@ -64,26 +56,22 @@ public function log($level, $message, array $context = []): void break; } $stop = empty($color) ? '' : static::COLOR_STOP; - - if (!in_array($level, self::LOG_LEVELS_UP_TO_NOTICE, true)) { - $this->loggedMessageAboveNotice = true; + if (!in_array($level, self::LOG_LEVELS_UP_TO_NOTICE, \true)) { + $this->loggedMessageAboveNotice = \true; } - /** @var ?\Exception $exception */ $exception = $context['exception'] ?? null; if ($message instanceof \Exception) { $exception = $message; $message = $exception->getMessage(); } - $logLine = sprintf('%s%s%s%s', $color, $prefix, $message, $stop); error_log($logLine); - if ($this->debug) { if ($exception) { error_log($exception->getTraceAsString()); } elseif ($logLine !== '' && $logLine !== '0') { - $stack = explode(PHP_EOL, (new \Exception())->getTraceAsString()); + $stack = explode(\PHP_EOL, (new \Exception())->getTraceAsString()); // self array_shift($stack); // AbstractLogger diff --git a/vendor/zircote/swagger-php/src/Loggers/DefaultLogger.php b/vendor/prefixed/zircote/swagger-php/src/Loggers/DefaultLogger.php similarity index 64% rename from vendor/zircote/swagger-php/src/Loggers/DefaultLogger.php rename to vendor/prefixed/zircote/swagger-php/src/Loggers/DefaultLogger.php index 75be183..8d71691 100644 --- a/vendor/zircote/swagger-php/src/Loggers/DefaultLogger.php +++ b/vendor/prefixed/zircote/swagger-php/src/Loggers/DefaultLogger.php @@ -1,25 +1,22 @@ - */ protected $pipes = []; - public function __construct(array $pipes = []) { $this->pipes = $pipes; } - - public function add(callable $pipe): Pipeline + public function add(callable $pipe) : Pipeline { $this->pipes[] = $pipe; - return $this; } - /** * @param callable|class-string|null $pipe */ - public function remove($pipe = null, ?callable $matcher = null): Pipeline + public function remove($pipe = null, ?callable $matcher = null) : Pipeline { if (!$pipe && !$matcher) { throw new OpenApiException('pipe or callable must not be empty'); } - // allow matching on class name in $pipe in a string if (is_string($pipe) && !$matcher) { $pipeClass = $pipe; - $matcher = function ($pipe) use ($pipeClass) { + $matcher = function ($pipe) use ($pipeClass) : bool { return !$pipe instanceof $pipeClass; }; } - if ($matcher) { $tmp = []; foreach ($this->pipes as $pipe) { @@ -49,60 +43,48 @@ public function remove($pipe = null, ?callable $matcher = null): Pipeline $tmp[] = $pipe; } } - $this->pipes = $tmp; } else { - if (false === ($key = array_search($pipe, $this->pipes, true))) { + if (\false === ($key = array_search($pipe, $this->pipes, \true))) { return $this; } - unset($this->pipes[$key]); - $this->pipes = array_values($this->pipes); } - return $this; } - /** * @param callable|class-string $matcher used to determine the position to insert * either an int from a callable or, in the case of $matcher being * a class-string, the position before the first pipe of that class */ - public function insert(callable $pipe, $matcher): Pipeline + public function insert(callable $pipe, $matcher) : Pipeline { if (is_string($matcher)) { $before = $matcher; - $matcher = function (array $pipes) use ($before) { + $matcher = function (array $pipes) use($before) { foreach ($pipes as $ii => $current) { if ($current instanceof $before) { return $ii; } } - return null; }; } - $index = $matcher($this->pipes); if (null === $index || $index < 0 || $index > count($this->pipes)) { throw new OpenApiException('Matcher result out of range'); } - array_splice($this->pipes, $index, 0, [$pipe]); - return $this; } - - public function walk(callable $walker): Pipeline + public function walk(callable $walker) : Pipeline { foreach ($this->pipes as $pipe) { $walker($pipe); } - return $this; } - /** * @param mixed $payload * @@ -114,7 +96,6 @@ public function process($payload) /** @deprecated null payload returned from pipe */ $payload = $pipe($payload) ?: $payload; } - return $payload; } } diff --git a/vendor/zircote/swagger-php/src/Processors/AugmentDiscriminators.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentDiscriminators.php similarity index 61% rename from vendor/zircote/swagger-php/src/Processors/AugmentDiscriminators.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/AugmentDiscriminators.php index 5e29650..75c1d0b 100644 --- a/vendor/zircote/swagger-php/src/Processors/AugmentDiscriminators.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentDiscriminators.php @@ -1,29 +1,27 @@ -getAnnotationsOfType(OA\Discriminator::class); - foreach ($discriminators as $discriminator) { if (!Generator::isDefault($discriminator->mapping)) { foreach ($discriminator->mapping as $value => $type) { - if (is_string($type) && $typeSchema = $analysis->getSchemaForSource($type)) { + if (is_string($type) && ($typeSchema = $analysis->getSchemaForSource($type))) { $discriminator->mapping[$value] = OA\Components::ref($typeSchema); } } diff --git a/vendor/zircote/swagger-php/src/Processors/AugmentParameters.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentParameters.php similarity index 71% rename from vendor/zircote/swagger-php/src/Processors/AugmentParameters.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/AugmentParameters.php index 66192f1..f32c051 100644 --- a/vendor/zircote/swagger-php/src/Processors/AugmentParameters.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentParameters.php @@ -1,17 +1,16 @@ -augmentOperationParameters = $augmentOperationParameters; } - - public function isAugmentOperationParameters(): bool + public function isAugmentOperationParameters() : bool { return $this->augmentOperationParameters; } - /** * If set to true try to find operation parameter descriptions in the operation docblock. */ - public function setAugmentOperationParameters(bool $augmentOperationParameters): AugmentParameters + public function setAugmentOperationParameters(bool $augmentOperationParameters) : AugmentParameters { $this->augmentOperationParameters = $augmentOperationParameters; - return $this; } - - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { $this->augmentSharedParameters($analysis); if ($this->augmentOperationParameters) { $this->augmentOperationParameters($analysis); } } - /** * Use the parameter->name as key field (parameter->parameter) when used as reusable component * (openapi->components->parameters). */ - protected function augmentSharedParameters(Analysis $analysis): void + protected function augmentSharedParameters(Analysis $analysis) : void { if (!Generator::isDefault($analysis->openapi->components) && !Generator::isDefault($analysis->openapi->components->parameters)) { $keys = []; @@ -74,29 +69,24 @@ protected function augmentSharedParameters(Analysis $analysis): void } } } - - protected function augmentOperationParameters(Analysis $analysis): void + protected function augmentOperationParameters(Analysis $analysis) : void { /** @var OA\Operation[] $operations */ $operations = $analysis->getAnnotationsOfType(OA\Operation::class); - foreach ($operations as $operation) { if (!Generator::isDefault($operation->parameters)) { $tags = []; $this->extractContent($operation->_context->comment, $tags); - if (array_key_exists('param', $tags)) { - foreach ($tags['param'] as $name => $details) { - foreach ($operation->parameters as $parameter) { - if ($parameter->name == $name) { - if (Generator::isDefault($parameter->description) && $details['description']) { - $parameter->description = $details['description']; - } + $docblockParams = $tags['param'] ?? []; + foreach ($operation->parameters as $parameter) { + if (Generator::isDefault($parameter->description)) { + if (array_key_exists($parameter->name, $docblockParams)) { + $details = $docblockParams[$parameter->name]; + if ($details['description']) { + $parameter->description = $details['description']; } } } - } - - foreach ($operation->parameters as $parameter) { if (!Generator::isDefault($parameter->schema)) { $this->mapNativeType($parameter->schema, $parameter->schema->type); } diff --git a/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentProperties.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentProperties.php new file mode 100644 index 0000000..ea10d46 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentProperties.php @@ -0,0 +1,167 @@ +getAnnotationsOfType(OA\Property::class); + foreach ($properties as $property) { + $context = $property->_context; + if (Generator::isDefault($property->property)) { + $property->property = $context->property; + } + if (!Generator::isDefault($property->ref)) { + continue; + } + $typeAndDescription = $this->extractVarTypeAndDescription((string) $context->comment); + if (Generator::isDefault($property->type)) { + $this->augmentSchemaType($analysis, $property, $context, $typeAndDescription['type']); + } else { + if (!is_array($property->type)) { + $this->mapNativeType($property, $property->type); + } + } + if (Generator::isDefault($property->description) && $typeAndDescription['description']) { + $property->description = trim($typeAndDescription['description']); + } + if (Generator::isDefault($property->description) && $this->isRoot($property)) { + $property->description = $this->extractContent($context->comment); + } + if (Generator::isDefault($property->example) && ($example = $this->extractExampleDescription((string) $context->comment))) { + $property->example = $example; + } + if (Generator::isDefault($property->deprecated) && ($deprecated = $this->isDeprecated($context->comment))) { + $property->deprecated = $deprecated; + } + } + } + protected function augmentSchemaType(Analysis $analysis, OA\Schema $schema, Context $context, ?string $varType) : void + { + // docblock typehints + if ($varType) { + $allTypes = trim($varType); + if ($this->isNullable($allTypes) && Generator::isDefault($schema->nullable)) { + $schema->nullable = \true; + } + $allTypes = $this->stripNull($allTypes); + preg_match('/^([^\\[\\<]+)(.*$)/', $allTypes, $typeMatches); + $type = $typeMatches[1]; + // finalise property type/ref + if (!$this->mapNativeType($schema, $type) && Generator::isDefault($schema->items)) { + $typeSchema = $analysis->getSchemaForSource($context->fullyQualifiedName($type)); + if (Generator::isDefault($schema->ref) && $typeSchema) { + $schema->ref = OA\Components::ref($typeSchema); + } + } + // ok, so we possibly have a type or ref + if (!Generator::isDefault($schema->ref) && $typeMatches[2] === '' && !Generator::isDefault($schema->nullable) && $schema->nullable) { + $typeSchema = $analysis->getSchemaForSource($context->fullyQualifiedName($type)); + if ($typeSchema) { + $schema->ref = OA\Components::ref($typeSchema); + } + } elseif ($typeMatches[2] === '[]') { + if (Generator::isDefault($schema->items)) { + $schema->items = new OA\Items(['type' => $schema->type, '_context' => new Context(['generated' => \true], $context)]); + $analysis->addAnnotation($schema->items, $schema->items->_context); + if (!Generator::isDefault($schema->ref)) { + $schema->items->ref = $schema->ref; + $schema->ref = Generator::UNDEFINED; + } + $schema->type = 'array'; + } + } elseif ($schema->type === 'integer' && strncmp($typeMatches[2], '<', strlen('<')) === 0 && substr_compare($typeMatches[2], '>', -strlen('>')) === 0) { + [$min, $max] = explode(',', substr($typeMatches[2], 1, -1)); + if (is_numeric($min)) { + $schema->minimum = (int) $min; + } + if (is_numeric($max)) { + $schema->maximum = (int) $max; + } + } elseif ($type === 'positive-int') { + $schema->type = 'integer'; + $schema->minimum = 1; + } elseif ($type === 'negative-int') { + $schema->type = 'integer'; + $schema->maximum = -1; + } elseif ($type === 'non-positive-int') { + $schema->type = 'integer'; + $schema->maximum = 0; + } elseif ($type === 'non-negative-int') { + $schema->type = 'integer'; + $schema->minimum = 0; + } elseif ($type === 'non-zero-int') { + $schema->type = 'integer'; + $schema->not = $schema->_context->isVersion('3.1.x') ? ['const' => 0] : ['enum' => [0]]; + } + } + // native typehints + if ($context->type && !Generator::isDefault($context->type)) { + if ($context->nullable === \true && Generator::isDefault($schema->nullable)) { + $schema->nullable = \true; + } + $type = strtolower($context->type); + if (!$this->mapNativeType($schema, $type)) { + $typeSchema = $analysis->getSchemaForSource($context->fullyQualifiedName($type)); + if (Generator::isDefault($schema->ref) && $typeSchema) { + $this->applyRef($analysis, $schema, OA\Components::ref($typeSchema)); + } else { + if (is_string($context->type) && ($typeSchema = $analysis->getSchemaForSource($context->type))) { + if (Generator::isDefault($schema->format)) { + $schema->ref = OA\Components::ref($typeSchema); + $schema->type = Generator::UNDEFINED; + } + } + } + } + } + if (!Generator::isDefault($schema->const) && Generator::isDefault($schema->type)) { + if (!$this->mapNativeType($schema, gettype($schema->const))) { + $schema->type = Generator::UNDEFINED; + } + } + } + protected function isNullable(string $typeDescription) : bool + { + return in_array('null', explode('|', strtolower($typeDescription))); + } + protected function stripNull(string $typeDescription) : string + { + if (strpos($typeDescription, '|') === \false) { + return $typeDescription; + } + $types = []; + foreach (explode('|', $typeDescription) as $type) { + if (strtolower($type) === 'null') { + continue; + } + $types[] = $type; + } + return implode('|', $types); + } + protected function applyRef(Analysis $analysis, OA\Schema $schema, string $ref) : void + { + if ($schema->nullable === \true) { + $schema->oneOf = [$nullableSchema = new OA\Schema(['ref' => $ref, '_context' => new Context(['generated' => \true], $schema->_context)])]; + $analysis->addAnnotation($nullableSchema, $nullableSchema->_context); + } else { + $schema->ref = $ref; + } + } +} diff --git a/vendor/zircote/swagger-php/src/Processors/AugmentRefs.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentRefs.php similarity index 82% rename from vendor/zircote/swagger-php/src/Processors/AugmentRefs.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/AugmentRefs.php index a7065b5..98aadfe 100644 --- a/vendor/zircote/swagger-php/src/Processors/AugmentRefs.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentRefs.php @@ -1,34 +1,30 @@ -resolveAllOfRefs($analysis); $this->resolveFQCNRefs($analysis); $this->removeDuplicateRefs($analysis); } - /** * Update refs broken due to allOf augmenting. */ - protected function resolveAllOfRefs(Analysis $analysis): void + protected function resolveAllOfRefs(Analysis $analysis) : void { /** @var OA\Schema[] $schemas */ $schemas = $analysis->getAnnotationsOfType(OA\Schema::class); - // ref rewriting $updatedRefs = []; foreach ($schemas as $schema) { @@ -36,13 +32,12 @@ protected function resolveAllOfRefs(Analysis $analysis): void // do we have to keep track of properties refs that need updating? foreach ($schema->allOf as $ii => $allOfSchema) { if (!Generator::isDefault($allOfSchema->properties)) { - $updatedRefs[OA\Components::ref($schema->schema . '/properties', false)] = OA\Components::ref($schema->schema . '/allOf/' . $ii . '/properties', false); + $updatedRefs[OA\Components::ref($schema->schema . '/properties', \false)] = OA\Components::ref($schema->schema . '/allOf/' . $ii . '/properties', \false); break; } } } } - if ($updatedRefs) { foreach ($analysis->annotations as $annotation) { if (property_exists($annotation, 'ref') && !Generator::isDefault($annotation->ref) && $annotation->ref !== null) { @@ -55,19 +50,17 @@ protected function resolveAllOfRefs(Analysis $analysis): void } } } - - protected function resolveFQCNRefs(Analysis $analysis): void + protected function resolveFQCNRefs(Analysis $analysis) : void { /** @var OA\AbstractAnnotation[] $annotations */ $annotations = $analysis->getAnnotationsOfType(OA\Components::componentTypes()); - foreach ($annotations as $annotation) { if (property_exists($annotation, 'ref') && !Generator::isDefault($annotation->ref) && is_string($annotation->ref) && !$this->isRef($annotation->ref)) { // check if we can resolve the ref to a component - $resolved = false; + $resolved = \false; foreach (OA\Components::componentTypes() as $type) { if ($refSchema = $analysis->getAnnotationForSource($annotation->ref, $type)) { - $resolved = true; + $resolved = \true; $annotation->ref = OA\Components::ref($refSchema); } } @@ -77,12 +70,10 @@ protected function resolveFQCNRefs(Analysis $analysis): void } } } - - protected function removeDuplicateRefs(Analysis $analysis): void + protected function removeDuplicateRefs(Analysis $analysis) : void { /** @var OA\Schema[] $schemas */ $schemas = $analysis->getAnnotationsOfType(OA\Schema::class); - foreach ($schemas as $schema) { if (!Generator::isDefault($schema->allOf)) { $refs = []; diff --git a/vendor/zircote/swagger-php/src/Processors/AugmentRequestBody.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentRequestBody.php similarity index 75% rename from vendor/zircote/swagger-php/src/Processors/AugmentRequestBody.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/AugmentRequestBody.php index 132c316..ca5e853 100644 --- a/vendor/zircote/swagger-php/src/Processors/AugmentRequestBody.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentRequestBody.php @@ -1,32 +1,29 @@ - $requests */ $requests = $analysis->getAnnotationsOfType(OA\RequestBody::class); - $this->augmentRequestBody($requests); } - /** * @param array $requests */ - protected function augmentRequestBody(array $requests): void + protected function augmentRequestBody(array $requests) : void { foreach ($requests as $request) { if (!$request->isRoot(OA\RequestBody::class)) { diff --git a/vendor/zircote/swagger-php/src/Processors/AugmentSchemas.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentSchemas.php similarity index 81% rename from vendor/zircote/swagger-php/src/Processors/AugmentSchemas.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/AugmentSchemas.php index 4c263d8..2c5ed91 100644 --- a/vendor/zircote/swagger-php/src/Processors/AugmentSchemas.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentSchemas.php @@ -1,16 +1,15 @@ -getAnnotationsOfType(OA\Schema::class); - $this->augmentSchema($schemas); $this->mergeUnmergedProperties($analysis); $this->augmentType($analysis, $schemas); $this->mergeAllOf($analysis, $schemas); } - /** * @param array $schemas */ - protected function augmentSchema(array $schemas): void + protected function augmentSchema(array $schemas) : void { foreach ($schemas as $schema) { if (!$schema->isRoot(OA\Schema::class)) { @@ -51,11 +48,10 @@ protected function augmentSchema(array $schemas): void } } } - /** * Merge unmerged @OA\Property annotations into the @OA\Schema of the class. */ - protected function mergeUnmergedProperties(Analysis $analysis): void + protected function mergeUnmergedProperties(Analysis $analysis) : void { // Merge unmerged @OA\Property annotations into the @OA\Schema of the class $unmergedProperties = $analysis->unmerged()->getAnnotationsOfType(OA\Property::class); @@ -63,11 +59,7 @@ protected function mergeUnmergedProperties(Analysis $analysis): void if ($property->_context->nested) { continue; } - - $schemaContext = $property->_context->with('class') - ?: $property->_context->with('interface') - ?: $property->_context->with('trait') - ?: $property->_context->with('enum'); + $schemaContext = (($property->_context->with('class') ?: $property->_context->with('interface')) ?: $property->_context->with('trait')) ?: $property->_context->with('enum'); if ($schemaContext->annotations) { foreach ($schemaContext->annotations as $annotation) { if ($annotation instanceof OA\Schema) { @@ -75,21 +67,19 @@ protected function mergeUnmergedProperties(Analysis $analysis): void // we shouldn't merge property into nested schemas continue; } - - $annotation->merge([$property], true); + $annotation->merge([$property], \true); break; } } } } } - /** * Set schema type based on various properties. * * @param array $schemas */ - protected function augmentType(Analysis $analysis, array $schemas): void + protected function augmentType(Analysis $analysis, array $schemas) : void { foreach ($schemas as $schema) { if (Generator::isDefault($schema->type)) { @@ -103,7 +93,7 @@ protected function augmentType(Analysis $analysis, array $schemas): void $schema->type = 'object'; } } else { - if (is_string($schema->type) && $typeSchema = $analysis->getSchemaForSource($schema->type)) { + if (is_string($schema->type) && ($typeSchema = $analysis->getSchemaForSource($schema->type))) { if (Generator::isDefault($schema->format)) { $schema->ref = OA\Components::ref($typeSchema); $schema->type = Generator::UNDEFINED; @@ -112,13 +102,12 @@ protected function augmentType(Analysis $analysis, array $schemas): void } } } - /** * Merge schema properties into allOf if both exist. * * @param array $schemas */ - protected function mergeAllOf(Analysis $analysis, array $schemas): void + protected function mergeAllOf(Analysis $analysis, array $schemas) : void { foreach ($schemas as $schema) { if (!Generator::isDefault($schema->properties) && !Generator::isDefault($schema->allOf)) { @@ -130,11 +119,7 @@ protected function mergeAllOf(Analysis $analysis, array $schemas): void } } if (!$allOfPropertiesSchema) { - $allOfPropertiesSchema = new OA\Schema([ - 'properties' => [], - 'type' => 'object', - '_context' => new Context(['generated' => true], $schema->_context), - ]); + $allOfPropertiesSchema = new OA\Schema(['properties' => [], 'type' => 'object', '_context' => new Context(['generated' => \true], $schema->_context)]); $analysis->addAnnotation($allOfPropertiesSchema, $allOfPropertiesSchema->_context); $schema->allOf[] = $allOfPropertiesSchema; } diff --git a/vendor/zircote/swagger-php/src/Processors/AugmentTags.php b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentTags.php similarity index 80% rename from vendor/zircote/swagger-php/src/Processors/AugmentTags.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/AugmentTags.php index 9093a1a..41ea177 100644 --- a/vendor/zircote/swagger-php/src/Processors/AugmentTags.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/AugmentTags.php @@ -1,43 +1,37 @@ -tags list. */ class AugmentTags { /** @var array */ - protected array $whitelist = []; - + protected $whitelist = []; public function __construct(array $whitelist = []) { $this->whitelist = $whitelist; } - /** * Whitelist tags to keep even if not used. * may be used to keep all unused. */ - public function setWhitelist(array $whitelist): AugmentTags + public function setWhitelist(array $whitelist) : AugmentTags { $this->whitelist = $whitelist; - return $this; } - - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { /** @var OA\Operation[] $operations */ $operations = $analysis->getAnnotationsOfType(OA\Operation::class); - $usedTagNames = []; foreach ($operations as $operation) { if (!Generator::isDefault($operation->tags)) { @@ -45,7 +39,6 @@ public function __invoke(Analysis $analysis) } } $usedTagNames = array_unique($usedTagNames); - $declaredTags = []; if (!Generator::isDefault($analysis->openapi->tags)) { foreach ($analysis->openapi->tags as $tag) { @@ -56,7 +49,6 @@ public function __invoke(Analysis $analysis) // last one wins $analysis->openapi->tags = array_values($declaredTags); } - // Add a tag for each tag that is used in operations but not declared in the global tags if ($usedTagNames) { $declatedTagNames = array_keys($declaredTags); @@ -66,20 +58,17 @@ public function __invoke(Analysis $analysis) } } } - $this->removeUnusedTags($usedTagNames, $declaredTags, $analysis); } - - private function removeUnusedTags(array $usedTagNames, array $declaredTags, Analysis $analysis) + private function removeUnusedTags(array $usedTagNames, array $declaredTags, Analysis $analysis) : void { if (in_array('*', $this->whitelist)) { return; } - $tagsToKeep = array_merge($usedTagNames, $this->whitelist); foreach ($declaredTags as $tag) { if (!in_array($tag->name, $tagsToKeep)) { - if (false !== $index = array_search($tag, $analysis->openapi->tags, true)) { + if (\false !== ($index = array_search($tag, $analysis->openapi->tags, \true))) { $analysis->annotations->detach($tag); unset($analysis->openapi->tags[$index]); $analysis->openapi->tags = array_values($analysis->openapi->tags); diff --git a/vendor/zircote/swagger-php/src/Processors/BuildPaths.php b/vendor/prefixed/zircote/swagger-php/src/Processors/BuildPaths.php similarity index 78% rename from vendor/zircote/swagger-php/src/Processors/BuildPaths.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/BuildPaths.php index f23e350..b5da090 100644 --- a/vendor/zircote/swagger-php/src/Processors/BuildPaths.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/BuildPaths.php @@ -1,22 +1,21 @@ -paths using the detected @OA\PathItem and @OA\Operation (@OA\Get, etc). */ class BuildPaths { - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { $paths = []; // Merge @OA\PathItems with the same path. @@ -32,20 +31,13 @@ public function __invoke(Analysis $analysis) } } } - /** @var OA\Operation[] $operations */ $operations = $analysis->unmerged()->getAnnotationsOfType(OA\Operation::class); - // Merge @OA\Operations into existing @OA\PathItems or create a new one. foreach ($operations as $operation) { if ($operation->path) { if (empty($paths[$operation->path])) { - $paths[$operation->path] = $pathItem = new OA\PathItem( - [ - 'path' => $operation->path, - '_context' => new Context(['generated' => true], $operation->_context), - ] - ); + $paths[$operation->path] = $pathItem = new OA\PathItem(['path' => $operation->path, '_context' => new Context(['generated' => \true], $operation->_context)]); $analysis->addAnnotation($pathItem, $pathItem->_context); } if ($paths[$operation->path]->merge([$operation])) { diff --git a/vendor/zircote/swagger-php/src/Processors/CleanUnmerged.php b/vendor/prefixed/zircote/swagger-php/src/Processors/CleanUnmerged.php similarity index 65% rename from vendor/zircote/swagger-php/src/Processors/CleanUnmerged.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/CleanUnmerged.php index 5a694f2..61ef37f 100644 --- a/vendor/zircote/swagger-php/src/Processors/CleanUnmerged.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/CleanUnmerged.php @@ -1,28 +1,27 @@ -split(); $merged = $split->merged->annotations; $unmerged = $split->unmerged->annotations; - /** @var OA\AbstractAnnotation $annotation */ foreach ($analysis->annotations as $annotation) { if (property_exists($annotation, '_unmerged')) { foreach ($annotation->_unmerged as $ii => $item) { if ($merged->contains($item)) { - unset($annotation->_unmerged[$ii]); // Property was merged + unset($annotation->_unmerged[$ii]); + // Property was merged } } } diff --git a/vendor/zircote/swagger-php/src/Processors/CleanUnusedComponents.php b/vendor/prefixed/zircote/swagger-php/src/Processors/CleanUnusedComponents.php similarity index 86% rename from vendor/zircote/swagger-php/src/Processors/CleanUnusedComponents.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/CleanUnusedComponents.php index 035e1f9..2e9dd86 100644 --- a/vendor/zircote/swagger-php/src/Processors/CleanUnusedComponents.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/CleanUnusedComponents.php @@ -1,52 +1,46 @@ -Components and removed unused schemas. */ class CleanUnusedComponents { use Concerns\AnnotationTrait; - - protected bool $enabled; - - public function __construct(bool $enabled = false) + /** + * @var bool + */ + protected $enabled; + public function __construct(bool $enabled = \false) { $this->enabled = $enabled; } - - public function isEnabled(): bool + public function isEnabled() : bool { return $this->enabled; } - /** * Enables/disables the CleanUnusedComponents processor. */ - public function setEnabled(bool $enabled): CleanUnusedComponents + public function setEnabled(bool $enabled) : CleanUnusedComponents { $this->enabled = $enabled; - return $this; } - - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { if (!$this->enabled || Generator::isDefault($analysis->openapi->components)) { return; } - $analysis->annotations = $this->collectAnnotations($analysis->annotations); - // allow multiple runs to catch nested dependencies for ($ii = 0; $ii < 10; ++$ii) { if (!$this->cleanup($analysis)) { @@ -54,15 +48,13 @@ public function __invoke(Analysis $analysis) } } } - - protected function cleanup(Analysis $analysis): bool + protected function cleanup(Analysis $analysis) : bool { $usedRefs = []; foreach ($analysis->annotations as $annotation) { if (property_exists($annotation, 'ref') && !Generator::isDefault($annotation->ref) && $annotation->ref !== null) { $usedRefs[$annotation->ref] = $annotation->ref; } - foreach (['allOf', 'anyOf', 'oneOf'] as $sub) { if (property_exists($annotation, $sub) && !Generator::isDefault($annotation->{$sub})) { foreach ($annotation->{$sub} as $subElem) { @@ -72,7 +64,6 @@ protected function cleanup(Analysis $analysis): bool } } } - if ($annotation instanceof OA\OpenApi || $annotation instanceof OA\Operation) { if (!Generator::isDefault($annotation->security)) { foreach ($annotation->security as $security) { @@ -84,7 +75,6 @@ protected function cleanup(Analysis $analysis): bool } } } - $unusedRefs = []; foreach (OA\Components::$_nested as $nested) { if (2 == count($nested)) { @@ -100,7 +90,6 @@ protected function cleanup(Analysis $analysis): bool } } } - // remove unused foreach ($unusedRefs as $refDetails) { [$ref, $nameProperty] = $refDetails; @@ -110,14 +99,12 @@ protected function cleanup(Analysis $analysis): bool $annotation = $analysis->openapi->components->{$componentType}[$ii]; $this->removeAnnotation($analysis->annotations, $annotation); unset($analysis->openapi->components->{$componentType}[$ii]); - if (!$analysis->openapi->components->{$componentType}) { $analysis->openapi->components->{$componentType} = Generator::UNDEFINED; } } } } - return 0 != count($unusedRefs); } } diff --git a/vendor/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php similarity index 78% rename from vendor/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php index 4919d41..ee499d6 100644 --- a/vendor/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/AnnotationTrait.php @@ -1,13 +1,12 @@ -traverseAnnotations($root, function ($item) use (&$storage) { + $this->traverseAnnotations($root, function ($item) use(&$storage) : void { if ($item instanceof OA\AbstractAnnotation && !$storage->contains($item)) { $storage->attach($item); } }); - return $storage; } - /** * Remove all annotations that are part of the $annotation tree. */ - public function removeAnnotation(iterable $root, OA\AbstractAnnotation $annotation, bool $recurse = true): void + public function removeAnnotation(iterable $root, OA\AbstractAnnotation $annotation, bool $recurse = \true) : void { $remove = $this->collectAnnotations($annotation); - $this->traverseAnnotations($root, function ($item) use ($remove) { + $this->traverseAnnotations($root, function ($item) use($remove) : void { if ($item instanceof \SplObjectStorage) { foreach ($remove as $annotation) { $item->detach($annotation); @@ -42,14 +38,12 @@ public function removeAnnotation(iterable $root, OA\AbstractAnnotation $annotati } }, $recurse); } - /** * @param string|array|iterable|OA\AbstractAnnotation $root */ - public function traverseAnnotations($root, callable $callable, bool $recurse = true): void + public function traverseAnnotations($root, callable $callable, bool $recurse = \true) : void { $callable($root); - if (is_iterable($root) && $recurse) { foreach ($root as $value) { $this->traverseAnnotations($value, $callable, $recurse); diff --git a/vendor/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php similarity index 62% rename from vendor/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php index b3bc3e6..485ffda 100644 --- a/vendor/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/DocblockTrait.php @@ -1,42 +1,29 @@ -_context) { - return true; + return \true; } - if (1 == count($annotation->_context->annotations)) { - return true; + return \true; } - /** @var array $matchPriorityMap */ - $matchPriorityMap = [ - OA\OpenApi::class, - - OA\Operation::class => false, - OA\Property::class => false, - OA\Parameter::class => false, - OA\Response::class => false, - - OA\Schema::class => true, - OAT\Schema::class => true, - ]; + $matchPriorityMap = [OA\OpenApi::class, OA\Operation::class => \false, OA\Property::class => \false, OA\Parameter::class => \false, OA\Response::class => \false, OA\Schema::class => \true, OAT\Schema::class => \true]; // try to find best root match foreach ($matchPriorityMap as $className => $strict) { foreach ($annotation->_context->annotations as $contextAnnotation) { @@ -51,60 +38,52 @@ public function isRoot(OA\AbstractAnnotation $annotation): bool } } } - - return false; + return \false; } - - protected function handleTag(string $line, ?array &$tags = null): void + protected function handleTag(string $line, ?array &$tags = null) : void { if (null === $tags) { return; } - // split of tag name - $token = preg_split("@[\s+ ]@u", $line, 2); + $token = preg_split("@[\\s+ ]@u", $line, 2); if (2 == count($token)) { $tag = substr($token[0], 1); $tail = $token[1]; if (!array_key_exists($tag, $tags)) { $tags[$tag] = []; } - - if (false !== ($dpos = strpos($tail, '$'))) { + if (\false !== ($dpos = strpos($tail, '$'))) { $type = trim(substr($tail, 0, $dpos)); - $token = preg_split("@[\s+ ]@u", substr($tail, $dpos), 2); + $token = preg_split("@[\\s+ ]@u", substr($tail, $dpos), 2); $name = trim(substr($token[0], 1)); $description = 2 == count($token) ? trim($token[1]) : null; - - $tags[$tag][$name] = [ - 'type' => $type, - 'description' => $description, - ]; + $tags[$tag][$name] = ['type' => $type, 'description' => $description]; } } } - /** * The text contents of the phpdoc comment (excl. tags). */ - public function extractContent(?string $docblock, ?array &$tags = null): string + public function extractContent(?string $docblock, ?array &$tags = null) : string { if (Generator::isDefault($docblock)) { return Generator::UNDEFINED; } - - $comment = preg_split('/(\n|\r\n)/', (string) $docblock); - $comment[0] = preg_replace('/[ \t]*\\/\*\*/', '', $comment[0]); // strip '/**' + $comment = preg_split('/(\\n|\\r\\n)/', (string) $docblock); + $comment[0] = preg_replace('/[ \\t]*\\/\\*\\*/', '', $comment[0]); + // strip '/**' $ii = count($comment) - 1; - $comment[$ii] = preg_replace('/\*\/[ \t]*$/', '', $comment[$ii]); // strip '*/' + $comment[$ii] = preg_replace('/\\*\\/[ \\t]*$/', '', $comment[$ii]); + // strip '*/' $lines = []; - $append = false; - $skip = false; + $append = \false; + $skip = \false; foreach ($comment as $line) { - $line = preg_replace('/^\s+\* ?/', '', $line); + $line = preg_replace('/^\\s+\\* ?/', '', $line); if (substr($tagline = trim($line), 0, 1) === '@') { $this->handleTag($tagline, $tags); - $skip = true; + $skip = \true; } if ($skip) { continue; @@ -115,25 +94,23 @@ public function extractContent(?string $docblock, ?array &$tags = null): string } else { $lines[] = $line; } - $append = (substr($line, -1) === '\\'); + $append = substr($line, -1) === '\\'; } $description = trim(implode("\n", $lines)); if ($description === '') { return Generator::UNDEFINED; } - return $description; } - /** * A short piece of text, usually one line, providing the basic function of the associated element. */ - public function extractSummary(?string $docblock): string + public function extractSummary(?string $docblock) : string { - if (!$content = $this->extractContent($docblock)) { + if (!($content = $this->extractContent($docblock))) { return Generator::UNDEFINED; } - $lines = preg_split('/(\n|\r\n)/', $content); + $lines = preg_split('/(\\n|\\r\\n)/', $content); $summary = ''; foreach ($lines as $line) { $summary .= $line . "\n"; @@ -145,62 +122,53 @@ public function extractSummary(?string $docblock): string if ($summary === '') { return Generator::UNDEFINED; } - return $summary; } - /** * An optional longer piece of text providing more details on the associated element’s function. * * This is very useful when working with a complex element. */ - public function extractDescription(?string $docblock): string + public function extractDescription(?string $docblock) : string { $summary = $this->extractSummary($docblock); if (!$summary) { return Generator::UNDEFINED; } - $description = ''; - if (false !== ($substr = substr($this->extractContent($docblock), strlen($summary)))) { + if (\false !== ($substr = substr($this->extractContent($docblock), strlen($summary)))) { $description = trim($substr); } - return $description ?: Generator::UNDEFINED; } - /** * Extract property type and description from a @var dockblock line. * * @return array extracted type and description; values default to null */ - public function extractVarTypeAndDescription(?string $docblock): array + public function extractVarTypeAndDescription(?string $docblock) : array { $comment = str_replace("\r\n", "\n", (string) $docblock); - $comment = preg_replace('/\*\/[ \t]*$/', '', $comment); // strip '*/' - preg_match('/@var\s+(?[^\s]+)([ \t])?(?.+)?$/im', $comment, $matches); - - return array_merge( - ['type' => null, 'description' => null], - array_filter($matches, fn ($key) => in_array($key, ['type', 'description']), ARRAY_FILTER_USE_KEY) - ); + $comment = preg_replace('/\\*\\/[ \\t]*$/', '', $comment); + // strip '*/' + preg_match('/@var\\s+(?[^\\s]+)([ \\t])?(?.+)?$/im', $comment, $matches); + return array_merge(['type' => null, 'description' => null], array_filter($matches, function ($key) : bool { + return in_array($key, ['type', 'description']); + }, \ARRAY_FILTER_USE_KEY)); } - /** * Extract example text from a @example dockblock line. */ - public function extractExampleDescription(?string $docblock): ?string + public function extractExampleDescription(?string $docblock) : ?string { - preg_match('/@example\s+([ \t])?(?.+)?$/im', $docblock, $matches); - - return isset($matches['example']) ? $matches['example'] : null; + preg_match('/@example\\s+([ \\t])?(?.+)?$/im', $docblock, $matches); + return $matches['example'] ?? null; } - /** * Returns true if the \@deprecated tag is present, false otherwise. */ - public function isDeprecated(?string $docblock): bool + public function isDeprecated(?string $docblock) : bool { - return 1 === preg_match('/@deprecated\s+([ \t])?(?.+)?$/im', (string) $docblock); + return 1 === preg_match('/@deprecated\\s+([ \\t])?(?.+)?$/im', (string) $docblock); } } diff --git a/vendor/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php similarity index 64% rename from vendor/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php index 86748d8..56bb48b 100644 --- a/vendor/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/MergePropertiesTrait.php @@ -1,16 +1,15 @@ -allOf)) { $schema->allOf = []; } // merging other properties into allOf is done in the AugmentSchemas processor - $schema->allOf[] = $refSchema = new OA\Schema([ - 'ref' => OA\Components::ref($refPath), - '_context' => new Context(['generated' => true], $context), - ]); + $schema->allOf[] = $refSchema = new OA\Schema(['ref' => OA\Components::ref($refPath), '_context' => new Context(['generated' => \true], $context)]); $analysis->addAnnotation($refSchema, $refSchema->_context); } - - protected function mergeProperties(OA\Schema $schema, array $from, array &$existing): void + protected function mergeProperties(OA\Schema $schema, array $from, array &$existing) : void { foreach ($from['properties'] as $context) { if (is_iterable($context->annotations)) { foreach ($context->annotations as $annotation) { - if ($annotation instanceof OA\Property && !in_array($annotation->_context->property, $existing, true)) { + if ($annotation instanceof OA\Property && !in_array($annotation->_context->property, $existing, \true)) { $existing[] = $annotation->_context->property; - $schema->merge([$annotation], true); + $schema->merge([$annotation], \true); } } } } } - - protected function mergeMethods(OA\Schema $schema, array $from, array &$existing): void + protected function mergeMethods(OA\Schema $schema, array $from, array &$existing) : void { foreach ($from['methods'] as $context) { if (is_iterable($context->annotations)) { foreach ($context->annotations as $annotation) { - if ($annotation instanceof OA\Property && !in_array($annotation->_context->property, $existing, true)) { + if ($annotation instanceof OA\Property && !in_array($annotation->_context->property, $existing, \true)) { $existing[] = $annotation->_context->property; - $schema->merge([$annotation], true); + $schema->merge([$annotation], \true); } } } diff --git a/vendor/zircote/swagger-php/src/Processors/Concerns/RefTrait.php b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/RefTrait.php similarity index 57% rename from vendor/zircote/swagger-php/src/Processors/Concerns/RefTrait.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/RefTrait.php index a97b195..319b8c1 100644 --- a/vendor/zircote/swagger-php/src/Processors/Concerns/RefTrait.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/RefTrait.php @@ -1,23 +1,20 @@ -fullyQualifiedName($name)); - return ltrim($fqn, '\\'); } - - protected function isRef(?string $ref): bool + protected function isRef(?string $ref) : bool { return $ref && 0 === strpos($ref, '#/'); } diff --git a/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php new file mode 100644 index 0000000..99c7a91 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php @@ -0,0 +1,34 @@ + 'array', 'byte' => ['string', 'byte'], 'boolean' => 'boolean', 'bool' => 'boolean', 'int' => 'integer', 'integer' => 'integer', 'long' => ['integer', 'long'], 'float' => ['number', 'float'], 'double' => ['number', 'double'], 'string' => 'string', 'date' => ['string', 'date'], 'datetime' => ['string', 'date-time'], '\\datetime' => ['string', 'date-time'], 'datetimeimmutable' => ['string', 'date-time'], '\\datetimeimmutable' => ['string', 'date-time'], 'datetimeinterface' => ['string', 'date-time'], '\\datetimeinterface' => ['string', 'date-time'], 'number' => 'number', 'object' => 'object']; + public function mapNativeType(OA\Schema $schema, string $type) : bool + { + if (!array_key_exists($type, self::$NATIVE_TYPE_MAP)) { + return \false; + } + $type = self::$NATIVE_TYPE_MAP[$type]; + if (is_array($type)) { + if (Generator::isDefault($schema->format)) { + $schema->format = $type[1]; + } + $type = $type[0]; + } + $schema->type = $type; + return \true; + } + public function native2spec(string $type) : string + { + $mapped = array_key_exists($type, self::$NATIVE_TYPE_MAP) ? self::$NATIVE_TYPE_MAP[$type] : $type; + return is_array($mapped) ? $mapped[0] : $mapped; + } +} diff --git a/vendor/zircote/swagger-php/src/Processors/DocBlockDescriptions.php b/vendor/prefixed/zircote/swagger-php/src/Processors/DocBlockDescriptions.php similarity index 84% rename from vendor/zircote/swagger-php/src/Processors/DocBlockDescriptions.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/DocBlockDescriptions.php index b9f60dc..8d6a5a9 100644 --- a/vendor/zircote/swagger-php/src/Processors/DocBlockDescriptions.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/DocBlockDescriptions.php @@ -1,15 +1,14 @@ -annotations as $annotation) { - if (property_exists($annotation, '_context') === false) { + if (property_exists($annotation, '_context') === \false) { // only annotations with context continue; } - if (!$this->isRoot($annotation)) { // only top-level annotations continue; } - $hasSummary = property_exists($annotation, 'summary'); $hasDescription = property_exists($annotation, 'description'); if (!$hasSummary && !$hasDescription) { continue; } - if ($hasSummary && $hasDescription) { $this->summaryAndDescription($annotation); } elseif ($hasDescription) { @@ -47,37 +42,33 @@ public function __invoke(Analysis $analysis) } } } - /** * @param OA\Operation|OA\Property|OA\Parameter|OA\Schema $annotation */ - protected function description(OA\AbstractAnnotation $annotation): void + protected function description(OA\AbstractAnnotation $annotation) : void { if (!Generator::isDefault($annotation->description)) { if ($annotation->description === null) { $annotation->description = Generator::UNDEFINED; } - return; } - $annotation->description = $this->extractContent($annotation->_context->comment); } - /** * @param OA\Operation|OA\Property|OA\Parameter|OA\Schema $annotation */ - protected function summaryAndDescription(OA\AbstractAnnotation $annotation): void + protected function summaryAndDescription(OA\AbstractAnnotation $annotation) : void { $ignoreSummary = !Generator::isDefault($annotation->summary); $ignoreDescription = !Generator::isDefault($annotation->description); if ($annotation->summary === null) { - $ignoreSummary = true; + $ignoreSummary = \true; $annotation->summary = Generator::UNDEFINED; } if ($annotation->description === null) { $annotation->description = Generator::UNDEFINED; - $ignoreDescription = true; + $ignoreDescription = \true; } if ($ignoreSummary && $ignoreDescription) { return; diff --git a/vendor/zircote/swagger-php/src/Processors/ExpandClasses.php b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandClasses.php similarity index 81% rename from vendor/zircote/swagger-php/src/Processors/ExpandClasses.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/ExpandClasses.php index acee105..5d9f4c9 100644 --- a/vendor/zircote/swagger-php/src/Processors/ExpandClasses.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandClasses.php @@ -1,15 +1,14 @@ -getAnnotationsOfType(OA\Schema::class, true); - + $schemas = $analysis->getAnnotationsOfType(OA\Schema::class, \true); foreach ($schemas as $schema) { if ($schema->_context->is('class')) { $ancestors = $analysis->getSuperClasses($schema->_context->fullyQualifiedName($schema->_context->class)); @@ -35,7 +32,6 @@ public function __invoke(Analysis $analysis) if ($ancestorSchema) { $refPath = Generator::isDefault($ancestorSchema->schema) ? $ancestor['class'] : $ancestorSchema->schema; $this->inheritFrom($analysis, $schema, $ancestorSchema, $refPath, $ancestor['context']); - // one ancestor is enough break; } else { diff --git a/vendor/zircote/swagger-php/src/Processors/ExpandEnums.php b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandEnums.php similarity index 75% rename from vendor/zircote/swagger-php/src/Processors/ExpandEnums.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/ExpandEnums.php index 7519c70..0c00dab 100644 --- a/vendor/zircote/swagger-php/src/Processors/ExpandEnums.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandEnums.php @@ -1,16 +1,15 @@ -enumNames = $enumNames; } - - public function getEnumNames(): ?string + public function getEnumNames() : ?string { return $this->enumNames; } - /** * Specifies the name of the extension variable where backed enum names will be stored. * Set to null to avoid writing backed enum names. @@ -44,31 +42,26 @@ public function getEnumNames(): ?string * - NAME2 * ``` */ - public function setEnumNames(?string $enumNames = null): void + public function setEnumNames(?string $enumNames = null) : void { $this->enumNames = $enumNames; } - - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { if (!class_exists('\\ReflectionEnum')) { return; } - $this->expandContextEnum($analysis); $this->expandSchemaEnum($analysis); } - - protected function expandContextEnum(Analysis $analysis): void + protected function expandContextEnum(Analysis $analysis) : void { /** @var OA\Schema[] $schemas */ - $schemas = $analysis->getAnnotationsOfType(OA\Schema::class, true); - + $schemas = $analysis->getAnnotationsOfType(OA\Schema::class, \true); foreach ($schemas as $schema) { if ($schema->_context->is('enum')) { $re = new \ReflectionEnum($schema->_context->fullyQualifiedName($schema->_context->enum)); $schema->schema = Generator::isDefault($schema->schema) ? $re->getShortName() : $schema->schema; - $schemaType = $schema->type; $enumType = null; if ($re->isBacked()) { @@ -77,57 +70,46 @@ protected function expandContextEnum(Analysis $analysis): void $enumType = $backingType->getName(); } } - // no (or invalid) schema type means name - $useName = Generator::isDefault($schemaType) || ($enumType && $this->native2spec($enumType) != $schemaType); - - $schema->enum = array_map(function ($case) use ($useName) { - return ($useName || !($case instanceof \ReflectionEnumBackedCase)) ? $case->name : $case->getBackingValue(); + $useName = Generator::isDefault($schemaType) || $enumType && $this->native2spec($enumType) != $schemaType; + $schema->enum = array_map(function (\ReflectionEnumUnitCase $case) use ($useName) { + return $useName || !$case instanceof \ReflectionEnumBackedCase ? $case->name : $case->getBackingValue(); }, $re->getCases()); - if ($this->enumNames !== null && !$useName) { $schemaX = Generator::isDefault($schema->x) ? [] : $schema->x; - $schemaX[$this->enumNames] = array_map(function ($case) { + $schemaX[$this->enumNames] = array_map(function (\ReflectionEnumUnitCase $case) : string { return $case->name; }, $re->getCases()); - $schema->x = $schemaX; } - $schema->type = $useName ? 'string' : $enumType; - $this->mapNativeType($schema, $schemaType); } } } - - protected function expandSchemaEnum(Analysis $analysis): void + protected function expandSchemaEnum(Analysis $analysis) : void { /** @var OA\Schema[] $schemas */ $schemas = $analysis->getAnnotationsOfType([OA\Schema::class, OA\ServerVariable::class]); - foreach ($schemas as $schema) { if (Generator::isDefault($schema->enum)) { continue; } - if (is_string($schema->enum)) { // might be enum class-string - if (is_a($schema->enum, \UnitEnum::class, true)) { + if (is_a($schema->enum, \UnitEnum::class, \true)) { $cases = $schema->enum::cases(); } else { - throw new OpenApiException("Unexpected enum value, requires specifying the Enum class string: $schema->enum"); + throw new OpenApiException("Unexpected enum value, requires specifying the Enum class string: {$schema->enum}"); } } else { // might be an array of \UnitEnum::class, string, int, etc... assert(is_array($schema->enum)); - $cases = []; - // transform \UnitEnum into individual cases /** @var string|class-string<\UnitEnum> $enum */ foreach ($schema->enum as $enum) { - if (is_string($enum) && function_exists('enum_exists') && enum_exists($enum)) { + if (is_string($enum) && function_exists('enum_exists') && class_exists($enum)) { foreach ($enum::cases() as $case) { $cases[] = $case; } @@ -136,12 +118,10 @@ protected function expandSchemaEnum(Analysis $analysis): void } } } - $enums = []; foreach ($cases as $enum) { $enums[] = is_a($enum, \UnitEnum::class) ? $enum->value ?? $enum->name : $enum; } - $schema->enum = $enums; } } diff --git a/vendor/zircote/swagger-php/src/Processors/ExpandInterfaces.php b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandInterfaces.php similarity index 84% rename from vendor/zircote/swagger-php/src/Processors/ExpandInterfaces.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/ExpandInterfaces.php index 2d89ce1..ffa5e8a 100644 --- a/vendor/zircote/swagger-php/src/Processors/ExpandInterfaces.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandInterfaces.php @@ -1,15 +1,14 @@ -getAnnotationsOfType(OA\Schema::class, true); - + $schemas = $analysis->getAnnotationsOfType(OA\Schema::class, \true); foreach ($schemas as $schema) { if ($schema->_context->is('class')) { $className = $schema->_context->fullyQualifiedName($schema->_context->class); - $interfaces = $analysis->getInterfacesOfClass($className, true); - + $interfaces = $analysis->getInterfacesOfClass($className, \true); if (class_exists($className) && ($parent = get_parent_class($className)) && ($inherited = array_keys(class_implements($parent)))) { // strip interfaces we inherit from ancestor foreach (array_keys($interfaces) as $interface) { @@ -37,7 +33,6 @@ public function __invoke(Analysis $analysis) } } } - $existing = []; foreach ($interfaces as $interface) { $interfaceName = $interface['context']->fullyQualifiedName($interface['interface']); diff --git a/vendor/zircote/swagger-php/src/Processors/ExpandTraits.php b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandTraits.php similarity index 85% rename from vendor/zircote/swagger-php/src/Processors/ExpandTraits.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/ExpandTraits.php index 01090d1..9b01803 100644 --- a/vendor/zircote/swagger-php/src/Processors/ExpandTraits.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/ExpandTraits.php @@ -1,15 +1,14 @@ -getAnnotationsOfType(OA\Schema::class, true); - + $schemas = $analysis->getAnnotationsOfType(OA\Schema::class, \true); // do regular trait inheritance / merge foreach ($schemas as $schema) { if ($schema->_context->is('trait')) { - $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($schema->_context->trait), true); + $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($schema->_context->trait), \true); $existing = []; foreach ($traits as $trait) { $traitSchema = $analysis->getSchemaForSource($trait['context']->fullyQualifiedName($trait['trait'])); @@ -41,11 +38,10 @@ public function __invoke(Analysis $analysis) } } } - foreach ($schemas as $schema) { if ($schema->_context->is('class') && !$schema->_context->is('generated')) { // look at class traits - $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($schema->_context->class), true); + $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($schema->_context->class), \true); $existing = []; foreach ($traits as $trait) { $traitSchema = $analysis->getSchemaForSource($trait['context']->fullyQualifiedName($trait['trait'])); @@ -57,7 +53,6 @@ public function __invoke(Analysis $analysis) $this->mergeProperties($schema, $trait, $existing); } } - // also merge ancestor traits of non schema parents $ancestors = $analysis->getSuperClasses($schema->_context->fullyQualifiedName($schema->_context->class)); $existing = []; @@ -67,7 +62,7 @@ public function __invoke(Analysis $analysis) // stop here as we inherit everything above break; } else { - $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($ancestor['class']), true); + $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($ancestor['class']), \true); foreach ($traits as $trait) { $this->mergeMethods($schema, $trait, $existing); $this->mergeProperties($schema, $trait, $existing); diff --git a/vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoComponents.php b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoComponents.php new file mode 100644 index 0000000..60f98b7 --- /dev/null +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoComponents.php @@ -0,0 +1,33 @@ +@OA\Schemas. + */ +class MergeIntoComponents +{ + public function __invoke(Analysis $analysis) : void + { + $components = $analysis->openapi->components; + if (Generator::isDefault($components)) { + $components = new OA\Components(['_context' => new Context(['generated' => \true], $analysis->context)]); + } + /** @var OA\AbstractAnnotation $annotation */ + foreach ($analysis->annotations as $annotation) { + if ($annotation instanceof OA\AbstractAnnotation && in_array(OA\Components::class, $annotation::$_parents) && \false === $annotation->_context->is('nested')) { + // A top level annotation. + $components->merge([$annotation], \true); + $analysis->openapi->components = $components; + } + } + } +} diff --git a/vendor/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php similarity index 69% rename from vendor/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php index f31b723..0bc8abd 100644 --- a/vendor/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeIntoOpenApi.php @@ -1,22 +1,21 @@ -@OA\OpenApi annotations into one. */ class MergeIntoOpenApi { - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { // Auto-create the OpenApi annotation. if (!$analysis->openapi) { @@ -25,7 +24,6 @@ public function __invoke(Analysis $analysis) } $openapi = $analysis->openapi; $openapi->_analysis = $analysis; - // Merge annotations into the target openapi $merge = []; /** @var OA\AbstractAnnotation $annotation */ @@ -45,14 +43,11 @@ public function __invoke(Analysis $analysis) $openapi->paths[] = $path; } } - } elseif ( - $annotation instanceof OA\AbstractAnnotation - && in_array(OA\OpenApi::class, $annotation::$_parents) - && false === $annotation->_context->is('nested')) { + } elseif ($annotation instanceof OA\AbstractAnnotation && in_array(OA\OpenApi::class, $annotation::$_parents) && \false === $annotation->_context->is('nested')) { // A top level annotation. $merge[] = $annotation; } } - $openapi->merge($merge, true); + $openapi->merge($merge, \true); } } diff --git a/vendor/zircote/swagger-php/src/Processors/MergeJsonContent.php b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeJsonContent.php similarity index 65% rename from vendor/zircote/swagger-php/src/Processors/MergeJsonContent.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/MergeJsonContent.php index ab8d804..f9ceb21 100644 --- a/vendor/zircote/swagger-php/src/Processors/MergeJsonContent.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeJsonContent.php @@ -1,29 +1,27 @@ -getAnnotationsOfType(OA\JsonContent::class); - foreach ($annotations as $jsonContent) { $parent = $jsonContent->_context->nested; - if (!($parent instanceof OA\Response) && !($parent instanceof OA\RequestBody) && !($parent instanceof OA\Parameter)) { + if (!$parent instanceof OA\Response && !$parent instanceof OA\RequestBody && !$parent instanceof OA\Parameter) { if ($parent) { $jsonContent->_context->logger->warning('Unexpected ' . $jsonContent->identity() . ' in ' . $parent->identity() . ' in ' . $parent->_context); } else { @@ -34,21 +32,15 @@ public function __invoke(Analysis $analysis) if (Generator::isDefault($parent->content)) { $parent->content = []; } - $parent->content['application/json'] = $mediaType = new OA\MediaType([ - 'schema' => $jsonContent, - 'example' => $jsonContent->example, - 'examples' => $jsonContent->examples, - '_context' => new Context(['generated' => true], $jsonContent->_context), - ]); + $parent->content['application/json'] = $mediaType = new OA\MediaType(['schema' => $jsonContent, 'example' => $jsonContent->example, 'examples' => $jsonContent->examples, '_context' => new Context(['generated' => \true], $jsonContent->_context)]); $analysis->addAnnotation($mediaType, $mediaType->_context); if (!$parent instanceof OA\Parameter) { $parent->content['application/json']->mediaType = 'application/json'; } $jsonContent->example = Generator::UNDEFINED; $jsonContent->examples = Generator::UNDEFINED; - - $index = array_search($jsonContent, $parent->_unmerged, true); - if ($index !== false) { + $index = array_search($jsonContent, $parent->_unmerged, \true); + if ($index !== \false) { array_splice($parent->_unmerged, $index, 1); } } diff --git a/vendor/zircote/swagger-php/src/Processors/MergeXmlContent.php b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeXmlContent.php similarity index 65% rename from vendor/zircote/swagger-php/src/Processors/MergeXmlContent.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/MergeXmlContent.php index 45590dc..87de7ba 100644 --- a/vendor/zircote/swagger-php/src/Processors/MergeXmlContent.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/MergeXmlContent.php @@ -1,29 +1,27 @@ -getAnnotationsOfType(OA\XmlContent::class); - foreach ($annotations as $xmlContent) { $parent = $xmlContent->_context->nested; - if (!($parent instanceof OA\Response) && !($parent instanceof OA\RequestBody) && !($parent instanceof OA\Parameter)) { + if (!$parent instanceof OA\Response && !$parent instanceof OA\RequestBody && !$parent instanceof OA\Parameter) { if ($parent) { $xmlContent->_context->logger->warning('Unexpected ' . $xmlContent->identity() . ' in ' . $parent->identity() . ' in ' . $parent->_context); } else { @@ -34,21 +32,15 @@ public function __invoke(Analysis $analysis) if (Generator::isDefault($parent->content)) { $parent->content = []; } - $parent->content['application/xml'] = $mediaType = new OA\MediaType([ - 'schema' => $xmlContent, - 'example' => $xmlContent->example, - 'examples' => $xmlContent->examples, - '_context' => new Context(['generated' => true], $xmlContent->_context), - ]); + $parent->content['application/xml'] = $mediaType = new OA\MediaType(['schema' => $xmlContent, 'example' => $xmlContent->example, 'examples' => $xmlContent->examples, '_context' => new Context(['generated' => \true], $xmlContent->_context)]); $analysis->addAnnotation($mediaType, $mediaType->_context); if (!$parent instanceof OA\Parameter) { $parent->content['application/xml']->mediaType = 'application/xml'; } $xmlContent->example = Generator::UNDEFINED; $xmlContent->examples = Generator::UNDEFINED; - - $index = array_search($xmlContent, $parent->_unmerged, true); - if ($index !== false) { + $index = array_search($xmlContent, $parent->_unmerged, \true); + if ($index !== \false) { array_splice($parent->_unmerged, $index, 1); } } diff --git a/vendor/zircote/swagger-php/src/Processors/OperationId.php b/vendor/prefixed/zircote/swagger-php/src/Processors/OperationId.php similarity index 72% rename from vendor/zircote/swagger-php/src/Processors/OperationId.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/OperationId.php index bb874c2..71fd926 100644 --- a/vendor/zircote/swagger-php/src/Processors/OperationId.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/OperationId.php @@ -1,67 +1,60 @@ -hash = $hash; } - - public function isHash(): bool + public function isHash() : bool { return $this->hash; } - /** * If set to true generate ids (md5) instead of clear text operation ids. */ - public function setHash(bool $hash): OperationId + public function setHash(bool $hash) : OperationId { $this->hash = $hash; - return $this; } - - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { $allOperations = $analysis->getAnnotationsOfType(OA\Operation::class); - /** @var OA\Operation $operation */ foreach ($allOperations as $operation) { if (null === $operation->operationId) { $operation->operationId = Generator::UNDEFINED; } - if (!Generator::isDefault($operation->operationId)) { continue; } - $context = $operation->_context; if ($context) { $source = $context->class ?? $context->interface ?? $context->trait; $operationId = null; if ($source) { - $method = $context->method ? ('::' . $context->method) : ''; + $method = $context->method ? '::' . $context->method : ''; $operationId = $context->namespace ? $context->namespace . '\\' . $source . $method : $source . $method; } elseif ($context->method) { $operationId = $context->method; } - if ($operationId) { $operationId = strtoupper($operation->method) . '::' . $operation->path . '::' . $operationId; $operation->operationId = $this->hash ? md5($operationId) : $operationId; diff --git a/vendor/zircote/swagger-php/src/Processors/PathFilter.php b/vendor/prefixed/zircote/swagger-php/src/Processors/PathFilter.php similarity index 74% rename from vendor/zircote/swagger-php/src/Processors/PathFilter.php rename to vendor/prefixed/zircote/swagger-php/src/Processors/PathFilter.php index efa2df2..e4f2f53 100644 --- a/vendor/zircote/swagger-php/src/Processors/PathFilter.php +++ b/vendor/prefixed/zircote/swagger-php/src/Processors/PathFilter.php @@ -1,15 +1,14 @@ -tags = $tags; $this->paths = $paths; $this->recurseCleanup = $recurseCleanup; } - - public function getTags(): array + public function getTags() : array { return $this->tags; } - /** * A list of regular expressions to match tags to include. * * @param array $tags */ - public function setTags(array $tags): PathFilter + public function setTags(array $tags) : PathFilter { $this->tags = $tags; - return $this; } - - public function getPaths(): array + public function getPaths() : array { return $this->paths; } - /** * A list of regular expressions to match paths to include. * * @param array $paths */ - public function setPaths(array $paths): PathFilter + public function setPaths(array $paths) : PathFilter { $this->paths = $paths; - return $this; } - - public function isRecurseCleanup(): bool + public function isRecurseCleanup() : bool { return $this->recurseCleanup; } - /** * Flag to do a recursive cleanup of unused paths and their nested annotations. */ - public function setRecurseCleanup(bool $recurseCleanup): void + public function setRecurseCleanup(bool $recurseCleanup) : void { $this->recurseCleanup = $recurseCleanup; } - - public function __invoke(Analysis $analysis) + public function __invoke(Analysis $analysis) : void { if (($this->tags || $this->paths) && !Generator::isDefault($analysis->openapi->paths)) { $filtered = []; @@ -99,21 +94,18 @@ public function __invoke(Analysis $analysis) } } } - foreach ($this->paths as $pattern) { if (preg_match($pattern, $pathItem->path)) { $matched = $pathItem; break; } } - if ($matched) { $filtered[] = $matched; } else { $this->removeAnnotation($analysis->annotations, $pathItem, $this->recurseCleanup); } } - $analysis->openapi->paths = $filtered; } } diff --git a/vendor/zircote/swagger-php/src/Serializer.php b/vendor/prefixed/zircote/swagger-php/src/Serializer.php similarity index 72% rename from vendor/zircote/swagger-php/src/Serializer.php rename to vendor/prefixed/zircote/swagger-php/src/Serializer.php index 7ec486b..3c4d81b 100644 --- a/vendor/zircote/swagger-php/src/Serializer.php +++ b/vendor/prefixed/zircote/swagger-php/src/Serializer.php @@ -1,111 +1,61 @@ -isValidAnnotationClass($className)) { + if (!static::isValidAnnotationClass($className)) { throw new OpenApiException($className . ' is not defined in OpenApi PHP Annotations'); } - - return $this->doDeserialize(json_decode($jsonString), $className, new Context(['generated' => true])); + return $this->doDeserialize(json_decode($jsonString), $className, new Context(['generated' => \true])); } - /** * Deserialize a file. */ - public function deserializeFile(string $filename, string $format = 'json', string $className = OA\OpenApi::class): OA\AbstractAnnotation + public function deserializeFile(string $filename, string $format = 'json', string $className = OA\OpenApi::class) : OA\AbstractAnnotation { - if (!$this->isValidAnnotationClass($className)) { + if (!static::isValidAnnotationClass($className)) { throw new OpenApiException($className . ' is not a valid OpenApi PHP Annotations'); } - $contents = file_get_contents($filename); - - $ext = pathinfo($filename, PATHINFO_EXTENSION); + $ext = pathinfo($filename, \PATHINFO_EXTENSION); if ('yaml' === $format || in_array($ext, ['yml', 'yaml'])) { $contents = json_encode(Yaml::parse($contents)); } - - return $this->doDeserialize(json_decode($contents), $className, new Context(['generated' => true])); + return $this->doDeserialize(json_decode($contents), $className, new Context(['generated' => \true])); } - /** * Do deserialization. */ - protected function doDeserialize(\stdClass $c, string $class, Context $context): OA\AbstractAnnotation + protected function doDeserialize(\stdClass $c, string $class, Context $context) : OA\AbstractAnnotation { $annotation = new $class(['_context' => $context]); foreach ((array) $c as $property => $value) { if ($property === '$ref') { $property = 'ref'; } - if (substr($property, 0, 2) === 'x-') { if (Generator::isDefault($annotation->x)) { $annotation->x = []; @@ -116,14 +66,11 @@ protected function doDeserialize(\stdClass $c, string $class, Context $context): $annotation->{$property} = $this->doDeserializeProperty($annotation, $property, $value, $context); } } - if ($annotation instanceof OA\OpenApi) { $context->root()->version = $annotation->openapi; } - return $annotation; } - /** * Deserialize the annotation's property. */ @@ -133,7 +80,6 @@ protected function doDeserializeProperty(OA\AbstractAnnotation $annotation, stri if (array_key_exists($property, $annotation::$_types)) { return $this->doDeserializeBaseProperty($annotation::$_types[$property], $value, $context); } - // property is embedded annotation // note: this does not support custom nested annotation classes foreach ($annotation::$_nested as $nestedClass => $declaration) { @@ -145,17 +91,14 @@ protected function doDeserializeProperty(OA\AbstractAnnotation $annotation, stri return $value; } } - // property is an annotation array if (is_array($declaration) && count($declaration) === 1 && $declaration[0] === $property) { $annotationArr = []; foreach ($value as $v) { $annotationArr[] = $this->doDeserialize($v, $nestedClass, $context); } - return $annotationArr; } - // property is an annotation hash map if (is_array($declaration) && count($declaration) === 2 && $declaration[0] === $property) { $key = $declaration[1]; @@ -165,14 +108,11 @@ protected function doDeserializeProperty(OA\AbstractAnnotation $annotation, stri $annotation->{$key} = $k; $annotationHash[$k] = $annotation; } - return $annotationHash; } } - return $value; } - /** * Deserialize base annotation property. * @@ -184,24 +124,18 @@ protected function doDeserializeProperty(OA\AbstractAnnotation $annotation, stri protected function doDeserializeBaseProperty($type, $value, Context $context) { $isAnnotationClass = is_string($type) && is_subclass_of(trim($type, '[]'), OA\AbstractAnnotation::class); - if ($isAnnotationClass) { $isArray = strpos($type, '[') === 0 && substr($type, -1) === ']'; - if ($isArray) { $annotationArr = []; $class = trim($type, '[]'); - foreach ($value as $v) { $annotationArr[] = $this->doDeserialize($v, $class, $context); } - return $annotationArr; } - return $this->doDeserialize($value, $type, $context); } - return $value; } } diff --git a/vendor/zircote/swagger-php/src/Util.php b/vendor/prefixed/zircote/swagger-php/src/Util.php similarity index 85% rename from vendor/zircote/swagger-php/src/Util.php rename to vendor/prefixed/zircote/swagger-php/src/Util.php index aab8918..e743476 100644 --- a/vendor/zircote/swagger-php/src/Util.php +++ b/vendor/prefixed/zircote/swagger-php/src/Util.php @@ -1,13 +1,12 @@ -files()->followLinks()->name($pattern); if (is_string($directory)) { - if (is_file($directory)) { // Scan a single file? + if (is_file($directory)) { + // Scan a single file? $finder->append([$directory]); - } else { // Scan a directory + } else { + // Scan a directory $finder->in($directory); } } elseif (is_array($directory)) { foreach ($directory as $path) { - if (is_file($path)) { // Scan a file? + if (is_file($path)) { + // Scan a file? $finder->append([$path]); } else { $finder->in($path); @@ -108,32 +107,28 @@ public static function finder($directory, $exclude = null, $pattern = null): Fin throw new OpenApiException('Unexpected $exclude value:' . gettype($exclude)); } } - return $finder; } - /** * Escapes the special characters "/" and "~". * * https://swagger.io/docs/specification/using-ref/ * https://tools.ietf.org/html/rfc6901#page-3 */ - public static function refEncode(string $raw): string + public static function refEncode(string $raw) : string { return str_replace('/', '~1', str_replace('~', '~0', $raw)); } - /** * Converted the escaped characters "~1" and "~" back to "/" and "~". * * https://swagger.io/docs/specification/using-ref/ * https://tools.ietf.org/html/rfc6901#page-3 */ - public static function refDecode(string $encoded): string + public static function refDecode(string $encoded) : string { return str_replace('~1', '/', str_replace('~0', '~', $encoded)); } - /** * Shorten class name(s). * @@ -145,12 +140,8 @@ public static function shorten($classes) { $short = []; foreach ((array) $classes as $class) { - $short[] = '@' . str_replace([ - 'OpenApi\\Annotations\\', - 'OpenApi\\Attributes\\', - ], 'OA\\', $class); + $short[] = '@' . str_replace(['OpenApi\\Annotations\\', 'OpenApi\\Attributes\\'], 'OA\\', $class); } - return is_array($classes) ? $short : array_pop($short); } } diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php deleted file mode 100644 index bb785f4..0000000 --- a/vendor/psr/cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * @author Fabien Potencier - */ -class Comparator -{ - private string $target; - private string $operator; - - public function __construct(string $target, string $operator = '==') - { - if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { - throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); - } - - $this->target = $target; - $this->operator = $operator; - } - - /** - * Gets the target value. - */ - public function getTarget(): string - { - return $this->target; - } - - /** - * Gets the comparison operator. - */ - public function getOperator(): string - { - return $this->operator; - } - - /** - * Tests against the target. - */ - public function test(mixed $test): bool - { - return match ($this->operator) { - '>' => $test > $this->target, - '>=' => $test >= $this->target, - '<' => $test < $this->target, - '<=' => $test <= $this->target, - '!=' => $test != $this->target, - default => $test == $this->target, - }; - } -} diff --git a/vendor/symfony/finder/Gitignore.php b/vendor/symfony/finder/Gitignore.php deleted file mode 100644 index bf05c5b..0000000 --- a/vendor/symfony/finder/Gitignore.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Gitignore matches against text. - * - * @author Michael Voříšek - * @author Ahmed Abdou - */ -class Gitignore -{ - /** - * Returns a regexp which is the equivalent of the gitignore pattern. - * - * Format specification: https://git-scm.com/docs/gitignore#_pattern_format - */ - public static function toRegex(string $gitignoreFileContent): string - { - return self::buildRegex($gitignoreFileContent, false); - } - - public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string - { - return self::buildRegex($gitignoreFileContent, true); - } - - private static function buildRegex(string $gitignoreFileContent, bool $inverted): string - { - $gitignoreFileContent = preg_replace('~(? '['.('' !== $matches[1] ? '^' : '').str_replace('\\-', '-', $matches[2]).']', $regex); - $regex = preg_replace('~(?:(?:\\\\\*){2,}(/?))+~', '(?:(?:(?!//).(? - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Ctype as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('ctype_alnum')) { - function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit($text) { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph($text) { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower($text) { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print($text) { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct($text) { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space($text) { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper($text) { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } -} diff --git a/vendor/symfony/polyfill-ctype/bootstrap80.php b/vendor/symfony/polyfill-ctype/bootstrap80.php deleted file mode 100644 index ab2f861..0000000 --- a/vendor/symfony/polyfill-ctype/bootstrap80.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Ctype as p; - -if (!function_exists('ctype_alnum')) { - function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } -} diff --git a/vendor/symfony/yaml/Dumper.php b/vendor/symfony/yaml/Dumper.php deleted file mode 100644 index 04646c5..0000000 --- a/vendor/symfony/yaml/Dumper.php +++ /dev/null @@ -1,178 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Dumper dumps PHP variables to YAML strings. - * - * @author Fabien Potencier - * - * @final - */ -class Dumper -{ - /** - * The amount of spaces to use for indentation of nested nodes. - */ - private int $indentation; - - public function __construct(int $indentation = 4) - { - if ($indentation < 1) { - throw new \InvalidArgumentException('The indentation must be greater than zero.'); - } - - $this->indentation = $indentation; - } - - /** - * Dumps a PHP value to YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The level of indentation (used internally) - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - */ - public function dump(mixed $input, int $inline = 0, int $indent = 0, int $flags = 0): string - { - $output = ''; - $prefix = $indent ? str_repeat(' ', $indent) : ''; - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $input); - } - - if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) { - $output .= $prefix.Inline::dump($input, $flags); - } elseif ($input instanceof TaggedValue) { - $output .= $this->dumpTaggedValue($input, $inline, $indent, $flags, $prefix); - } else { - $dumpAsMap = Inline::isHash($input); - - foreach ($input as $key => $value) { - if ('' !== $output && "\n" !== $output[-1]) { - $output .= "\n"; - } - - if (\is_int($key) && Yaml::DUMP_NUMERIC_KEY_AS_STRING & $flags) { - $key = (string) $key; - } - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && str_contains($value, "\n") && !str_contains($value, "\r")) { - $blockIndentationIndicator = $this->getBlockIndentationIndicator($value); - - if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) { - $blockChompingIndicator = '+'; - } elseif ("\n" === $value[-1]) { - $blockChompingIndicator = ''; - } else { - $blockChompingIndicator = '-'; - } - - $output .= sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator); - - foreach (explode("\n", $value) as $row) { - if ('' === $row) { - $output .= "\n"; - } else { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - } - - continue; - } - - if ($value instanceof TaggedValue) { - $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag()); - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) { - $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue()); - $output .= sprintf(' |%s', $blockIndentationIndicator); - - foreach (explode("\n", $value->getValue()) as $row) { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - - continue; - } - - if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) { - $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n"; - } else { - $output .= "\n"; - $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags); - } - - continue; - } - - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $value); - } - - $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value); - - $output .= sprintf('%s%s%s%s', - $prefix, - $dumpAsMap ? Inline::dump($key, $flags).':' : '-', - $willBeInlined ? ' ' : "\n", - $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags) - ).($willBeInlined ? "\n" : ''); - } - } - - return $output; - } - - private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix): string - { - $output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag()); - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) { - $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue()); - $output .= sprintf(' |%s', $blockIndentationIndicator); - - foreach (explode("\n", $value->getValue()) as $row) { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - - return $output; - } - - if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) { - return $output.' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n"; - } - - return $output."\n".$this->dump($value->getValue(), $inline - 1, $indent, $flags); - } - - private function getBlockIndentationIndicator(string $value): string - { - $lines = explode("\n", $value); - - // If the first line (that is neither empty nor contains only spaces) - // starts with a space character, the spec requires a block indentation indicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - foreach ($lines as $line) { - if ('' !== trim($line, ' ')) { - return (' ' === substr($line, 0, 1)) ? (string) $this->indentation : ''; - } - } - - return ''; - } -} diff --git a/vendor/symfony/yaml/Escaper.php b/vendor/symfony/yaml/Escaper.php deleted file mode 100644 index e8090d8..0000000 --- a/vendor/symfony/yaml/Escaper.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -/** - * Escaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Escaper -{ - // Characters that would cause a dumped string to require double quoting. - public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - - // Mapping arrays for escaping a double quoted string. The backslash is - // first to ensure proper escaping because str_replace operates iteratively - // on the input arrays. This ordering of the characters avoids the use of strtr, - // which performs more slowly. - private const ESCAPEES = ['\\', '\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\x7f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", - ]; - private const ESCAPED = ['\\\\', '\\"', '\\\\', '\\"', - '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', - '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', - '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', - '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', - '\\x7f', - '\\N', '\\_', '\\L', '\\P', - ]; - - /** - * Determines if a PHP value would require double quoting in YAML. - * - * @param string $value A PHP value - */ - public static function requiresDoubleQuoting(string $value): bool - { - return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); - } - - /** - * Escapes and surrounds a PHP value with double quotes. - * - * @param string $value A PHP value - */ - public static function escapeWithDoubleQuotes(string $value): string - { - return sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value)); - } - - /** - * Determines if a PHP value would require single quoting in YAML. - * - * @param string $value A PHP value - */ - public static function requiresSingleQuoting(string $value): bool - { - // Determines if a PHP value is entirely composed of a value that would - // require single quoting in YAML. - if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) { - return true; - } - - // Determines if the PHP value contains any single characters that would - // cause it to require single quoting in YAML. - return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu', $value); - } - - /** - * Escapes and surrounds a PHP value with single quotes. - * - * @param string $value A PHP value - */ - public static function escapeWithSingleQuotes(string $value): string - { - return sprintf("'%s'", str_replace('\'', '\'\'', $value)); - } -} diff --git a/vendor/symfony/yaml/Resources/bin/yaml-lint b/vendor/symfony/yaml/Resources/bin/yaml-lint deleted file mode 100755 index 143869e..0000000 --- a/vendor/symfony/yaml/Resources/bin/yaml-lint +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if ('cli' !== \PHP_SAPI) { - throw new Exception('This script must be run from the command line.'); -} - -/** - * Runs the Yaml lint command. - * - * @author Jan Schädlich - */ - -use Symfony\Component\Console\Application; -use Symfony\Component\Yaml\Command\LintCommand; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL); - exit(1); -} - -(new Application())->add($command = new LintCommand()) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run() -; diff --git a/vendor/symfony/yaml/Unescaper.php b/vendor/symfony/yaml/Unescaper.php deleted file mode 100644 index 9e640ff..0000000 --- a/vendor/symfony/yaml/Unescaper.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Unescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Unescaper -{ - /** - * Regex fragment that matches an escaped character in a double quoted string. - */ - public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; - - /** - * Unescapes a single quoted string. - * - * @param string $value A single quoted string - */ - public function unescapeSingleQuotedString(string $value): string - { - return str_replace('\'\'', '\'', $value); - } - - /** - * Unescapes a double quoted string. - * - * @param string $value A double quoted string - */ - public function unescapeDoubleQuotedString(string $value): string - { - $callback = fn ($match) => $this->unescapeCharacter($match[0]); - - // evaluate the string - return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); - } - - /** - * Unescapes a character that was found in a double-quoted string. - * - * @param string $value An escaped character - */ - private function unescapeCharacter(string $value): string - { - return match ($value[1]) { - '0' => "\x0", - 'a' => "\x7", - 'b' => "\x8", - 't' => "\t", - "\t" => "\t", - 'n' => "\n", - 'v' => "\xB", - 'f' => "\xC", - 'r' => "\r", - 'e' => "\x1B", - ' ' => ' ', - '"' => '"', - '/' => '/', - '\\' => '\\', - // U+0085 NEXT LINE - 'N' => "\xC2\x85", - // U+00A0 NO-BREAK SPACE - '_' => "\xC2\xA0", - // U+2028 LINE SEPARATOR - 'L' => "\xE2\x80\xA8", - // U+2029 PARAGRAPH SEPARATOR - 'P' => "\xE2\x80\xA9", - 'x' => self::utf8chr(hexdec(substr($value, 2, 2))), - 'u' => self::utf8chr(hexdec(substr($value, 2, 4))), - 'U' => self::utf8chr(hexdec(substr($value, 2, 8))), - default => throw new ParseException(sprintf('Found unknown escape character "%s".', $value)), - }; - } - - /** - * Get the UTF-8 character for the given code point. - */ - private static function utf8chr(int $c): string - { - if (0x80 > $c %= 0x200000) { - return \chr($c); - } - if (0x800 > $c) { - return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); - } - if (0x10000 > $c) { - return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } - - return \chr(0xF0 | $c >> 18).\chr(0x80 | $c >> 12 & 0x3F).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } -} diff --git a/vendor/zircote/swagger-php/bin/openapi b/vendor/zircote/swagger-php/bin/openapi deleted file mode 100755 index c302320..0000000 --- a/vendor/zircote/swagger-php/bin/openapi +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env php - [], - 'output' => false, - 'format' => 'auto', - 'exclude' => [], - 'pattern' => '*.php', - 'bootstrap' => [], - 'help' => false, - 'debug' => false, - 'processor' => [], - 'version' => null, -]; -$aliases = [ - 'c' => 'config', - 'o' => 'output', - 'e' => 'exclude', - 'n' => 'pattern', - 'b' => 'bootstrap', - 'h' => 'help', - 'd' => 'debug', - 'p' => 'processor', - 'f' => 'format' -]; -$needsArgument = [ - 'config', - 'output', - 'format', - 'exclude', - 'pattern', - 'bootstrap', - 'processor', - 'version', -]; -$paths = []; -$error = false; - -try { - // Parse cli arguments - for ($i = 1; $i < $argc; $i++) { - $arg = $argv[$i]; - if (substr($arg, 0, 2) === '--') { // longopt - $option = substr($arg, 2); - } elseif ($arg[0] === '-') { // shortopt - if (array_key_exists(substr($arg, 1), $aliases)) { - $option = $aliases[$arg[1]]; - } else { - throw new Exception('Unknown option: "' . $arg . '"'); - } - } else { - $paths[] = $arg; - continue; - } - if (array_key_exists($option, $options) === false) { - throw new Exception('Unknown option: "' . $arg . '"'); - } - if (in_array($option, $needsArgument)) { - if (empty($argv[$i + 1]) || $argv[$i + 1][0] === '-') { - throw new Exception('Missing argument for "' . $arg . '"'); - } - if (is_array($options[$option])) { - $options[$option][] = $argv[$i + 1]; - } else { - $options[$option] = $argv[$i + 1]; - } - $i++; - } else { - $options[$option] = true; - } - } -} catch (\Exception $e) { - $error = $e->getMessage(); -} - -$logger = new ConsoleLogger($options['debug']); - -if (!$error && $options['bootstrap']) { - foreach ($options['bootstrap'] as $bootstrap) { - $filenames = glob($bootstrap); - if (false === $filenames) { - $error = 'Invalid `--bootstrap` value: "' . $bootstrap . '"'; - break; - } - foreach ($filenames as $filename) { - if ($options['debug']) { - $logger->debug('Bootstrapping: ' . $filename); - } - require_once($filename); - } - } -} -if (count($paths) === 0) { - $error = 'Specify at least one path.'; -} - -if ($options['help'] === false && $error) { - $logger->error('', ['prefix' => '']); - $logger->error($error); - // Show help - $options['help'] = true; -} -$defaultVersion = OpenApi::DEFAULT_VERSION; -if ($options['help']) { - $help = <<info($help); - exit(1); -} - -$errorTypes = [ - E_ERROR => 'Error', - E_WARNING => 'Warning', - E_PARSE => 'Parser error', - E_NOTICE => 'Notice', - E_DEPRECATED => 'Deprecated', - E_CORE_ERROR => 'Error(Core)', - E_CORE_WARNING => 'Warning(Core)', - E_COMPILE_ERROR => 'Error(compile)', - E_COMPILE_WARNING => 'Warning(Compile)', - E_RECOVERABLE_ERROR => 'Error(Recoverable)', - E_USER_ERROR => 'Error', - E_USER_WARNING => 'Warning', - E_USER_NOTICE => 'Notice', - E_USER_DEPRECATED => 'Deprecated', -]; -set_error_handler(function ($errno, $errstr, $file, $line) use ($errorTypes, $options, $logger) { - if (!(error_reporting() & $errno)) { - // This error code is not included in error_reporting - return; - } - $type = array_key_exists($errno, $errorTypes) ? $errorTypes[$errno] : 'Error'; - if ($type === 'Deprecated') { - $logger->info($errstr, ['prefix' => $type . ': ']); - } else { - $logger->error($errstr, ['prefix' => $type . ': ']); - } - - if ($options['debug']) { - $logger->info(' in '.$file.' on line '.$line); - } - if (substr($type, 0, 5) === 'Error') { - exit($errno); - } -}); - -set_exception_handler(function ($exception) use ($logger) { - $logger->error($exception); - exit($exception->getCode() ?: 1); -}); - -$exclude = null; -if ($options['exclude']) { - $exclude = $options['exclude']; - if (strpos($exclude[0], ',') !== false) { - $exploded = explode(',', $exclude[0]); - $logger->error('Comma-separated exclude paths are deprecated, use multiple --exclude statements: --exclude '.$exploded[0].' --exclude '.$exploded[1]); - $exclude[0] = array_shift($exploded); - $exclude = array_merge($exclude, $exploded); - } -} - -$pattern = "*.php"; -if ($options['pattern']) { - $pattern = $options['pattern']; -} - -$generator = new Generator($logger); -foreach ($options["processor"] as $processor) { - $class = '\OpenApi\Processors\\'.$processor; - if (class_exists($class)) { - $processor = new $class(); - } elseif (class_exists($processor)) { - $processor = new $processor(); - } - $generator->getProcessorPipeline()->add($processor); -} - -$analyser = new ReflectionAnalyser([new DocBlockAnnotationFactory(), new AttributeAnnotationFactory()]); -$analyser->setGenerator($generator); - -$openapi = $generator - ->setVersion($options['version']) - ->setConfig($options['config']) - ->setAnalyser($analyser) - ->generate(Util::finder($paths, $exclude, $pattern)); - -if ($options['output'] === false) { - if (strtolower($options['format']) === 'json') { - echo $openapi->toJson(); - } else { - echo $openapi->toYaml(); - } - echo "\n"; -} else { - if (is_dir($options['output'])) { - $options['output'] .= '/openapi.yaml'; - } - $openapi->saveAs($options['output'], $options['format']); -} -exit($logger->loggedMessageAboveNotice() ? 1 : 0); diff --git a/vendor/zircote/swagger-php/rector.php b/vendor/zircote/swagger-php/rector.php deleted file mode 100644 index 9bf87fe..0000000 --- a/vendor/zircote/swagger-php/rector.php +++ /dev/null @@ -1,31 +0,0 @@ -withRules([ - TypedPropertyFromStrictConstructorRector::class - ]) - ->withSkip([ - CombineIfRector::class, - ExplicitBoolCompareRector::class, - ForRepeatedCountToOwnVariableRector::class, - RemoveAlwaysTrueIfConditionRector::class => [ - __DIR__ . '/src/Processors/ExpandEnums.php', - ] , - RemoveDeadInstanceOfRector::class => [ - __DIR__ . '/src/Processors/ExpandEnums.php', - ], - ShortenElseIfRector::class, - ]) - ->withPreparedSets(true, true) - ->withPhpVersion(PhpVersion::PHP_74); diff --git a/vendor/zircote/swagger-php/src/Analysers/AnalyserInterface.php b/vendor/zircote/swagger-php/src/Analysers/AnalyserInterface.php deleted file mode 100644 index 4756aad..0000000 --- a/vendor/zircote/swagger-php/src/Analysers/AnalyserInterface.php +++ /dev/null @@ -1,16 +0,0 @@ - 'discriminator', - Items::class => 'items', - Property::class => ['properties', 'property'], - ExternalDocumentation::class => 'externalDocs', - Xml::class => 'xml', - AdditionalProperties::class => 'additionalProperties', - Attachable::class => ['attachables'], - ]; -} diff --git a/vendor/zircote/swagger-php/src/Annotations/Attachable.php b/vendor/zircote/swagger-php/src/Annotations/Attachable.php deleted file mode 100644 index 0875746..0000000 --- a/vendor/zircote/swagger-php/src/Annotations/Attachable.php +++ /dev/null @@ -1,74 +0,0 @@ -|null List of valid parent annotation classes. If null, the default nesting rules apply. - */ - public function allowedParents(): ?array - { - return null; - } -} diff --git a/vendor/zircote/swagger-php/src/Annotations/Items.php b/vendor/zircote/swagger-php/src/Annotations/Items.php deleted file mode 100644 index 17800c6..0000000 --- a/vendor/zircote/swagger-php/src/Annotations/Items.php +++ /dev/null @@ -1,61 +0,0 @@ -array. - * - * @Annotation - */ -class Items extends Schema -{ - /** - * @inheritdoc - */ - public static $_nested = [ - Discriminator::class => 'discriminator', - Items::class => 'items', - Property::class => ['properties', 'property'], - ExternalDocumentation::class => 'externalDocs', - Xml::class => 'xml', - AdditionalProperties::class => 'additionalProperties', - Attachable::class => ['attachables'], - ]; - - /** - * @inheritdoc - */ - public static $_parents = [ - Property::class, - AdditionalProperties::class, - Schema::class, - JsonContent::class, - XmlContent::class, - Items::class, - ]; - - /** - * @inheritdoc - */ - public function validate(array $stack = [], array $skip = [], string $ref = '', $context = null): bool - { - if (in_array($this, $skip, true)) { - return true; - } - - $valid = parent::validate($stack, $skip, $ref, $context); - - $parent = end($stack); - // type might be array in 3.1.0 - if ($parent instanceof Schema && ($parent->type !== 'array' && !(is_array($parent->type) && in_array('array', $parent->type)))) { - $this->_context->logger->warning('@OA\\Items() parent type must be "array" in ' . $this->_context); - $valid = false; - } - - return $valid; - } -} diff --git a/vendor/zircote/swagger-php/src/Annotations/JsonContent.php b/vendor/zircote/swagger-php/src/Annotations/JsonContent.php deleted file mode 100644 index 6d30c24..0000000 --- a/vendor/zircote/swagger-php/src/Annotations/JsonContent.php +++ /dev/null @@ -1,51 +0,0 @@ - 'discriminator', - Items::class => 'items', - Property::class => ['properties', 'property'], - ExternalDocumentation::class => 'externalDocs', - AdditionalProperties::class => 'additionalProperties', - Examples::class => ['examples', 'example'], - Attachable::class => ['attachables'], - ]; -} diff --git a/vendor/zircote/swagger-php/src/Annotations/Property.php b/vendor/zircote/swagger-php/src/Annotations/Property.php deleted file mode 100644 index b707deb..0000000 --- a/vendor/zircote/swagger-php/src/Annotations/Property.php +++ /dev/null @@ -1,47 +0,0 @@ -properties array. - * - * @var string - */ - public $property = Generator::UNDEFINED; - - /** - * @inheritdoc - */ - public static $_parents = [ - AdditionalProperties::class, - Schema::class, - JsonContent::class, - XmlContent::class, - Property::class, - Items::class, - ]; - - /** - * @inheritdoc - */ - public static $_nested = [ - Discriminator::class => 'discriminator', - Items::class => 'items', - Property::class => ['properties', 'property'], - ExternalDocumentation::class => 'externalDocs', - Xml::class => 'xml', - AdditionalProperties::class => 'additionalProperties', - Attachable::class => ['attachables'], - ]; -} diff --git a/vendor/zircote/swagger-php/src/Annotations/XmlContent.php b/vendor/zircote/swagger-php/src/Annotations/XmlContent.php deleted file mode 100644 index 5abd9b5..0000000 --- a/vendor/zircote/swagger-php/src/Annotations/XmlContent.php +++ /dev/null @@ -1,38 +0,0 @@ -@OA\Schema inside a Response and MediaType->'application/xml' will be generated. - * - * @Annotation - */ -class XmlContent extends Schema -{ - /** - * @inheritdoc - */ - public static $_parents = []; - - /** - * @inheritdoc - */ - public static $_nested = [ - Discriminator::class => 'discriminator', - Items::class => 'items', - Property::class => ['properties', 'property'], - ExternalDocumentation::class => 'externalDocs', - Xml::class => 'xml', - AdditionalProperties::class => 'additionalProperties', - Examples::class => ['examples', 'example'], - Attachable::class => ['attachables'], - ]; -} diff --git a/vendor/zircote/swagger-php/src/Attributes/AdditionalProperties.php b/vendor/zircote/swagger-php/src/Attributes/AdditionalProperties.php deleted file mode 100644 index bec55c2..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/AdditionalProperties.php +++ /dev/null @@ -1,109 +0,0 @@ -|null $type - * @param int|float $maximum - * @param int|float $minimum - * @param array|class-string|null $enum - * @param array $allOf - * @param array $anyOf - * @param array $oneOf - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - // schema - string|object|null $ref = null, - ?string $schema = null, - ?string $title = null, - ?string $description = null, - ?int $maxProperties = null, - ?int $minProperties = null, - ?array $required = null, - ?array $properties = null, - string|array|null $type = null, - ?string $format = null, - ?Items $items = null, - ?string $collectionFormat = null, - mixed $default = Generator::UNDEFINED, - $maximum = null, - bool|int|float|null $exclusiveMaximum = null, - $minimum = null, - bool|int|float|null $exclusiveMinimum = null, - ?int $maxLength = null, - ?int $minLength = null, - ?int $maxItems = null, - ?int $minItems = null, - ?bool $uniqueItems = null, - ?string $pattern = null, - array|string|null $enum = null, - ?Discriminator $discriminator = null, - ?bool $readOnly = null, - ?bool $writeOnly = null, - ?Xml $xml = null, - ?ExternalDocumentation $externalDocs = null, - mixed $example = Generator::UNDEFINED, - ?bool $nullable = null, - ?bool $deprecated = null, - ?array $allOf = null, - ?array $anyOf = null, - ?array $oneOf = null, - AdditionalProperties|bool|null $additionalProperties = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'ref' => $ref ?? Generator::UNDEFINED, - 'schema' => $schema ?? Generator::UNDEFINED, - 'title' => $title ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'maxProperties' => $maxProperties ?? Generator::UNDEFINED, - 'minProperties' => $minProperties ?? Generator::UNDEFINED, - 'required' => $required ?? Generator::UNDEFINED, - 'properties' => $properties ?? Generator::UNDEFINED, - 'type' => $type ?? Generator::UNDEFINED, - 'format' => $format ?? Generator::UNDEFINED, - 'collectionFormat' => $collectionFormat ?? Generator::UNDEFINED, - 'default' => $default, - 'maximum' => $maximum ?? Generator::UNDEFINED, - 'exclusiveMaximum' => $exclusiveMaximum ?? Generator::UNDEFINED, - 'minimum' => $minimum ?? Generator::UNDEFINED, - 'exclusiveMinimum' => $exclusiveMinimum ?? Generator::UNDEFINED, - 'maxLength' => $maxLength ?? Generator::UNDEFINED, - 'minLength' => $minLength ?? Generator::UNDEFINED, - 'maxItems' => $maxItems ?? Generator::UNDEFINED, - 'minItems' => $minItems ?? Generator::UNDEFINED, - 'uniqueItems' => $uniqueItems ?? Generator::UNDEFINED, - 'pattern' => $pattern ?? Generator::UNDEFINED, - 'enum' => $enum ?? Generator::UNDEFINED, - 'readOnly' => $readOnly ?? Generator::UNDEFINED, - 'writeOnly' => $writeOnly ?? Generator::UNDEFINED, - 'xml' => $xml ?? Generator::UNDEFINED, - 'example' => $example, - 'nullable' => $nullable ?? Generator::UNDEFINED, - 'deprecated' => $deprecated ?? Generator::UNDEFINED, - 'allOf' => $allOf ?? Generator::UNDEFINED, - 'anyOf' => $anyOf ?? Generator::UNDEFINED, - 'oneOf' => $oneOf ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($items, $discriminator, $externalDocs, $additionalProperties), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Contact.php b/vendor/zircote/swagger-php/src/Attributes/Contact.php deleted file mode 100644 index e1c8e58..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Contact.php +++ /dev/null @@ -1,35 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $name = null, - ?string $url = null, - ?string $email = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'name' => $name ?? Generator::UNDEFINED, - 'url' => $url ?? Generator::UNDEFINED, - 'email' => $email ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Examples.php b/vendor/zircote/swagger-php/src/Attributes/Examples.php deleted file mode 100644 index 4f14d5c..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Examples.php +++ /dev/null @@ -1,42 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $example = null, - ?string $summary = null, - ?string $description = null, - int|string|array|null $value = null, - ?string $externalValue = null, - string|object|null $ref = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'example' => $example ?? Generator::UNDEFINED, - 'summary' => $summary ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'value' => $value ?? Generator::UNDEFINED, - 'externalValue' => $externalValue ?? Generator::UNDEFINED, - 'ref' => $ref ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/ExternalDocumentation.php b/vendor/zircote/swagger-php/src/Attributes/ExternalDocumentation.php deleted file mode 100644 index d3e5e6e..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/ExternalDocumentation.php +++ /dev/null @@ -1,33 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $description = null, - ?string $url = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'description' => $description ?? Generator::UNDEFINED, - 'url' => $url ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Header.php b/vendor/zircote/swagger-php/src/Attributes/Header.php deleted file mode 100644 index 3072b6e..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Header.php +++ /dev/null @@ -1,43 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - string|object|null $ref = null, - ?string $header = null, - ?string $description = null, - ?bool $required = null, - ?Schema $schema = null, - ?bool $deprecated = null, - ?bool $allowEmptyValue = null, - // annotation4 - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'ref' => $ref ?? Generator::UNDEFINED, - 'header' => $header ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'required' => $required ?? Generator::UNDEFINED, - 'deprecated' => $deprecated ?? Generator::UNDEFINED, - 'allowEmptyValue' => $allowEmptyValue ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($schema), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Info.php b/vendor/zircote/swagger-php/src/Attributes/Info.php deleted file mode 100644 index b79cea3..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Info.php +++ /dev/null @@ -1,40 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $version = null, - ?string $description = null, - ?string $title = null, - ?string $termsOfService = null, - ?Contact $contact = null, - ?License $license = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'version' => $version ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'title' => $title ?? Generator::UNDEFINED, - 'termsOfService' => $termsOfService ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($contact, $license), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/License.php b/vendor/zircote/swagger-php/src/Attributes/License.php deleted file mode 100644 index 870223f..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/License.php +++ /dev/null @@ -1,35 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $name = null, - ?string $identifier = null, - ?string $url = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'name' => $name ?? Generator::UNDEFINED, - 'identifier' => $identifier ?? Generator::UNDEFINED, - 'url' => $url ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Link.php b/vendor/zircote/swagger-php/src/Attributes/Link.php deleted file mode 100644 index e1080f3..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Link.php +++ /dev/null @@ -1,47 +0,0 @@ - $parameters - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $link = null, - ?string $operationRef = null, - string|object|null $ref = null, - ?string $operationId = null, - ?array $parameters = null, - mixed $requestBody = null, - ?string $description = null, - ?Server $server = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'link' => $link ?? Generator::UNDEFINED, - 'operationRef' => $operationRef ?? Generator::UNDEFINED, - 'ref' => $ref ?? Generator::UNDEFINED, - 'operationId' => $operationId ?? Generator::UNDEFINED, - 'parameters' => $parameters ?? Generator::UNDEFINED, - 'requestBody' => $requestBody ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($server), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/MediaType.php b/vendor/zircote/swagger-php/src/Attributes/MediaType.php deleted file mode 100644 index 777b8b3..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/MediaType.php +++ /dev/null @@ -1,40 +0,0 @@ - $examples - * @param array $encoding - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $mediaType = null, - ?Schema $schema = null, - mixed $example = Generator::UNDEFINED, - ?array $examples = null, - ?array $encoding = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'mediaType' => $mediaType ?? Generator::UNDEFINED, - 'example' => $example, - 'encoding' => $encoding ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($schema, $examples), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/ParameterTrait.php b/vendor/zircote/swagger-php/src/Attributes/ParameterTrait.php deleted file mode 100644 index 2ece9f4..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/ParameterTrait.php +++ /dev/null @@ -1,64 +0,0 @@ - $examples - * @param array|JsonContent|XmlContent|Attachable|null $content - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $parameter = null, - ?string $name = null, - ?string $description = null, - ?string $in = null, - ?bool $required = null, - ?bool $deprecated = null, - ?bool $allowEmptyValue = null, - string|object|null $ref = null, - ?Schema $schema = null, - mixed $example = Generator::UNDEFINED, - ?array $examples = null, - array|JsonContent|XmlContent|Attachable|null $content = null, - ?string $style = null, - ?bool $explode = null, - ?bool $allowReserved = null, - ?array $spaceDelimited = null, - ?array $pipeDelimited = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'parameter' => $parameter ?? Generator::UNDEFINED, - 'name' => $name ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - // next two are special as we override the default value for specific Parameter subclasses - 'in' => $in ?? (Generator::isDefault($this->in) ? Generator::UNDEFINED : $this->in), - 'required' => $required ?? (Generator::isDefault($this->required) ? Generator::UNDEFINED : $this->required), - 'deprecated' => $deprecated ?? Generator::UNDEFINED, - 'allowEmptyValue' => $allowEmptyValue ?? Generator::UNDEFINED, - 'ref' => $ref ?? Generator::UNDEFINED, - 'example' => $example, - 'style' => $style ?? Generator::UNDEFINED, - 'explode' => $explode ?? Generator::UNDEFINED, - 'allowReserved' => $allowReserved ?? Generator::UNDEFINED, - 'spaceDelimited' => $spaceDelimited ?? Generator::UNDEFINED, - 'pipeDelimited' => $pipeDelimited ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($schema, $examples, $content), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Schema.php b/vendor/zircote/swagger-php/src/Attributes/Schema.php deleted file mode 100644 index 047e6d0..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Schema.php +++ /dev/null @@ -1,114 +0,0 @@ -|null $type - * @param int|float $maximum - * @param int|float $minimum - * @param array|class-string|null $enum - * @param array $examples - * @param array $allOf - * @param array $anyOf - * @param array $oneOf - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - // schema - string|object|null $ref = null, - ?string $schema = null, - ?string $title = null, - ?string $description = null, - ?int $maxProperties = null, - ?int $minProperties = null, - ?array $required = null, - ?array $properties = null, - string|array|null $type = null, - ?string $format = null, - ?Items $items = null, - ?string $collectionFormat = null, - mixed $default = Generator::UNDEFINED, - $maximum = null, - bool|int|float|null $exclusiveMaximum = null, - $minimum = null, - bool|int|float|null $exclusiveMinimum = null, - ?int $maxLength = null, - ?int $minLength = null, - ?int $maxItems = null, - ?int $minItems = null, - ?bool $uniqueItems = null, - ?string $pattern = null, - array|string|null $enum = null, - ?Discriminator $discriminator = null, - ?bool $readOnly = null, - ?bool $writeOnly = null, - ?Xml $xml = null, - ?ExternalDocumentation $externalDocs = null, - mixed $example = Generator::UNDEFINED, - ?array $examples = null, - ?bool $nullable = null, - ?bool $deprecated = null, - ?array $allOf = null, - ?array $anyOf = null, - ?array $oneOf = null, - AdditionalProperties|bool|null $additionalProperties = null, - mixed $const = Generator::UNDEFINED, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'ref' => $ref ?? Generator::UNDEFINED, - 'schema' => $schema ?? Generator::UNDEFINED, - 'title' => $title ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'maxProperties' => $maxProperties ?? Generator::UNDEFINED, - 'minProperties' => $minProperties ?? Generator::UNDEFINED, - 'required' => $required ?? Generator::UNDEFINED, - 'properties' => $properties ?? Generator::UNDEFINED, - 'type' => $type ?? Generator::UNDEFINED, - 'format' => $format ?? Generator::UNDEFINED, - 'collectionFormat' => $collectionFormat ?? Generator::UNDEFINED, - 'default' => $default, - 'maximum' => $maximum ?? Generator::UNDEFINED, - 'exclusiveMaximum' => $exclusiveMaximum ?? Generator::UNDEFINED, - 'minimum' => $minimum ?? Generator::UNDEFINED, - 'exclusiveMinimum' => $exclusiveMinimum ?? Generator::UNDEFINED, - 'maxLength' => $maxLength ?? Generator::UNDEFINED, - 'minLength' => $minLength ?? Generator::UNDEFINED, - 'maxItems' => $maxItems ?? Generator::UNDEFINED, - 'minItems' => $minItems ?? Generator::UNDEFINED, - 'uniqueItems' => $uniqueItems ?? Generator::UNDEFINED, - 'pattern' => $pattern ?? Generator::UNDEFINED, - 'enum' => $enum ?? Generator::UNDEFINED, - 'readOnly' => $readOnly ?? Generator::UNDEFINED, - 'writeOnly' => $writeOnly ?? Generator::UNDEFINED, - 'xml' => $xml ?? Generator::UNDEFINED, - 'example' => $example, - 'nullable' => $nullable ?? Generator::UNDEFINED, - 'deprecated' => $deprecated ?? Generator::UNDEFINED, - 'allOf' => $allOf ?? Generator::UNDEFINED, - 'anyOf' => $anyOf ?? Generator::UNDEFINED, - 'oneOf' => $oneOf ?? Generator::UNDEFINED, - 'additionalProperties' => $additionalProperties ?? Generator::UNDEFINED, - 'const' => $const, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($items, $discriminator, $externalDocs, $examples), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/SecurityScheme.php b/vendor/zircote/swagger-php/src/Attributes/SecurityScheme.php deleted file mode 100644 index 748e112..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/SecurityScheme.php +++ /dev/null @@ -1,52 +0,0 @@ -|null $type - * @param Flow[] $flows - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - string|object|null $ref = null, - ?string $securityScheme = null, - string|array|null $type = null, - ?string $description = null, - ?string $name = null, - ?string $in = null, - ?string $bearerFormat = null, - ?string $scheme = null, - ?string $openIdConnectUrl = null, - ?array $flows = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'ref' => $ref ?? Generator::UNDEFINED, - 'securityScheme' => $securityScheme ?? Generator::UNDEFINED, - 'type' => $type ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'name' => $name ?? Generator::UNDEFINED, - 'in' => $in ?? Generator::UNDEFINED, - 'bearerFormat' => $bearerFormat ?? Generator::UNDEFINED, - 'scheme' => $scheme ?? Generator::UNDEFINED, - 'openIdConnectUrl' => $openIdConnectUrl ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - 'value' => $this->combine($flows), - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/ServerVariable.php b/vendor/zircote/swagger-php/src/Attributes/ServerVariable.php deleted file mode 100644 index d3005b0..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/ServerVariable.php +++ /dev/null @@ -1,40 +0,0 @@ -|class-string|null $enum - * @param array|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $serverVariable = null, - ?string $description = null, - ?string $default = null, - array|string|null $enum = null, - ?array $variables = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'serverVariable' => $serverVariable ?? Generator::UNDEFINED, - 'description' => $description ?? Generator::UNDEFINED, - 'default' => $default ?? Generator::UNDEFINED, - 'enum' => $enum ?? Generator::UNDEFINED, - 'variables' => $variables ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/Attributes/Xml.php b/vendor/zircote/swagger-php/src/Attributes/Xml.php deleted file mode 100644 index 79798be..0000000 --- a/vendor/zircote/swagger-php/src/Attributes/Xml.php +++ /dev/null @@ -1,39 +0,0 @@ -|null $x - * @param Attachable[]|null $attachables - */ - public function __construct( - ?string $name = null, - ?string $namespace = null, - ?string $prefix = null, - ?bool $attribute = null, - ?bool $wrapped = null, - // annotation - ?array $x = null, - ?array $attachables = null - ) { - parent::__construct([ - 'name' => $name ?? Generator::UNDEFINED, - 'namespace' => $namespace ?? Generator::UNDEFINED, - 'prefix' => $prefix ?? Generator::UNDEFINED, - 'attribute' => $attribute ?? Generator::UNDEFINED, - 'wrapped' => $wrapped ?? Generator::UNDEFINED, - 'x' => $x ?? Generator::UNDEFINED, - 'attachables' => $attachables ?? Generator::UNDEFINED, - ]); - } -} diff --git a/vendor/zircote/swagger-php/src/GeneratorAwareTrait.php b/vendor/zircote/swagger-php/src/GeneratorAwareTrait.php deleted file mode 100644 index bf1d40e..0000000 --- a/vendor/zircote/swagger-php/src/GeneratorAwareTrait.php +++ /dev/null @@ -1,19 +0,0 @@ -generator = $generator; - - return $this; - } -} diff --git a/vendor/zircote/swagger-php/src/OpenApiException.php b/vendor/zircote/swagger-php/src/OpenApiException.php deleted file mode 100644 index 1198d36..0000000 --- a/vendor/zircote/swagger-php/src/OpenApiException.php +++ /dev/null @@ -1,11 +0,0 @@ -getAnnotationsOfType(OA\Property::class); - - foreach ($properties as $property) { - $context = $property->_context; - - if (Generator::isDefault($property->property)) { - $property->property = $context->property; - } - - if (!Generator::isDefault($property->ref)) { - continue; - } - - $typeAndDescription = $this->extractVarTypeAndDescription((string) $context->comment); - - if (Generator::isDefault($property->type)) { - $this->augmentType($analysis, $property, $context, $typeAndDescription['type']); - } else { - if (!is_array($property->type)) { - $this->mapNativeType($property, $property->type); - } - } - - if (Generator::isDefault($property->description) && $typeAndDescription['description']) { - $property->description = trim($typeAndDescription['description']); - } - if (Generator::isDefault($property->description) && $this->isRoot($property)) { - $property->description = $this->extractContent($context->comment); - } - - if (Generator::isDefault($property->example) && ($example = $this->extractExampleDescription((string) $context->comment))) { - $property->example = $example; - } - - if (Generator::isDefault($property->deprecated) && ($deprecated = $this->isDeprecated($context->comment))) { - $property->deprecated = $deprecated; - } - } - } - - protected function augmentType(Analysis $analysis, OA\Property $property, Context $context, ?string $varType): void - { - // docblock typehints - if ($varType) { - $allTypes = trim($varType); - - if ($this->isNullable($allTypes) && Generator::isDefault($property->nullable)) { - $property->nullable = true; - } - - $allTypes = $this->stripNull($allTypes); - preg_match('/^([^\[\<]+)(.*$)/', $allTypes, $typeMatches); - $type = $typeMatches[1]; - - // finalise property type/ref - if (!$this->mapNativeType($property, $type) && Generator::isDefault($property->items)) { - $schema = $analysis->getSchemaForSource($context->fullyQualifiedName($type)); - if (Generator::isDefault($property->ref) && $schema) { - $property->ref = OA\Components::ref($schema); - } - } - - // ok, so we possibly have a type or ref - if (!Generator::isDefault($property->ref) && $typeMatches[2] === '' && !Generator::isDefault($property->nullable) && $property->nullable) { - $schema = $analysis->getSchemaForSource($context->fullyQualifiedName($type)); - if ($schema) { - $property->ref = OA\Components::ref($schema); - } - } elseif ($typeMatches[2] === '[]') { - if (Generator::isDefault($property->items)) { - $property->items = $items = new OA\Items( - [ - 'type' => $property->type, - '_context' => new Context(['generated' => true], $context), - ] - ); - $analysis->addAnnotation($items, $items->_context); - if (!Generator::isDefault($property->ref)) { - $property->items->ref = $property->ref; - $property->ref = Generator::UNDEFINED; - } - $property->type = 'array'; - } - } elseif ($property->type === 'integer' && str_starts_with($typeMatches[2], '<') && str_ends_with($typeMatches[2], '>')) { - [$min, $max] = explode(',', substr($typeMatches[2], 1, -1)); - - if (is_numeric($min)) { - $property->minimum = (int) $min; - } - if (is_numeric($max)) { - $property->maximum = (int) $max; - } - } elseif ($type === 'positive-int') { - $property->type = 'integer'; - $property->minimum = 1; - } elseif ($type === 'negative-int') { - $property->type = 'integer'; - $property->maximum = -1; - } elseif ($type === 'non-positive-int') { - $property->type = 'integer'; - $property->maximum = 0; - } elseif ($type === 'non-negative-int') { - $property->type = 'integer'; - $property->minimum = 0; - } elseif ($type === 'non-zero-int') { - $property->type = 'integer'; - if ($property->_context->isVersion(OA\OpenApi::VERSION_3_1_0)) { - $property->not = ['const' => 0]; - } else { - $property->not = ['enum' => [0]]; - } - } - } - - // native typehints - if ($context->type && !Generator::isDefault($context->type)) { - if ($context->nullable === true) { - $property->nullable = true; - } - $type = strtolower($context->type); - if (!$this->mapNativeType($property, $type)) { - $schema = $analysis->getSchemaForSource($context->fullyQualifiedName($type)); - if (Generator::isDefault($property->ref) && $schema) { - $this->applyRef($analysis, $property, OA\Components::ref($schema)); - } else { - if (is_string($context->type) && $typeSchema = $analysis->getSchemaForSource($context->type)) { - if (Generator::isDefault($property->format)) { - $property->ref = OA\Components::ref($typeSchema); - $property->type = Generator::UNDEFINED; - } - } - } - } - } - - if (!Generator::isDefault($property->const) && Generator::isDefault($property->type)) { - if (!$this->mapNativeType($property, gettype($property->const))) { - $property->type = Generator::UNDEFINED; - } - } - } - - protected function isNullable(string $typeDescription): bool - { - return in_array('null', explode('|', strtolower($typeDescription))); - } - - protected function stripNull(string $typeDescription): string - { - if (strpos($typeDescription, '|') === false) { - return $typeDescription; - } - $types = []; - foreach (explode('|', $typeDescription) as $type) { - if (strtolower($type) === 'null') { - continue; - } - $types[] = $type; - } - - return implode('|', $types); - } - - protected function applyRef(Analysis $analysis, OA\Property $property, string $ref): void - { - if ($property->nullable === true) { - $property->oneOf = [ - $schema = new OA\Schema([ - 'ref' => $ref, - '_context' => new Context(['generated' => true], $property->_context), - ]), - ]; - $analysis->addAnnotation($schema, $schema->_context); - } else { - $property->ref = $ref; - } - } -} diff --git a/vendor/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php b/vendor/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php deleted file mode 100644 index 1da3ee5..0000000 --- a/vendor/zircote/swagger-php/src/Processors/Concerns/TypesTrait.php +++ /dev/null @@ -1,61 +0,0 @@ - 'array', - 'byte' => ['string', 'byte'], - 'boolean' => 'boolean', - 'bool' => 'boolean', - 'int' => 'integer', - 'integer' => 'integer', - 'long' => ['integer', 'long'], - 'float' => ['number', 'float'], - 'double' => ['number', 'double'], - 'string' => 'string', - 'date' => ['string', 'date'], - 'datetime' => ['string', 'date-time'], - '\\datetime' => ['string', 'date-time'], - 'datetimeimmutable' => ['string', 'date-time'], - '\\datetimeimmutable' => ['string', 'date-time'], - 'datetimeinterface' => ['string', 'date-time'], - '\\datetimeinterface' => ['string', 'date-time'], - 'number' => 'number', - 'object' => 'object', - ]; - - public function mapNativeType(OA\Schema $schema, string $type): bool - { - if (!array_key_exists($type, self::$NATIVE_TYPE_MAP)) { - return false; - } - - $type = self::$NATIVE_TYPE_MAP[$type]; - if (is_array($type)) { - if (Generator::isDefault($schema->format)) { - $schema->format = $type[1]; - } - $type = $type[0]; - } - - $schema->type = $type; - - return true; - } - - public function native2spec(string $type): string - { - $mapped = array_key_exists($type, self::$NATIVE_TYPE_MAP) ? self::$NATIVE_TYPE_MAP[$type] : $type; - - return is_array($mapped) ? $mapped[0] : $mapped; - } -} diff --git a/vendor/zircote/swagger-php/src/Processors/MergeIntoComponents.php b/vendor/zircote/swagger-php/src/Processors/MergeIntoComponents.php deleted file mode 100644 index fd1e1b9..0000000 --- a/vendor/zircote/swagger-php/src/Processors/MergeIntoComponents.php +++ /dev/null @@ -1,37 +0,0 @@ -@OA\Schemas. - */ -class MergeIntoComponents -{ - public function __invoke(Analysis $analysis) - { - $components = $analysis->openapi->components; - if (Generator::isDefault($components)) { - $components = new OA\Components(['_context' => new Context(['generated' => true], $analysis->context)]); - } - - /** @var OA\AbstractAnnotation $annotation */ - foreach ($analysis->annotations as $annotation) { - if ($annotation instanceof OA\AbstractAnnotation - && in_array(OA\Components::class, $annotation::$_parents) - && false === $annotation->_context->is('nested')) { - // A top level annotation. - $components->merge([$annotation], true); - $analysis->openapi->components = $components; - } - } - } -} From 7773ba7c581833d8cfe2eb522cb7516d132720af Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 1 Oct 2025 17:14:58 +1300 Subject: [PATCH 2/4] Skip downgrading Token for php-parser --- README.md | 6 +++++- Specs/SpecGenerator.php | 16 +++++++++++----- scoper.inc.php | 2 +- vendor/autoload_original.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- vendor/composer/installed.php | 4 ++-- .../lib/PhpParser/Internal/TokenStream.php | 6 +++--- .../nikic/php-parser/lib/PhpParser/Lexer.php | 6 +++--- .../lib/PhpParser/Lexer/Emulative.php | 8 ++++---- .../AsymmetricVisibilityTokenEmulator.php | 6 +++--- .../Lexer/TokenEmulator/AttributeEmulator.php | 2 +- .../TokenEmulator/ExplicitOctalEmulator.php | 6 +++--- .../Lexer/TokenEmulator/KeywordEmulator.php | 2 +- .../TokenEmulator/NullsafeTokenEmulator.php | 8 ++++---- .../TokenEmulator/PipeOperatorEmulator.php | 2 +- .../TokenEmulator/ReadonlyTokenEmulator.php | 2 +- .../Lexer/TokenEmulator/VoidCastEmulator.php | 18 +++++++++--------- .../NodeVisitor/CommentAnnotatingVisitor.php | 4 ++-- .../lib/PhpParser/ParserAbstract.php | 8 ++++---- .../nikic/php-parser/lib/PhpParser/Token.php | 4 ++-- vendor/prefixed/vendor/autoload.php | 2 +- .../prefixed/vendor/composer/autoload_real.php | 10 +++++----- .../vendor/composer/autoload_static.php | 4 ++-- 24 files changed, 78 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index 63cb3d1..66342ac 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,11 @@ return static function (RectorConfig $rectorConfig): void { ]); $rectorConfig->skip([ - \Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector::class + \Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector::class, + // Skip downgrading Token for php-parser since it already provides a polyfill + \Rector\DowngradePhp80\Rector\StaticCall\DowngradePhpTokenRector::class => [ + '*/vendor/prefixed/nikic/php-parser/*', + ], ]); }; ``` diff --git a/Specs/SpecGenerator.php b/Specs/SpecGenerator.php index 7cf66a7..cec07e9 100644 --- a/Specs/SpecGenerator.php +++ b/Specs/SpecGenerator.php @@ -9,8 +9,8 @@ namespace Piwik\Plugins\OpenApiDocs\Specs; -use OpenApi\Annotations\OpenApi; -use OpenApi\Generator; +use Matomo\Dependencies\OpenApiDocs\OpenApi\Annotations\OpenApi; +use Matomo\Dependencies\OpenApiDocs\OpenApi\Generator; use Piwik\Container\StaticContainer; use Piwik\Log\LoggerInterface; use Piwik\Log\NullLogger; @@ -60,6 +60,7 @@ public function generatePluginDoc(string $pluginName, string $format = 'json', s * @throws \Piwik\Exception\DI\DependencyException * @throws \Piwik\Exception\DI\NotFoundException * @throws \Piwik\Exception\PluginDeactivatedException + * @throws \Exception */ public function generateSpec(array $pluginNames, string $format = 'json', string $version = OpenApiDocs::DEFAULT_SPEC_VERSION, bool $writeToFile = false): string { @@ -73,10 +74,15 @@ public function generateSpec(array $pluginNames, string $format = 'json', string $pluginDir = Manager::getInstance()::getPluginDirectory($pluginName); $pluginAnnotationsSource = $pluginDir . '/API.php'; - $openapi = (new Generator(StaticContainer::get(NullLogger::class)))->generate([ - $pluginAnnotationsSource, - ]); + try { + $openapi = (new Generator(StaticContainer::get(NullLogger::class)))->generate([ + $pluginAnnotationsSource, + ]); + } catch (\Throwable $e) { + throw new \Exception('There was an error testing the API annotations for plugin ' . $pluginName, 0, $e); + } if (trim($openapi->toYaml()) === 'openapi: ' . OpenApi::DEFAULT_VERSION) { + var_dump($openapi->toYaml()); throw new \Exception("The $pluginName plugin's API class does not appear to be annotated yet."); } $pluginDirs[$pluginName] = $pluginAnnotationsSource; diff --git a/scoper.inc.php b/scoper.inc.php index 22ba99b..bdf9a3d 100644 --- a/scoper.inc.php +++ b/scoper.inc.php @@ -28,7 +28,7 @@ ->exclude('lang') ->exclude('javascripts') ->exclude('vue') - ->notName(['scoper.inc.php', 'Controller.php']) + ->notName(['scoper.inc.php']) ->filter(function (\SplFileInfo $file) { return !($file->isLink() && $file->isDir()); }) diff --git a/vendor/autoload_original.php b/vendor/autoload_original.php index 1ef4989..290e05f 100644 --- a/vendor/autoload_original.php +++ b/vendor/autoload_original.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit90dbd33beaf3a1c9a0c815781114b7ea::getLoader(); +return ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index de59b22..7df13a6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit90dbd33beaf3a1c9a0c815781114b7ea +class ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa { private static $loader; @@ -22,16 +22,16 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit90dbd33beaf3a1c9a0c815781114b7ea', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit90dbd33beaf3a1c9a0c815781114b7ea', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index cb2f3a6..e31252b 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea +class ComposerStaticInitc8345434bce3699d515e040a2b2da4fa { public static $files = array( ); @@ -57,9 +57,9 @@ class ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit90dbd33beaf3a1c9a0c815781114b7ea::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 6a066b3..2bacb1f 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-5.x-dev', 'version' => 'dev-5.x-dev', - 'reference' => 'd3519004db86652d7e3d0b6682f262dd5725405c', + 'reference' => '2d16105a21f74ee3dfb31e5713e2f1d75b40b913', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-5.x-dev', 'version' => 'dev-5.x-dev', - 'reference' => 'd3519004db86652d7e3d0b6682f262dd5725405c', + 'reference' => '2d16105a21f74ee3dfb31e5713e2f1d75b40b913', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php index bfd01f7..6dd1498 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php @@ -217,7 +217,7 @@ public function getTokenCode(int $from, int $to, int $indent) : string for ($pos = $from; $pos < $to; $pos++) { $token = $tokens[$pos]; $id = $token->id; - $text = is_array($token) ? $token[1] : $token; + $text = $token->text; if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { $result .= $text; } else { @@ -245,11 +245,11 @@ private function calcIndentMap(int $tabWidth) : array foreach ($this->tokens as $i => $token) { $indentMap[] = $indent; if ($token->id === \T_WHITESPACE) { - $content = is_array($token) ? $token[1] : $token; + $content = $token->text; $newlinePos = \strrpos($content, "\n"); if (\false !== $newlinePos) { $indent = $this->getIndent(\substr($content, $newlinePos + 1), $tabWidth); - } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && (is_array($this->tokens[0]) ? $this->tokens[0][1] : $this->tokens[0])[\strlen(is_array($this->tokens[0]) ? $this->tokens[0][1] : $this->tokens[0]) - 1] === "\n") { + } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { // Special case: Newline at the end of opening tag followed by whitespace. $indent = $this->getIndent($content, $tabWidth); } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php index c47d111..7ce5f03 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer.php @@ -28,7 +28,7 @@ public function tokenize(string $code, ?ErrorHandler $errorHandler = null) : arr $errorHandler = new ErrorHandler\Throwing(); } $scream = ini_set('xdebug.scream', '0'); - $tokens = @token_get_all($code); + $tokens = @Token::tokenize($code); $this->postprocessTokens($tokens, $errorHandler); if (\false !== $scream) { ini_set('xdebug.scream', $scream); @@ -37,7 +37,7 @@ public function tokenize(string $code, ?ErrorHandler $errorHandler = null) : arr } private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler) : void { - $chr = is_array($token) ? $token[1] : $token; + $chr = $token->text; if ($chr === "\x00") { // PHP cuts error message after null byte, so need special case $errorMsg = 'Unexpected null byte'; @@ -48,7 +48,7 @@ private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler } private function isUnterminatedComment(Token $token) : bool { - return $token->is([\T_COMMENT, \T_DOC_COMMENT]) && substr(is_array($token) ? $token[1] : $token, 0, 2) === '/*' && substr(is_array($token) ? $token[1] : $token, -2) !== '*/'; + return $token->is([\T_COMMENT, \T_DOC_COMMENT]) && substr($token->text, 0, 2) === '/*' && substr($token->text, -2) !== '*/'; } /** * @param list $tokens diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index b98014a..76d1cd3 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -123,7 +123,7 @@ private function fixupTokens(array $tokens) : array $token->pos += $posDelta; $token->line += $lineDelta; $localPosDelta = 0; - $len = \strlen(is_array($token) ? $token[1] : $token); + $len = \strlen($token->text); while ($patchPos >= $pos && $patchPos < $pos + $len) { $patchTextLen = \strlen($patchText); if ($patchType === 'remove') { @@ -134,18 +134,18 @@ private function fixupTokens(array $tokens) : array $c--; } else { // Remove from token string - is_array($token) ? $token[1] : $token = substr_replace(is_array($token) ? $token[1] : $token, '', $patchPos - $pos + $localPosDelta, $patchTextLen); + $token->text = substr_replace($token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen); $localPosDelta -= $patchTextLen; } $lineDelta -= \substr_count($patchText, "\n"); } elseif ($patchType === 'add') { // Insert into the token string - is_array($token) ? $token[1] : $token = substr_replace(is_array($token) ? $token[1] : $token, $patchText, $patchPos - $pos + $localPosDelta, 0); + $token->text = substr_replace($token->text, $patchText, $patchPos - $pos + $localPosDelta, 0); $localPosDelta += $patchTextLen; $lineDelta += \substr_count($patchText, "\n"); } elseif ($patchType === 'replace') { // Replace inside the token string - is_array($token) ? $token[1] : $token = substr_replace(is_array($token) ? $token[1] : $token, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen); + $token->text = substr_replace($token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen); } else { assert(\false); } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php index 13ede98..5c63bc3 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php @@ -21,8 +21,8 @@ public function emulate(string $code, array $tokens) : array $map = [\T_PUBLIC => \Matomo\Dependencies\OpenApiDocs\T_PUBLIC_SET, \T_PROTECTED => \Matomo\Dependencies\OpenApiDocs\T_PROTECTED_SET, \T_PRIVATE => \Matomo\Dependencies\OpenApiDocs\T_PRIVATE_SET]; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if (isset($map[$token->id]) && $i + 3 < $c && (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]) === '(' && $tokens[$i + 2]->id === \T_STRING && \strtolower(is_array($tokens[$i + 2]) ? $tokens[$i + 2][1] : $tokens[$i + 2]) === 'set' && (is_array($tokens[$i + 3]) ? $tokens[$i + 3][1] : $tokens[$i + 3]) === ')' && $this->isKeywordContext($tokens, $i)) { - array_splice($tokens, $i, 4, [new Token($map[$token->id], (is_array($token) ? $token[1] : $token) . '(' . (is_array($tokens[$i + 2]) ? $tokens[$i + 2][1] : $tokens[$i + 2]) . ')', $token->line, $token->pos)]); + if (isset($map[$token->id]) && $i + 3 < $c && $tokens[$i + 1]->text === '(' && $tokens[$i + 2]->id === \T_STRING && \strtolower($tokens[$i + 2]->text) === 'set' && $tokens[$i + 3]->text === ')' && $this->isKeywordContext($tokens, $i)) { + array_splice($tokens, $i, 4, [new Token($map[$token->id], $token->text . '(' . $tokens[$i + 2]->text . ')', $token->line, $token->pos)]); $c -= 3; } } @@ -33,7 +33,7 @@ public function reverseEmulate(string $code, array $tokens) : array $reverseMap = [\Matomo\Dependencies\OpenApiDocs\T_PUBLIC_SET => \T_PUBLIC, \Matomo\Dependencies\OpenApiDocs\T_PROTECTED_SET => \T_PROTECTED, \Matomo\Dependencies\OpenApiDocs\T_PRIVATE_SET => \T_PRIVATE]; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if (isset($reverseMap[$token->id]) && \preg_match('/(public|protected|private)\\((set)\\)/i', is_array($token) ? $token[1] : $token, $matches)) { + if (isset($reverseMap[$token->id]) && \preg_match('/(public|protected|private)\\((set)\\)/i', $token->text, $matches)) { [, $modifier, $set] = $matches; $modifierLen = \strlen($modifier); array_splice($tokens, $i, 1, [new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4)]); diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php index ed2a1c4..577e34d 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -21,7 +21,7 @@ public function emulate(string $code, array $tokens) : array // the tokens array on the way. for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if ((is_array($token) ? $token[1] : $token) === '#' && isset($tokens[$i + 1]) && (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]) === '[') { + if ($token->text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { array_splice($tokens, $i, 2, [new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos)]); $c--; continue; diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index af17010..072fcc2 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -19,9 +19,9 @@ public function emulate(string $code, array $tokens) : array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if ($token->id == \T_LNUMBER && (is_array($token) ? $token[1] : $token) === '0' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && preg_match('/[oO][0-7]+(?:_[0-7]+)*/', is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1])) { - $tokenKind = $this->resolveIntegerOrFloatToken(is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]); - array_splice($tokens, $i, 2, [new Token($tokenKind, '0' . (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]), $token->line, $token->pos)]); + if ($token->id == \T_LNUMBER && $token->text === '0' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text)) { + $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); + array_splice($tokens, $i, 2, [new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos)]); $c--; } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index c92e4c1..51ca95c 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -25,7 +25,7 @@ public function emulate(string $code, array $tokens) : array { $keywordString = $this->getKeywordString(); foreach ($tokens as $i => $token) { - if ($token->id === \T_STRING && strtolower(is_array($token) ? $token[1] : $token) === $keywordString && $this->isKeywordContext($tokens, $i)) { + if ($token->id === \T_STRING && strtolower($token->text) === $keywordString && $this->isKeywordContext($tokens, $i)) { $token->id = $this->getKeywordToken(); } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php index 823c67c..93fcd7f 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php @@ -21,17 +21,17 @@ public function emulate(string $code, array $tokens) : array // the tokens array on the way for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if ((is_array($token) ? $token[1] : $token) === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { + if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { array_splice($tokens, $i, 2, [new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos)]); $c--; continue; } // Handle ?-> inside encapsed string. - if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) && $tokens[$i - 1]->id === \T_VARIABLE && preg_match('/^\\?->([a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*)/', is_array($token) ? $token[1] : $token, $matches)) { + if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) && $tokens[$i - 1]->id === \T_VARIABLE && preg_match('/^\\?->([a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*)/', $token->text, $matches)) { $replacement = [new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3)]; $matchLen = \strlen($matches[0]); - if ($matchLen !== \strlen(is_array($token) ? $token[1] : $token)) { - $replacement[] = new Token(\T_ENCAPSED_AND_WHITESPACE, \substr(is_array($token) ? $token[1] : $token, $matchLen), $token->line, $token->pos + $matchLen); + if ($matchLen !== \strlen($token->text)) { + $replacement[] = new Token(\T_ENCAPSED_AND_WHITESPACE, \substr($token->text, $matchLen), $token->line, $token->pos + $matchLen); } array_splice($tokens, $i, 1, $replacement); $c += \count($replacement) - 1; diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php index bb9ae19..2bd25bc 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php @@ -20,7 +20,7 @@ public function emulate(string $code, array $tokens) : array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if ((is_array($token) ? $token[1] : $token) === '|' && isset($tokens[$i + 1]) && (is_array($tokens[$i + 1]) ? $tokens[$i + 1][1] : $tokens[$i + 1]) === '>') { + if ($token->text === '|' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '>') { array_splice($tokens, $i, 2, [new Token(\Matomo\Dependencies\OpenApiDocs\T_PIPE, '|>', $token->line, $token->pos)]); $c--; } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index 9adc7a3..81fabd9 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -24,6 +24,6 @@ protected function isKeywordContext(array $tokens, int $pos) : bool return \false; } // Support "function readonly(" - return !(isset($tokens[$pos + 1]) && ((is_array($tokens[$pos + 1]) ? $tokens[$pos + 1][1] : $tokens[$pos + 1]) === '(' || $tokens[$pos + 1]->id === \T_WHITESPACE && isset($tokens[$pos + 2]) && (is_array($tokens[$pos + 2]) ? $tokens[$pos + 2][1] : $tokens[$pos + 2]) === '(')); + return !(isset($tokens[$pos + 1]) && ($tokens[$pos + 1]->text === '(' || $tokens[$pos + 1]->id === \T_WHITESPACE && isset($tokens[$pos + 2]) && $tokens[$pos + 2]->text === '(')); } } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php index 5bd2ebe..9ac4b5e 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php @@ -19,29 +19,29 @@ public function emulate(string $code, array $tokens) : array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - if ((is_array($token) ? $token[1] : $token) !== '(') { + if ($token->text !== '(') { continue; } $numTokens = 1; $text = '('; $j = $i + 1; - if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \\t]+/', is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j])) { - $text .= is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j]; + if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \\t]+/', $tokens[$j]->text)) { + $text .= $tokens[$j]->text; $numTokens++; $j++; } - if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower(is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j]) !== 'void') { + if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower($tokens[$j]->text) !== 'void') { continue; } - $text .= is_array($tokens[$j]) ? $tokens[$j][1] : $tokens[$j]; + $text .= $tokens[$j]->text; $numTokens++; $k = $j + 1; - if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \\t]+/', is_array($tokens[$k]) ? $tokens[$k][1] : $tokens[$k])) { - $text .= is_array($tokens[$k]) ? $tokens[$k][1] : $tokens[$k]; + if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \\t]+/', $tokens[$k]->text)) { + $text .= $tokens[$k]->text; $numTokens++; $k++; } - if ($k >= $c || (is_array($tokens[$k]) ? $tokens[$k][1] : $tokens[$k]) !== ')') { + if ($k >= $c || $tokens[$k]->text !== ')') { continue; } $text .= ')'; @@ -58,7 +58,7 @@ public function reverseEmulate(string $code, array $tokens) : array if ($token->id !== \Matomo\Dependencies\OpenApiDocs\T_VOID_CAST) { continue; } - if (!preg_match('/^\\(([ \\t]*)(void)([ \\t]*)\\)$/i', is_array($token) ? $token[1] : $token, $match)) { + if (!preg_match('/^\\(([ \\t]*)(void)([ \\t]*)\\)$/i', $token->text, $match)) { throw new \LogicException('Unexpected T_VOID_CAST contents'); } $newTokens = []; diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php index f556d29..30027fc 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php @@ -45,11 +45,11 @@ public function enterNode(Node $node) while (--$pos >= $oldPos) { $token = $this->tokens[$pos]; if ($token->id === \T_DOC_COMMENT) { - $comments[] = new Comment\Doc(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $pos, $token->getEndLine(), $token->getEndPos() - 1, $pos); + $comments[] = new Comment\Doc($token->text, $token->line, $token->pos, $pos, $token->getEndLine(), $token->getEndPos() - 1, $pos); continue; } if ($token->id === \T_COMMENT) { - $comments[] = new Comment(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $pos, $token->getEndLine(), $token->getEndPos() - 1, $pos); + $comments[] = new Comment($token->text, $token->line, $token->pos, $pos, $token->getEndLine(), $token->getEndPos() - 1, $pos); continue; } if ($token->id !== \T_WHITESPACE) { diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php index c85b236..9c86abc 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -225,7 +225,7 @@ protected function doParse() : ?array $tokenId = $token->id; } while (isset($this->dropTokens[$tokenId])); // Map the lexer token id to the internally used symbols. - $tokenValue = is_array($token) ? $token[1] : $token; + $tokenValue = $token->text; if (!isset($this->phpTokenToSymbol[$tokenId])) { throw new \RangeException(sprintf('The lexer returned an invalid token (id=%d, value=%s)', $tokenId, $tokenValue)); } @@ -769,7 +769,7 @@ protected function parseDocString(string $startToken, $contents, string $endToke protected function createCommentFromToken(Token $token, int $tokenPos) : Comment { assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); - return \T_DOC_COMMENT === $token->id ? new Comment\Doc(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $tokenPos, $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) : new Comment(is_array($token) ? $token[1] : $token, $token->line, $token->pos, $tokenPos, $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); + return \T_DOC_COMMENT === $token->id ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) : new Comment($token->text, $token->line, $token->pos, $tokenPos, $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); } /** * Get last comment before the given token position, if any @@ -815,7 +815,7 @@ protected function handleHaltCompiler() : string $nextToken = $this->tokens[$this->tokenPos + 1]; $this->tokenPos = \count($this->tokens) - 2; // Return text after __halt_compiler. - return $nextToken->id === \T_INLINE_HTML ? is_array($nextToken) ? $nextToken[1] : $nextToken : ''; + return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; } protected function inlineHtmlHasLeadingNewline(int $stackPos) : bool { @@ -825,7 +825,7 @@ protected function inlineHtmlHasLeadingNewline(int $stackPos) : bool if ($tokenPos > 0) { $prevToken = $this->tokens[$tokenPos - 1]; assert($prevToken->id == \T_CLOSE_TAG); - return \false !== strpos(is_array($prevToken) ? $prevToken[1] : $prevToken, "\n") || \false !== strpos(is_array($prevToken) ? $prevToken[1] : $prevToken, "\r"); + return \false !== strpos($prevToken->text, "\n") || \false !== strpos($prevToken->text, "\r"); } return \true; } diff --git a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php index e730a92..6a438b6 100644 --- a/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php +++ b/vendor/prefixed/nikic/php-parser/lib/PhpParser/Token.php @@ -11,11 +11,11 @@ class Token extends Internal\TokenPolyfill /** Get (exclusive) zero-based end position of the token. */ public function getEndPos() : int { - return $this->pos + \strlen(is_array($this) ? $this[1] : $this); + return $this->pos + \strlen($this->text); } /** Get 1-based end line number of the token. */ public function getEndLine() : int { - return $this->line + \substr_count(is_array($this) ? $this[1] : $this, "\n"); + return $this->line + \substr_count($this->text, "\n"); } } diff --git a/vendor/prefixed/vendor/autoload.php b/vendor/prefixed/vendor/autoload.php index 1f6bfd5..321ec13 100644 --- a/vendor/prefixed/vendor/autoload.php +++ b/vendor/prefixed/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitbf3e82ea0e22f57ce1f502a4e1c9968c::getLoader(); +return ComposerAutoloaderInit132d040fab428c85c099cbf235197aea::getLoader(); diff --git a/vendor/prefixed/vendor/composer/autoload_real.php b/vendor/prefixed/vendor/composer/autoload_real.php index 0a1f319..ea8b5dc 100644 --- a/vendor/prefixed/vendor/composer/autoload_real.php +++ b/vendor/prefixed/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitbf3e82ea0e22f57ce1f502a4e1c9968c +class ComposerAutoloaderInit132d040fab428c85c099cbf235197aea { private static $loader; @@ -22,16 +22,16 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitbf3e82ea0e22f57ce1f502a4e1c9968c', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit132d040fab428c85c099cbf235197aea', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitbf3e82ea0e22f57ce1f502a4e1c9968c', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit132d040fab428c85c099cbf235197aea', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit132d040fab428c85c099cbf235197aea::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit132d040fab428c85c099cbf235197aea::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/prefixed/vendor/composer/autoload_static.php b/vendor/prefixed/vendor/composer/autoload_static.php index 9a2d7bc..e19fe3c 100644 --- a/vendor/prefixed/vendor/composer/autoload_static.php +++ b/vendor/prefixed/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c +class ComposerStaticInit132d040fab428c85c099cbf235197aea { public static $files = array ( '66cfd3a7190309803b5cc0fea03a4cdc' => __DIR__ . '/../..' . '/symfony/deprecation-contracts/function.php', @@ -453,7 +453,7 @@ class ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInitbf3e82ea0e22f57ce1f502a4e1c9968c::$classMap; + $loader->classMap = ComposerStaticInit132d040fab428c85c099cbf235197aea::$classMap; }, null, ClassLoader::class); } From eaab8b4793382f75580eef1cedf0b8b77cb38fab Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 1 Oct 2025 23:24:59 +1300 Subject: [PATCH 3/4] Fixing scoping to make spec generation work --- Annotations/GlobalApiComponents.php | 5 +- Specs/SpecGenerator.php | 3 +- composer.json | 3 +- composer.lock | 204 +++- scoper.inc.php | 21 +- vendor/autoload_original.php | 2 +- vendor/composer/autoload_psr4.php | 3 + vendor/composer/autoload_real.php | 10 +- vendor/composer/autoload_static.php | 26 +- vendor/composer/installed.json | 211 ++++ vendor/composer/installed.php | 31 +- vendor/prefixed/doctrine/annotations/LICENSE | 19 + .../annotations/docs/en/annotations.rst | 189 +++ .../doctrine/annotations/docs/en/custom.rst | 443 +++++++ .../doctrine/annotations/docs/en/index.rst | 109 ++ .../doctrine/annotations/docs/en/sidebar.rst | 6 + .../Common/Annotations/Annotation.php | 45 + .../Annotations/Annotation/Attribute.php | 19 + .../Annotations/Annotation/Attributes.php | 15 + .../Common/Annotations/Annotation/Enum.php | 55 + .../Annotation/IgnoreAnnotation.php | 35 + .../Annotation/NamedArgumentConstructor.php | 13 + .../Annotations/Annotation/Required.php | 13 + .../Common/Annotations/Annotation/Target.php | 71 ++ .../Annotations/AnnotationException.php | 105 ++ .../Common/Annotations/AnnotationReader.php | 307 +++++ .../Common/Annotations/AnnotationRegistry.php | 36 + .../Doctrine/Common/Annotations/DocLexer.php | 92 ++ .../Doctrine/Common/Annotations/DocParser.php | 1042 +++++++++++++++++ .../ImplicitlyIgnoredAnnotationNames.php | 82 ++ .../Common/Annotations/IndexedReader.php | 86 ++ .../Doctrine/Common/Annotations/PhpParser.php | 66 ++ .../Common/Annotations/PsrCachedReader.php | 177 +++ .../Doctrine/Common/Annotations/Reader.php | 74 ++ .../Common/Annotations/TokenParser.php | 173 +++ vendor/prefixed/doctrine/lexer/LICENSE | 19 + .../doctrine/lexer/src/AbstractLexer.php | 282 +++++ vendor/prefixed/doctrine/lexer/src/Token.php | 50 + vendor/prefixed/psr/cache/LICENSE.txt | 19 + .../prefixed/psr/cache/src/CacheException.php | 10 + .../psr/cache/src/CacheItemInterface.php | 100 ++ .../psr/cache/src/CacheItemPoolInterface.php | 130 ++ .../cache/src/InvalidArgumentException.php | 13 + vendor/prefixed/vendor/autoload.php | 2 +- .../vendor/composer/autoload_classmap.php | 25 + .../vendor/composer/autoload_real.php | 10 +- .../vendor/composer/autoload_static.php | 29 +- .../src/Analysers/DocBlockParser.php | 6 +- .../src/Annotations/AbstractAnnotation.php | 2 +- 49 files changed, 4456 insertions(+), 32 deletions(-) create mode 100644 vendor/prefixed/doctrine/annotations/LICENSE create mode 100644 vendor/prefixed/doctrine/annotations/docs/en/annotations.rst create mode 100644 vendor/prefixed/doctrine/annotations/docs/en/custom.rst create mode 100644 vendor/prefixed/doctrine/annotations/docs/en/index.rst create mode 100644 vendor/prefixed/doctrine/annotations/docs/en/sidebar.rst create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php create mode 100644 vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php create mode 100644 vendor/prefixed/doctrine/lexer/LICENSE create mode 100644 vendor/prefixed/doctrine/lexer/src/AbstractLexer.php create mode 100644 vendor/prefixed/doctrine/lexer/src/Token.php create mode 100644 vendor/prefixed/psr/cache/LICENSE.txt create mode 100644 vendor/prefixed/psr/cache/src/CacheException.php create mode 100644 vendor/prefixed/psr/cache/src/CacheItemInterface.php create mode 100644 vendor/prefixed/psr/cache/src/CacheItemPoolInterface.php create mode 100644 vendor/prefixed/psr/cache/src/InvalidArgumentException.php diff --git a/Annotations/GlobalApiComponents.php b/Annotations/GlobalApiComponents.php index 4f35ea8..b60a334 100644 --- a/Annotations/GlobalApiComponents.php +++ b/Annotations/GlobalApiComponents.php @@ -15,7 +15,6 @@ /** * @OA\OpenApi( - * openapi="3.1.0", * security={{"MatomoToken": {}}}, * @OA\ExternalDocumentation( * description="Matomo Reporting API developer page", @@ -58,7 +57,7 @@ * description="Generic Matomo success payload.", * required={"result","message"}, * additionalProperties=true, - * @OA\Property(property="result", type="string", enum={"success"}, example="success"), + * @OA\Property(property="result", type="string", example="success"), * @OA\Property(property="message", type="string", example="ok"), * @OA\Property(property="code", type="integer", example="200") * ) @@ -70,7 +69,7 @@ * description="Generic Matomo error payload.", * required={"result","message"}, * additionalProperties=true, - * @OA\Property(property="result", type="string", enum={"error"}, example="error"), + * @OA\Property(property="result", type="string", example="error"), * @OA\Property(property="message", type="string", example="There was an error"), * @OA\Property(property="code", type="integer") * ) diff --git a/Specs/SpecGenerator.php b/Specs/SpecGenerator.php index cec07e9..3ba2544 100644 --- a/Specs/SpecGenerator.php +++ b/Specs/SpecGenerator.php @@ -82,14 +82,13 @@ public function generateSpec(array $pluginNames, string $format = 'json', string throw new \Exception('There was an error testing the API annotations for plugin ' . $pluginName, 0, $e); } if (trim($openapi->toYaml()) === 'openapi: ' . OpenApi::DEFAULT_VERSION) { - var_dump($openapi->toYaml()); throw new \Exception("The $pluginName plugin's API class does not appear to be annotated yet."); } $pluginDirs[$pluginName] = $pluginAnnotationsSource; } $generator = new Generator(StaticContainer::get(LoggerInterface::class)); - $openapi = $generator->generate(array_merge([ + $openapi = $generator->setVersion(OpenApi::VERSION_3_1_0)->generate(array_merge([ $currentPluginDir . '/Annotations/GlobalApiComponents.php', ], $pluginDirs)); diff --git a/composer.json b/composer.json index eaadd00..c36ed8c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "require": { - "zircote/swagger-php": "^5.4" + "zircote/swagger-php": "^5.4", + "doctrine/annotations": "^2.0" }, "replace": { "monolog/monolog": "*", diff --git a/composer.lock b/composer.lock index 399cebf..96d7444 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,161 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c8345434bce3699d515e040a2b2da4fa", + "content-hash": "c02410b41ab976b8400bb73dedbf07dc", "packages": [ + { + "name": "doctrine/annotations", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2 || ^3", + "ext-tokenizer": "*", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.10.28", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^5.4 || ^6.4 || ^7", + "vimeo/psalm": "^4.30 || ^5.14" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/2.0.2" + }, + "time": "2024-09-05T10:17:24+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2024-02-05T11:56:58+00:00" + }, { "name": "nikic/php-parser", "version": "v5.6.1", @@ -64,6 +217,55 @@ }, "time": "2025-08-13T20:13:15+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, { "name": "symfony/deprecation-contracts", "version": "v3.6.0", diff --git a/scoper.inc.php b/scoper.inc.php index bdf9a3d..d3a006c 100644 --- a/scoper.inc.php +++ b/scoper.inc.php @@ -56,7 +56,26 @@ 'force-no-global-alias' => $forceNoGlobalAlias, 'prefix' => 'Matomo\\Dependencies\\' . $pluginName, 'finders' => $finders, - 'patchers' => [], + 'patchers' => [ + // Patcher for making sure that AbstractAnnotation is looking for the correct root + static function (string $filePath, string $prefix, string $content) use ($isRenamingReferences): string { + if ($isRenamingReferences) { + return $content; + } + + // Fix the string reference of a scoped dependency in the Math lib + $escapedPrefix = str_replace('\\', '\\\\', $prefix); + if ($filePath === __DIR__ . '/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php') { + $content = str_replace( + 'OpenApi\\\\Annotations\\\\', + "{$escapedPrefix}\\\\OpenApi\\\\Annotations\\\\", + $content + ); + } + + return $content; + }, + ], 'include-namespaces' => $namespacesToIncludeRegexes, 'exclude-namespaces' => $namespacesToExclude, 'exclude-constants' => [ diff --git a/vendor/autoload_original.php b/vendor/autoload_original.php index 290e05f..8349aed 100644 --- a/vendor/autoload_original.php +++ b/vendor/autoload_original.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa::getLoader(); +return ComposerAutoloaderInitc02410b41ab976b8400bb73dedbf07dc::getLoader(); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 8cef7a3..6050e83 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -9,6 +9,9 @@ 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), + 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'OpenApi\\' => array($vendorDir . '/zircote/swagger-php/src'), + 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), + 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 7df13a6..b6f351c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa +class ComposerAutoloaderInitc02410b41ab976b8400bb73dedbf07dc { private static $loader; @@ -22,16 +22,16 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitc02410b41ab976b8400bb73dedbf07dc', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitc8345434bce3699d515e040a2b2da4fa', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitc02410b41ab976b8400bb73dedbf07dc', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitc02410b41ab976b8400bb73dedbf07dc::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitc02410b41ab976b8400bb73dedbf07dc::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e31252b..66659ed 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitc8345434bce3699d515e040a2b2da4fa +class ComposerStaticInitc02410b41ab976b8400bb73dedbf07dc { public static $files = array( ); @@ -19,12 +19,18 @@ class ComposerStaticInitc8345434bce3699d515e040a2b2da4fa ), 'P' => array ( + 'Psr\\Cache\\' => 10, 'PhpParser\\' => 10, ), 'O' => array ( 'OpenApi\\' => 8, ), + 'D' => + array ( + 'Doctrine\\Common\\Lexer\\' => 22, + 'Doctrine\\Common\\Annotations\\' => 28, + ), ); public static $prefixDirsPsr4 = array ( @@ -40,6 +46,10 @@ class ComposerStaticInitc8345434bce3699d515e040a2b2da4fa array ( 0 => __DIR__ . '/..' . '/symfony/finder', ), + 'Psr\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/cache/src', + ), 'PhpParser\\' => array ( 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', @@ -48,6 +58,14 @@ class ComposerStaticInitc8345434bce3699d515e040a2b2da4fa array ( 0 => __DIR__ . '/..' . '/zircote/swagger-php/src', ), + 'Doctrine\\Common\\Lexer\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/lexer/src', + ), + 'Doctrine\\Common\\Annotations\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', + ), ); public static $classMap = array ( @@ -57,9 +75,9 @@ class ComposerStaticInitc8345434bce3699d515e040a2b2da4fa public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitc8345434bce3699d515e040a2b2da4fa::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitc02410b41ab976b8400bb73dedbf07dc::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitc02410b41ab976b8400bb73dedbf07dc::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitc02410b41ab976b8400bb73dedbf07dc::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 138c187..3575ed6 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,5 +1,164 @@ { "packages": [ + { + "name": "doctrine/annotations", + "version": "2.0.2", + "version_normalized": "2.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2 || ^3", + "ext-tokenizer": "*", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.10.28", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^5.4 || ^6.4 || ^7", + "vimeo/psalm": "^4.30 || ^5.14" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "time": "2024-09-05T10:17:24+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/2.0.2" + }, + "install-path": "../doctrine/annotations" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "version_normalized": "3.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "time": "2024-02-05T11:56:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "install-path": "../doctrine/lexer" + }, { "name": "nikic/php-parser", "version": "v5.6.1", @@ -61,6 +220,58 @@ }, "install-path": "../nikic/php-parser" }, + { + "name": "psr/cache", + "version": "3.0.0", + "version_normalized": "3.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "time": "2021-02-03T23:26:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "install-path": "../psr/cache" + }, { "name": "symfony/deprecation-contracts", "version": "v3.6.0", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 2bacb1f..08b6452 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-5.x-dev', 'version' => 'dev-5.x-dev', - 'reference' => '2d16105a21f74ee3dfb31e5713e2f1d75b40b913', + 'reference' => '7773ba7c581833d8cfe2eb522cb7516d132720af', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,12 +13,30 @@ '__root__' => array( 'pretty_version' => 'dev-5.x-dev', 'version' => 'dev-5.x-dev', - 'reference' => '2d16105a21f74ee3dfb31e5713e2f1d75b40b913', + 'reference' => '7773ba7c581833d8cfe2eb522cb7516d132720af', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), + 'doctrine/annotations' => array( + 'pretty_version' => '2.0.2', + 'version' => '2.0.2.0', + 'reference' => '901c2ee5d26eb64ff43c47976e114bf00843acf7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/annotations', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/lexer' => array( + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => '31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/lexer', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'monolog/monolog' => array( 'dev_requirement' => false, 'replaced' => array( @@ -34,6 +52,15 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'psr/cache' => array( + 'pretty_version' => '3.0.0', + 'version' => '3.0.0.0', + 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/cache', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'psr/log' => array( 'dev_requirement' => false, 'replaced' => array( diff --git a/vendor/prefixed/doctrine/annotations/LICENSE b/vendor/prefixed/doctrine/annotations/LICENSE new file mode 100644 index 0000000..5e781fc --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2013 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/prefixed/doctrine/annotations/docs/en/annotations.rst b/vendor/prefixed/doctrine/annotations/docs/en/annotations.rst new file mode 100644 index 0000000..d32b15d --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/docs/en/annotations.rst @@ -0,0 +1,189 @@ +Handling Annotations +==================== + +There are several different approaches to handling annotations in PHP. +Doctrine Annotations maps docblock annotations to PHP classes. Because +not all docblock annotations are used for metadata purposes a filter is +applied to ignore or skip classes that are not Doctrine annotations. + +Take a look at the following code snippet: + +.. code-block:: php + + namespace MyProject\Entities; + + use Doctrine\ORM\Mapping AS ORM; + use Symfony\Component\Validator\Constraints AS Assert; + + /** + * @author Benjamin Eberlei + * @ORM\Entity + * @MyProject\Annotations\Foobarable + */ + class User + { + /** + * @ORM\Id @ORM\Column @ORM\GeneratedValue + * @dummy + * @var int + */ + private $id; + + /** + * @ORM\Column(type="string") + * @Assert\NotEmpty + * @Assert\Email + * @var string + */ + private $email; + } + +In this snippet you can see a variety of different docblock annotations: + +- Documentation annotations such as ``@var`` and ``@author``. These + annotations are ignored and never considered for throwing an + exception due to wrongly used annotations. +- Annotations imported through use statements. The statement ``use + Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace + available as ``@ORM\ClassName``. Same goes for the import of + ``@Assert``. +- The ``@dummy`` annotation. It is not a documentation annotation and + not ignored. For Doctrine Annotations it is not entirely clear how + to handle this annotation. Depending on the configuration an exception + (unknown annotation) will be thrown when parsing this annotation. +- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. + This is transformed directly into the given class name. + +How are these annotations loaded? From looking at the code you could +guess that the ORM Mapping, Assert Validation and the fully qualified +annotation can just be loaded using +the defined PHP autoloaders. This is not the case however: For error +handling reasons every check for class existence inside the +``AnnotationReader`` sets the second parameter $autoload +of ``class_exists($name, $autoload)`` to false. To work flawlessly the +``AnnotationReader`` requires silent autoloaders which many autoloaders are +not. Silent autoloading is NOT part of the `PSR-0 specification +`_ +for autoloading. + +This is why Doctrine Annotations uses its own autoloading mechanism +through a global registry. If you are wondering about the annotation +registry being global, there is no other way to solve the architectural +problems of autoloading annotation classes in a straightforward fashion. +Additionally if you think about PHP autoloading then you recognize it is +a global as well. + +To anticipate the configuration section, making the above PHP class work +with Doctrine Annotations requires this setup: + +.. code-block:: php + + use Doctrine\Common\Annotations\AnnotationReader; + + $reader = new AnnotationReader(); + AnnotationReader::addGlobalIgnoredName('dummy'); + +We create the actual ``AnnotationReader`` instance. +Note that we also add ``dummy`` to the global list of ignored +annotations for which we do not throw exceptions. Setting this is +necessary in our example case, otherwise ``@dummy`` would trigger an +exception to be thrown during the parsing of the docblock of +``MyProject\Entities\User#id``. + +Setup and Configuration +----------------------- + +To use the annotations library is simple, you just need to create a new +``AnnotationReader`` instance: + +.. code-block:: php + + $reader = new \Doctrine\Common\Annotations\AnnotationReader(); + +This creates a simple annotation reader with no caching other than in +memory (in php arrays). Since parsing docblocks can be expensive you +should cache this process by using a caching reader. + +To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``. +This reader decorates the original reader and stores all annotations in a PSR-6 +cache: + +.. code-block:: php + + use Doctrine\Common\Annotations\AnnotationReader; + use Doctrine\Common\Annotations\PsrCachedReader; + + $cache = ... // instantiate a PSR-6 Cache pool + + $reader = new PsrCachedReader( + new AnnotationReader(), + $cache, + $debug = true + ); + +The ``debug`` flag is used here as well to invalidate the cache files +when the PHP class with annotations changed and should be used during +development. + +.. warning :: + + The ``AnnotationReader`` works and caches under the + assumption that all annotations of a doc-block are processed at + once. That means that annotation classes that do not exist and + aren't loaded and cannot be autoloaded (using the + AnnotationRegistry) would never be visible and not accessible if a + cache is used unless the cache is cleared and the annotations + requested again, this time with all annotations defined. + +By default the annotation reader returns a list of annotations with +numeric indexes. If you want your annotations to be indexed by their +class name you can wrap the reader in an ``IndexedReader``: + +.. code-block:: php + + use Doctrine\Common\Annotations\AnnotationReader; + use Doctrine\Common\Annotations\IndexedReader; + + $reader = new IndexedReader(new AnnotationReader()); + +.. warning:: + + You should never wrap the indexed reader inside a cached reader, + only the other way around. This way you can re-use the cache with + indexed or numeric keys, otherwise your code may experience failures + due to caching in a numerical or indexed format. + +Ignoring missing exceptions +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default an exception is thrown from the ``AnnotationReader`` if an +annotation was found that: + +- is not part of the list of ignored "documentation annotations"; +- was not imported through a use statement; +- is not a fully qualified class that exists. + +You can disable this behavior for specific names if your docblocks do +not follow strict requirements: + +.. code-block:: php + + $reader = new \Doctrine\Common\Annotations\AnnotationReader(); + AnnotationReader::addGlobalIgnoredName('foo'); + +PHP Imports +~~~~~~~~~~~ + +By default the annotation reader parses the use-statement of a php file +to gain access to the import rules and register them for the annotation +processing. Only if you are using PHP Imports can you validate the +correct usage of annotations and throw exceptions if you misspelled an +annotation. This mechanism is enabled by default. + +To ease the upgrade path, we still allow you to disable this mechanism. +Note however that we will remove this in future versions: + +.. code-block:: php + + $reader = new \Doctrine\Common\Annotations\AnnotationReader(); + $reader->setEnabledPhpImports(false); diff --git a/vendor/prefixed/doctrine/annotations/docs/en/custom.rst b/vendor/prefixed/doctrine/annotations/docs/en/custom.rst new file mode 100644 index 0000000..3005166 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/docs/en/custom.rst @@ -0,0 +1,443 @@ +Custom Annotation Classes +========================= + +If you want to define your own annotations, you just have to group them +in a namespace. +Annotation classes have to contain a class-level docblock with the text +``@Annotation``: + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** @Annotation */ + class Bar + { + // some code + } + +Inject annotation values +------------------------ + +The annotation parser checks if the annotation constructor has arguments, +if so then it will pass the value array, otherwise it will try to inject +values into public properties directly: + + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * + * Some Annotation using a constructor + */ + class Bar + { + private $foo; + + public function __construct(array $values) + { + $this->foo = $values['foo']; + } + } + + /** + * @Annotation + * + * Some Annotation without a constructor + */ + class Foo + { + public $bar; + } + +Optional: Constructors with Named Parameters +-------------------------------------------- + +Starting with Annotations v1.11 a new annotation instantiation strategy +is available that aims at compatibility of Annotation classes with the PHP 8 +attribute feature. You need to declare a constructor with regular parameter +names that match the named arguments in the annotation syntax. + +To enable this feature, you can tag your annotation class with +``@NamedArgumentConstructor`` (available from v1.12) or implement the +``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface +(available from v1.11 and deprecated as of v1.12). +When using the ``@NamedArgumentConstructor`` tag, the first argument of the +constructor is considered as the default one. + + +Usage with the ``@NamedArgumentConstructor`` tag + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * @NamedArgumentConstructor + */ + class Bar implements NamedArgumentConstructorAnnotation + { + private $foo; + + public function __construct(string $foo) + { + $this->foo = $foo; + } + } + + /** Usable with @Bar(foo="baz") */ + /** Usable with @Bar("baz") */ + +In combination with PHP 8's constructor property promotion feature +you can simplify this to: + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * @NamedArgumentConstructor + */ + class Bar implements NamedArgumentConstructorAnnotation + { + public function __construct(private string $foo) {} + } + + +Usage with the +``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` +interface (v1.11, deprecated as of v1.12): +.. code-block:: php + + namespace MyCompany\Annotations; + + use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; + + /** @Annotation */ + class Bar implements NamedArgumentConstructorAnnotation + { + private $foo; + + public function __construct(private string $foo) {} + } + + /** Usable with @Bar(foo="baz") */ + +Annotation Target +----------------- + +``@Target`` indicates the kinds of class elements to which an annotation +type is applicable. Then you could define one or more targets: + +- ``CLASS`` Allowed in class docblocks +- ``PROPERTY`` Allowed in property docblocks +- ``METHOD`` Allowed in the method docblocks +- ``FUNCTION`` Allowed in function dockblocks +- ``ALL`` Allowed in class, property, method and function docblocks +- ``ANNOTATION`` Allowed inside other annotations + +If the annotations is not allowed in the current context, an +``AnnotationException`` is thrown. + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * @Target({"METHOD","PROPERTY"}) + */ + class Bar + { + // some code + } + + /** + * @Annotation + * @Target("CLASS") + */ + class Foo + { + // some code + } + +Attribute types +--------------- + +The annotation parser checks the given parameters using the phpdoc +annotation ``@var``, The data type could be validated using the ``@var`` +annotation on the annotation properties or using the ``@Attributes`` and +``@Attribute`` annotations. + +If the data type does not match you get an ``AnnotationException`` + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * @Target({"METHOD","PROPERTY"}) + */ + class Bar + { + /** @var mixed */ + public $mixed; + + /** @var boolean */ + public $boolean; + + /** @var bool */ + public $bool; + + /** @var float */ + public $float; + + /** @var string */ + public $string; + + /** @var integer */ + public $integer; + + /** @var array */ + public $array; + + /** @var SomeAnnotationClass */ + public $annotation; + + /** @var array */ + public $arrayOfIntegers; + + /** @var array */ + public $arrayOfAnnotations; + } + + /** + * @Annotation + * @Target({"METHOD","PROPERTY"}) + * @Attributes({ + * @Attribute("stringProperty", type = "string"), + * @Attribute("annotProperty", type = "SomeAnnotationClass"), + * }) + */ + class Foo + { + public function __construct(array $values) + { + $this->stringProperty = $values['stringProperty']; + $this->annotProperty = $values['annotProperty']; + } + + // some code + } + +Annotation Required +------------------- + +``@Required`` indicates that the field must be specified when the +annotation is used. If it is not used you get an ``AnnotationException`` +stating that this value can not be null. + +Declaring a required field: + +.. code-block:: php + + /** + * @Annotation + * @Target("ALL") + */ + class Foo + { + /** @Required */ + public $requiredField; + } + +Usage: + +.. code-block:: php + + /** @Foo(requiredField="value") */ + public $direction; // Valid + + /** @Foo */ + public $direction; // Required field missing, throws an AnnotationException + + +Enumerated values +----------------- + +- An annotation property marked with ``@Enum`` is a field that accepts a + fixed set of scalar values. +- You should use ``@Enum`` fields any time you need to represent fixed + values. +- The annotation parser checks the given value and throws an + ``AnnotationException`` if the value does not match. + + +Declaring an enumerated property: + +.. code-block:: php + + /** + * @Annotation + * @Target("ALL") + */ + class Direction + { + /** + * @Enum({"NORTH", "SOUTH", "EAST", "WEST"}) + */ + public $value; + } + +Annotation usage: + +.. code-block:: php + + /** @Direction("NORTH") */ + public $direction; // Valid value + + /** @Direction("NORTHEAST") */ + public $direction; // Invalid value, throws an AnnotationException + + +Constants +--------- + +The use of constants and class constants is available on the annotations +parser. + +The following usages are allowed: + +.. code-block:: php + + namespace MyCompany\Entity; + + use MyCompany\Annotations\Foo; + use MyCompany\Annotations\Bar; + use MyCompany\Entity\SomeClass; + + /** + * @Foo(PHP_EOL) + * @Bar(Bar::FOO) + * @Foo({SomeClass::FOO, SomeClass::BAR}) + * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE}) + */ + class User + { + } + + +Be careful with constants and the cache ! + +.. note:: + + The cached reader will not re-evaluate each time an annotation is + loaded from cache. When a constant is changed the cache must be + cleaned. + + +Usage +----- + +Using the library API is simple. Using the annotations described in the +previous section, you can now annotate other classes with your +annotations: + +.. code-block:: php + + namespace MyCompany\Entity; + + use MyCompany\Annotations\Foo; + use MyCompany\Annotations\Bar; + + /** + * @Foo(bar="foo") + * @Bar(foo="bar") + */ + class User + { + } + +Now we can write a script to get the annotations above: + +.. code-block:: php + + $reflClass = new ReflectionClass('MyCompany\Entity\User'); + $classAnnotations = $reader->getClassAnnotations($reflClass); + + foreach ($classAnnotations AS $annot) { + if ($annot instanceof \MyCompany\Annotations\Foo) { + echo $annot->bar; // prints "foo"; + } else if ($annot instanceof \MyCompany\Annotations\Bar) { + echo $annot->foo; // prints "bar"; + } + } + +You have a complete API for retrieving annotation class instances from a +class, property or method docblock: + + +Reader API +~~~~~~~~~~ + +Access all annotations of a class +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getClassAnnotations(\ReflectionClass $class); + +Access one annotation of a class +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getClassAnnotation(\ReflectionClass $class, $annotationName); + +Access all annotations of a method +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getMethodAnnotations(\ReflectionMethod $method); + +Access one annotation of a method +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getMethodAnnotation(\ReflectionMethod $method, $annotationName); + +Access all annotations of a property +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getPropertyAnnotations(\ReflectionProperty $property); + +Access one annotation of a property +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); + +Access all annotations of a function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getFunctionAnnotations(\ReflectionFunction $property); + +Access one annotation of a function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/vendor/prefixed/doctrine/annotations/docs/en/index.rst b/vendor/prefixed/doctrine/annotations/docs/en/index.rst new file mode 100644 index 0000000..3cf37e5 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/docs/en/index.rst @@ -0,0 +1,109 @@ +Deprecation notice +================== + +PHP 8 introduced `attributes +`_, +which are a native replacement for annotations. As such, this library is +considered feature complete, and should receive exclusively bugfixes and +security fixes. + +We do not recommend using this library in new projects and encourage authors +of downstream libraries to offer support for attributes as an alternative to +Doctrine Annotations. + +Have a look at [our blog](https://www.doctrine-project.org/2022/11/04/annotations-to-attributes.html) +to learn more. + +Introduction +============ + +Doctrine Annotations allows to implement custom annotation +functionality for PHP classes and functions. + +.. code-block:: php + + class Foo + { + /** + * @MyAnnotation(myProperty="value") + */ + private $bar; + } + +Annotations aren't implemented in PHP itself which is why this component +offers a way to use the PHP doc-blocks as a place for the well known +annotation syntax using the ``@`` char. + +Annotations in Doctrine are used for the ORM configuration to build the +class mapping, but it can be used in other projects for other purposes +too. + +Installation +============ + +You can install the Annotation component with composer: + +.. code-block:: + + $ composer require doctrine/annotations + +Create an annotation class +========================== + +An annotation class is a representation of the later used annotation +configuration in classes. The annotation class of the previous example +looks like this: + +.. code-block:: php + + /** + * @Annotation + */ + final class MyAnnotation + { + public $myProperty; + } + +The annotation class is declared as an annotation by ``@Annotation``. + +:ref:`Read more about custom annotations. ` + +Reading annotations +=================== + +The access to the annotations happens by reflection of the class or function +containing them. There are multiple reader-classes implementing the +``Doctrine\Common\Annotations\Reader`` interface, that can access the +annotations of a class. A common one is +``Doctrine\Common\Annotations\AnnotationReader``: + +.. code-block:: php + + use Doctrine\Common\Annotations\AnnotationReader; + + $reflectionClass = new ReflectionClass(Foo::class); + $property = $reflectionClass->getProperty('bar'); + + $reader = new AnnotationReader(); + $myAnnotation = $reader->getPropertyAnnotation( + $property, + MyAnnotation::class + ); + + echo $myAnnotation->myProperty; // result: "value" + +A reader has multiple methods to access the annotations of a class or +function. + +:ref:`Read more about handling annotations. ` + +IDE Support +----------- + +Some IDEs already provide support for annotations: + +- Eclipse via the `Symfony2 Plugin `_ +- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ + +.. _Read more about handling annotations.: annotations +.. _Read more about custom annotations.: custom diff --git a/vendor/prefixed/doctrine/annotations/docs/en/sidebar.rst b/vendor/prefixed/doctrine/annotations/docs/en/sidebar.rst new file mode 100644 index 0000000..6f5d13c --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/docs/en/sidebar.rst @@ -0,0 +1,6 @@ +.. toctree:: + :depth: 3 + + index + annotations + custom diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php new file mode 100644 index 0000000..1e55d1b --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php @@ -0,0 +1,45 @@ + $data Key-value for properties to be defined in this class. */ + public final function __construct(array $data) + { + foreach ($data as $key => $value) { + $this->{$key} = $value; + } + } + /** + * Error handler for unknown property accessor in Annotation class. + * + * @throws BadMethodCallException + */ + public function __get(string $name) + { + throw new BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class)); + } + /** + * Error handler for unknown property mutator in Annotation class. + * + * @param mixed $value Property value. + * + * @throws BadMethodCallException + */ + public function __set(string $name, $value) + { + throw new BadMethodCallException(sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class)); + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php new file mode 100644 index 0000000..85bc62f --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php @@ -0,0 +1,19 @@ + */ + public $value; +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php new file mode 100644 index 0000000..0e32ae0 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php @@ -0,0 +1,55 @@ + */ + public $value; + /** + * Literal target declaration. + * + * @var mixed[] + */ + public $literal; + /** + * @phpstan-param array{literal?: mixed[], value: list} $values + * + * @throws InvalidArgumentException + */ + public function __construct(array $values) + { + if (!isset($values['literal'])) { + $values['literal'] = []; + } + foreach ($values['value'] as $var) { + if (!is_scalar($var)) { + throw new InvalidArgumentException(sprintf('@Enum supports only scalar values "%s" given.', is_object($var) ? get_class($var) : gettype($var))); + } + } + foreach ($values['literal'] as $key => $var) { + if (!in_array($key, $values['value'])) { + throw new InvalidArgumentException(sprintf('Undefined enumerator value "%s" for literal "%s".', $key, $var)); + } + } + $this->value = $values['value']; + $this->literal = $values['literal']; + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php new file mode 100644 index 0000000..966d8eb --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php @@ -0,0 +1,35 @@ + */ + public $names; + /** + * @phpstan-param array{value: string|list} $values + * + * @throws RuntimeException + */ + public function __construct(array $values) + { + if (is_string($values['value'])) { + $values['value'] = [$values['value']]; + } + if (!is_array($values['value'])) { + throw new RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value']))); + } + $this->names = $values['value']; + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php new file mode 100644 index 0000000..f1b845b --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php @@ -0,0 +1,13 @@ + */ + private static $map = ['ALL' => self::TARGET_ALL, 'CLASS' => self::TARGET_CLASS, 'METHOD' => self::TARGET_METHOD, 'PROPERTY' => self::TARGET_PROPERTY, 'FUNCTION' => self::TARGET_FUNCTION, 'ANNOTATION' => self::TARGET_ANNOTATION]; + /** @phpstan-var list */ + public $value; + /** + * Targets as bitmask. + * + * @var int + */ + public $targets; + /** + * Literal target declaration. + * + * @var string + */ + public $literal; + /** + * @phpstan-param array{value?: string|list} $values + * + * @throws InvalidArgumentException + */ + public function __construct(array $values) + { + if (!isset($values['value'])) { + $values['value'] = null; + } + if (is_string($values['value'])) { + $values['value'] = [$values['value']]; + } + if (!is_array($values['value'])) { + throw new InvalidArgumentException(sprintf('@Target expects either a string value, or an array of strings, "%s" given.', is_object($values['value']) ? get_class($values['value']) : gettype($values['value']))); + } + $bitmask = 0; + foreach ($values['value'] as $literal) { + if (!isset(self::$map[$literal])) { + throw new InvalidArgumentException(sprintf('Invalid Target "%s". Available targets: [%s]', $literal, implode(', ', array_keys(self::$map)))); + } + $bitmask |= self::$map[$literal]; + } + $this->targets = $bitmask; + $this->value = $values['value']; + $this->literal = implode(', ', $this->value); + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php new file mode 100644 index 0000000..e1877c1 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php @@ -0,0 +1,105 @@ + $available + * + * @return AnnotationException + */ + public static function enumeratorError(string $attributeName, string $annotationName, string $context, array $available, $given) + { + return new self(sprintf('[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', $attributeName, $annotationName, $context, implode(', ', $available), is_object($given) ? get_class($given) : $given)); + } + /** @return AnnotationException */ + public static function optimizerPlusSaveComments() + { + return new self('You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.'); + } + /** @return AnnotationException */ + public static function optimizerPlusLoadComments() + { + return new self('You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.'); + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php new file mode 100644 index 0000000..4b67d31 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -0,0 +1,307 @@ + + */ + private static $globalImports = ['ignoreannotation' => Annotation\IgnoreAnnotation::class]; + /** + * A list with annotations that are not causing exceptions when not resolved to an annotation class. + * + * The names are case sensitive. + * + * @var array + */ + private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; + /** + * A list with annotations that are not causing exceptions when not resolved to an annotation class. + * + * The names are case sensitive. + * + * @var array + */ + private static $globalIgnoredNamespaces = []; + /** + * Add a new annotation to the globally ignored annotation names with regard to exception handling. + */ + public static function addGlobalIgnoredName(string $name) + { + self::$globalIgnoredNames[$name] = \true; + } + /** + * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling. + */ + public static function addGlobalIgnoredNamespace(string $namespace) + { + self::$globalIgnoredNamespaces[$namespace] = \true; + } + /** + * Annotations parser. + * + * @var DocParser + */ + private $parser; + /** + * Annotations parser used to collect parsing metadata. + * + * @var DocParser + */ + private $preParser; + /** + * PHP parser used to collect imports. + * + * @var PhpParser + */ + private $phpParser; + /** + * In-memory cache mechanism to store imported annotations per class. + * + * @psalm-var array<'class'|'function', array>> + */ + private $imports = []; + /** + * In-memory cache mechanism to store ignored annotations per class. + * + * @psalm-var array<'class'|'function', array>> + */ + private $ignoredAnnotationNames = []; + /** + * Initializes a new AnnotationReader. + * + * @throws AnnotationException + */ + public function __construct(?DocParser $parser = null) + { + if (extension_loaded('Zend Optimizer+') && (filter_var(ini_get('zend_optimizerplus.save_comments'), FILTER_VALIDATE_BOOLEAN) === \false || filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === \false)) { + throw AnnotationException::optimizerPlusSaveComments(); + } + if (extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === \false) { + throw AnnotationException::optimizerPlusSaveComments(); + } + // Make sure that the IgnoreAnnotation annotation is loaded + class_exists(IgnoreAnnotation::class); + $this->parser = $parser ?: new DocParser(); + $this->preParser = new DocParser(); + $this->preParser->setImports(self::$globalImports); + $this->preParser->setIgnoreNotImportedAnnotations(\true); + $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); + $this->phpParser = new PhpParser(); + } + /** + * {@inheritDoc} + */ + public function getClassAnnotations(ReflectionClass $class) + { + $this->parser->setTarget(Target::TARGET_CLASS); + $this->parser->setImports($this->getImports($class)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); + $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); + return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); + } + /** + * {@inheritDoc} + */ + public function getClassAnnotation(ReflectionClass $class, $annotationName) + { + $annotations = $this->getClassAnnotations($class); + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + return null; + } + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $context = 'property ' . $class->getName() . '::$' . $property->getName(); + $this->parser->setTarget(Target::TARGET_PROPERTY); + $this->parser->setImports($this->getPropertyImports($property)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); + $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); + return $this->parser->parse($property->getDocComment(), $context); + } + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) + { + $annotations = $this->getPropertyAnnotations($property); + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + return null; + } + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; + $this->parser->setTarget(Target::TARGET_METHOD); + $this->parser->setImports($this->getMethodImports($method)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); + $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); + return $this->parser->parse($method->getDocComment(), $context); + } + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) + { + $annotations = $this->getMethodAnnotations($method); + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + return null; + } + /** + * Gets the annotations applied to a function. + * + * @phpstan-return list An array of Annotations. + */ + public function getFunctionAnnotations(ReflectionFunction $function) : array + { + $context = 'function ' . $function->getName(); + $this->parser->setTarget(Target::TARGET_FUNCTION); + $this->parser->setImports($this->getImports($function)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); + $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); + return $this->parser->parse($function->getDocComment(), $context); + } + /** + * Gets a function annotation. + * + * @return object|null The Annotation or NULL, if the requested annotation does not exist. + */ + public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) + { + $annotations = $this->getFunctionAnnotations($function); + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + return null; + } + /** + * Returns the ignored annotations for the given class or function. + * + * @param ReflectionClass|ReflectionFunction $reflection + * + * @return array + */ + private function getIgnoredAnnotationNames($reflection) : array + { + $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; + $name = $reflection->getName(); + if (isset($this->ignoredAnnotationNames[$type][$name])) { + return $this->ignoredAnnotationNames[$type][$name]; + } + $this->collectParsingMetadata($reflection); + return $this->ignoredAnnotationNames[$type][$name]; + } + /** + * Retrieves imports for a class or a function. + * + * @param ReflectionClass|ReflectionFunction $reflection + * + * @return array + */ + private function getImports($reflection) : array + { + $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; + $name = $reflection->getName(); + if (isset($this->imports[$type][$name])) { + return $this->imports[$type][$name]; + } + $this->collectParsingMetadata($reflection); + return $this->imports[$type][$name]; + } + /** + * Retrieves imports for methods. + * + * @return array + */ + private function getMethodImports(ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $classImports = $this->getImports($class); + $traitImports = []; + foreach ($class->getTraits() as $trait) { + if (!$trait->hasMethod($method->getName()) || $trait->getFileName() !== $method->getFileName()) { + continue; + } + $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); + } + return array_merge($classImports, $traitImports); + } + /** + * Retrieves imports for properties. + * + * @return array + */ + private function getPropertyImports(ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $classImports = $this->getImports($class); + $traitImports = []; + foreach ($class->getTraits() as $trait) { + if (!$trait->hasProperty($property->getName())) { + continue; + } + $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); + } + return array_merge($classImports, $traitImports); + } + /** + * Collects parsing metadata for a given class or function. + * + * @param ReflectionClass|ReflectionFunction $reflection + */ + private function collectParsingMetadata($reflection) : void + { + $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; + $name = $reflection->getName(); + $ignoredAnnotationNames = self::$globalIgnoredNames; + $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); + foreach ($annotations as $annotation) { + if (!$annotation instanceof IgnoreAnnotation) { + continue; + } + foreach ($annotation->names as $annot) { + $ignoredAnnotationNames[$annot] = \true; + } + } + $this->imports[$type][$name] = array_merge(self::$globalImports, $this->phpParser->parseUseStatements($reflection), ['__NAMESPACE__' => $reflection->getNamespaceName(), 'self' => $name]); + $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php new file mode 100644 index 0000000..5535885 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php @@ -0,0 +1,36 @@ + + */ +final class DocLexer extends AbstractLexer +{ + public const T_NONE = 1; + public const T_INTEGER = 2; + public const T_STRING = 3; + public const T_FLOAT = 4; + // All tokens that are also identifiers should be >= 100 + public const T_IDENTIFIER = 100; + public const T_AT = 101; + public const T_CLOSE_CURLY_BRACES = 102; + public const T_CLOSE_PARENTHESIS = 103; + public const T_COMMA = 104; + public const T_EQUALS = 105; + public const T_FALSE = 106; + public const T_NAMESPACE_SEPARATOR = 107; + public const T_OPEN_CURLY_BRACES = 108; + public const T_OPEN_PARENTHESIS = 109; + public const T_TRUE = 110; + public const T_NULL = 111; + public const T_COLON = 112; + public const T_MINUS = 113; + /** @var array */ + protected $noCase = ['@' => self::T_AT, ',' => self::T_COMMA, '(' => self::T_OPEN_PARENTHESIS, ')' => self::T_CLOSE_PARENTHESIS, '{' => self::T_OPEN_CURLY_BRACES, '}' => self::T_CLOSE_CURLY_BRACES, '=' => self::T_EQUALS, ':' => self::T_COLON, '-' => self::T_MINUS, '\\' => self::T_NAMESPACE_SEPARATOR]; + /** @var array */ + protected $withCase = ['true' => self::T_TRUE, 'false' => self::T_FALSE, 'null' => self::T_NULL]; + /** + * Whether the next token starts immediately, or if there were + * non-captured symbols before that + */ + public function nextTokenIsAdjacent() : bool + { + return $this->token === null || $this->lookahead !== null && $this->lookahead->position - $this->token->position === strlen($this->token->value); + } + /** + * {@inheritDoc} + */ + protected function getCatchablePatterns() + { + return ['[a-z_\\\\][a-z0-9_\\:\\\\]*[a-z_][a-z0-9_]*', '(?:[+-]?[0-9]+(?:[\\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', '"(?:""|[^"])*+"']; + } + /** + * {@inheritDoc} + */ + protected function getNonCatchablePatterns() + { + return ['\\s+', '\\*+', '(.)']; + } + /** + * {@inheritDoc} + */ + protected function getType(&$value) + { + $type = self::T_NONE; + if ($value[0] === '"') { + $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); + return self::T_STRING; + } + if (isset($this->noCase[$value])) { + return $this->noCase[$value]; + } + if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { + return self::T_IDENTIFIER; + } + $lowerValue = strtolower($value); + if (isset($this->withCase[$lowerValue])) { + return $this->withCase[$lowerValue]; + } + // Checking numeric value + if (is_numeric($value)) { + return strpos($value, '.') !== \false || stripos($value, 'e') !== \false ? self::T_FLOAT : self::T_INTEGER; + } + return $type; + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php new file mode 100644 index 0000000..13b5d6e --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php @@ -0,0 +1,1042 @@ +, named_arguments?: array} + */ +final class DocParser +{ + /** + * An array of all valid tokens for a class name. + * + * @phpstan-var list + */ + private static $classIdentifiers = [DocLexer::T_IDENTIFIER, DocLexer::T_TRUE, DocLexer::T_FALSE, DocLexer::T_NULL]; + /** + * The lexer. + * + * @var DocLexer + */ + private $lexer; + /** + * Current target context. + * + * @var int + */ + private $target; + /** + * Doc parser used to collect annotation target. + * + * @var DocParser + */ + private static $metadataParser; + /** + * Flag to control if the current annotation is nested or not. + * + * @var bool + */ + private $isNestedAnnotation = \false; + /** + * Hashmap containing all use-statements that are to be used when parsing + * the given doc block. + * + * @var array + */ + private $imports = []; + /** + * This hashmap is used internally to cache results of class_exists() + * look-ups. + * + * @var array + */ + private $classExists = []; + /** + * Whether annotations that have not been imported should be ignored. + * + * @var bool + */ + private $ignoreNotImportedAnnotations = \false; + /** + * An array of default namespaces if operating in simple mode. + * + * @var string[] + */ + private $namespaces = []; + /** + * A list with annotations that are not causing exceptions when not resolved to an annotation class. + * + * The names must be the raw names as used in the class, not the fully qualified + * + * @var bool[] indexed by annotation name + */ + private $ignoredAnnotationNames = []; + /** + * A list with annotations in namespaced format + * that are not causing exceptions when not resolved to an annotation class. + * + * @var bool[] indexed by namespace name + */ + private $ignoredAnnotationNamespaces = []; + /** @var string */ + private $context = ''; + /** + * Hash-map for caching annotation metadata. + * + * @var array + */ + private static $annotationMetadata = [Annotation\Target::class => ['is_annotation' => \true, 'has_constructor' => \true, 'has_named_argument_constructor' => \false, 'properties' => [], 'targets_literal' => 'ANNOTATION_CLASS', 'targets' => Target::TARGET_CLASS, 'default_property' => 'value', 'attribute_types' => ['value' => ['required' => \false, 'type' => 'array', 'array_type' => 'string', 'value' => 'array']]], Annotation\Attribute::class => ['is_annotation' => \true, 'has_constructor' => \false, 'has_named_argument_constructor' => \false, 'targets_literal' => 'ANNOTATION_ANNOTATION', 'targets' => Target::TARGET_ANNOTATION, 'default_property' => 'name', 'properties' => ['name' => 'name', 'type' => 'type', 'required' => 'required'], 'attribute_types' => ['value' => ['required' => \true, 'type' => 'string', 'value' => 'string'], 'type' => ['required' => \true, 'type' => 'string', 'value' => 'string'], 'required' => ['required' => \false, 'type' => 'boolean', 'value' => 'boolean']]], Annotation\Attributes::class => ['is_annotation' => \true, 'has_constructor' => \false, 'has_named_argument_constructor' => \false, 'targets_literal' => 'ANNOTATION_CLASS', 'targets' => Target::TARGET_CLASS, 'default_property' => 'value', 'properties' => ['value' => 'value'], 'attribute_types' => ['value' => ['type' => 'array', 'required' => \true, 'array_type' => Annotation\Attribute::class, 'value' => 'array<' . Annotation\Attribute::class . '>']]], Annotation\Enum::class => ['is_annotation' => \true, 'has_constructor' => \true, 'has_named_argument_constructor' => \false, 'targets_literal' => 'ANNOTATION_PROPERTY', 'targets' => Target::TARGET_PROPERTY, 'default_property' => 'value', 'properties' => ['value' => 'value'], 'attribute_types' => ['value' => ['type' => 'array', 'required' => \true], 'literal' => ['type' => 'array', 'required' => \false]]], Annotation\NamedArgumentConstructor::class => ['is_annotation' => \true, 'has_constructor' => \false, 'has_named_argument_constructor' => \false, 'targets_literal' => 'ANNOTATION_CLASS', 'targets' => Target::TARGET_CLASS, 'default_property' => null, 'properties' => [], 'attribute_types' => []]]; + /** + * Hash-map for handle types declaration. + * + * @var array + */ + private static $typeMap = [ + 'float' => 'double', + 'bool' => 'boolean', + // allow uppercase Boolean in honor of George Boole + 'Boolean' => 'boolean', + 'int' => 'integer', + ]; + /** + * Constructs a new DocParser. + */ + public function __construct() + { + $this->lexer = new DocLexer(); + } + /** + * Sets the annotation names that are ignored during the parsing process. + * + * The names are supposed to be the raw names as used in the class, not the + * fully qualified class names. + * + * @param bool[] $names indexed by annotation name + * + * @return void + */ + public function setIgnoredAnnotationNames(array $names) + { + $this->ignoredAnnotationNames = $names; + } + /** + * Sets the annotation namespaces that are ignored during the parsing process. + * + * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name + * + * @return void + */ + public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces) + { + $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces; + } + /** + * Sets ignore on not-imported annotations. + * + * @return void + */ + public function setIgnoreNotImportedAnnotations(bool $bool) + { + $this->ignoreNotImportedAnnotations = $bool; + } + /** + * Sets the default namespaces. + * + * @return void + * + * @throws RuntimeException + */ + public function addNamespace(string $namespace) + { + if ($this->imports) { + throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + } + $this->namespaces[] = $namespace; + } + /** + * Sets the imports. + * + * @param array $imports + * + * @return void + * + * @throws RuntimeException + */ + public function setImports(array $imports) + { + if ($this->namespaces) { + throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + } + $this->imports = $imports; + } + /** + * Sets current target context as bitmask. + * + * @return void + */ + public function setTarget(int $target) + { + $this->target = $target; + } + /** + * Parses the given docblock string for annotations. + * + * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. + * + * @throws AnnotationException + * @throws ReflectionException + */ + public function parse(string $input, string $context = '') + { + $pos = $this->findInitialTokenPosition($input); + if ($pos === null) { + return []; + } + $this->context = $context; + $this->lexer->setInput(trim(substr($input, $pos), '* /')); + $this->lexer->moveNext(); + return $this->Annotations(); + } + /** + * Finds the first valid annotation + */ + private function findInitialTokenPosition(string $input) : ?int + { + $pos = 0; + // search for first valid annotation + while (($pos = strpos($input, '@', $pos)) !== \false) { + $preceding = substr($input, $pos - 1, 1); + // if the @ is preceded by a space, a tab or * it is valid + if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") { + return $pos; + } + $pos++; + } + return null; + } + /** + * Attempts to match the given token with the current lookahead token. + * If they match, updates the lookahead token; otherwise raises a syntax error. + * + * @param int $token Type of token. + * + * @return bool True if tokens match; false otherwise. + * + * @throws AnnotationException + */ + private function match(int $token) : bool + { + if (!$this->lexer->isNextToken($token)) { + throw $this->syntaxError($this->lexer->getLiteral($token)); + } + return $this->lexer->moveNext(); + } + /** + * Attempts to match the current lookahead token with any of the given tokens. + * + * If any of them matches, this method updates the lookahead token; otherwise + * a syntax error is raised. + * + * @phpstan-param list $tokens + * + * @throws AnnotationException + */ + private function matchAny(array $tokens) : bool + { + if (!$this->lexer->isNextTokenAny($tokens)) { + throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); + } + return $this->lexer->moveNext(); + } + /** + * Generates a new syntax error. + * + * @param string $expected Expected string. + * @param mixed[]|null $token Optional token. + */ + private function syntaxError(string $expected, ?array $token = null) : AnnotationException + { + if ($token === null) { + $token = $this->lexer->lookahead; + } + $message = sprintf('Expected %s, got ', $expected); + $message .= $this->lexer->lookahead === null ? 'end of string' : sprintf("'%s' at position %s", $token->value, $token->position); + if (strlen($this->context)) { + $message .= ' in ' . $this->context; + } + $message .= '.'; + return AnnotationException::syntaxError($message); + } + /** + * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism + * but uses the {@link AnnotationRegistry} to load classes. + * + * @param class-string $fqcn + */ + private function classExists(string $fqcn) : bool + { + if (isset($this->classExists[$fqcn])) { + return $this->classExists[$fqcn]; + } + // first check if the class already exists, maybe loaded through another AnnotationReader + if (class_exists($fqcn, \false)) { + return $this->classExists[$fqcn] = \true; + } + // final check, does this class exist? + return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); + } + /** + * Collects parsing metadata for a given annotation class + * + * @param class-string $name The annotation name + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function collectAnnotationMetadata(string $name) : void + { + if (self::$metadataParser === null) { + self::$metadataParser = new self(); + self::$metadataParser->setIgnoreNotImportedAnnotations(\true); + self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); + self::$metadataParser->setImports(['enum' => Enum::class, 'target' => Target::class, 'attribute' => Attribute::class, 'attributes' => Attributes::class, 'namedargumentconstructor' => NamedArgumentConstructor::class]); + // Make sure that annotations from metadata are loaded + class_exists(Enum::class); + class_exists(Target::class); + class_exists(Attribute::class); + class_exists(Attributes::class); + class_exists(NamedArgumentConstructor::class); + } + $class = new ReflectionClass($name); + $docComment = $class->getDocComment(); + // Sets default values for annotation metadata + $constructor = $class->getConstructor(); + $metadata = ['default_property' => null, 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, 'constructor_args' => [], 'properties' => [], 'property_types' => [], 'attribute_types' => [], 'targets_literal' => null, 'targets' => Target::TARGET_ALL, 'is_annotation' => strpos($docComment, '@Annotation') !== \false]; + $metadata['has_named_argument_constructor'] = \false; + // verify that the class is really meant to be an annotation + if ($metadata['is_annotation']) { + self::$metadataParser->setTarget(Target::TARGET_CLASS); + foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { + if ($annotation instanceof Target) { + $metadata['targets'] = $annotation->targets; + $metadata['targets_literal'] = $annotation->literal; + continue; + } + if ($annotation instanceof NamedArgumentConstructor) { + $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; + if ($metadata['has_named_argument_constructor']) { + // choose the first argument as the default property + $metadata['default_property'] = $constructor->getParameters()[0]->getName(); + } + } + if (!$annotation instanceof Attributes) { + continue; + } + foreach ($annotation->value as $attribute) { + $this->collectAttributeTypeMetadata($metadata, $attribute); + } + } + // if not has a constructor will inject values into public properties + if ($metadata['has_constructor'] === \false) { + // collect all public properties + foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { + $metadata['properties'][$property->name] = $property->name; + $propertyComment = $property->getDocComment(); + if ($propertyComment === \false) { + continue; + } + $attribute = new Attribute(); + $attribute->required = strpos($propertyComment, '@Required') !== \false; + $attribute->name = $property->name; + $attribute->type = strpos($propertyComment, '@var') !== \false && preg_match('/@var\\s+([^\\s]+)/', $propertyComment, $matches) ? $matches[1] : 'mixed'; + $this->collectAttributeTypeMetadata($metadata, $attribute); + // checks if the property has @Enum + if (strpos($propertyComment, '@Enum') === \false) { + continue; + } + $context = 'property ' . $class->name . '::$' . $property->name; + self::$metadataParser->setTarget(Target::TARGET_PROPERTY); + foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { + if (!$annotation instanceof Enum) { + continue; + } + $metadata['enum'][$property->name]['value'] = $annotation->value; + $metadata['enum'][$property->name]['literal'] = !empty($annotation->literal) ? $annotation->literal : $annotation->value; + } + } + // choose the first property as default property + $metadata['default_property'] = reset($metadata['properties']); + } elseif ($metadata['has_named_argument_constructor']) { + foreach ($constructor->getParameters() as $parameter) { + if ($parameter->isVariadic()) { + break; + } + $metadata['constructor_args'][$parameter->getName()] = ['position' => $parameter->getPosition(), 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null]; + } + } + } + self::$annotationMetadata[$name] = $metadata; + } + /** + * Collects parsing metadata for a given attribute. + * + * @param mixed[] $metadata + */ + private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute) : void + { + // handle internal type declaration + $type = self::$typeMap[$attribute->type] ?? $attribute->type; + // handle the case if the property type is mixed + if ($type === 'mixed') { + return; + } + // Evaluate type + $pos = strpos($type, '<'); + if ($pos !== \false) { + // Checks if the property has array + $arrayType = substr($type, $pos + 1, -1); + $type = 'array'; + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; + } else { + // Checks if the property has type[] + $pos = strrpos($type, '['); + if ($pos !== \false) { + $arrayType = substr($type, 0, $pos); + $type = 'array'; + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; + } + } + $metadata['attribute_types'][$attribute->name]['type'] = $type; + $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; + $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; + } + /** + * Annotations ::= Annotation {[ "*" ]* [Annotation]}* + * + * @phpstan-return list + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function Annotations() : array + { + $annotations = []; + while ($this->lexer->lookahead !== null) { + if ($this->lexer->lookahead->type !== DocLexer::T_AT) { + $this->lexer->moveNext(); + continue; + } + // make sure the @ is preceded by non-catchable pattern + if ($this->lexer->token !== null && $this->lexer->lookahead->position === $this->lexer->token->position + strlen($this->lexer->token->value)) { + $this->lexer->moveNext(); + continue; + } + // make sure the @ is followed by either a namespace separator, or + // an identifier token + $peek = $this->lexer->glimpse(); + if ($peek === null || $peek->type !== DocLexer::T_NAMESPACE_SEPARATOR && !in_array($peek->type, self::$classIdentifiers, \true) || $peek->position !== $this->lexer->lookahead->position + 1) { + $this->lexer->moveNext(); + continue; + } + $this->isNestedAnnotation = \false; + $annot = $this->Annotation(); + if ($annot === \false) { + continue; + } + $annotations[] = $annot; + } + return $annotations; + } + /** + * Annotation ::= "@" AnnotationName MethodCall + * AnnotationName ::= QualifiedName | SimpleName + * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName + * NameSpacePart ::= identifier | null | false | true + * SimpleName ::= identifier | null | false | true + * + * @return object|false False if it is not a valid annotation. + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function Annotation() + { + $this->match(DocLexer::T_AT); + // check if we have an annotation + $name = $this->Identifier(); + if ($this->lexer->isNextToken(DocLexer::T_MINUS) && $this->lexer->nextTokenIsAdjacent()) { + // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded + return \false; + } + // only process names which are not fully qualified, yet + // fully qualified names must start with a \ + $originalName = $name; + if ($name[0] !== '\\') { + $pos = strpos($name, '\\'); + $alias = $pos === \false ? $name : substr($name, 0, $pos); + $found = \false; + $loweredAlias = strtolower($alias); + if ($this->namespaces) { + foreach ($this->namespaces as $namespace) { + if ($this->classExists($namespace . '\\' . $name)) { + $name = $namespace . '\\' . $name; + $found = \true; + break; + } + } + } elseif (isset($this->imports[$loweredAlias])) { + $namespace = ltrim($this->imports[$loweredAlias], '\\'); + $name = $pos !== \false ? $namespace . substr($name, $pos) : $namespace; + $found = $this->classExists($name); + } elseif (!isset($this->ignoredAnnotationNames[$name]) && isset($this->imports['__NAMESPACE__']) && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name)) { + $name = $this->imports['__NAMESPACE__'] . '\\' . $name; + $found = \true; + } elseif (!isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { + $found = \true; + } + if (!$found) { + if ($this->isIgnoredAnnotation($name)) { + return \false; + } + throw AnnotationException::semanticalError(sprintf(<<<'EXCEPTION' +The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? +EXCEPTION +, $name, $this->context)); + } + } + $name = ltrim($name, '\\'); + if (!$this->classExists($name)) { + throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context)); + } + // at this point, $name contains the fully qualified class name of the + // annotation, and it is also guaranteed that this class exists, and + // that it is loaded + // collects the metadata annotation only if there is not yet + if (!isset(self::$annotationMetadata[$name])) { + $this->collectAnnotationMetadata($name); + } + // verify that the class is really meant to be an annotation and not just any ordinary class + if (self::$annotationMetadata[$name]['is_annotation'] === \false) { + if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { + return \false; + } + throw AnnotationException::semanticalError(sprintf(<<<'EXCEPTION' +The class "%s" is not annotated with @Annotation. +Are you sure this class can be used as annotation? +If so, then you need to add @Annotation to the _class_ doc comment of "%s". +If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. +EXCEPTION +, $name, $name, $originalName, $this->context)); + } + //if target is nested annotation + $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; + // Next will be nested + $this->isNestedAnnotation = \true; + //if annotation does not support current target + if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { + throw AnnotationException::semanticalError(sprintf(<<<'EXCEPTION' +Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. +EXCEPTION +, $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal'])); + } + $arguments = $this->MethodCall(); + $values = $this->resolvePositionalValues($arguments, $name); + if (isset(self::$annotationMetadata[$name]['enum'])) { + // checks all declared attributes + foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { + // checks if the attribute is a valid enumerator + if (isset($values[$property]) && !in_array($values[$property], $enum['value'])) { + throw AnnotationException::enumeratorError($property, $name, $this->context, $enum['literal'], $values[$property]); + } + } + } + // checks all declared attributes + foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { + if ($property === self::$annotationMetadata[$name]['default_property'] && !isset($values[$property]) && isset($values['value'])) { + $property = 'value'; + } + // handle a not given attribute or null value + if (!isset($values[$property])) { + if ($type['required']) { + throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) ' . $type['value']); + } + continue; + } + if ($type['type'] === 'array') { + // handle the case of a single value + if (!is_array($values[$property])) { + $values[$property] = [$values[$property]]; + } + // checks if the attribute has array type declaration, such as "array" + if (isset($type['array_type'])) { + foreach ($values[$property] as $item) { + if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) { + throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', $item); + } + } + } + } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) { + throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'a(n) ' . $type['value'], $values[$property]); + } + } + if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { + if (PHP_VERSION_ID >= 80000) { + foreach ($values as $property => $value) { + if (!isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { + throw AnnotationException::creationError(sprintf(<<<'EXCEPTION' +The annotation @%s declared on %s does not have a property named "%s" +that can be set through its named arguments constructor. +Available named arguments: %s +EXCEPTION +, $originalName, $this->context, $property, implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])))); + } + } + return $this->instantiateAnnotiation($originalName, $this->context, $name, $values); + } + $positionalValues = []; + foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { + $positionalValues[$parameter['position']] = $parameter['default']; + } + foreach ($values as $property => $value) { + if (!isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { + throw AnnotationException::creationError(sprintf(<<<'EXCEPTION' +The annotation @%s declared on %s does not have a property named "%s" +that can be set through its named arguments constructor. +Available named arguments: %s +EXCEPTION +, $originalName, $this->context, $property, implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])))); + } + $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; + } + return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues); + } + // check if the annotation expects values via the constructor, + // or directly injected into public properties + if (self::$annotationMetadata[$name]['has_constructor'] === \true) { + return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]); + } + $instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []); + foreach ($values as $property => $value) { + if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { + if ($property !== 'value') { + throw AnnotationException::creationError(sprintf(<<<'EXCEPTION' +The annotation @%s declared on %s does not have a property named "%s". +Available properties: %s +EXCEPTION +, $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); + } + // handle the case if the property has no annotations + $property = self::$annotationMetadata[$name]['default_property']; + if (!$property) { + throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); + } + } + $instance->{$property} = $value; + } + return $instance; + } + /** + * MethodCall ::= ["(" [Values] ")"] + * + * @psalm-return Arguments + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function MethodCall() : array + { + $values = []; + if (!$this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { + return $values; + } + $this->match(DocLexer::T_OPEN_PARENTHESIS); + if (!$this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { + $values = $this->Values(); + } + $this->match(DocLexer::T_CLOSE_PARENTHESIS); + return $values; + } + /** + * Values ::= Array | Value {"," Value}* [","] + * + * @psalm-return Arguments + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function Values() : array + { + $values = [$this->Value()]; + while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { + $this->match(DocLexer::T_COMMA); + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { + break; + } + $token = $this->lexer->lookahead; + $value = $this->Value(); + $values[] = $value; + } + $namedArguments = []; + $positionalArguments = []; + foreach ($values as $k => $value) { + if (is_object($value) && $value instanceof stdClass) { + $namedArguments[$value->name] = $value->value; + } else { + $positionalArguments[$k] = $value; + } + } + return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; + } + /** + * Constant ::= integer | string | float | boolean + * + * @return mixed + * + * @throws AnnotationException + */ + private function Constant() + { + $identifier = $this->Identifier(); + if (!defined($identifier) && strpos($identifier, '::') !== \false && $identifier[0] !== '\\') { + [$className, $const] = explode('::', $identifier); + $pos = strpos($className, '\\'); + $alias = $pos === \false ? $className : substr($className, 0, $pos); + $found = \false; + $loweredAlias = strtolower($alias); + switch (\true) { + case !empty($this->namespaces): + foreach ($this->namespaces as $ns) { + if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { + $className = $ns . '\\' . $className; + $found = \true; + break; + } + } + break; + case isset($this->imports[$loweredAlias]): + $found = \true; + $className = $pos !== \false ? $this->imports[$loweredAlias] . substr($className, $pos) : $this->imports[$loweredAlias]; + break; + default: + if (isset($this->imports['__NAMESPACE__'])) { + $ns = $this->imports['__NAMESPACE__']; + if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { + $className = $ns . '\\' . $className; + $found = \true; + } + } + break; + } + if ($found) { + $identifier = $className . '::' . $const; + } + } + /** + * Checks if identifier ends with ::class and remove the leading backslash if it exists. + */ + if ($this->identifierEndsWithClassConstant($identifier) && !$this->identifierStartsWithBackslash($identifier)) { + return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); + } + if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { + return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); + } + if (!defined($identifier)) { + throw AnnotationException::semanticalErrorConstants($identifier, $this->context); + } + return constant($identifier); + } + private function identifierStartsWithBackslash(string $identifier) : bool + { + return $identifier[0] === '\\'; + } + private function identifierEndsWithClassConstant(string $identifier) : bool + { + return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); + } + /** @return int|false */ + private function getClassConstantPositionInIdentifier(string $identifier) + { + return stripos($identifier, '::class'); + } + /** + * Identifier ::= string + * + * @throws AnnotationException + */ + private function Identifier() : string + { + // check if we have an annotation + if (!$this->lexer->isNextTokenAny(self::$classIdentifiers)) { + throw $this->syntaxError('namespace separator or identifier'); + } + $this->lexer->moveNext(); + $className = $this->lexer->token->value; + while ($this->lexer->lookahead !== null && $this->lexer->lookahead->position === $this->lexer->token->position + strlen($this->lexer->token->value) && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) { + $this->match(DocLexer::T_NAMESPACE_SEPARATOR); + $this->matchAny(self::$classIdentifiers); + $className .= '\\' . $this->lexer->token->value; + } + return $className; + } + /** + * Value ::= PlainValue | FieldAssignment + * + * @return mixed + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function Value() + { + $peek = $this->lexer->glimpse(); + if ($peek->type === DocLexer::T_EQUALS) { + return $this->FieldAssignment(); + } + return $this->PlainValue(); + } + /** + * PlainValue ::= integer | string | float | boolean | Array | Annotation + * + * @return mixed + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function PlainValue() + { + if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { + return $this->Arrayx(); + } + if ($this->lexer->isNextToken(DocLexer::T_AT)) { + return $this->Annotation(); + } + if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { + return $this->Constant(); + } + switch ($this->lexer->lookahead->type) { + case DocLexer::T_STRING: + $this->match(DocLexer::T_STRING); + return $this->lexer->token->value; + case DocLexer::T_INTEGER: + $this->match(DocLexer::T_INTEGER); + return (int) $this->lexer->token->value; + case DocLexer::T_FLOAT: + $this->match(DocLexer::T_FLOAT); + return (float) $this->lexer->token->value; + case DocLexer::T_TRUE: + $this->match(DocLexer::T_TRUE); + return \true; + case DocLexer::T_FALSE: + $this->match(DocLexer::T_FALSE); + return \false; + case DocLexer::T_NULL: + $this->match(DocLexer::T_NULL); + return null; + default: + throw $this->syntaxError('PlainValue'); + } + } + /** + * FieldAssignment ::= FieldName "=" PlainValue + * FieldName ::= identifier + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function FieldAssignment() : stdClass + { + $this->match(DocLexer::T_IDENTIFIER); + $fieldName = $this->lexer->token->value; + $this->match(DocLexer::T_EQUALS); + $item = new stdClass(); + $item->name = $fieldName; + $item->value = $this->PlainValue(); + return $item; + } + /** + * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" + * + * @return mixed[] + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function Arrayx() : array + { + $array = $values = []; + $this->match(DocLexer::T_OPEN_CURLY_BRACES); + // If the array is empty, stop parsing and return. + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { + $this->match(DocLexer::T_CLOSE_CURLY_BRACES); + return $array; + } + $values[] = $this->ArrayEntry(); + while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { + $this->match(DocLexer::T_COMMA); + // optional trailing comma + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { + break; + } + $values[] = $this->ArrayEntry(); + } + $this->match(DocLexer::T_CLOSE_CURLY_BRACES); + foreach ($values as $value) { + [$key, $val] = $value; + if ($key !== null) { + $array[$key] = $val; + } else { + $array[] = $val; + } + } + return $array; + } + /** + * ArrayEntry ::= Value | KeyValuePair + * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant + * Key ::= string | integer | Constant + * + * @phpstan-return array{mixed, mixed} + * + * @throws AnnotationException + * @throws ReflectionException + */ + private function ArrayEntry() : array + { + $peek = $this->lexer->glimpse(); + if ($peek->type === DocLexer::T_EQUALS || $peek->type === DocLexer::T_COLON) { + if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { + $key = $this->Constant(); + } else { + $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]); + $key = $this->lexer->token->value; + } + $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]); + return [$key, $this->PlainValue()]; + } + return [null, $this->Value()]; + } + /** + * Checks whether the given $name matches any ignored annotation name or namespace + */ + private function isIgnoredAnnotation(string $name) : bool + { + if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { + return \true; + } + foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { + $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; + if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { + return \true; + } + } + return \false; + } + /** + * Resolve positional arguments (without name) to named ones + * + * @psalm-param Arguments $arguments + * + * @return array + */ + private function resolvePositionalValues(array $arguments, string $name) : array + { + $positionalArguments = $arguments['positional_arguments'] ?? []; + $values = $arguments['named_arguments'] ?? []; + if (self::$annotationMetadata[$name]['has_named_argument_constructor'] && self::$annotationMetadata[$name]['default_property'] !== null) { + // We must ensure that we don't have positional arguments after named ones + $positions = array_keys($positionalArguments); + $lastPosition = null; + foreach ($positions as $position) { + if ($lastPosition === null && $position !== 0 || $lastPosition !== null && $position !== $lastPosition + 1) { + throw $this->syntaxError('Positional arguments after named arguments is not allowed'); + } + $lastPosition = $position; + } + foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { + $position = $parameter['position']; + if (isset($values[$property]) || !isset($positionalArguments[$position])) { + continue; + } + $values[$property] = $positionalArguments[$position]; + } + } else { + if (count($positionalArguments) > 0 && !isset($values['value'])) { + if (count($positionalArguments) === 1) { + $value = array_pop($positionalArguments); + } else { + $value = array_values($positionalArguments); + } + $values['value'] = $value; + } + } + return $values; + } + /** + * Try to instantiate the annotation and catch and process any exceptions related to failure + * + * @param class-string $name + * @param array $arguments + * + * @return object + * + * @throws AnnotationException + */ + private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments) + { + try { + return new $name(...$arguments); + } catch (Throwable $exception) { + throw AnnotationException::creationError(sprintf('An error occurred while instantiating the annotation @%s declared on %s: "%s".', $originalName, $context, $exception->getMessage()), $exception); + } + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php new file mode 100644 index 0000000..c34e015 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php @@ -0,0 +1,82 @@ + \true, + 'Attribute' => \true, + 'Attributes' => \true, + /* Can we enable this? 'Enum' => true, */ + 'Required' => \true, + 'Target' => \true, + 'NamedArgumentConstructor' => \true, + ]; + private const WidelyUsedNonStandard = ['fix' => \true, 'fixme' => \true, 'override' => \true]; + private const PhpDocumentor1 = ['abstract' => \true, 'access' => \true, 'code' => \true, 'deprec' => \true, 'endcode' => \true, 'exception' => \true, 'final' => \true, 'ingroup' => \true, 'inheritdoc' => \true, 'inheritDoc' => \true, 'magic' => \true, 'name' => \true, 'private' => \true, 'static' => \true, 'staticvar' => \true, 'staticVar' => \true, 'toc' => \true, 'tutorial' => \true, 'throw' => \true]; + private const PhpDocumentor2 = [ + 'api' => \true, + 'author' => \true, + 'category' => \true, + 'copyright' => \true, + 'deprecated' => \true, + 'example' => \true, + 'filesource' => \true, + 'global' => \true, + 'ignore' => \true, + /* Can we enable this? 'index' => true, */ + 'internal' => \true, + 'license' => \true, + 'link' => \true, + 'method' => \true, + 'package' => \true, + 'param' => \true, + 'property' => \true, + 'property-read' => \true, + 'property-write' => \true, + 'return' => \true, + 'see' => \true, + 'since' => \true, + 'source' => \true, + 'subpackage' => \true, + 'throws' => \true, + 'todo' => \true, + 'TODO' => \true, + 'usedby' => \true, + 'uses' => \true, + 'var' => \true, + 'version' => \true, + ]; + private const PHPUnit = ['author' => \true, 'after' => \true, 'afterClass' => \true, 'backupGlobals' => \true, 'backupStaticAttributes' => \true, 'before' => \true, 'beforeClass' => \true, 'codeCoverageIgnore' => \true, 'codeCoverageIgnoreStart' => \true, 'codeCoverageIgnoreEnd' => \true, 'covers' => \true, 'coversDefaultClass' => \true, 'coversNothing' => \true, 'dataProvider' => \true, 'depends' => \true, 'doesNotPerformAssertions' => \true, 'expectedException' => \true, 'expectedExceptionCode' => \true, 'expectedExceptionMessage' => \true, 'expectedExceptionMessageRegExp' => \true, 'group' => \true, 'large' => \true, 'medium' => \true, 'preserveGlobalState' => \true, 'requires' => \true, 'runTestsInSeparateProcesses' => \true, 'runInSeparateProcess' => \true, 'small' => \true, 'test' => \true, 'testdox' => \true, 'testWith' => \true, 'ticket' => \true, 'uses' => \true]; + private const PhpCheckStyle = ['SuppressWarnings' => \true]; + private const PhpStorm = ['noinspection' => \true]; + private const PEAR = ['package_version' => \true]; + private const PlainUML = ['startuml' => \true, 'enduml' => \true]; + private const Symfony = ['experimental' => \true]; + private const PhpCodeSniffer = ['codingStandardsIgnoreStart' => \true, 'codingStandardsIgnoreEnd' => \true]; + private const SlevomatCodingStandard = ['phpcsSuppress' => \true]; + private const Phan = ['suppress' => \true]; + private const Rector = ['noRector' => \true]; + private const StaticAnalysis = [ + // PHPStan, Psalm + 'extends' => \true, + 'implements' => \true, + 'readonly' => \true, + 'template' => \true, + 'use' => \true, + // Psalm + 'pure' => \true, + 'immutable' => \true, + ]; + public const LIST = self::Reserved + self::WidelyUsedNonStandard + self::PhpDocumentor1 + self::PhpDocumentor2 + self::PHPUnit + self::PhpCheckStyle + self::PhpStorm + self::PEAR + self::PlainUML + self::Symfony + self::SlevomatCodingStandard + self::PhpCodeSniffer + self::Phan + self::Rector + self::StaticAnalysis; + private function __construct() + { + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php new file mode 100644 index 0000000..ab1183a --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php @@ -0,0 +1,86 @@ +delegate = $reader; + } + /** + * {@inheritDoc} + */ + public function getClassAnnotations(ReflectionClass $class) + { + $annotations = []; + foreach ($this->delegate->getClassAnnotations($class) as $annot) { + $annotations[get_class($annot)] = $annot; + } + return $annotations; + } + /** + * {@inheritDoc} + */ + public function getClassAnnotation(ReflectionClass $class, $annotationName) + { + return $this->delegate->getClassAnnotation($class, $annotationName); + } + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(ReflectionMethod $method) + { + $annotations = []; + foreach ($this->delegate->getMethodAnnotations($method) as $annot) { + $annotations[get_class($annot)] = $annot; + } + return $annotations; + } + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) + { + return $this->delegate->getMethodAnnotation($method, $annotationName); + } + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(ReflectionProperty $property) + { + $annotations = []; + foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { + $annotations[get_class($annot)] = $annot; + } + return $annotations; + } + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) + { + return $this->delegate->getPropertyAnnotation($property, $annotationName); + } + /** + * Proxies all methods to the delegate. + * + * @param mixed[] $args + * + * @return mixed + */ + public function __call(string $method, array $args) + { + return call_user_func_array([$this->delegate, $method], $args); + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php new file mode 100644 index 0000000..1e80ac2 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php @@ -0,0 +1,66 @@ + a list with use statements in the form (Alias => FQN). + */ + public function parseUseStatements($reflection) : array + { + if (method_exists($reflection, 'getUseStatements')) { + return $reflection->getUseStatements(); + } + $filename = $reflection->getFileName(); + if ($filename === \false) { + return []; + } + $content = $this->getFileContent($filename, $reflection->getStartLine()); + if ($content === null) { + return []; + } + $namespace = preg_quote($reflection->getNamespaceName()); + $content = preg_replace('/^.*?(\\bnamespace\\s+' . $namespace . '\\s*[;{].*)$/s', '\\1', $content); + $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); + } + /** + * Gets the content of the file right up to the given line number. + * + * @param string $filename The name of the file to load. + * @param int $lineNumber The number of lines to read from file. + * + * @return string|null The content of the file or null if the file does not exist. + */ + private function getFileContent(string $filename, $lineNumber) + { + if (!is_file($filename)) { + return null; + } + $content = ''; + $lineCnt = 0; + $file = new SplFileObject($filename); + while (!$file->eof()) { + if ($lineCnt++ === $lineNumber) { + break; + } + $content .= $file->fgets(); + } + return $content; + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php new file mode 100644 index 0000000..cbc6fe3 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php @@ -0,0 +1,177 @@ +> */ + private $loadedAnnotations = []; + /** @var int[] */ + private $loadedFilemtimes = []; + public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = \false) + { + $this->delegate = $reader; + $this->cache = $cache; + $this->debug = (bool) $debug; + } + /** + * {@inheritDoc} + */ + public function getClassAnnotations(ReflectionClass $class) + { + $cacheKey = $class->getName(); + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class); + return $this->loadedAnnotations[$cacheKey] = $annots; + } + /** + * {@inheritDoc} + */ + public function getClassAnnotation(ReflectionClass $class, $annotationName) + { + foreach ($this->getClassAnnotations($class) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + return null; + } + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $cacheKey = $class->getName() . '$' . $property->getName(); + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property); + return $this->loadedAnnotations[$cacheKey] = $annots; + } + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) + { + foreach ($this->getPropertyAnnotations($property) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + return null; + } + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $cacheKey = $class->getName() . '#' . $method->getName(); + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method); + return $this->loadedAnnotations[$cacheKey] = $annots; + } + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) + { + foreach ($this->getMethodAnnotations($method) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + return null; + } + public function clearLoadedAnnotations() : void + { + $this->loadedAnnotations = []; + $this->loadedFilemtimes = []; + } + /** @return mixed[] */ + private function fetchFromCache(string $cacheKey, ReflectionClass $class, string $method, Reflector $reflector) : array + { + $cacheKey = rawurlencode($cacheKey); + $item = $this->cache->getItem($cacheKey); + if ($this->debug && !$this->refresh($cacheKey, $class) || !$item->isHit()) { + $this->cache->save($item->set($this->delegate->{$method}($reflector))); + } + return $item->get(); + } + /** + * Used in debug mode to check if the cache is fresh. + * + * @return bool Returns true if the cache was fresh, or false if the class + * being read was modified since writing to the cache. + */ + private function refresh(string $cacheKey, ReflectionClass $class) : bool + { + $lastModification = $this->getLastModification($class); + if ($lastModification === 0) { + return \true; + } + $item = $this->cache->getItem('[C]' . $cacheKey); + if ($item->isHit() && $item->get() >= $lastModification) { + return \true; + } + $this->cache->save($item->set(time())); + return \false; + } + /** + * Returns the time the class was last modified, testing traits and parents + */ + private function getLastModification(ReflectionClass $class) : int + { + $filename = $class->getFileName(); + if (isset($this->loadedFilemtimes[$filename])) { + return $this->loadedFilemtimes[$filename]; + } + $parent = $class->getParentClass(); + $lastModification = max(array_merge([$filename !== \false && is_file($filename) ? filemtime($filename) : 0], array_map(function (ReflectionClass $reflectionTrait) : int { + return $this->getTraitLastModificationTime($reflectionTrait); + }, $class->getTraits()), array_map(function (ReflectionClass $class) : int { + return $this->getLastModification($class); + }, $class->getInterfaces()), $parent ? [$this->getLastModification($parent)] : [])); + assert($lastModification !== \false); + return $this->loadedFilemtimes[$filename] = $lastModification; + } + private function getTraitLastModificationTime(ReflectionClass $reflectionTrait) : int + { + $fileName = $reflectionTrait->getFileName(); + if (isset($this->loadedFilemtimes[$fileName])) { + return $this->loadedFilemtimes[$fileName]; + } + $lastModificationTime = max(array_merge([$fileName !== \false && is_file($fileName) ? filemtime($fileName) : 0], array_map(function (ReflectionClass $reflectionTrait) : int { + return $this->getTraitLastModificationTime($reflectionTrait); + }, $reflectionTrait->getTraits()))); + assert($lastModificationTime !== \false); + return $this->loadedFilemtimes[$fileName] = $lastModificationTime; + } +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php new file mode 100644 index 0000000..f7475d5 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php @@ -0,0 +1,74 @@ + An array of Annotations. + */ + public function getClassAnnotations(ReflectionClass $class); + /** + * Gets a class annotation. + * + * @param ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. + * @param class-string $annotationName The name of the annotation. + * + * @return T|null The Annotation or NULL, if the requested annotation does not exist. + * + * @template T + */ + public function getClassAnnotation(ReflectionClass $class, $annotationName); + /** + * Gets the annotations applied to a method. + * + * @param ReflectionMethod $method The ReflectionMethod of the method from which + * the annotations should be read. + * + * @return array An array of Annotations. + */ + public function getMethodAnnotations(ReflectionMethod $method); + /** + * Gets a method annotation. + * + * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. + * @param class-string $annotationName The name of the annotation. + * + * @return T|null The Annotation or NULL, if the requested annotation does not exist. + * + * @template T + */ + public function getMethodAnnotation(ReflectionMethod $method, $annotationName); + /** + * Gets the annotations applied to a property. + * + * @param ReflectionProperty $property The ReflectionProperty of the property + * from which the annotations should be read. + * + * @return array An array of Annotations. + */ + public function getPropertyAnnotations(ReflectionProperty $property); + /** + * Gets a property annotation. + * + * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. + * @param class-string $annotationName The name of the annotation. + * + * @return T|null The Annotation or NULL, if the requested annotation does not exist. + * + * @template T + */ + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); +} diff --git a/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php new file mode 100644 index 0000000..271fb64 --- /dev/null +++ b/vendor/prefixed/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php @@ -0,0 +1,173 @@ + + */ + private $tokens; + /** + * The number of tokens. + * + * @var int + */ + private $numTokens; + /** + * The current array pointer. + * + * @var int + */ + private $pointer = 0; + public function __construct(string $contents) + { + $this->tokens = token_get_all($contents); + // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it + // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored + // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a + // docblock. If the first thing in the file is a class without a doc block this would cause calls to + // getDocBlock() on said class to return our long lost doc_comment. Argh. + // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least + // it's harmless to us. + token_get_all("numTokens = count($this->tokens); + } + /** + * Gets the next non whitespace and non comment token. + * + * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. + * If FALSE then only whitespace and normal comments are skipped. + * + * @return mixed[]|string|null The token if exists, null otherwise. + */ + public function next(bool $docCommentIsComment = \true) + { + for ($i = $this->pointer; $i < $this->numTokens; $i++) { + $this->pointer++; + if ($this->tokens[$i][0] === T_WHITESPACE || $this->tokens[$i][0] === T_COMMENT || $docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) { + continue; + } + return $this->tokens[$i]; + } + return null; + } + /** + * Parses a single use statement. + * + * @return array A list with all found class names for a use statement. + */ + public function parseUseStatement() + { + $groupRoot = ''; + $class = ''; + $alias = ''; + $statements = []; + $explicitAlias = \false; + while ($token = $this->next()) { + if (!$explicitAlias && $token[0] === T_STRING) { + $class .= $token[1]; + $alias = $token[1]; + } elseif ($explicitAlias && $token[0] === T_STRING) { + $alias = $token[1]; + } elseif (PHP_VERSION_ID >= 80000 && ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED)) { + $class .= $token[1]; + $classSplit = explode('\\', $token[1]); + $alias = $classSplit[count($classSplit) - 1]; + } elseif ($token[0] === T_NS_SEPARATOR) { + $class .= '\\'; + $alias = ''; + } elseif ($token[0] === T_AS) { + $explicitAlias = \true; + $alias = ''; + } elseif ($token === ',') { + $statements[strtolower($alias)] = $groupRoot . $class; + $class = ''; + $alias = ''; + $explicitAlias = \false; + } elseif ($token === ';') { + $statements[strtolower($alias)] = $groupRoot . $class; + break; + } elseif ($token === '{') { + $groupRoot = $class; + $class = ''; + } elseif ($token === '}') { + continue; + } else { + break; + } + } + return $statements; + } + /** + * Gets all use statements. + * + * @param string $namespaceName The namespace name of the reflected class. + * + * @return array A list with all found use statements. + */ + public function parseUseStatements(string $namespaceName) + { + $statements = []; + while ($token = $this->next()) { + if ($token[0] === T_USE) { + $statements = array_merge($statements, $this->parseUseStatement()); + continue; + } + if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { + continue; + } + // Get fresh array for new namespace. This is to prevent the parser to collect the use statements + // for a previous namespace with the same name. This is the case if a namespace is defined twice + // or if a namespace with the same name is commented out. + $statements = []; + } + return $statements; + } + /** + * Gets the namespace. + * + * @return string The found namespace. + */ + public function parseNamespace() + { + $name = ''; + while (($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || PHP_VERSION_ID >= 80000 && ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED))) { + $name .= $token[1]; + } + return $name; + } + /** + * Gets the class name. + * + * @return string The found class name. + */ + public function parseClass() + { + // Namespaces and class names are tokenized the same: T_STRINGs + // separated by T_NS_SEPARATOR so we can use one function to provide + // both. + return $this->parseNamespace(); + } +} diff --git a/vendor/prefixed/doctrine/lexer/LICENSE b/vendor/prefixed/doctrine/lexer/LICENSE new file mode 100644 index 0000000..e8fdec4 --- /dev/null +++ b/vendor/prefixed/doctrine/lexer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2018 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/prefixed/doctrine/lexer/src/AbstractLexer.php b/vendor/prefixed/doctrine/lexer/src/AbstractLexer.php new file mode 100644 index 0000000..decf51a --- /dev/null +++ b/vendor/prefixed/doctrine/lexer/src/AbstractLexer.php @@ -0,0 +1,282 @@ +> + */ + private $tokens = []; + /** + * Current lexer position in input string. + * @var int + */ + private $position = 0; + /** + * Current peek of current lexer position. + * @var int + */ + private $peek = 0; + /** + * The next token in the input. + * + * @var Token|null + */ + public $lookahead; + /** + * The last matched/seen token. + * + * @var Token|null + */ + public $token; + /** + * Composed regex for input parsing. + * + * @var non-empty-string|null + */ + private $regex = null; + /** + * Sets the input data to be tokenized. + * + * The Lexer is immediately reset and the new input tokenized. + * Any unprocessed tokens from any previous input are lost. + * + * @param string $input The input to be tokenized. + * + * @return void + */ + public function setInput(string $input) + { + $this->input = $input; + $this->tokens = []; + $this->reset(); + $this->scan($input); + } + /** + * Resets the lexer. + * + * @return void + */ + public function reset() + { + $this->lookahead = null; + $this->token = null; + $this->peek = 0; + $this->position = 0; + } + /** + * Resets the peek pointer to 0. + * + * @return void + */ + public function resetPeek() + { + $this->peek = 0; + } + /** + * Resets the lexer position on the input to the given position. + * + * @param int $position Position to place the lexical scanner. + * + * @return void + */ + public function resetPosition(int $position = 0) + { + $this->position = $position; + } + /** + * Retrieve the original lexer's input until a given position. + * + * @return string + */ + public function getInputUntilPosition(int $position) + { + return substr($this->input, 0, $position); + } + /** + * Checks whether a given token matches the current lookahead. + * + * @param int|string|\UnitEnum $type + * + * @return bool + * + * @psalm-assert-if-true !=null $this->lookahead + */ + public function isNextToken($type) + { + return $this->lookahead !== null && $this->lookahead->isA($type); + } + /** + * Checks whether any of the given tokens matches the current lookahead. + * + * @param list $types + * + * @return bool + * + * @psalm-assert-if-true !=null $this->lookahead + */ + public function isNextTokenAny(array $types) + { + return $this->lookahead !== null && $this->lookahead->isA(...$types); + } + /** + * Moves to the next token in the input string. + * + * @return bool + * + * @psalm-assert-if-true !null $this->lookahead + */ + public function moveNext() + { + $this->peek = 0; + $this->token = $this->lookahead; + $this->lookahead = isset($this->tokens[$this->position]) ? $this->tokens[$this->position++] : null; + return $this->lookahead !== null; + } + /** + * Tells the lexer to skip input tokens until it sees a token with the given value. + * + * @param int|string|\UnitEnum $type The token type to skip until. + * + * @return void + */ + public function skipUntil($type) + { + while ($this->lookahead !== null && !$this->lookahead->isA($type)) { + $this->moveNext(); + } + } + /** + * Checks if given value is identical to the given token. + * + * @return bool + * @param int|string|\UnitEnum $token + */ + public function isA(string $value, $token) + { + return $this->getType($value) === $token; + } + /** + * Moves the lookahead token forward. + * + * @return Token|null The next token or NULL if there are no more tokens ahead. + */ + public function peek() + { + if (isset($this->tokens[$this->position + $this->peek])) { + return $this->tokens[$this->position + $this->peek++]; + } + return null; + } + /** + * Peeks at the next token, returns it and immediately resets the peek. + * + * @return Token|null The next token or NULL if there are no more tokens ahead. + */ + public function glimpse() + { + $peek = $this->peek(); + $this->peek = 0; + return $peek; + } + /** + * Scans the input string for tokens. + * + * @param string $input A query string. + * + * @return void + */ + protected function scan(string $input) + { + if (!isset($this->regex)) { + $this->regex = sprintf('/(%s)|%s/%s', implode(')|(', $this->getCatchablePatterns()), implode('|', $this->getNonCatchablePatterns()), $this->getModifiers()); + } + $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; + $matches = preg_split($this->regex, $input, -1, $flags); + if ($matches === \false) { + // Work around https://bugs.php.net/78122 + $matches = [[$input, 0]]; + } + foreach ($matches as $match) { + // Must remain before 'value' assignment since it can change content + $firstMatch = $match[0]; + $type = $this->getType($firstMatch); + $this->tokens[] = new Token($firstMatch, $type, $match[1]); + } + } + /** + * Gets the literal for a given token. + * + * @param int|string|\UnitEnum $token + * + * @return int|string + */ + public function getLiteral($token) + { + if ($token instanceof UnitEnum) { + return get_class($token) . '::' . $token->name; + } + $className = static::class; + $reflClass = new ReflectionClass($className); + $constants = $reflClass->getConstants(); + foreach ($constants as $name => $value) { + if ($value === $token) { + return $className . '::' . $name; + } + } + return $token; + } + /** + * Regex modifiers + * + * @return string + */ + protected function getModifiers() + { + return 'iu'; + } + /** + * Lexical catchable patterns. + * + * @return string[] + */ + protected abstract function getCatchablePatterns(); + /** + * Lexical non-catchable patterns. + * + * @return string[] + */ + protected abstract function getNonCatchablePatterns(); + /** + * Retrieve token type. Also processes the token value if necessary. + * + * @return T|null + * + * @param-out V $value + */ + protected abstract function getType(string &$value); +} diff --git a/vendor/prefixed/doctrine/lexer/src/Token.php b/vendor/prefixed/doctrine/lexer/src/Token.php new file mode 100644 index 0000000..d0f5048 --- /dev/null +++ b/vendor/prefixed/doctrine/lexer/src/Token.php @@ -0,0 +1,50 @@ +value = $value; + $this->type = $type; + $this->position = $position; + } + /** @param T ...$types */ + public function isA(...$types) : bool + { + return in_array($this->type, $types, \true); + } +} diff --git a/vendor/prefixed/psr/cache/LICENSE.txt b/vendor/prefixed/psr/cache/LICENSE.txt new file mode 100644 index 0000000..b1c2c97 --- /dev/null +++ b/vendor/prefixed/psr/cache/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015 PHP Framework Interoperability Group + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/prefixed/psr/cache/src/CacheException.php b/vendor/prefixed/psr/cache/src/CacheException.php new file mode 100644 index 0000000..c68daf5 --- /dev/null +++ b/vendor/prefixed/psr/cache/src/CacheException.php @@ -0,0 +1,10 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\AnnotationException' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\AnnotationReader' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\AnnotationRegistry' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Attribute' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Attributes' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Enum' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Required' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Target' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\DocLexer' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\DocParser' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\IndexedReader' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\PhpParser' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\PsrCachedReader' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Reader' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\TokenParser' => $baseDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Lexer\\AbstractLexer' => $baseDir . '/doctrine/lexer/src/AbstractLexer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Lexer\\Token' => $baseDir . '/doctrine/lexer/src/Token.php', 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnalyserInterface' => $baseDir . '/zircote/swagger-php/src/Analysers/AnalyserInterface.php', 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnnotationFactoryInterface' => $baseDir . '/zircote/swagger-php/src/Analysers/AnnotationFactoryInterface.php', 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AttributeAnnotationFactory' => $baseDir . '/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php', @@ -406,6 +427,10 @@ 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinterAbstract' => $baseDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinter\\Standard' => $baseDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Token' => $baseDir . '/nikic/php-parser/lib/PhpParser/Token.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\CacheException' => $baseDir . '/psr/cache/src/CacheException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\CacheItemInterface' => $baseDir . '/psr/cache/src/CacheItemInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\CacheItemPoolInterface' => $baseDir . '/psr/cache/src/CacheItemPoolInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\InvalidArgumentException' => $baseDir . '/psr/cache/src/InvalidArgumentException.php', 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\Comparator' => $baseDir . '/symfony/finder/Comparator/Comparator.php', 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\DateComparator' => $baseDir . '/symfony/finder/Comparator/DateComparator.php', 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $baseDir . '/symfony/finder/Comparator/NumberComparator.php', diff --git a/vendor/prefixed/vendor/composer/autoload_real.php b/vendor/prefixed/vendor/composer/autoload_real.php index ea8b5dc..4c01990 100644 --- a/vendor/prefixed/vendor/composer/autoload_real.php +++ b/vendor/prefixed/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit132d040fab428c85c099cbf235197aea +class ComposerAutoloaderInit46e93b8f7623c9124c551d4ca8162993 { private static $loader; @@ -22,16 +22,16 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit132d040fab428c85c099cbf235197aea', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit46e93b8f7623c9124c551d4ca8162993', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit132d040fab428c85c099cbf235197aea', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit46e93b8f7623c9124c551d4ca8162993', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit132d040fab428c85c099cbf235197aea::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit46e93b8f7623c9124c551d4ca8162993::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit132d040fab428c85c099cbf235197aea::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit46e93b8f7623c9124c551d4ca8162993::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/prefixed/vendor/composer/autoload_static.php b/vendor/prefixed/vendor/composer/autoload_static.php index e19fe3c..947494a 100644 --- a/vendor/prefixed/vendor/composer/autoload_static.php +++ b/vendor/prefixed/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit132d040fab428c85c099cbf235197aea +class ComposerStaticInit46e93b8f7623c9124c551d4ca8162993 { public static $files = array ( '66cfd3a7190309803b5cc0fea03a4cdc' => __DIR__ . '/../..' . '/symfony/deprecation-contracts/function.php', @@ -13,6 +13,27 @@ class ComposerStaticInit132d040fab428c85c099cbf235197aea public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\AnnotationException' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\AnnotationReader' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\AnnotationRegistry' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Attribute' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Attributes' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Enum' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Required' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Annotation\\Target' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\DocLexer' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\DocParser' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\IndexedReader' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\PhpParser' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\PsrCachedReader' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\Reader' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\TokenParser' => __DIR__ . '/../..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/../..' . '/doctrine/lexer/src/AbstractLexer.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Lexer\\Token' => __DIR__ . '/../..' . '/doctrine/lexer/src/Token.php', 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnalyserInterface' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/AnalyserInterface.php', 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AnnotationFactoryInterface' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/AnnotationFactoryInterface.php', 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Analysers\\AttributeAnnotationFactory' => __DIR__ . '/../..' . '/zircote/swagger-php/src/Analysers/AttributeAnnotationFactory.php', @@ -412,6 +433,10 @@ class ComposerStaticInit132d040fab428c85c099cbf235197aea 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', 'Matomo\\Dependencies\\OpenApiDocs\\PhpParser\\Token' => __DIR__ . '/../..' . '/nikic/php-parser/lib/PhpParser/Token.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\CacheException' => __DIR__ . '/../..' . '/psr/cache/src/CacheException.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\CacheItemInterface' => __DIR__ . '/../..' . '/psr/cache/src/CacheItemInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/../..' . '/psr/cache/src/CacheItemPoolInterface.php', + 'Matomo\\Dependencies\\OpenApiDocs\\Psr\\Cache\\InvalidArgumentException' => __DIR__ . '/../..' . '/psr/cache/src/InvalidArgumentException.php', 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/../..' . '/symfony/finder/Comparator/Comparator.php', 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/../..' . '/symfony/finder/Comparator/DateComparator.php', 'Matomo\\Dependencies\\OpenApiDocs\\Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/../..' . '/symfony/finder/Comparator/NumberComparator.php', @@ -453,7 +478,7 @@ class ComposerStaticInit132d040fab428c85c099cbf235197aea public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInit132d040fab428c85c099cbf235197aea::$classMap; + $loader->classMap = ComposerStaticInit46e93b8f7623c9124c551d4ca8162993::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php b/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php index dc8e728..3e910ae 100644 --- a/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php +++ b/vendor/prefixed/zircote/swagger-php/src/Analysers/DocBlockParser.php @@ -6,7 +6,7 @@ */ namespace Matomo\Dependencies\OpenApiDocs\OpenApi\Analysers; -use Doctrine\Common\Annotations\DocParser; +use Matomo\Dependencies\OpenApiDocs\Doctrine\Common\Annotations\DocParser; use Matomo\Dependencies\OpenApiDocs\OpenApi\Annotations as OA; use Matomo\Dependencies\OpenApiDocs\OpenApi\Context; use Matomo\Dependencies\OpenApiDocs\OpenApi\Generator; @@ -16,7 +16,7 @@ class DocBlockParser { /** - * @var \Doctrine\Common\Annotations\DocParser + * @var \Matomo\Dependencies\OpenApiDocs\Doctrine\Common\Annotations\DocParser */ protected $docParser; /** @@ -36,7 +36,7 @@ public function __construct(array $aliases = []) */ public static function isEnabled() : bool { - return class_exists('Doctrine\\Common\\Annotations\\DocParser'); + return class_exists('Matomo\\Dependencies\\OpenApiDocs\\Doctrine\\Common\\Annotations\\DocParser'); } /** * @param array $aliases diff --git a/vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php b/vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php index ac3fabc..8780cdf 100644 --- a/vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php +++ b/vendor/prefixed/zircote/swagger-php/src/Annotations/AbstractAnnotation.php @@ -601,7 +601,7 @@ public function getRoot() : string { $class = get_class($this); do { - if (0 === strpos($class, 'OpenApi\\Annotations\\')) { + if (0 === strpos($class, 'Matomo\\Dependencies\\OpenApiDocs\\OpenApi\\Annotations\\')) { break; } } while ($class = get_parent_class($class)); From efa688a5e9845ae78eeda430879bc0920ae7adf9 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Thu, 2 Oct 2025 09:23:14 +1300 Subject: [PATCH 4/4] Fixed copy/pasted comment --- scoper.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scoper.inc.php b/scoper.inc.php index d3a006c..4ca21a1 100644 --- a/scoper.inc.php +++ b/scoper.inc.php @@ -63,7 +63,7 @@ static function (string $filePath, string $prefix, string $content) use ($isRena return $content; } - // Fix the string reference of a scoped dependency in the Math lib + // Fix the string reference of a scoped dependency in the AbstractAnnotation class $escapedPrefix = str_replace('\\', '\\\\', $prefix); if ($filePath === __DIR__ . '/vendor/zircote/swagger-php/src/Annotations/AbstractAnnotation.php') { $content = str_replace(