From a8e75d158b7e143ca752be24475dc3286cd46bce Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Tue, 6 Sep 2022 11:16:33 +0900 Subject: [PATCH] Update composer installed packages --- www/vendor/composer/autoload_classmap.php | 2 + www/vendor/composer/autoload_files.php | 1 - www/vendor/composer/autoload_psr4.php | 4 - www/vendor/composer/autoload_static.php | 34 +- www/vendor/composer/installed.json | 460 +-- www/vendor/composer/installed.php | 78 +- www/vendor/nikic/php-parser/README.md | 6 +- www/vendor/nikic/php-parser/grammar/php5.y | 10 +- www/vendor/nikic/php-parser/grammar/php7.y | 62 +- .../nikic/php-parser/grammar/phpyLang.php | 8 - .../lib/PhpParser/Builder/Class_.php | 10 +- .../lib/PhpParser/BuilderHelpers.php | 24 +- .../Lexer/TokenEmulator/KeywordEmulator.php | 2 +- .../TokenEmulator/ReadonlyTokenEmulator.php | 15 +- .../php-parser/lib/PhpParser/Node/Const_.php | 4 +- .../php-parser/lib/PhpParser/Node/Name.php | 2 +- .../lib/PhpParser/Node/Scalar/DNumber.php | 13 +- .../lib/PhpParser/Node/Scalar/LNumber.php | 4 +- .../lib/PhpParser/Node/Scalar/String_.php | 16 + .../lib/PhpParser/Node/Stmt/ClassLike.php | 2 +- .../lib/PhpParser/Node/Stmt/ClassMethod.php | 32 +- .../lib/PhpParser/Node/Stmt/Class_.php | 25 + .../lib/PhpParser/Node/Stmt/Function_.php | 2 +- .../lib/PhpParser/Node/UnionType.php | 2 +- .../php-parser/lib/PhpParser/Parser/Php5.php | 8 +- .../php-parser/lib/PhpParser/Parser/Php7.php | 2582 ++++++++------- .../lib/PhpParser/ParserAbstract.php | 10 + .../lib/PhpParser/PrettyPrinter/Standard.php | 10 +- .../lib/PhpParser/PrettyPrinterAbstract.php | 15 +- .../reflection-common/.github/dependabot.yml | 7 - .../.github/workflows/push.yml | 223 -- .../phpdocumentor/reflection-common/LICENSE | 22 - .../phpdocumentor/reflection-common/README.md | 11 - .../reflection-common/composer.json | 28 - .../reflection-common/src/Element.php | 30 - .../reflection-common/src/File.php | 35 - .../reflection-common/src/Fqsen.php | 89 - .../reflection-common/src/Location.php | 53 - .../reflection-common/src/Project.php | 25 - .../reflection-common/src/ProjectFactory.php | 28 - .../phpdocumentor/reflection-docblock/LICENSE | 21 - .../reflection-docblock/README.md | 75 - .../reflection-docblock/composer.json | 42 - .../reflection-docblock/src/DocBlock.php | 228 -- .../src/DocBlock/Description.php | 115 - .../src/DocBlock/DescriptionFactory.php | 178 - .../src/DocBlock/ExampleFinder.php | 159 - .../src/DocBlock/Serializer.php | 157 - .../src/DocBlock/StandardTagFactory.php | 348 -- .../reflection-docblock/src/DocBlock/Tag.php | 31 - .../src/DocBlock/TagFactory.php | 84 - .../src/DocBlock/Tags/Author.php | 102 - .../src/DocBlock/Tags/BaseTag.php | 53 - .../src/DocBlock/Tags/Covers.php | 101 - .../src/DocBlock/Tags/Deprecated.php | 109 - .../src/DocBlock/Tags/Example.php | 200 -- .../DocBlock/Tags/Factory/StaticMethod.php | 25 - .../src/DocBlock/Tags/Formatter.php | 24 - .../Tags/Formatter/AlignFormatter.php | 50 - .../Tags/Formatter/PassthroughFormatter.php | 30 - .../src/DocBlock/Tags/Generic.php | 89 - .../src/DocBlock/Tags/InvalidTag.php | 145 - .../src/DocBlock/Tags/Link.php | 78 - .../src/DocBlock/Tags/Method.php | 279 -- .../src/DocBlock/Tags/Param.php | 174 - .../src/DocBlock/Tags/Property.php | 121 - .../src/DocBlock/Tags/PropertyRead.php | 121 - .../src/DocBlock/Tags/PropertyWrite.php | 121 - .../src/DocBlock/Tags/Reference/Fqsen.php | 38 - .../src/DocBlock/Tags/Reference/Reference.php | 22 - .../src/DocBlock/Tags/Reference/Url.php | 36 - .../src/DocBlock/Tags/Return_.php | 64 - .../src/DocBlock/Tags/See.php | 106 - .../src/DocBlock/Tags/Since.php | 103 - .../src/DocBlock/Tags/Source.php | 116 - .../src/DocBlock/Tags/TagWithType.php | 66 - .../src/DocBlock/Tags/Throws.php | 64 - .../src/DocBlock/Tags/Uses.php | 100 - .../src/DocBlock/Tags/Var_.php | 122 - .../src/DocBlock/Tags/Version.php | 106 - .../src/DocBlockFactory.php | 287 -- .../src/DocBlockFactoryInterface.php | 23 - .../src/Exception/PcreException.php | 44 - .../reflection-docblock/src/Utils.php | 62 - .../phpdocumentor/type-resolver/LICENSE | 21 - .../phpdocumentor/type-resolver/README.md | 177 - .../phpdocumentor/type-resolver/composer.json | 35 - .../type-resolver/src/FqsenResolver.php | 80 - .../type-resolver/src/PseudoType.php | 19 - .../src/PseudoTypes/CallableString.php | 39 - .../type-resolver/src/PseudoTypes/False_.php | 40 - .../src/PseudoTypes/HtmlEscapedString.php | 39 - .../src/PseudoTypes/IntegerRange.php | 61 - .../type-resolver/src/PseudoTypes/List_.php | 50 - .../src/PseudoTypes/LiteralString.php | 39 - .../src/PseudoTypes/LowercaseString.php | 39 - .../src/PseudoTypes/NegativeInteger.php | 39 - .../PseudoTypes/NonEmptyLowercaseString.php | 39 - .../src/PseudoTypes/NonEmptyString.php | 39 - .../src/PseudoTypes/NumericString.php | 39 - .../src/PseudoTypes/Numeric_.php | 47 - .../src/PseudoTypes/PositiveInteger.php | 39 - .../src/PseudoTypes/TraitString.php | 39 - .../type-resolver/src/PseudoTypes/True_.php | 40 - .../phpdocumentor/type-resolver/src/Type.php | 25 - .../type-resolver/src/TypeResolver.php | 700 ---- .../type-resolver/src/Types/AbstractList.php | 83 - .../src/Types/AggregatedType.php | 125 - .../type-resolver/src/Types/ArrayKey.php | 42 - .../type-resolver/src/Types/Array_.php | 29 - .../type-resolver/src/Types/Boolean.php | 32 - .../type-resolver/src/Types/Callable_.php | 32 - .../type-resolver/src/Types/ClassString.php | 62 - .../type-resolver/src/Types/Collection.php | 68 - .../type-resolver/src/Types/Compound.php | 38 - .../type-resolver/src/Types/Context.php | 95 - .../src/Types/ContextFactory.php | 420 --- .../type-resolver/src/Types/Expression.php | 51 - .../type-resolver/src/Types/Float_.php | 32 - .../type-resolver/src/Types/Integer.php | 32 - .../src/Types/InterfaceString.php | 56 - .../type-resolver/src/Types/Intersection.php | 37 - .../type-resolver/src/Types/Iterable_.php | 38 - .../type-resolver/src/Types/Mixed_.php | 32 - .../type-resolver/src/Types/Never_.php | 35 - .../type-resolver/src/Types/Null_.php | 32 - .../type-resolver/src/Types/Nullable.php | 51 - .../type-resolver/src/Types/Object_.php | 69 - .../type-resolver/src/Types/Parent_.php | 34 - .../type-resolver/src/Types/Resource_.php | 32 - .../type-resolver/src/Types/Scalar.php | 32 - .../type-resolver/src/Types/Self_.php | 34 - .../type-resolver/src/Types/Static_.php | 39 - .../type-resolver/src/Types/String_.php | 32 - .../type-resolver/src/Types/This.php | 35 - .../type-resolver/src/Types/Void_.php | 35 - www/vendor/phpspec/prophecy/CHANGES.md | 302 -- www/vendor/phpspec/prophecy/LICENSE | 23 - www/vendor/phpspec/prophecy/README.md | 411 --- www/vendor/phpspec/prophecy/composer.json | 50 - .../prophecy/src/Prophecy/Argument.php | 239 -- .../Prophecy/Argument/ArgumentsWildcard.php | 101 - .../Prophecy/Argument/Token/AnyValueToken.php | 52 - .../Argument/Token/AnyValuesToken.php | 52 - .../Argument/Token/ApproximateValueToken.php | 55 - .../Argument/Token/ArrayCountToken.php | 86 - .../Argument/Token/ArrayEntryToken.php | 143 - .../Argument/Token/ArrayEveryEntryToken.php | 82 - .../Prophecy/Argument/Token/CallbackToken.php | 75 - .../Argument/Token/ExactValueToken.php | 118 - .../Argument/Token/IdenticalValueToken.php | 74 - .../Prophecy/Argument/Token/InArrayToken.php | 74 - .../Argument/Token/LogicalAndToken.php | 80 - .../Argument/Token/LogicalNotToken.php | 73 - .../Argument/Token/NotInArrayToken.php | 75 - .../Argument/Token/ObjectStateToken.php | 104 - .../Argument/Token/StringContainsToken.php | 67 - .../Argument/Token/TokenInterface.php | 43 - .../src/Prophecy/Argument/Token/TypeToken.php | 76 - .../prophecy/src/Prophecy/Call/Call.php | 162 - .../prophecy/src/Prophecy/Call/CallCenter.php | 240 -- .../Prophecy/Comparator/ClosureComparator.php | 44 - .../src/Prophecy/Comparator/Factory.php | 47 - .../Comparator/ProphecyComparator.php | 31 - .../src/Prophecy/Doubler/CachedDoubler.php | 66 - .../ClassPatch/ClassPatchInterface.php | 48 - .../ClassPatch/DisableConstructorPatch.php | 76 - .../Doubler/ClassPatch/HhvmExceptionPatch.php | 63 - .../Doubler/ClassPatch/KeywordPatch.php | 68 - .../Doubler/ClassPatch/MagicCallPatch.php | 105 - .../ClassPatch/ProphecySubjectPatch.php | 113 - .../ReflectionClassNewInstancePatch.php | 57 - .../Doubler/ClassPatch/SplFileInfoPatch.php | 123 - .../Doubler/ClassPatch/ThrowablePatch.php | 95 - .../Doubler/ClassPatch/TraversablePatch.php | 98 - .../src/Prophecy/Doubler/DoubleInterface.php | 22 - .../prophecy/src/Prophecy/Doubler/Doubler.php | 146 - .../Doubler/Generator/ClassCodeGenerator.php | 110 - .../Doubler/Generator/ClassCreator.php | 67 - .../Doubler/Generator/ClassMirror.php | 254 -- .../Doubler/Generator/Node/ArgumentNode.php | 133 - .../Generator/Node/ArgumentTypeNode.php | 10 - .../Doubler/Generator/Node/ClassNode.php | 169 - .../Doubler/Generator/Node/MethodNode.php | 210 -- .../Doubler/Generator/Node/ReturnTypeNode.php | 45 - .../Generator/Node/TypeNodeAbstract.php | 97 - .../Doubler/Generator/ReflectionInterface.php | 22 - .../Doubler/Generator/TypeHintReference.php | 43 - .../src/Prophecy/Doubler/LazyDouble.php | 127 - .../src/Prophecy/Doubler/NameGenerator.php | 52 - .../Call/UnexpectedCallException.php | 40 - .../Doubler/ClassCreatorException.php | 31 - .../Doubler/ClassMirrorException.php | 31 - .../Doubler/ClassNotFoundException.php | 33 - .../Exception/Doubler/DoubleException.php | 18 - .../Exception/Doubler/DoublerException.php | 18 - .../Doubler/InterfaceNotFoundException.php | 20 - .../Doubler/MethodNotExtendableException.php | 41 - .../Doubler/MethodNotFoundException.php | 60 - .../Doubler/ReturnByReferenceException.php | 41 - .../src/Prophecy/Exception/Exception.php | 22 - .../Exception/InvalidArgumentException.php | 16 - .../Prediction/AggregateException.php | 51 - .../Prediction/FailedPredictionException.php | 24 - .../Exception/Prediction/NoCallsException.php | 18 - .../Prediction/PredictionException.php | 18 - .../UnexpectedCallsCountException.php | 31 - .../Prediction/UnexpectedCallsException.php | 32 - .../Prophecy/MethodProphecyException.php | 34 - .../Prophecy/ObjectProphecyException.php | 34 - .../Exception/Prophecy/ProphecyException.php | 18 - .../ClassAndInterfaceTagRetriever.php | 69 - .../PhpDocumentor/ClassTagRetriever.php | 60 - .../PhpDocumentor/LegacyClassTagRetriever.php | 35 - .../MethodTagRetrieverInterface.php | 30 - .../Prophecy/Prediction/CallPrediction.php | 86 - .../Prediction/CallTimesPrediction.php | 107 - .../Prediction/CallbackPrediction.php | 66 - .../Prophecy/Prediction/NoCallsPrediction.php | 68 - .../Prediction/PredictionInterface.php | 37 - .../src/Prophecy/Promise/CallbackPromise.php | 67 - .../src/Prophecy/Promise/PromiseInterface.php | 35 - .../Promise/ReturnArgumentPromise.php | 61 - .../src/Prophecy/Promise/ReturnPromise.php | 55 - .../src/Prophecy/Promise/ThrowPromise.php | 100 - .../src/Prophecy/Prophecy/MethodProphecy.php | 573 ---- .../src/Prophecy/Prophecy/ObjectProphecy.php | 286 -- .../Prophecy/Prophecy/ProphecyInterface.php | 27 - .../Prophecy/ProphecySubjectInterface.php | 34 - .../src/Prophecy/Prophecy/Revealer.php | 44 - .../Prophecy/Prophecy/RevealerInterface.php | 29 - .../phpspec/prophecy/src/Prophecy/Prophet.php | 138 - .../prophecy/src/Prophecy/Util/ExportUtil.php | 210 -- .../prophecy/src/Prophecy/Util/StringUtil.php | 99 - .../phpunit/php-code-coverage/ChangeLog.md | 19 + .../phpunit/php-code-coverage/composer.json | 2 +- .../php-code-coverage/src/CodeCoverage.php | 2 +- .../phpunit/php-code-coverage/src/Filter.php | 6 +- .../Renderer/Template/file_item.html.dist | 2 +- .../Template/file_item_branch.html.dist | 2 +- .../Renderer/Template/method_item.html.dist | 2 +- .../Template/method_item_branch.html.dist | 2 +- .../StaticAnalysis/CachingFileAnalyser.php | 34 +- .../phpunit/php-code-coverage/src/Version.php | 2 +- www/vendor/phpunit/phpunit/ChangeLog-8.5.md | 30 + www/vendor/phpunit/phpunit/ChangeLog-9.5.md | 37 + www/vendor/phpunit/phpunit/composer.json | 7 +- www/vendor/phpunit/phpunit/phpunit.xsd | 6 +- .../src/Framework/ExceptionWrapper.php | 26 +- .../src/Framework/MockObject/Invocation.php | 4 + .../src/Framework/MockObject/Matcher.php | 8 +- .../src/Framework/MockObject/MockMethod.php | 6 +- .../phpunit/src/Framework/TestCase.php | 13 +- .../phpunit/src/Framework/TestResult.php | 4 +- .../phpunit/src/Framework/TestSuite.php | 15 +- .../src/Runner/StandardTestSuiteLoader.php | 5 +- .../phpunit/phpunit/src/Runner/Version.php | 2 +- .../src/TextUI/DefaultResultPrinter.php | 3 +- .../phpunit/phpunit/src/TextUI/TestRunner.php | 4 +- .../phpunit/src/TextUI/TestSuiteMapper.php | 12 +- .../phpunit/phpunit/src/Util/ExcludeList.php | 70 +- .../phpunit/phpunit/src/Util/Reflection.php | 63 + www/vendor/phpunit/phpunit/src/Util/Test.php | 11 +- www/vendor/sebastian/type/ChangeLog.md | 8 +- www/vendor/sebastian/type/composer.json | 2 +- .../sebastian/type/src/type/SimpleType.php | 4 + .../sebastian/type/src/type/TrueType.php | 39 + www/vendor/sebastian/type/src/type/Type.php | 18 +- www/vendor/symfony/polyfill-ctype/Ctype.php | 232 -- www/vendor/symfony/polyfill-ctype/LICENSE | 19 - www/vendor/symfony/polyfill-ctype/README.md | 12 - .../symfony/polyfill-ctype/bootstrap.php | 50 - .../symfony/polyfill-ctype/bootstrap80.php | 46 - .../symfony/polyfill-ctype/composer.json | 41 - www/vendor/webmozart/assert/.editorconfig | 12 - .../assert/.github/workflows/ci.yaml | 120 - www/vendor/webmozart/assert/.php_cs | 24 - www/vendor/webmozart/assert/CHANGELOG.md | 190 -- www/vendor/webmozart/assert/LICENSE | 20 - www/vendor/webmozart/assert/README.md | 287 -- www/vendor/webmozart/assert/composer.json | 43 - www/vendor/webmozart/assert/psalm.xml | 14 - www/vendor/webmozart/assert/src/Assert.php | 2066 ------------ .../assert/src/InvalidArgumentException.php | 16 - www/vendor/webmozart/assert/src/Mixin.php | 2916 ----------------- 285 files changed, 1916 insertions(+), 25069 deletions(-) delete mode 100644 www/vendor/phpdocumentor/reflection-common/.github/dependabot.yml delete mode 100644 www/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml delete mode 100644 www/vendor/phpdocumentor/reflection-common/LICENSE delete mode 100644 www/vendor/phpdocumentor/reflection-common/README.md delete mode 100644 www/vendor/phpdocumentor/reflection-common/composer.json delete mode 100644 www/vendor/phpdocumentor/reflection-common/src/Element.php delete mode 100644 www/vendor/phpdocumentor/reflection-common/src/File.php delete mode 100644 www/vendor/phpdocumentor/reflection-common/src/Fqsen.php delete mode 100644 www/vendor/phpdocumentor/reflection-common/src/Location.php delete mode 100644 www/vendor/phpdocumentor/reflection-common/src/Project.php delete mode 100644 www/vendor/phpdocumentor/reflection-common/src/ProjectFactory.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/LICENSE delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/README.md delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/composer.json delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php delete mode 100644 www/vendor/phpdocumentor/reflection-docblock/src/Utils.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/LICENSE delete mode 100644 www/vendor/phpdocumentor/type-resolver/README.md delete mode 100644 www/vendor/phpdocumentor/type-resolver/composer.json delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoType.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/CallableString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/False_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/HtmlEscapedString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/IntegerRange.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LowercaseString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/NegativeInteger.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/NonEmptyLowercaseString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/NonEmptyString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/NumericString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/Numeric_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/PositiveInteger.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/TraitString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/True_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Type.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/TypeResolver.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Array_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/ClassString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Collection.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Compound.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Context.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Expression.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Float_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Integer.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/InterfaceString.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Never_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Null_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Nullable.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Object_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Resource_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Self_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Static_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/String_.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/This.php delete mode 100644 www/vendor/phpdocumentor/type-resolver/src/Types/Void_.php delete mode 100644 www/vendor/phpspec/prophecy/CHANGES.md delete mode 100644 www/vendor/phpspec/prophecy/LICENSE delete mode 100644 www/vendor/phpspec/prophecy/README.md delete mode 100644 www/vendor/phpspec/prophecy/composer.json delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Prophet.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php delete mode 100644 www/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php create mode 100644 www/vendor/phpunit/phpunit/src/Util/Reflection.php create mode 100644 www/vendor/sebastian/type/src/type/TrueType.php delete mode 100644 www/vendor/symfony/polyfill-ctype/Ctype.php delete mode 100644 www/vendor/symfony/polyfill-ctype/LICENSE delete mode 100644 www/vendor/symfony/polyfill-ctype/README.md delete mode 100644 www/vendor/symfony/polyfill-ctype/bootstrap.php delete mode 100644 www/vendor/symfony/polyfill-ctype/bootstrap80.php delete mode 100644 www/vendor/symfony/polyfill-ctype/composer.json delete mode 100644 www/vendor/webmozart/assert/.editorconfig delete mode 100644 www/vendor/webmozart/assert/.github/workflows/ci.yaml delete mode 100644 www/vendor/webmozart/assert/.php_cs delete mode 100644 www/vendor/webmozart/assert/CHANGELOG.md delete mode 100644 www/vendor/webmozart/assert/LICENSE delete mode 100644 www/vendor/webmozart/assert/README.md delete mode 100644 www/vendor/webmozart/assert/composer.json delete mode 100644 www/vendor/webmozart/assert/psalm.xml delete mode 100644 www/vendor/webmozart/assert/src/Assert.php delete mode 100644 www/vendor/webmozart/assert/src/InvalidArgumentException.php delete mode 100644 www/vendor/webmozart/assert/src/Mixin.php diff --git a/www/vendor/composer/autoload_classmap.php b/www/vendor/composer/autoload_classmap.php index bf15237c..0ffc765e 100644 --- a/www/vendor/composer/autoload_classmap.php +++ b/www/vendor/composer/autoload_classmap.php @@ -383,6 +383,7 @@ return array( 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php', 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php', 'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit\\Util\\Reflection' => $vendorDir . '/phpunit/phpunit/src/Util/Reflection.php', 'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php', 'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', 'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php', @@ -671,6 +672,7 @@ return array( 'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php', 'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php', 'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/type/StaticType.php', + 'SebastianBergmann\\Type\\TrueType' => $vendorDir . '/sebastian/type/src/type/TrueType.php', 'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/type/Type.php', 'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php', 'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/type/UnionType.php', diff --git a/www/vendor/composer/autoload_files.php b/www/vendor/composer/autoload_files.php index dff73413..7fa6f4a9 100644 --- a/www/vendor/composer/autoload_files.php +++ b/www/vendor/composer/autoload_files.php @@ -7,6 +7,5 @@ $baseDir = dirname($vendorDir); return array( 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', ); diff --git a/www/vendor/composer/autoload_psr4.php b/www/vendor/composer/autoload_psr4.php index 3c243ed8..f80149dc 100644 --- a/www/vendor/composer/autoload_psr4.php +++ b/www/vendor/composer/autoload_psr4.php @@ -6,10 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'), - 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), - 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), - 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), diff --git a/www/vendor/composer/autoload_static.php b/www/vendor/composer/autoload_static.php index ee64a887..aef4ee86 100644 --- a/www/vendor/composer/autoload_static.php +++ b/www/vendor/composer/autoload_static.php @@ -8,26 +8,12 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9 { public static $files = array ( 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', ); public static $prefixLengthsPsr4 = array ( - 'p' => - array ( - 'phpDocumentor\\Reflection\\' => 25, - ), - 'W' => - array ( - 'Webmozart\\Assert\\' => 17, - ), - 'S' => - array ( - 'Symfony\\Polyfill\\Ctype\\' => 23, - ), 'P' => array ( - 'Prophecy\\' => 9, 'PhpParser\\' => 10, ), 'D' => @@ -38,24 +24,6 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9 ); public static $prefixDirsPsr4 = array ( - 'phpDocumentor\\Reflection\\' => - array ( - 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', - 1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', - 2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', - ), - 'Webmozart\\Assert\\' => - array ( - 0 => __DIR__ . '/..' . '/webmozart/assert/src', - ), - 'Symfony\\Polyfill\\Ctype\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', - ), - 'Prophecy\\' => - array ( - 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', - ), 'PhpParser\\' => array ( 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', @@ -448,6 +416,7 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php', 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php', 'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit\\Util\\Reflection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Reflection.php', 'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php', 'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', 'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php', @@ -736,6 +705,7 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9 'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php', 'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php', 'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/type/StaticType.php', + 'SebastianBergmann\\Type\\TrueType' => __DIR__ . '/..' . '/sebastian/type/src/type/TrueType.php', 'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/type/Type.php', 'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php', 'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnionType.php', diff --git a/www/vendor/composer/installed.json b/www/vendor/composer/installed.json index 20b4b93f..12ea5d37 100644 --- a/www/vendor/composer/installed.json +++ b/www/vendor/composer/installed.json @@ -137,17 +137,17 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", - "version_normalized": "4.13.2.0", + "version": "v4.15.1", + "version_normalized": "4.15.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -158,7 +158,7 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, - "time": "2021-11-30T19:35:32+00:00", + "time": "2022-09-04T07:30:47+00:00", "bin": [ "bin/php-parse" ], @@ -190,7 +190,7 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, "install-path": "../nikic/php-parser" }, @@ -311,265 +311,26 @@ }, "install-path": "../phar-io/version" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "version_normalized": "2.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "time": "2020-06-27T09:03:43+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "install-path": "../phpdocumentor/reflection-common" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "version_normalized": "5.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "time": "2021-10-19T17:43:47+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "install-path": "../phpdocumentor/reflection-docblock" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "version_normalized": "1.6.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "time": "2022-03-15T21:29:03+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "install-path": "../phpdocumentor/type-resolver" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "version_normalized": "1.15.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "time": "2021-12-08T12:19:24+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "install-path": "../phpspec/prophecy" - }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", - "version_normalized": "9.2.15.0", + "version": "9.2.17", + "version_normalized": "9.2.17.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -587,7 +348,7 @@ "ext-pcov": "*", "ext-xdebug": "*" }, - "time": "2022-03-07T09:28:20+00:00", + "time": "2022-08-30T12:24:04+00:00", "type": "library", "extra": { "branch-alias": { @@ -620,7 +381,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" }, "funding": [ { @@ -885,17 +646,17 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.20", - "version_normalized": "9.5.20.0", + "version": "9.5.24", + "version_normalized": "9.5.24.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", "shasum": "" }, "require": { @@ -910,7 +671,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -925,18 +685,14 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.1", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" }, - "time": "2022-04-01T12:37:26+00:00", + "time": "2022-08-30T07:42:16+00:00", "bin": [ "phpunit" ], @@ -975,7 +731,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" }, "funding": [ { @@ -1888,17 +1644,17 @@ }, { "name": "sebastian/type", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.1.0", + "version_normalized": "3.1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb44e1cc6e557418387ad815780360057e40753e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e", + "reference": "fb44e1cc6e557418387ad815780360057e40753e", "shasum": "" }, "require": { @@ -1907,11 +1663,11 @@ "require-dev": { "phpunit/phpunit": "^9.5" }, - "time": "2022-03-15T09:54:48+00:00", + "time": "2022-08-29T06:55:37+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "installation-source": "dist", @@ -1935,7 +1691,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.1.0" }, "funding": [ { @@ -2001,91 +1757,6 @@ ], "install-path": "../sebastian/version" }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "time": "2021-10-20T20:35:02+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-ctype" - }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -2138,67 +1809,6 @@ } ], "install-path": "../theseer/tokenizer" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "version_normalized": "1.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "time": "2021-03-09T10:59:23+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "install-path": "../webmozart/assert" } ], "dev": true, @@ -2208,10 +1818,6 @@ "nikic/php-parser", "phar-io/manifest", "phar-io/version", - "phpdocumentor/reflection-common", - "phpdocumentor/reflection-docblock", - "phpdocumentor/type-resolver", - "phpspec/prophecy", "phpunit/php-code-coverage", "phpunit/php-file-iterator", "phpunit/php-invoker", @@ -2234,8 +1840,6 @@ "sebastian/resource-operations", "sebastian/type", "sebastian/version", - "symfony/polyfill-ctype", - "theseer/tokenizer", - "webmozart/assert" + "theseer/tokenizer" ] } diff --git a/www/vendor/composer/installed.php b/www/vendor/composer/installed.php index b18498bd..b3d80c62 100644 --- a/www/vendor/composer/installed.php +++ b/www/vendor/composer/installed.php @@ -38,12 +38,12 @@ 'dev_requirement' => true, ), 'nikic/php-parser' => array( - 'pretty_version' => 'v4.13.2', - 'version' => '4.13.2.0', + 'pretty_version' => 'v4.15.1', + 'version' => '4.15.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), - 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077', + 'reference' => '0ef6c55a3f47f89d7a374e6f835197a0b5fcf900', 'dev_requirement' => true, ), 'phar-io/manifest' => array( @@ -64,49 +64,13 @@ 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74', 'dev_requirement' => true, ), - 'phpdocumentor/reflection-common' => array( - 'pretty_version' => '2.2.0', - 'version' => '2.2.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common', - 'aliases' => array(), - 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b', - 'dev_requirement' => true, - ), - 'phpdocumentor/reflection-docblock' => array( - 'pretty_version' => '5.3.0', - 'version' => '5.3.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock', - 'aliases' => array(), - 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170', - 'dev_requirement' => true, - ), - 'phpdocumentor/type-resolver' => array( - 'pretty_version' => '1.6.1', - 'version' => '1.6.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver', - 'aliases' => array(), - 'reference' => '77a32518733312af16a44300404e945338981de3', - 'dev_requirement' => true, - ), - 'phpspec/prophecy' => array( - 'pretty_version' => 'v1.15.0', - 'version' => '1.15.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpspec/prophecy', - 'aliases' => array(), - 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13', - 'dev_requirement' => true, - ), 'phpunit/php-code-coverage' => array( - 'pretty_version' => '9.2.15', - 'version' => '9.2.15.0', + 'pretty_version' => '9.2.17', + 'version' => '9.2.17.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', 'aliases' => array(), - 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f', + 'reference' => 'aa94dc41e8661fe90c7316849907cba3007b10d8', 'dev_requirement' => true, ), 'phpunit/php-file-iterator' => array( @@ -146,12 +110,12 @@ 'dev_requirement' => true, ), 'phpunit/phpunit' => array( - 'pretty_version' => '9.5.20', - 'version' => '9.5.20.0', + 'pretty_version' => '9.5.24', + 'version' => '9.5.24.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/phpunit', 'aliases' => array(), - 'reference' => '12bc8879fb65aef2138b26fc633cb1e3620cffba', + 'reference' => 'd0aa6097bef9fd42458a9b3c49da32c6ce6129c5', 'dev_requirement' => true, ), 'sebastian/cli-parser' => array( @@ -281,12 +245,12 @@ 'dev_requirement' => true, ), 'sebastian/type' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', + 'pretty_version' => '3.1.0', + 'version' => '3.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/type', 'aliases' => array(), - 'reference' => 'b233b84bc4465aff7b57cf1c4bc75c86d00d6dad', + 'reference' => 'fb44e1cc6e557418387ad815780360057e40753e', 'dev_requirement' => true, ), 'sebastian/version' => array( @@ -298,15 +262,6 @@ 'reference' => 'c6c1022351a901512170118436c764e473f6de8c', 'dev_requirement' => true, ), - 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', - 'aliases' => array(), - 'reference' => '30885182c981ab175d4d034db0f6f469898070ab', - 'dev_requirement' => true, - ), 'theseer/tokenizer' => array( 'pretty_version' => '1.2.1', 'version' => '1.2.1.0', @@ -316,14 +271,5 @@ 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e', 'dev_requirement' => true, ), - 'webmozart/assert' => array( - 'pretty_version' => '1.10.0', - 'version' => '1.10.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../webmozart/assert', - 'aliases' => array(), - 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', - 'dev_requirement' => true, - ), ), ); diff --git a/www/vendor/nikic/php-parser/README.md b/www/vendor/nikic/php-parser/README.md index e5b26bf5..36de23cd 100644 --- a/www/vendor/nikic/php-parser/README.md +++ b/www/vendor/nikic/php-parser/README.md @@ -3,10 +3,10 @@ PHP Parser [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) -This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.0). +[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2). [Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). @@ -222,4 +222,4 @@ Component documentation: * Parent and sibling references [doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc - [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc + [doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc diff --git a/www/vendor/nikic/php-parser/grammar/php5.y b/www/vendor/nikic/php-parser/grammar/php5.y index f9e7e7dd..a62e9a31 100644 --- a/www/vendor/nikic/php-parser/grammar/php5.y +++ b/www/vendor/nikic/php-parser/grammar/php5.y @@ -689,9 +689,7 @@ array_expr: scalar_dereference: array_expr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = Expr\ArrayDimFetch[new Scalar\String_(Scalar\String_::parse($1), $attrs), $3]; } + | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $3]; } | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } /* alternative array syntax missing intentionally */ @@ -793,10 +791,8 @@ ctor_arguments: common_scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); } - | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } - | T_CONSTANT_ENCAPSED_STRING - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); } + | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } + | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), false); } | T_LINE { $$ = Scalar\MagicConst\Line[]; } | T_FILE { $$ = Scalar\MagicConst\File[]; } | T_DIR { $$ = Scalar\MagicConst\Dir[]; } diff --git a/www/vendor/nikic/php-parser/grammar/php7.y b/www/vendor/nikic/php-parser/grammar/php7.y index eac68d09..5d5fff21 100644 --- a/www/vendor/nikic/php-parser/grammar/php7.y +++ b/www/vendor/nikic/php-parser/grammar/php7.y @@ -382,8 +382,18 @@ enum_case_expr: class_entry_type: T_CLASS { $$ = 0; } - | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } + | class_modifiers T_CLASS { $$ = $1; } +; + +class_modifiers: + class_modifier { $$ = $1; } + | class_modifiers class_modifier { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; } +; + +class_modifier: + T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } + | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } + | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } ; extends_from: @@ -561,7 +571,7 @@ type_expr: type { $$ = $1; } | '?' type { $$ = Node\NullableType[$2]; } | union_type { $$ = Node\UnionType[$1]; } - | intersection_type { $$ = Node\IntersectionType[$1]; } + | intersection_type { $$ = $1; } ; type: @@ -575,34 +585,52 @@ type_without_static: | T_CALLABLE { $$ = Node\Identifier['callable']; } ; +union_type_element: + type { $$ = $1; } + | '(' intersection_type ')' { $$ = $2; } +; + union_type: - type '|' type { init($1, $3); } - | union_type '|' type { push($1, $3); } + union_type_element '|' union_type_element { init($1, $3); } + | union_type '|' union_type_element { push($1, $3); } +; + +union_type_without_static_element: + type_without_static { $$ = $1; } + | '(' intersection_type_without_static ')' { $$ = $2; } ; union_type_without_static: - type_without_static '|' type_without_static { init($1, $3); } - | union_type_without_static '|' type_without_static { push($1, $3); } + union_type_without_static_element '|' union_type_without_static_element { init($1, $3); } + | union_type_without_static '|' union_type_without_static_element { push($1, $3); } +; + +intersection_type_list: + type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } + | intersection_type_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type + { push($1, $3); } ; intersection_type: - type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } - | intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type + intersection_type_list { $$ = Node\IntersectionType[$1]; } +; + +intersection_type_without_static_list: + type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static + { init($1, $3); } + | intersection_type_without_static_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static { push($1, $3); } ; intersection_type_without_static: - type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static - { init($1, $3); } - | intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static - { push($1, $3); } + intersection_type_without_static_list { $$ = Node\IntersectionType[$1]; } ; type_expr_without_static: type_without_static { $$ = $1; } | '?' type_without_static { $$ = Node\NullableType[$2]; } | union_type_without_static { $$ = Node\UnionType[$1]; } - | intersection_type_without_static { $$ = Node\IntersectionType[$1]; } + | intersection_type_without_static { $$ = $1; } ; optional_type_without_static: @@ -1014,9 +1042,7 @@ dereferencable_scalar: { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; $$ = new Expr\Array_($3, $attrs); } | array_short_syntax { $$ = $1; } - | T_CONSTANT_ENCAPSED_STRING - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = new Scalar\String_(Scalar\String_::parse($1), $attrs); } + | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); } | '"' encaps_list '"' { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } @@ -1024,7 +1050,7 @@ dereferencable_scalar: scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); } - | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } + | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } | dereferencable_scalar { $$ = $1; } | constant { $$ = $1; } | class_constant { $$ = $1; } diff --git a/www/vendor/nikic/php-parser/grammar/phpyLang.php b/www/vendor/nikic/php-parser/grammar/phpyLang.php index 1a9808dc..663c2a14 100644 --- a/www/vendor/nikic/php-parser/grammar/phpyLang.php +++ b/www/vendor/nikic/php-parser/grammar/phpyLang.php @@ -128,14 +128,6 @@ function resolveMacros($code) { . ' else { ' . $args[0] . ' = null; }'; } - if ('strKind' === $name) { - assertArgs(1, $args, $name); - - return '(' . $args[0] . '[0] === "\'" || (' . $args[0] . '[1] === "\'" && ' - . '(' . $args[0] . '[0] === \'b\' || ' . $args[0] . '[0] === \'B\')) ' - . '? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED)'; - } - if ('prependLeadingComments' === $name) { assertArgs(1, $args, $name); diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/www/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php index 87e2901a..35b54d04 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php @@ -67,7 +67,7 @@ class Class_ extends Declaration * @return $this The builder instance (for fluid interface) */ public function makeAbstract() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); return $this; } @@ -78,7 +78,13 @@ class Class_ extends Declaration * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + + return $this; + } + + public function makeReadonly() { + $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); return $this; } diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/www/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php index 2f0e9127..af6ceb99 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php @@ -178,7 +178,20 @@ final class BuilderHelpers } $builtinTypes = [ - 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed', 'never', + 'array', + 'callable', + 'bool', + 'int', + 'float', + 'string', + 'iterable', + 'void', + 'object', + 'null', + 'false', + 'mixed', + 'never', + 'true', ]; $lowerType = strtolower($type); @@ -310,4 +323,13 @@ final class BuilderHelpers Stmt\Class_::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 { + Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet); + return $existingModifiers | $modifierToSet; + } } diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index ea261cc1..f8e83629 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -33,7 +33,7 @@ abstract class KeywordEmulator extends TokenEmulator /** * @param mixed[] $tokens - * @return mixed[]|null + * @return array|string|null */ private function getPreviousNonSpaceToken(array $tokens, int $start) { diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index b97f8d11..539a2bcf 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -20,4 +20,17 @@ final class ReadonlyTokenEmulator extends KeywordEmulator { return \T_READONLY; } -} \ No newline at end of file + + protected function isKeywordContext(array $tokens, int $pos): bool + { + if (!parent::isKeywordContext($tokens, $pos)) { + return false; + } + // Support "function readonly(" + return !(isset($tokens[$pos + 1]) && + ($tokens[$pos + 1][0] === '(' || + ($tokens[$pos + 1][0] === \T_WHITESPACE && + isset($tokens[$pos + 2]) && + $tokens[$pos + 2][0] === '('))); + } +} diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php index b69eb16f..07a74df8 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php @@ -11,7 +11,7 @@ class Const_ extends NodeAbstract /** @var Expr Value */ public $value; - /** @var Name Namespaced name (if using NameResolver) */ + /** @var Name|null Namespaced name (if using NameResolver) */ public $namespacedName; /** @@ -30,7 +30,7 @@ class Const_ extends NodeAbstract public function getSubNodeNames() : array { return ['name', 'value']; } - + public function getType() : string { return 'Const'; } diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php index 6b1cc9f8..17bd1c0f 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php @@ -162,7 +162,7 @@ class Name extends NodeAbstract $realLength = $numParts - $realOffset; } else { $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; - if ($realLength < 0 || $realLength > $numParts) { + if ($realLength < 0 || $realLength > $numParts - $realOffset) { throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); } } diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php index 29ce0dd4..d4796d65 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php @@ -24,6 +24,17 @@ class DNumber extends Scalar return ['value']; } + /** + * @param mixed[] $attributes + */ + public static function fromString(string $str, array $attributes = []): DNumber + { + $attributes['rawValue'] = $str; + $float = self::parse($str); + + return new DNumber($float, $attributes); + } + /** * @internal * @@ -63,7 +74,7 @@ class DNumber extends Scalar // dec return (float) $str; } - + public function getType() : string { return 'Scalar_DNumber'; } diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php index f17dd1f8..2cc2b22c 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -41,6 +41,8 @@ class LNumber extends Scalar * @return LNumber The constructed LNumber, including kind attribute */ public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { + $attributes['rawValue'] = $str; + $str = str_replace('_', '', $str); if ('0' !== $str[0] || '0' === $str) { @@ -71,7 +73,7 @@ class LNumber extends Scalar $attributes['kind'] = LNumber::KIND_OCT; return new LNumber(intval($str, 8), $attributes); } - + public function getType() : string { return 'Scalar_LNumber'; } diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php index 8a6d93a4..6690a16b 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php @@ -42,6 +42,22 @@ class String_ extends Scalar return ['value']; } + /** + * @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 * diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php index 6c336917..2fa4e861 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php @@ -13,7 +13,7 @@ abstract class ClassLike extends Node\Stmt /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; - /** @var Node\Name Namespaced name (if using NameResolver) */ + /** @var Node\Name|null Namespaced name (if using NameResolver) */ public $namespacedName; /** diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php index 09b877a9..6e85161e 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -23,21 +23,23 @@ class ClassMethod extends Node\Stmt implements FunctionLike public $attrGroups; 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, + '__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, ]; /** diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php index b290aaf6..52ed6c6c 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -68,6 +68,10 @@ class Class_ extends ClassLike return (bool) ($this->flags & self::MODIFIER_FINAL); } + public function isReadonly() : bool { + return (bool) ($this->flags & self::MODIFIER_READONLY); + } + /** * Whether the class is anonymous. * @@ -77,6 +81,27 @@ class Class_ extends ClassLike return null === $this->name; } + /** + * @internal + */ + public static function verifyClassModifier($a, $b) { + if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { + throw new Error('Multiple readonly modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class'); + } + } + /** * @internal */ diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php index abb7ee5c..c2ccae24 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -20,7 +20,7 @@ class Function_ extends Node\Stmt implements FunctionLike /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; - /** @var Node\Name Namespaced name (if using NameResolver) */ + /** @var Node\Name|null Namespaced name (if using NameResolver) */ public $namespacedName; /** diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/www/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php index 61c2d810..51ecec2a 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php @@ -10,7 +10,7 @@ class UnionType extends ComplexType /** * Constructs a union type. * - * @param (Identifier|Name)[] $types Types + * @param (Identifier|Name|IntersectionType)[] $types Types * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php index c62adfd2..d9c8fe04 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php @@ -2147,8 +2147,7 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 393 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); @@ -2275,11 +2274,10 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); }, 434 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)], false), $attrs); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false); }, 436 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index 7a0854b3..91eefac8 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -18,16 +18,16 @@ use PhpParser\Node\Stmt; class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1196; - protected $gotoTableSize = 545; + protected $actionTableSize = 1217; + protected $gotoTableSize = 604; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 420; - protected $numNonLeafStates = 710; + protected $YY2TBLSTATE = 429; + protected $numNonLeafStates = 717; protected $symbolToName = array( "EOF", @@ -244,325 +244,330 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 569, 135, 136, 0, 722, 723, 724, - 137, 37, 834, 911, 835, 469,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1068, 1069, - 1070, 1067, 1066, 1065, 1071, 716, 715,-32766,-32766,-32766, + 132, 133, 134, 570, 135, 136, 0, 729, 730, 731, + 137, 37, 929, 450, 451, 452,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1085, 1086, + 1087, 1084, 1083, 1082, 1088, 723, 722,-32766, 1275,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 545, 546,-32766,-32766, 725,-32766,-32766,-32766, 998, - 999, 806, 922, 447, 448, 449, 370, 371, 2, 267, - 138, 396, 729, 730, 731, 732, 414,-32766, 420,-32766, - -32766,-32766,-32766,-32766, 990, 733, 734, 735, 736, 737, - 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, - 766, 767, 755, 756, 336, 337, 758, 759, 744, 745, - 746, 748, 749, 750, 346, 790, 791, 792, 793, 794, - 795, 751, 752, 571, 572, 784, 775, 773, 774, 787, - 770, 771, 283, 420, 573, 574, 769, 575, 576, 577, - 578, 579, 580, 598, -575, 470, 14, 798, 772, 581, - 582, -575, 139,-32766,-32766,-32766, 132, 133, 134, 569, - 135, 136, 1017, 722, 723, 724, 137, 37, 1060,-32766, - -32766,-32766, 1303, 696,-32766, 1304,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071, - -32766, 716, 715, 372, 371, 1258,-32766,-32766,-32766, -572, - 106, 107, 108, 414, 270, 891, -572, 240, 1193, 1192, - 1194, 725,-32766,-32766,-32766, 1046, 109,-32766,-32766,-32766, - -32766, 986, 985, 984, 987, 267, 138, 396, 729, 730, - 731, 732, 12,-32766, 420,-32766,-32766,-32766,-32766, 998, - 999, 733, 734, 735, 736, 737, 738, 739, 740, 741, - 742, 743, 763, 570, 764, 765, 766, 767, 755, 756, - 336, 337, 758, 759, 744, 745, 746, 748, 749, 750, - 346, 790, 791, 792, 793, 794, 795, 751, 752, 571, - 572, 784, 775, 773, 774, 787, 770, 771, 881, 321, - 573, 574, 769, 575, 576, 577, 578, 579, 580,-32766, - 82, 83, 84, -575, 772, 581, 582, -575, 148, 747, - 717, 718, 719, 720, 721, 1278, 722, 723, 724, 760, - 761, 36, 1277, 85, 86, 87, 88, 89, 90, 91, + -32767, 373, 374, 918, 2, 732,-32766,-32766,-32766, 1001, + 472, 417, 150,-32766,-32766,-32766, 375, 374, 12, 267, + 138, 399, 736, 737, 738, 739, 417,-32766, 423,-32766, + -32766,-32766,-32766,-32766,-32766, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 770, 571, 771, 772, + 773, 774, 762, 763, 339, 340, 765, 766, 751, 752, + 753, 755, 756, 757, 349, 797, 798, 799, 800, 801, + 802, 758, 759, 572, 573, 791, 782, 780, 781, 794, + 777, 778, 323, 423, 574, 575, 776, 576, 577, 578, + 579, 580, 581, -324, -585, 810, 34, 805, 779, 582, + 583, -585, 139,-32766,-32766,-32766, 132, 133, 134, 570, + 135, 136, 1034, 729, 730, 731, 137, 37,-32766,-32766, + -32766, 544, 814, 126,-32766, 1310,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 1085, 1086, 1087, 1084, 1083, 1082, 1088, + 473, 723, 722,-32766,-32766,-32766, 458, 459, 81,-32766, + -32766,-32766, -193, -192, 322, 898, 240, 599, 1210, 1209, + 1211, 732, 816, 703,-32766, 1063,-32766,-32766,-32766,-32766, + -32766, 811,-32766,-32766,-32766, 267, 138, 399, 736, 737, + 738, 739, 1247, 1295, 423, 694, 1320, 35, 249, 1321, + 1294, 740, 741, 742, 743, 744, 745, 746, 747, 748, + 749, 750, 770, 571, 771, 772, 773, 774, 762, 763, + 339, 340, 765, 766, 751, 752, 753, 755, 756, 757, + 349, 797, 798, 799, 800, 801, 802, 758, 759, 572, + 573, 791, 782, 780, 781, 794, 777, 778, 888, 593, + 574, 575, 776, 576, 577, 578, 579, 580, 581, -324, + 82, 83, 84, -585, 779, 582, 583, -585, 148, 754, + 724, 725, 726, 727, 728, -582, 729, 730, 731, 767, + 768, 36, -582, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 996, 270, 150, - -32766,-32766,-32766, 455, 456, 81, 34, -264, -572, 1016, - 109, 320, -572, 893, 725, 682, 803, 128, 998, 999, - 592,-32766, 1044,-32766,-32766,-32766, 809, 151, 726, 727, - 728, 729, 730, 731, 732, -88, 1198, 796, 278, -526, - 283,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738, - 739, 740, 741, 742, 743, 763, 786, 764, 765, 766, - 767, 755, 756, 757, 785, 758, 759, 744, 745, 746, - 748, 749, 750, 789, 790, 791, 792, 793, 794, 795, - 751, 752, 753, 754, 784, 775, 773, 774, 787, 770, - 771, 144, 804, 762, 768, 769, 776, 777, 779, 778, - 780, 781, -314, -526, -526, -193, -192, 772, 783, 782, - 49, 50, 51, 500, 52, 53, 239, 807, -526, -86, - 54, 55, -111, 56, 996, 253,-32766, -111, 800, -111, - -526, 541, -532, -352, 300, -352, 304, -111, -111, -111, - -111, -111, -111, -111, -111, 998, 999, 998, 999, 153, - -32766,-32766,-32766, 1191, 807, 126, 306, 1293, 57, 58, - 103, 104, 105, -111, 59, 1218, 60, 246, 247, 61, - 62, 63, 64, 65, 66, 67, 68, -525, 27, 268, - 69, 436, 501, -328, 808, -86, 1224, 1225, 502, 1189, - 807, 1198, 1230, 293, 1222, 41, 24, 503, 74, 504, - 953, 505, 320, 506, 802, 154, 507, 508, 279, 684, - 280, 43, 44, 437, 367, 366, 891, 45, 509, 35, - 249, -16, -566, 358, 332, 318, -566, 1198, 1193, 1192, - 1194, -527, 510, 511, 512, 333, -524, 1274, 48, 716, - 715, -525, -525, 334, 513, 514, 807, 1212, 1213, 1214, - 1215, 1209, 1210, 292, 360, 284, -525, 285, -314, 1216, - 1211, -193, -192, 1193, 1192, 1194, 293, 891, -525, 364, - -531, 70, 807, 316, 317, 320, 31, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - -153, -153, -153, 638, 25, -527, -527, 687, 379, 881, - -524, -524, 296, 297, 891, -153, 432, -153, 807, -153, - -527, -153, 716, 715, 433, -524, 798, 363, -111, 1105, - 1107, 365, -527, 434, 891, 140, 435, -524, 954, 127, - -524, 320, -111, -111, 688, 813, 381, -529, 11, 834, - 155, 835, 867, -111, -111, -111, -111, 47, 293,-32766, - 881, 654, 655, 74, 689, 1191, 1045, 320, 708, 149, - 399, 157,-32766,-32766,-32766, 32,-32766, -79,-32766, 123, - -32766, 716, 715,-32766, 893, 891, 682, -153,-32766,-32766, - -32766, 716, 715, 891,-32766,-32766, 124, 881, 129, 74, - -32766, 411, 130, 320, -524, -524, 143, 141, -75,-32766, - 158, -529, -529, 320, 27, 691, 159, 881, 160, -524, - 161, 294, 295, 698, 368, 369, 807, -73,-32766, -72, - 1222, -524, 373, 374, 1191, 893, -71, 682, -529, 73, - -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 125,-32766, - 630, 631,-32766, -67, -66, -47, -51,-32766,-32766,-32766, - -18, 147, 271,-32766,-32766, 277, 697, 700, 881,-32766, - 411, 890, 893, 146, 682, 282, 881, 907,-32766, 281, - 513, 514, 286, 1212, 1213, 1214, 1215, 1209, 1210, 326, - 131, 145, 939, 287, 682, 1216, 1211, 109, 270,-32766, - 798, 807,-32766, 662, 639, 1191, 657, 72, 675, 1075, - 317, 320,-32766,-32766,-32766, 1305,-32766, 301,-32766, 628, - -32766, 431, 543,-32766,-32766, 923, 555, 924,-32766,-32766, - -32766, 1229, 549,-32766,-32766,-32766, -4, 891, -490, 1191, - -32766, 411, 644, 893, 299, 682,-32766,-32766,-32766,-32766, - -32766, 893,-32766, 682,-32766, 13, 1231,-32766, 452, 480, - 645, 909,-32766,-32766,-32766,-32766, 658, -480,-32766,-32766, - 0, 1191, 0, 0,-32766, 411, 0, 298,-32766,-32766, - -32766, 305,-32766,-32766,-32766, 0,-32766, 0, 806,-32766, - 0, 0, 0, 475,-32766,-32766,-32766,-32766, 0, 7, - -32766,-32766, 16, 1191, 561, 596,-32766, 411, 1219, 891, - -32766,-32766,-32766, 362,-32766,-32766,-32766, 818,-32766, -267, - 881,-32766, 39, 293, 0, 0,-32766,-32766,-32766, 40, - 705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 411, - 937, 948, 365, 870, 427, 891, 935,-32766, 1049, 291, - 1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262, - 1296, 633, 0, 826, -111, -111, -111, -111, 33, 315, - -32766, 361, 683, 686, 690, 692, 1191, 693, 694, 695, - 699, 685, 320,-32766,-32766,-32766, 9,-32766, 702,-32766, - 868,-32766, 881, 1300,-32766, 893, 1302, 682, -4,-32766, - -32766,-32766, 829, 828, 837,-32766,-32766, 916, -242, -242, - -242,-32766, 411, 955, 365, 27, 836, 1301, 915, 917, - -32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898, - 945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111, - 1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531, - 365, -530, 1, 28, 29, 38, 42, 46, 71, 0, - 75, -111, -111, 76, 77, 78, 79, 893, 80, 682, - -242, 867, -111, -111, -111, -111, 142, 152, 156, 245, - 322, 347, 514, 348, 1212, 1213, 1214, 1215, 1209, 1210, - 349, 350, 351, 352, 353, 354, 1216, 1211, 355, 356, - 357, 359, 428, 893, -265, 682, -241, -264, 72, 0, - 18, 317, 320, 19, 20, 21, 23, 398, 471, 472, - 479, 482, 483, 484, 485, 489, 490, 491, 498, 669, - 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 17, 22, - 26, 290, 397, 589, 593, 620, 674, 1149, 1197, 1146, - 1275, 0, -494, 1162, 0, 1223 + 102, 103, 104, 105, 106, 107, 108, -362, 271, -362, + -32766,-32766,-32766, 106, 107, 108, -268, 271, -193, -192, + 109, 933, 934, 900, 732, 689, 935, 14, 288, 109, + 815,-32766, 1061,-32766,-32766, 964, -86, 288, 733, 734, + 735, 736, 737, 738, 739, 239, 384, 803, 11, 1077, + -539,-32766,-32766,-32766, 740, 741, 742, 743, 744, 745, + 746, 747, 748, 749, 750, 770, 793, 771, 772, 773, + 774, 762, 763, 764, 792, 765, 766, 751, 752, 753, + 755, 756, 757, 796, 797, 798, 799, 800, 801, 802, + 758, 759, 760, 761, 791, 782, 780, 781, 794, 777, + 778, 128, -86, 769, 775, 776, 783, 784, 786, 785, + 787, 788, -576, 144, -539, -539, -576, 779, 790, 789, + 49, 50, 51, 503, 52, 53, 997, 996, 995, 998, + 54, 55, -111, 56, -582, 1033, 1010, -111, -582, -111, + 1291, -539,-32766,-32766, 302, 1010, 1010, -111, -111, -111, + -111, -111, -111, -111, -111, 1208, 841, 898, 842, 253, + 807, 287, 306, 965, 284, 898, 723, 722, 57, 58, + 287, 287, 1007, -536, 59, 308, 60, 246, 247, 61, + 62, 63, 64, 65, 66, 67, 68, 695, 27, 269, + 69, 439, 504, -338, 1010, 696, 1241, 1242, 505, 898, + 814, 640, 25, 898, 1239, 41, 24, 506, 320, 507, + 1235, 508, 1009, 509, 149, 402, 510, 511, 841, 805, + 842, 43, 44, 440, 370, 369, 898, 45, 512, 698, + 1210, 1209, 1211, 361, 335, 1215, 809, -536, -536, 336, + 888, 691, 513, 514, 515, 1215, 1007, 1062, 888, 715, + 1007, 337, -536, 363, 516, 517, 705, 1229, 1230, 1231, + 1232, 1226, 1227, 294, -536, -16, -542, 813, 1010, 1233, + 1228, 367, 1010, 1210, 1209, 1211, 295, -153, -153, -153, + 382, 70, 888, 318, 319, 322, 888, 659, 660, -535, + 1206, 814, -153, 279, -153, 435, -153, 279, -153, 436, + 141, 103, 104, 105, 632, 633, 322, 437, 368, 888, + -32766,-32766, 371, 372, 438, 900, 814, 689, 820, -111, + -111, 376, 377, 950, -111, 689, 814, -88, 151, 874, + -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 723, 722, + 1206, 153, 154, -535, -535, 155, 898, 900, 157, 689, + 1206, 900, -111, 689, -153, 32, 123, 898, -535, 124, + 140,-32766, -537, 129, 130, 143, 322, 1122, 1124, 158, + -535,-32766, -541, -534, 900,-32766, 689, 159, -534, 723, + 722, 1208, 295, 160, 161, -79, -75, 74,-32766,-32766, + -32766, 322,-32766, -73,-32766, -298,-32766, 74, -294,-32766, + -72, 322, -71, -70,-32766,-32766,-32766, -69, -68, -67, + -32766,-32766, 27, -66, -47, 1215,-32766, 414, -18, 147, + 275, 270, 281, 704, 814,-32766, -537, -537, 1239, 888, + 707, 897, 146, 276, 48, -4, 898, -534, -534, 282, + 888, -537, -534, -534, 283, -246, -246, -246, 329, 285, + 271, 368, -534, -537, 286, 73, 289, -534, 1206, 47, + 723, 722, -111, -111, -534, 290, 109, -111, 914, -534, + 550, 669, 874, -111, -111, -111, -111, 145, 516, 517, + -32766, 1229, 1230, 1231, 1232, 1226, 1227, 814, 805, 1322, + 662, 300, 1092, 1233, 1228, 682, 814,-32766, 298, 299, + 546, 641, 647, 1208, 900, 72, 689, -246, 319, 322, + -32766,-32766,-32766, 366,-32766, 900,-32766, 689,-32766, 888, + 646,-32766, 13, 296, 297, 127,-32766,-32766,-32766, 455, + 1206, -51,-32766,-32766, 483, 630, 663, 556,-32766, 414, + 303, 368, -111, 430, 434, 39, 930,-32766, 293, 0, + 125,-32766, -111, -111, 301, 0, 0, -111, 1010, 307, + 0, 0, 833, -111, -111, -111, -111, 0,-32766, 131, + 0, 0, 295, 0,-32766, 1246, 0, 74, 0, 1248, + 1208, 322, 0, -500, 0, 9, 0,-32766,-32766,-32766, + -490,-32766, 7,-32766, 900,-32766, 689, -4,-32766, 16, + 365, 597, 813,-32766,-32766,-32766, 916, 295, 709,-32766, + -32766, 1240,-32766, 40, 712,-32766, 414, 713, 1208, 879, + 898, 974, 951, 958,-32766,-32766,-32766,-32766, 948,-32766, + 959,-32766, 877,-32766, 946, 1066,-32766, 1069, 1070, 1067, + 1068,-32766,-32766,-32766,-32766, 1074, 33,-32766,-32766, 1236, + 1208, 825, 1261,-32766, 414, 1279, 1313,-32766,-32766,-32766, + 317,-32766,-32766,-32766, 635,-32766, 364, 690,-32766, 693, + 697, 699, 478,-32766,-32766,-32766,-32766, 700, 701,-32766, + -32766, 702, 1208, 562, 706,-32766, 414, 692, -570,-32766, + -32766,-32766, 875,-32766,-32766,-32766, 1317,-32766, 1319, 836, + -32766, 835, 844, 888, 923,-32766,-32766,-32766, 966, 843, + 1318,-32766,-32766, 922, 924, 921, 1194,-32766, 414, -245, + -245, -245, 907, 917, 905, 368,-32766, 956, 957, 1316, + 1273, 1262, 0, 1280, 1286, 1289, -111, -111, -568, 27, + -542, -111, -541, -540, 1, 28, 874, -111, -111, -111, + -111, 814, 29,-32766, 38, 1239, 42, 46, 71, 1208, + 75, 76, 77, 78, 79, 0,-32766,-32766,-32766, 80, + -32766, 142,-32766, 152,-32766, 156, 245,-32766, 900, 324, + 689, -245,-32766,-32766,-32766, 1206, 350, 351,-32766,-32766, + 352, 353, 354, 355,-32766, 414, 356, 357, 358, 359, + 360, 362, 431,-32766, -271, -269, 517, -268, 1229, 1230, + 1231, 1232, 1226, 1227, 18, 19, 20, 21, 23, 401, + 1233, 1228, 474, 475, 482, 485, 486, 487, 488, 492, + 493, 494, 72, -504, 501, 319, 322, 676, 1219, 1162, + 1237, 1036, 1035, 0, 1016, 1198, 1012, -273, -103, 17, + 22, 26, 292, 400, 590, 594, 621, 681, 1166, 1214, + 1163, 1292, 0, 1179, 0, 0, 322 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 106, 1, 108, 31, 9, 10, 11, 44, + 12, 13, 128, 129, 130, 131, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, + 118, 119, 120, 121, 122, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 117, 118, 9, 10, 57, 9, 10, 11, 137, - 138, 155, 128, 129, 130, 131, 106, 107, 8, 71, + 43, 106, 107, 1, 8, 57, 9, 10, 11, 1, + 31, 116, 14, 9, 10, 11, 106, 107, 8, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, - 33, 34, 35, 36, 1, 87, 88, 89, 90, 91, + 33, 34, 35, 36, 30, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 30, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 51, 1, 161, 101, 80, 150, 151, + 132, 133, 70, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 8, 1, 80, 8, 80, 150, 151, 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, - 6, 7, 164, 9, 10, 11, 12, 13, 123, 9, - 10, 11, 80, 161, 30, 83, 32, 33, 34, 35, + 6, 7, 164, 9, 10, 11, 12, 13, 9, 10, + 11, 85, 82, 14, 30, 85, 32, 33, 34, 35, 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, - 30, 37, 38, 106, 107, 1, 9, 10, 11, 1, - 53, 54, 55, 116, 57, 1, 8, 14, 155, 156, - 157, 57, 9, 10, 11, 162, 69, 30, 116, 32, - 33, 119, 120, 121, 122, 71, 72, 73, 74, 75, - 76, 77, 8, 30, 80, 32, 33, 34, 35, 137, - 138, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 161, 37, 38, 9, 10, 11, 134, 135, 161, 9, + 10, 11, 8, 8, 167, 1, 14, 51, 155, 156, + 157, 57, 1, 161, 30, 162, 32, 33, 34, 35, + 30, 156, 32, 33, 34, 71, 72, 73, 74, 75, + 76, 77, 146, 1, 80, 31, 80, 147, 148, 83, + 8, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 84, 70, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 9, + 126, 127, 128, 129, 130, 131, 132, 133, 84, 1, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 164, 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 116, 57, 14, - 9, 10, 11, 134, 135, 161, 8, 164, 160, 1, - 69, 167, 164, 159, 57, 161, 80, 8, 137, 138, - 1, 30, 1, 32, 33, 34, 1, 14, 71, 72, - 73, 74, 75, 76, 77, 31, 1, 80, 30, 70, - 30, 9, 10, 11, 87, 88, 89, 90, 91, 92, + 49, 50, 51, 52, 53, 54, 55, 106, 57, 108, + 9, 10, 11, 53, 54, 55, 164, 57, 164, 164, + 69, 117, 118, 159, 57, 161, 122, 101, 30, 69, + 159, 30, 1, 32, 33, 31, 31, 30, 71, 72, + 73, 74, 75, 76, 77, 97, 106, 80, 108, 123, + 70, 9, 10, 11, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 8, 156, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 8, 134, 135, 8, 8, 150, 151, 152, - 2, 3, 4, 5, 6, 7, 97, 82, 149, 31, - 12, 13, 101, 15, 116, 8, 116, 106, 80, 108, - 161, 85, 163, 106, 113, 108, 8, 116, 117, 118, - 119, 120, 121, 122, 123, 137, 138, 137, 138, 14, - 9, 10, 11, 80, 82, 14, 8, 85, 50, 51, - 50, 51, 52, 128, 56, 1, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, - 72, 73, 74, 162, 159, 97, 78, 79, 80, 116, - 82, 1, 146, 158, 86, 87, 88, 89, 163, 91, - 31, 93, 167, 95, 156, 14, 98, 99, 35, 161, - 37, 103, 104, 105, 106, 107, 1, 109, 110, 147, - 148, 31, 160, 115, 116, 8, 164, 1, 155, 156, - 157, 70, 124, 125, 126, 8, 70, 1, 70, 37, - 38, 134, 135, 8, 136, 137, 82, 139, 140, 141, - 142, 143, 144, 145, 8, 35, 149, 37, 164, 151, - 152, 164, 164, 155, 156, 157, 158, 1, 161, 8, - 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 75, 76, 77, 75, 76, 134, 135, 31, 8, 84, - 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, - 149, 96, 37, 38, 8, 149, 80, 149, 128, 59, - 60, 106, 161, 8, 1, 161, 8, 161, 159, 161, - 70, 167, 117, 118, 31, 8, 106, 70, 108, 106, - 14, 108, 127, 128, 129, 130, 131, 70, 158, 74, - 84, 75, 76, 163, 31, 80, 159, 167, 161, 101, - 102, 14, 87, 88, 89, 14, 91, 31, 93, 16, - 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, - 105, 37, 38, 1, 109, 110, 16, 84, 16, 163, - 115, 116, 16, 167, 134, 135, 16, 161, 31, 124, - 16, 134, 135, 167, 70, 31, 16, 84, 16, 149, - 16, 134, 135, 31, 106, 107, 82, 31, 74, 31, - 86, 161, 106, 107, 80, 159, 31, 161, 161, 154, - 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, - 111, 112, 98, 31, 31, 31, 31, 103, 104, 105, - 31, 31, 31, 109, 110, 31, 31, 31, 84, 115, - 116, 31, 159, 31, 161, 37, 84, 38, 124, 35, - 136, 137, 35, 139, 140, 141, 142, 143, 144, 35, - 31, 70, 159, 37, 161, 151, 152, 69, 57, 74, - 80, 82, 85, 77, 90, 80, 94, 163, 92, 82, - 166, 167, 87, 88, 89, 83, 91, 114, 93, 113, - 95, 128, 85, 98, 116, 128, 153, 128, 103, 104, - 105, 146, 89, 74, 109, 110, 0, 1, 149, 80, - 115, 116, 96, 159, 133, 161, 87, 88, 89, 124, - 91, 159, 93, 161, 95, 97, 146, 98, 97, 97, - 100, 154, 103, 104, 105, 74, 100, 149, 109, 110, - -1, 80, -1, -1, 115, 116, -1, 132, 87, 88, - 89, 132, 91, 124, 93, -1, 95, -1, 155, 98, - -1, -1, -1, 102, 103, 104, 105, 74, -1, 149, - 109, 110, 149, 80, 81, 153, 115, 116, 160, 1, - 87, 88, 89, 149, 91, 124, 93, 160, 95, 164, - 84, 98, 159, 158, -1, -1, 103, 104, 105, 159, - 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, - 159, 159, 106, 159, 108, 1, 159, 124, 159, 113, - 160, 159, 159, 117, 118, 159, 159, 159, 163, 160, - 160, 160, -1, 127, 128, 129, 130, 131, 161, 161, - 74, 161, 161, 161, 161, 161, 80, 161, 161, 161, - 161, 161, 167, 87, 88, 89, 150, 91, 162, 93, - 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, - 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, - 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, - 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, - 162, 86, 162, 162, 162, 127, 128, 129, 130, 131, - 162, 162, 162, 162, 100, 101, 102, 163, 163, 163, - 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, - 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, - 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, - 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, - 163, 163, 163, 163, 163, 163, 151, 152, 163, 163, - 163, 163, 163, 159, 164, 161, 162, 164, 163, -1, - 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, + 133, 8, 97, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 160, 8, 134, 135, 164, 150, 151, 152, + 2, 3, 4, 5, 6, 7, 119, 120, 121, 122, + 12, 13, 101, 15, 160, 1, 138, 106, 164, 108, + 1, 161, 9, 10, 113, 138, 138, 116, 117, 118, + 119, 120, 121, 122, 123, 80, 106, 1, 108, 8, + 80, 163, 8, 159, 30, 1, 37, 38, 50, 51, + 163, 163, 116, 70, 56, 8, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 31, 70, 71, + 72, 73, 74, 162, 138, 31, 78, 79, 80, 1, + 82, 75, 76, 1, 86, 87, 88, 89, 8, 91, + 1, 93, 137, 95, 101, 102, 98, 99, 106, 80, + 108, 103, 104, 105, 106, 107, 1, 109, 110, 31, + 155, 156, 157, 115, 116, 1, 156, 134, 135, 8, + 84, 161, 124, 125, 126, 1, 116, 159, 84, 161, + 116, 8, 149, 8, 136, 137, 31, 139, 140, 141, + 142, 143, 144, 145, 161, 31, 163, 155, 138, 151, + 152, 8, 138, 155, 156, 157, 158, 75, 76, 77, + 8, 163, 84, 165, 166, 167, 84, 75, 76, 70, + 116, 82, 90, 163, 92, 8, 94, 163, 96, 8, + 161, 50, 51, 52, 111, 112, 167, 8, 106, 84, + 9, 137, 106, 107, 8, 159, 82, 161, 8, 117, + 118, 106, 107, 159, 122, 161, 82, 31, 14, 127, + 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 37, 38, + 116, 14, 14, 134, 135, 14, 1, 159, 14, 161, + 116, 159, 128, 161, 162, 14, 16, 1, 149, 16, + 161, 137, 70, 16, 16, 16, 167, 59, 60, 16, + 161, 137, 163, 70, 159, 74, 161, 16, 70, 37, + 38, 80, 158, 16, 16, 31, 31, 163, 87, 88, + 89, 167, 91, 31, 93, 35, 95, 163, 35, 98, + 31, 167, 31, 31, 103, 104, 105, 31, 31, 31, + 109, 110, 70, 31, 31, 1, 115, 116, 31, 31, + 35, 31, 31, 31, 82, 124, 134, 135, 86, 84, + 31, 31, 31, 35, 70, 0, 1, 134, 135, 35, + 84, 149, 134, 135, 35, 100, 101, 102, 35, 37, + 57, 106, 149, 161, 37, 154, 37, 149, 116, 70, + 37, 38, 117, 118, 161, 37, 69, 122, 38, 161, + 89, 77, 127, 128, 129, 130, 131, 70, 136, 137, + 85, 139, 140, 141, 142, 143, 144, 82, 80, 83, + 94, 132, 82, 151, 152, 92, 82, 74, 134, 135, + 85, 90, 100, 80, 159, 163, 161, 162, 166, 167, + 87, 88, 89, 149, 91, 159, 93, 161, 95, 84, + 96, 98, 97, 134, 135, 161, 103, 104, 105, 97, + 116, 31, 109, 110, 97, 113, 100, 153, 115, 116, + 114, 106, 128, 108, 128, 159, 128, 124, 113, -1, + 161, 137, 117, 118, 133, -1, -1, 122, 138, 132, + -1, -1, 127, 128, 129, 130, 131, -1, 137, 31, + -1, -1, 158, -1, 74, 146, -1, 163, -1, 146, + 80, 167, -1, 149, -1, 150, -1, 87, 88, 89, + 149, 91, 149, 93, 159, 95, 161, 162, 98, 149, + 149, 153, 155, 103, 104, 105, 154, 158, 162, 109, + 110, 166, 74, 159, 159, 115, 116, 159, 80, 159, + 1, 159, 159, 159, 124, 87, 88, 89, 159, 91, + 159, 93, 159, 95, 159, 159, 98, 159, 159, 159, + 159, 103, 104, 105, 74, 159, 161, 109, 110, 160, + 80, 160, 160, 115, 116, 160, 160, 87, 88, 89, + 161, 91, 124, 93, 160, 95, 161, 161, 98, 161, + 161, 161, 102, 103, 104, 105, 74, 161, 161, 109, + 110, 161, 80, 81, 161, 115, 116, 161, 163, 87, + 88, 89, 162, 91, 124, 93, 162, 95, 162, 162, + 98, 162, 162, 84, 162, 103, 104, 105, 162, 162, + 162, 109, 110, 162, 162, 162, 162, 115, 116, 100, + 101, 102, 162, 162, 162, 106, 124, 162, 162, 162, + 162, 162, -1, 162, 162, 162, 117, 118, 163, 70, + 163, 122, 163, 163, 163, 163, 127, 128, 129, 130, + 131, 82, 163, 74, 163, 86, 163, 163, 163, 80, + 163, 163, 163, 163, 163, -1, 87, 88, 89, 163, + 91, 163, 93, 163, 95, 163, 163, 98, 159, 163, + 161, 162, 103, 104, 105, 116, 163, 163, 109, 110, + 163, 163, 163, 163, 115, 116, 163, 163, 163, 163, + 163, 163, 163, 124, 164, 164, 137, 164, 139, 140, + 141, 142, 143, 144, 164, 164, 164, 164, 164, 164, + 151, 152, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 163, 165, 164, 166, 167, 164, 164, 164, + 164, 164, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, -1, 165, 165, -1, 166 + 164, 164, -1, 165, -1, -1, 167 ); protected $actionBase = array( - 0, -2, 154, 565, 876, 948, 984, 514, 53, 398, - 837, 307, 307, 67, 307, 307, 307, 653, 724, 724, - 732, 724, 616, 673, 204, 204, 204, 625, 625, 625, - 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, - 1015, 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, - 920, 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, + 0, -2, 154, 542, 785, 695, 969, 549, 53, 420, + 831, 307, 307, 67, 307, 307, 307, 496, 538, 538, + 565, 538, 204, 504, 706, 706, 706, 651, 651, 651, + 651, 773, 773, 920, 920, 952, 888, 850, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 211, 344, 288, 691, 1038, 1044, 1040, 1045, + 1036, 1035, 1039, 1041, 1046, 917, 918, 751, 919, 921, + 922, 923, 1042, 854, 1037, 1043, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 290, 491, 44, 382, 382, 382, 382, 382, + 291, 291, 641, 159, 473, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 160, 160, 160, 187, 684, - 684, 341, 203, 610, 47, 985, 985, 985, 985, 985, - 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, - 7, 7, 371, -25, -25, -25, -25, 540, 385, 102, - 576, 358, 45, 377, 460, 460, 360, 231, 231, 231, - 231, 231, 231, -78, -78, -78, -78, -78, -66, 319, - 457, -94, 396, 423, 586, 586, 586, 586, 423, 423, - 423, 423, 750, 1029, 423, 423, 423, 511, 516, 516, - 518, 147, 147, 147, 516, 583, 777, 422, 583, 422, - 194, 92, 748, -40, 87, 412, 748, 617, 627, 198, - 143, 773, 658, 773, 1013, 757, 764, 717, 838, 860, - 1026, 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, - 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, - 1013, 286, 855, 855, 855, 552, 552, 552, 552, 552, - 552, 552, 552, 552, 552, 679, 286, 568, 626, 286, - 794, 552, 375, 758, 375, 375, 375, 375, 958, 375, - 375, 375, 375, 375, 375, 970, 769, -16, 375, 519, - 12, 12, 547, 83, 12, 12, 12, 12, 375, 375, - 375, 658, 781, 713, 666, 792, 448, 781, 781, 781, - 438, 444, 193, 447, 570, 523, 580, 760, 760, 767, - 929, 929, 760, 759, 760, 767, 934, 760, 929, 805, - 359, 648, 577, 611, 656, 929, 478, 760, 760, 760, - 760, 665, 760, 467, 433, 760, 760, 785, 774, 789, - 60, 929, 929, 929, 789, 596, 751, 751, 751, 811, - 812, 746, 771, 567, 498, 677, 348, 779, 771, 771, - 760, 640, 746, 771, 746, 771, 747, 771, 771, 771, - 746, 771, 759, 585, 771, 734, 668, 224, 771, 6, - 935, 937, 354, 940, 932, 941, 979, 942, 943, 851, - 956, 933, 945, 931, 930, 780, 703, 720, 790, 729, - 928, 768, 768, 768, 925, 768, 768, 768, 768, 768, - 768, 768, 768, 703, 788, 804, 733, 783, 960, 722, - 726, 725, 868, 1027, 1028, 737, 739, 958, 1006, 953, - 803, 730, 992, 967, 866, 848, 968, 969, 993, 1007, - 1008, 871, 761, 874, 880, 797, 971, 852, 768, 935, - 943, 933, 945, 931, 930, 763, 762, 753, 755, 749, - 745, 736, 738, 770, 1009, 924, 835, 830, 970, 926, - 703, 839, 986, 847, 994, 995, 850, 801, 772, 840, - 881, 972, 975, 976, 853, 1010, 810, 989, 795, 996, - 802, 882, 997, 998, 999, 1000, 885, 854, 856, 857, - 815, 754, 980, 786, 891, 335, 787, 796, 978, 363, - 957, 858, 894, 895, 1001, 1002, 1003, 896, 954, 816, - 990, 752, 991, 983, 817, 818, 485, 784, 778, 541, - 676, 897, 899, 900, 955, 775, 766, 821, 822, 1011, - 901, 697, 824, 740, 902, 1005, 742, 744, 756, 859, - 793, 743, 798, 977, 776, 827, 907, 829, 832, 833, - 1004, 836, 0, 0, 0, 0, 0, 0, 0, 0, + 382, 382, 382, 382, 382, 54, 54, 54, 341, 692, + 692, 190, 184, 658, 47, 1019, 1019, 1019, 1019, 1019, + 1019, 1019, 1019, 1019, 1019, 144, 144, 7, 7, 7, + 7, 7, 371, -25, -25, -25, -25, 574, 347, 764, + 474, 584, 266, 241, 338, 470, 470, 591, 591, 396, + -116, 396, 348, 348, 396, 396, 396, 770, 770, 770, + 770, 443, 559, 452, 86, 514, 479, 479, 479, 479, + 514, 514, 514, 514, 783, 795, 514, 514, 514, 642, + 653, 653, 714, 300, 300, 300, 653, 390, 765, 90, + 390, 90, 37, 156, 781, -55, -40, 292, 768, 781, + 320, 739, 314, 143, 797, 546, 797, 1034, 745, 733, + 705, 836, 876, 1047, 752, 915, 786, 916, 62, 704, + 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, + 1033, 1049, 469, 1034, 65, 1049, 1049, 1049, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 533, 65, + 466, 552, 65, 763, 469, 211, 791, 211, 211, 211, + 211, 973, 211, 211, 211, 211, 211, 211, 980, 737, + 29, 211, 344, 52, 52, 428, 58, 52, 52, 52, + 52, 211, 211, 211, 546, 743, 734, 555, 798, 195, + 743, 743, 743, 345, 135, 192, 194, 710, 713, 280, + 758, 758, 760, 931, 931, 758, 755, 758, 760, 944, + 758, 931, 799, 433, 627, 571, 603, 631, 931, 494, + 758, 758, 758, 758, 639, 758, 491, 445, 758, 758, + 709, 741, 777, 46, 931, 931, 931, 777, 585, 771, + 771, 771, 805, 808, 772, 740, 540, 507, 650, 138, + 780, 740, 740, 758, 612, 772, 740, 772, 740, 802, + 740, 740, 740, 772, 740, 755, 583, 740, 703, 646, + 60, 740, 6, 945, 947, 636, 948, 941, 949, 989, + 950, 951, 856, 963, 943, 956, 939, 932, 750, 690, + 693, 793, 784, 930, 747, 747, 747, 927, 747, 747, + 747, 747, 747, 747, 747, 747, 690, 839, 801, 766, + 731, 974, 697, 698, 779, 880, 1018, 1048, 973, 1024, + 958, 736, 699, 1004, 977, 796, 849, 978, 979, 1005, + 1025, 1026, 884, 757, 886, 887, 841, 983, 858, 747, + 945, 951, 943, 956, 939, 932, 732, 728, 726, 727, + 722, 721, 712, 719, 738, 1027, 925, 875, 842, 980, + 929, 690, 845, 1000, 835, 1008, 1009, 855, 782, 756, + 846, 889, 984, 985, 986, 859, 1028, 804, 1001, 990, + 1010, 787, 890, 1011, 1012, 1013, 1014, 892, 860, 866, + 867, 810, 761, 991, 774, 896, 48, 754, 759, 778, + 988, 654, 966, 870, 897, 898, 1015, 1016, 1017, 901, + 960, 812, 1002, 746, 1003, 993, 813, 814, 677, 769, + 1030, 735, 748, 767, 678, 681, 902, 903, 904, 962, + 742, 744, 819, 821, 1031, 762, 1032, 910, 684, 823, + 711, 911, 1023, 717, 718, 753, 873, 800, 776, 775, + 987, 749, 825, 912, 826, 828, 829, 1020, 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, - 307, 0, 0, 307, 0, 0, 0, 458, 458, 458, + 0, 0, 0, 0, 0, 0, 0, 0, 458, 458, + 458, 458, 458, 458, 307, 307, 307, 307, 0, 0, + 307, 0, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, @@ -576,42 +581,43 @@ class Php7 extends \PhpParser\ParserAbstract 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, - 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, - 291, 291, 805, 147, 147, 147, 147, 423, 423, 423, - 423, 423, -88, -88, 147, 147, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, - 0, 286, 422, 0, 759, 759, 759, 759, 0, 0, - 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 286, 422, 0, 286, 0, - 759, 759, 423, 805, 805, 314, 423, 0, 0, 0, - 0, 286, 759, 286, 552, 422, 552, 552, 12, 375, - 314, 608, 608, 608, 608, 0, 658, 805, 805, 805, - 805, 805, 805, 805, 805, 805, 805, 805, 759, 0, - 805, 0, 759, 759, 759, 0, 0, 0, 0, 0, + 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 759, 0, 0, 929, 0, 0, 0, 0, 760, 0, - 0, 0, 0, 0, 0, 760, 934, 0, 0, 0, - 0, 0, 0, 759, 0, 0, 0, 0, 0, 0, - 0, 0, 768, 801, 0, 801, 0, 768, 768, 768 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 415, 415, 291, 291, + 0, 291, 415, 415, 415, 415, 415, 415, 415, 415, + 415, 415, 291, 291, 291, 291, 291, 291, 291, 799, + 300, 300, 300, 300, 415, 415, 415, 415, 415, -88, + -88, 415, 415, 415, 300, 300, 415, 244, 415, 415, + 415, 415, 415, 415, 415, 415, 415, 415, 0, 0, + 65, 90, 415, 755, 755, 755, 755, 415, 415, 415, + 415, 90, 90, 415, 415, 415, 0, 0, 0, 0, + 0, 0, 0, 0, 65, 90, 0, 65, 0, 755, + 755, 415, 799, 799, 232, 244, 415, 0, 0, 0, + 0, 65, 755, 65, 469, 90, 469, 469, 52, 211, + 232, 453, 453, 453, 453, 0, 546, 799, 799, 799, + 799, 799, 799, 799, 799, 799, 799, 799, 755, 0, + 799, 0, 755, 755, 755, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 755, 0, 0, 931, 0, 0, 0, 0, 758, 0, + 0, 0, 0, 0, 0, 758, 944, 0, 0, 0, + 0, 0, 0, 755, 0, 0, 0, 0, 0, 0, + 0, 0, 747, 782, 0, 782, 0, 747, 747, 747, + 0, 0, 0, 0, 769, 762 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 578, 578, 578, - 578,32767,32767, 246, 103,32767,32767, 454, 372, 372, - 372,32767,32767, 522, 522, 522, 522, 522, 522,32767, - 32767,32767,32767,32767,32767, 454,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 588, 588, 588, + 588,32767,32767, 250, 103,32767,32767, 464, 382, 382, + 382,32767,32767, 532, 532, 532, 532, 532, 532,32767, + 32767,32767,32767,32767,32767, 464,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -619,128 +625,135 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 310, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 320, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 571,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 581,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 458, 437, 438, 440, - 441, 371, 523, 577, 313, 574, 370, 146, 325, 315, - 234, 316, 250, 459, 251, 460, 463, 464, 211, 279, - 367, 150, 401, 455, 403, 453, 457, 402, 377, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, - 393, 394, 375, 376, 456, 434, 433, 432, 399,32767, - 32767, 400, 404, 374, 407,32767,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 405, 406, 423, 424, 421, - 422, 425,32767, 426, 427, 428, 429,32767,32767, 302, - 32767,32767, 351, 349, 414, 415, 302,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, - 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 103,32767, 101, 518, 396, 398, - 486, 409, 410, 408, 378,32767, 493,32767, 103, 495, - 32767,32767,32767, 112,32767,32767,32767, 517,32767, 524, - 524,32767, 479, 101, 194,32767, 194, 194,32767,32767, - 32767,32767,32767,32767,32767, 585, 479, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111,32767, 194, - 111,32767,32767,32767, 101, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 189,32767, 260, 262, 103, - 539, 194,32767, 498,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 491,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 468, 447, 448, 450, + 451, 381, 533, 587, 323, 584, 380, 146, 335, 325, + 238, 326, 254, 469, 255, 470, 473, 474, 211, 283, + 377, 150, 411, 465, 413, 463, 467, 412, 387, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 385, 386, 466, 444, 443, 442, 409,32767, + 32767, 410, 414, 384, 417,32767,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 415, 416, 433, 434, 431, + 432, 435,32767, 436, 437, 438, 439,32767, 312,32767, + 32767,32767, 361, 359, 312,32767,32767, 424, 425,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 479, 419, 139,32767, 139, 524, 411, 412, 413, - 481, 524, 524, 524, 298, 281,32767,32767,32767,32767, - 496, 496, 101, 101, 101, 101, 491,32767,32767, 112, - 100, 100, 100, 100, 100, 104, 102,32767,32767,32767, - 32767, 100,32767, 102, 102,32767,32767, 217, 208, 215, - 102,32767, 543, 544, 215, 102, 219, 219, 219, 239, - 239, 470, 304, 102, 100, 102, 102, 196, 304, 304, - 32767, 102, 470, 304, 470, 304, 198, 304, 304, 304, - 470, 304,32767, 102, 304, 210, 100, 100, 304,32767, - 32767,32767, 481,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 511,32767, 528, - 541, 417, 418, 420, 526, 442, 443, 444, 445, 446, - 447, 448, 450, 573,32767, 485,32767,32767,32767,32767, - 324, 583,32767, 583,32767,32767,32767,32767,32767,32767, + 32767, 526, 441,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 103,32767, 101, 528, + 406, 408, 496, 419, 420, 418, 388,32767, 503,32767, + 103, 505,32767,32767,32767, 112,32767,32767,32767,32767, + 527,32767, 534, 534,32767, 489, 101, 194,32767, 194, + 194,32767,32767,32767,32767,32767,32767,32767, 595, 489, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 189,32767, + 264, 266, 103, 549, 194,32767, 508,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 501, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 584,32767, 524,32767,32767,32767,32767, 416, 9, - 76, 43, 44, 52, 58, 502, 503, 504, 505, 499, - 500, 506, 501,32767,32767, 507, 549,32767,32767, 525, - 576,32767,32767,32767,32767,32767,32767, 139,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 511,32767, - 137,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 524,32767,32767,32767, 300, 301,32767,32767, + 32767,32767,32767,32767, 489, 429, 139,32767, 139, 534, + 421, 422, 423, 491, 534, 534, 534, 308, 285,32767, + 32767,32767,32767, 506, 506, 101, 101, 101, 101, 501, + 32767,32767, 112, 100, 100, 100, 100, 100, 104, 102, + 32767,32767,32767,32767, 100,32767, 102, 102,32767,32767, + 221, 208, 219, 102,32767, 553, 554, 219, 102, 223, + 223, 223, 243, 243, 480, 314, 102, 100, 102, 102, + 196, 314, 314,32767, 102, 480, 314, 480, 314, 198, + 314, 314, 314, 480, 314,32767, 102, 314, 210, 100, + 100, 314,32767,32767,32767, 491,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 524,32767,32767,32767, 283, 284,32767, + 521,32767, 538, 551, 427, 428, 430, 536, 452, 453, + 454, 455, 456, 457, 458, 460, 583,32767, 495,32767, + 32767,32767,32767, 334, 593,32767, 593,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 278,32767,32767, 366,32767,32767,32767, - 32767, 345,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 152, 152, 3, 3, 327, 152, 152, 152, - 327, 152, 327, 327, 327, 152, 152, 152, 152, 152, - 152, 272, 184, 254, 257, 239, 239, 152, 337, 152 + 32767,32767, 594,32767, 534,32767,32767,32767,32767, 426, + 9, 76, 43, 44, 52, 58, 512, 513, 514, 515, + 509, 510, 516, 511,32767,32767, 517, 559,32767,32767, + 535, 586,32767,32767,32767,32767,32767,32767, 139,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 521, + 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 534,32767,32767,32767,32767, 310, 307, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 534,32767,32767,32767,32767, + 32767, 287,32767, 304,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 282,32767,32767, 376,32767,32767,32767,32767, 355,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 152, + 152, 3, 3, 337, 152, 152, 152, 337, 152, 337, + 337, 337, 152, 152, 152, 152, 152, 152, 276, 184, + 258, 261, 243, 243, 152, 347, 152 ); protected $goto = array( - 194, 194, 670, 422, 643, 463, 1264, 1265, 1022, 416, - 308, 309, 329, 563, 314, 421, 330, 423, 622, 801, - 678, 637, 586, 651, 652, 653, 165, 165, 165, 165, + 194, 194, 677, 466, 1281, 1282, 345, 428, 325, 325, + 325, 325, 536, 536, 536, 536, 665, 591, 926, 1039, + 685, 1003, 1019, 1020, 1080, 1081, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 521, 522, 412, 523, - 525, 526, 527, 528, 529, 530, 531, 532, 1091, 166, + 188, 189, 190, 215, 213, 216, 524, 525, 415, 526, + 528, 529, 530, 531, 532, 533, 534, 535, 1108, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 275, 311, 312, 313, 417, 418, 419, 568, 219, + 277, 278, 313, 314, 315, 420, 421, 422, 569, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1091, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1108, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 827, 608, 608, 824, 547, - 538, 342, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, - 1221, 1221, 1239, 1239, 288, 288, 288, 288, 1239, 1239, - 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 388, 538, - 547, 556, 557, 395, 566, 588, 602, 603, 832, 825, - 880, 875, 876, 889, 15, 833, 877, 830, 878, 879, - 831, 799, 251, 251, 883, 919, 992, 1000, 1004, 1001, - 1005, 1237, 1237, 938, 1043, 1039, 1040, 1237, 1237, 1237, - 1237, 1237, 1237, 1237, 1237, 1237, 1237, 858, 248, 248, - 248, 248, 250, 252, 533, 533, 533, 533, 487, 590, - 488, 1190, 1190, 997, 1190, 997, 494, 1290, 1290, 560, - 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, - 997, 997, 1261, 1261, 1290, 1261, 340, 1190, 930, 402, - 677, 1279, 1190, 1190, 1190, 1190, 959, 345, 1190, 1190, - 1190, 1271, 1271, 1271, 1271, 606, 640, 345, 345, 1273, - 1273, 1273, 1273, 820, 820, 805, 896, 884, 840, 885, - 897, 345, 345, 5, 345, 6, 1306, 384, 535, 535, - 559, 535, 415, 852, 597, 1257, 839, 540, 524, 524, - 345, 1289, 1289, 642, 524, 524, 524, 524, 524, 524, - 524, 524, 524, 524, 445, 805, 1140, 805, 1289, 932, - 932, 932, 932, 1063, 1064, 445, 926, 933, 386, 390, - 548, 587, 591, 1030, 1292, 331, 554, 1259, 1259, 1030, - 704, 621, 623, 823, 641, 1250, 319, 303, 660, 664, - 973, 668, 676, 969, 429, 553, 962, 936, 936, 934, - 936, 703, 601, 537, 971, 966, 343, 344, 663, 817, - 595, 609, 612, 613, 614, 615, 634, 635, 636, 680, - 439, 1186, 845, 454, 454, 439, 439, 1266, 1267, 820, - 901, 1079, 454, 394, 539, 551, 1183, 605, 540, 539, - 842, 551, 978, 272, 387, 618, 619, 981, 536, 536, - 844, 707, 646, 957, 567, 457, 458, 459, 838, 850, - 254, 254, 1297, 1298, 400, 401, 976, 976, 464, 649, - 1182, 650, 1028, 404, 405, 406, 1187, 661, 424, 1032, - 407, 564, 600, 815, 338, 424, 854, 848, 853, 841, - 1027, 1031, 1009, 1002, 1006, 1003, 1007, 1185, 941, 1188, - 1247, 1248, 943, 0, 1074, 439, 439, 439, 439, 439, - 439, 439, 439, 439, 439, 439, 0, 468, 439, 585, - 1056, 931, 681, 667, 667, 0, 495, 673, 1054, 1171, - 912, 0, 0, 1172, 1175, 913, 1176, 0, 0, 0, - 0, 0, 0, 1072, 857 + 211, 834, 587, 425, 645, 548, 541, 830, 831, 419, + 310, 311, 332, 564, 316, 424, 333, 426, 623, 832, + 973, 947, 947, 945, 947, 710, 808, 540, 982, 977, + 827, 827, 607, 642, 391, 541, 548, 557, 558, 398, + 567, 589, 603, 604, 839, 865, 887, 882, 883, 896, + 15, 840, 884, 837, 885, 886, 838, 457, 457, 639, + 890, 656, 657, 658, 987, 987, 457, 609, 609, 806, + 1060, 1056, 1057, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + 1238, 1238, 1238, 1256, 1256, 346, 347, 812, 949, 1256, + 1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256, 1014, + 1013, 1207, 1008, 1207, 1008, 1207, 561, 442, 1008, 1008, + 1008, 343, 442, 1008, 442, 1008, 1008, 1008, 1008, 1008, + 1008, 1008, 1008, 1008, 1008, 251, 251, 1296, 812, 1207, + 812, 1307, 1307, 970, 1207, 1207, 1207, 1207, 1017, 1018, + 1207, 1207, 1207, 1288, 1288, 1288, 1288, 827, 1307, 321, + 305, 248, 248, 248, 248, 250, 252, 387, 903, 1254, + 1254, 619, 620, 904, 1203, 1254, 1254, 1254, 1254, 1254, + 1254, 1254, 1254, 1254, 1254, 527, 527, 280, 280, 280, + 280, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 527, 941, 405, 684, 560, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 348, 644, 442, 389, + 393, 549, 588, 592, 847, 1157, 348, 348, 538, 1204, + 538, 891, 538, 892, 432, 418, 822, 598, 666, 859, + 348, 348, 846, 348, 5, 1323, 6, 824, 554, 1283, + 1284, 650, 1205, 1264, 1265, 602, 448, 543, 565, 601, + 348, 943, 943, 943, 943, 334, 932, 448, 937, 944, + 403, 404, 1278, 852, 1278, 654, 1278, 655, 397, 407, + 408, 409, 1200, 668, 849, 1045, 410, 542, 552, 992, + 341, 490, 542, 491, 552, 714, 467, 390, 861, 497, + 1049, 1290, 1290, 1290, 1290, 1267, 954, 568, 460, 461, + 462, 1091, 857, 471, 0, 1314, 1315, 555, 0, 0, + 0, 711, 622, 624, 0, 643, 0, 1274, 670, 667, + 671, 984, 675, 683, 980, 0, 0, 0, 0, 0, + 855, 596, 610, 613, 614, 615, 616, 636, 637, 638, + 687, 860, 848, 1044, 1048, 908, 1096, 0, 543, 0, + 0, 952, 606, 1306, 1306, 0, 1047, 989, 0, 0, + 1276, 1276, 1047, 254, 254, 851, 0, 648, 968, 427, + 1306, 0, 0, 845, 942, 427, 0, 0, 0, 0, + 0, 0, 0, 1015, 1015, 1199, 0, 1309, 649, 1026, + 1022, 1023, 0, 0, 0, 0, 1089, 864, 0, 0, + 0, 586, 1073, 0, 688, 674, 674, 1202, 498, 680, + 1071, 1188, 919, 0, 0, 1189, 1192, 920, 1193, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 272, 0, 0, 0, + 0, 539, 0, 539 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 166, 166, 166, 119, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 7, - 9, 84, 122, 84, 84, 84, 42, 42, 42, 42, + 42, 42, 72, 172, 172, 172, 95, 87, 23, 23, + 23, 23, 105, 105, 105, 105, 87, 105, 87, 125, + 9, 87, 87, 87, 142, 142, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -754,87 +767,95 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 104, 104, 26, 75, - 75, 93, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 160, 160, 24, 24, 24, 24, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 15, 27, - 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, - 15, 6, 5, 5, 15, 87, 87, 87, 87, 87, - 87, 161, 161, 49, 15, 15, 15, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 45, 5, 5, - 5, 5, 5, 5, 103, 103, 103, 103, 147, 103, - 147, 72, 72, 72, 72, 72, 147, 173, 173, 162, - 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 122, 122, 173, 122, 169, 72, 89, 89, - 89, 171, 72, 72, 72, 72, 99, 14, 72, 72, - 72, 9, 9, 9, 9, 55, 55, 14, 14, 122, - 122, 122, 122, 22, 22, 12, 72, 64, 35, 64, - 72, 14, 14, 46, 14, 46, 14, 61, 19, 19, - 100, 19, 13, 35, 13, 122, 35, 14, 163, 163, - 14, 172, 172, 63, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 19, 12, 143, 12, 172, 19, - 19, 19, 19, 136, 136, 19, 19, 19, 58, 58, - 58, 58, 58, 122, 172, 29, 48, 122, 122, 122, - 48, 48, 48, 25, 48, 14, 159, 159, 48, 48, - 48, 48, 48, 48, 109, 9, 25, 25, 25, 25, - 25, 25, 9, 25, 25, 25, 93, 93, 14, 18, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 23, 20, 39, 141, 141, 23, 23, 168, 168, 22, - 17, 17, 141, 28, 9, 9, 152, 17, 14, 9, - 37, 9, 17, 24, 9, 83, 83, 106, 24, 24, - 17, 95, 17, 17, 9, 9, 9, 9, 17, 9, - 5, 5, 9, 9, 80, 80, 103, 103, 149, 80, - 17, 80, 121, 80, 80, 80, 20, 80, 113, 124, - 80, 2, 2, 20, 80, 113, 41, 9, 16, 16, - 16, 16, 113, 113, 113, 113, 113, 14, 16, 20, - 20, 20, 92, -1, 139, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, -1, 82, 23, 8, - 8, 16, 8, 8, 8, -1, 8, 8, 8, 78, - 78, -1, -1, 78, 78, 78, 78, -1, -1, -1, - -1, -1, -1, 16, 16 + 42, 15, 128, 65, 65, 75, 75, 25, 26, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 27, + 25, 25, 25, 25, 25, 25, 7, 25, 25, 25, + 22, 22, 55, 55, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 15, 45, 15, 15, 15, 15, + 75, 15, 15, 15, 15, 15, 15, 147, 147, 84, + 15, 84, 84, 84, 105, 105, 147, 106, 106, 6, + 15, 15, 15, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 166, 166, 95, 95, 12, 49, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 166, 116, + 116, 72, 72, 72, 72, 72, 168, 23, 72, 72, + 72, 175, 23, 72, 23, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 5, 5, 177, 12, 72, + 12, 179, 179, 101, 72, 72, 72, 72, 117, 117, + 72, 72, 72, 9, 9, 9, 9, 22, 179, 165, + 165, 5, 5, 5, 5, 5, 5, 61, 72, 167, + 167, 83, 83, 72, 20, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 169, 169, 24, 24, 24, + 24, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 91, 91, 91, 102, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 14, 63, 23, 58, + 58, 58, 58, 58, 35, 149, 14, 14, 19, 20, + 19, 64, 19, 64, 111, 13, 20, 13, 114, 35, + 14, 14, 35, 14, 46, 14, 46, 18, 9, 174, + 174, 118, 20, 20, 20, 9, 19, 14, 2, 2, + 14, 19, 19, 19, 19, 29, 90, 19, 19, 19, + 80, 80, 128, 39, 128, 80, 128, 80, 28, 80, + 80, 80, 158, 80, 37, 127, 80, 9, 9, 108, + 80, 153, 9, 153, 9, 97, 155, 9, 41, 153, + 130, 128, 128, 128, 128, 14, 94, 9, 9, 9, + 9, 145, 9, 82, -1, 9, 9, 48, -1, -1, + -1, 48, 48, 48, -1, 48, -1, 128, 14, 48, + 48, 48, 48, 48, 48, -1, -1, -1, -1, -1, + 9, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 16, 16, 16, 16, 17, 17, -1, 14, -1, + -1, 16, 17, 178, 178, -1, 128, 17, -1, -1, + 128, 128, 128, 5, 5, 17, -1, 17, 17, 115, + 178, -1, -1, 17, 16, 115, -1, -1, -1, -1, + -1, -1, -1, 115, 115, 17, -1, 178, 115, 115, + 115, 115, -1, -1, -1, -1, 16, 16, -1, -1, + -1, 8, 8, -1, 8, 8, 8, 14, 8, 8, + 8, 78, 78, -1, -1, 78, 78, 78, 78, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, + -1, 24, -1, 24 ); protected $gotoBase = array( - 0, 0, -203, 0, 0, 221, 208, 10, 512, 7, - 0, 0, 24, 1, 5, -174, 47, -23, 105, 61, - 38, 0, -10, 158, 181, 379, 164, 205, 102, 84, - 0, 0, 0, 0, 0, -43, 0, 107, 0, 104, - 0, 54, -1, 0, 0, 235, -384, 0, -307, 210, - 0, 0, 0, 0, 0, 266, 0, 0, 324, 0, - 0, 286, 0, 103, 298, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -167, 0, 0, 129, 62, - -14, 0, 53, -22, -669, 0, 0, -52, 0, -11, - 0, 0, 68, -299, 0, 52, 0, 0, 0, 262, - 288, 0, 0, 227, -73, 0, 87, 0, 0, 118, - 0, 0, 0, 209, 0, 0, 0, 0, 0, 6, - 0, 108, 15, 0, 46, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 91, 0, 0, 69, - 0, 390, 0, 86, 0, 0, 0, -224, 0, 37, - 0, 0, 77, 0, 0, 0, 0, 0, 0, 70, - -57, -8, 241, 99, 0, 0, -290, 0, 65, 257, - 0, 261, 39, -35, 0, 0 + 0, 0, -283, 0, 0, 284, 216, 177, 554, 7, + 0, 0, -46, 51, 72, -181, 57, 49, 91, 111, + -62, 0, -135, 5, 334, 163, 164, 175, 94, 122, + 0, 0, 0, 0, 0, 10, 0, 98, 0, 103, + 0, 13, -1, 0, 0, 193, -320, 0, -223, 225, + 0, 0, 0, 0, 0, 153, 0, 0, 325, 0, + 0, 276, 0, 127, 362, -76, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -174, 0, 0, 168, 140, + -61, 0, -4, -149, -478, 0, 0, -263, 0, 0, + 88, 50, 0, 0, 19, -467, 0, 43, 0, 0, + 0, 259, 312, 0, 0, -15, -12, 0, 76, 0, + 0, 110, 0, 0, 109, 261, -16, 16, 114, 0, + 0, 0, 0, 0, 0, 17, 0, 68, 155, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -248, 0, 0, 23, 0, 184, 0, 104, + 0, 0, 0, -44, 0, 12, 0, 0, 70, 0, + 0, 0, 0, 0, 0, -9, 4, 80, 238, 96, + 0, 0, -294, 0, 34, 242, 0, 257, 209, -13, + 0, 0 ); protected $gotoDefault = array( - -32768, 499, 711, 4, 712, 905, 788, 797, 583, 515, - 679, 339, 610, 413, 1255, 882, 1078, 565, 816, 1199, - 1207, 446, 819, 324, 701, 864, 865, 866, 391, 376, - 382, 389, 632, 611, 481, 851, 442, 843, 473, 846, - 441, 855, 162, 410, 497, 859, 3, 861, 542, 892, - 377, 869, 378, 656, 871, 550, 873, 874, 385, 392, - 393, 1083, 558, 607, 886, 243, 552, 887, 375, 888, - 895, 380, 383, 665, 453, 492, 486, 403, 1058, 594, - 629, 450, 467, 617, 616, 604, 466, 425, 408, 928, - 474, 451, 942, 341, 950, 709, 1090, 624, 476, 958, - 625, 965, 968, 516, 517, 465, 980, 269, 983, 477, - 1015, 647, 648, 995, 626, 627, 1013, 460, 584, 1021, - 443, 1029, 1243, 444, 1033, 262, 1036, 276, 409, 426, - 1041, 1042, 8, 1048, 671, 672, 10, 273, 496, 1073, - 666, 440, 1089, 430, 1159, 1161, 544, 478, 1179, 1178, - 659, 493, 1184, 1246, 438, 518, 461, 310, 519, 302, - 327, 307, 534, 289, 328, 520, 462, 1252, 1260, 325, - 30, 1280, 1291, 335, 562, 599 + -32768, 502, 718, 4, 719, 912, 795, 804, 584, 518, + 686, 342, 611, 416, 1272, 889, 1095, 566, 823, 1216, + 1224, 449, 826, 326, 708, 871, 872, 873, 394, 379, + 385, 392, 634, 612, 484, 858, 445, 850, 476, 853, + 444, 862, 162, 413, 500, 866, 3, 868, 545, 899, + 380, 876, 381, 661, 878, 551, 880, 881, 388, 395, + 396, 1100, 559, 608, 893, 243, 553, 894, 378, 895, + 902, 383, 386, 672, 456, 495, 489, 406, 1075, 595, + 631, 453, 470, 618, 617, 605, 469, 1011, 411, 328, + 931, 939, 477, 454, 953, 344, 961, 716, 1107, 625, + 479, 969, 626, 976, 979, 519, 520, 468, 991, 268, + 994, 480, 1032, 651, 1005, 1006, 652, 627, 1028, 628, + 653, 629, 1030, 463, 585, 1038, 446, 1046, 1260, 447, + 1050, 262, 1053, 274, 412, 429, 1058, 1059, 8, 1065, + 678, 679, 10, 273, 499, 1090, 673, 443, 1106, 433, + 1176, 1178, 547, 481, 1196, 1195, 664, 496, 1201, 1263, + 441, 521, 464, 312, 522, 304, 330, 309, 537, 291, + 331, 523, 465, 1269, 1277, 327, 30, 1297, 1308, 338, + 563, 600 ); protected $ruleToNonTerminal = array( @@ -859,23 +880,24 @@ class Php7 extends \PhpParser\ParserAbstract 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, - 88, 88, 81, 81, 81, 82, 82, 85, 85, 83, - 83, 89, 90, 90, 56, 56, 64, 64, 67, 67, - 67, 66, 91, 91, 92, 57, 57, 57, 57, 93, - 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, - 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, - 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, - 105, 105, 107, 107, 108, 108, 108, 108, 106, 106, - 106, 110, 110, 110, 110, 87, 87, 113, 113, 113, - 111, 111, 114, 114, 112, 112, 115, 115, 116, 116, - 116, 116, 109, 109, 80, 80, 80, 20, 20, 20, - 118, 117, 117, 119, 119, 119, 119, 59, 120, 120, - 121, 60, 123, 123, 124, 124, 125, 125, 84, 126, - 126, 126, 126, 126, 126, 131, 131, 132, 132, 133, - 133, 133, 133, 133, 134, 135, 135, 130, 130, 127, - 127, 129, 129, 137, 137, 136, 136, 136, 136, 136, - 136, 136, 128, 138, 138, 140, 139, 139, 61, 100, - 141, 141, 55, 55, 42, 42, 42, 42, 42, 42, + 88, 88, 81, 81, 89, 89, 90, 90, 90, 82, + 82, 85, 85, 83, 83, 91, 92, 92, 56, 56, + 64, 64, 67, 67, 67, 66, 93, 93, 94, 57, + 57, 57, 57, 95, 95, 96, 96, 97, 97, 98, + 99, 99, 100, 100, 101, 101, 54, 54, 50, 50, + 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, + 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, + 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, + 87, 115, 115, 115, 116, 116, 113, 113, 117, 117, + 119, 119, 120, 120, 114, 121, 121, 118, 122, 122, + 122, 122, 111, 111, 80, 80, 80, 20, 20, 20, + 124, 123, 123, 125, 125, 125, 125, 59, 126, 126, + 127, 60, 129, 129, 130, 130, 131, 131, 84, 132, + 132, 132, 132, 132, 132, 137, 137, 138, 138, 139, + 139, 139, 139, 139, 140, 141, 141, 136, 136, 133, + 133, 135, 135, 143, 143, 142, 142, 142, 142, 142, + 142, 142, 134, 144, 144, 146, 145, 145, 61, 102, + 147, 147, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -884,20 +906,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 148, 142, 142, - 147, 147, 150, 151, 151, 152, 153, 153, 153, 19, - 19, 72, 72, 72, 72, 143, 143, 143, 143, 155, - 155, 144, 144, 146, 146, 146, 149, 149, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 161, 161, 104, - 163, 163, 163, 163, 145, 145, 145, 145, 145, 145, - 145, 145, 58, 58, 158, 158, 158, 158, 164, 164, - 154, 154, 154, 165, 165, 165, 165, 165, 165, 73, - 73, 65, 65, 65, 65, 122, 122, 122, 122, 168, - 167, 157, 157, 157, 157, 157, 157, 157, 156, 156, - 156, 166, 166, 166, 166, 103, 162, 170, 170, 169, - 169, 171, 171, 171, 171, 171, 171, 171, 171, 159, - 159, 159, 159, 173, 174, 172, 172, 172, 172, 172, - 172, 172, 172, 175, 175, 175, 175 + 42, 42, 42, 42, 42, 42, 42, 154, 148, 148, + 153, 153, 156, 157, 157, 158, 159, 159, 159, 19, + 19, 72, 72, 72, 72, 149, 149, 149, 149, 161, + 161, 150, 150, 152, 152, 152, 155, 155, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 167, 167, 106, + 169, 169, 169, 169, 151, 151, 151, 151, 151, 151, + 151, 151, 58, 58, 164, 164, 164, 164, 170, 170, + 160, 160, 160, 171, 171, 171, 171, 171, 171, 73, + 73, 65, 65, 65, 65, 128, 128, 128, 128, 174, + 173, 163, 163, 163, 163, 163, 163, 163, 162, 162, + 162, 172, 172, 172, 172, 105, 168, 176, 176, 175, + 175, 177, 177, 177, 177, 177, 177, 177, 177, 165, + 165, 165, 165, 179, 180, 178, 178, 178, 178, 178, + 178, 178, 178, 181, 181, 181, 181 ); protected $ruleToLength = array( @@ -922,15 +944,16 @@ class Php7 extends \PhpParser\ParserAbstract 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, - 0, 2, 1, 2, 2, 0, 2, 0, 2, 0, - 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, - 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, - 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, - 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, - 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, - 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, - 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, + 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, 6, 8, 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, 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, @@ -1633,255 +1656,255 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = 0; }, 213 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 214 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 215 => function ($stackPos) { - $this->semValue = null; + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 217 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 218 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 219 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 220 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 221 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 222 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 223 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array(); }, 224 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 226 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 228 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 229 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 230 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 232 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 233 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 234 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 239 => function ($stackPos) { - $this->semValue = array(); - }, - 240 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 241 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 242 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 245 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 246 => function ($stackPos) { - $this->semValue = []; - }, - 247 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 248 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 249 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 250 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 251 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 252 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 253 => function ($stackPos) { + 231 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 254 => function ($stackPos) { - $this->semValue = array(); + 232 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 255 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 256 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 257 => function ($stackPos) { - $this->semValue = array(); - }, - 258 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 259 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 260 => function ($stackPos) { + 233 => function ($stackPos) { $this->semValue = null; }, - 261 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 234 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 262 => function ($stackPos) { - $this->semValue = null; - }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 265 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 266 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 267 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 268 => function ($stackPos) { + 235 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 269 => function ($stackPos) { - $this->semValue = array(); - }, - 270 => function ($stackPos) { + 236 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 271 => function ($stackPos) { + 237 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, + 238 => function ($stackPos) { + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 239 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 240 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 241 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 242 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(5-3)]; + }, + 243 => function ($stackPos) { + $this->semValue = array(); + }, + 244 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 245 => function ($stackPos) { + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 246 => function ($stackPos) { + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 247 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 248 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 249 => function ($stackPos) { + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 250 => function ($stackPos) { + $this->semValue = []; + }, + 251 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 252 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 253 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 254 => function ($stackPos) { + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 255 => function ($stackPos) { + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 256 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 257 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 258 => function ($stackPos) { + $this->semValue = array(); + }, + 259 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 260 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 261 => function ($stackPos) { + $this->semValue = array(); + }, + 262 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 263 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 264 => function ($stackPos) { + $this->semValue = null; + }, + 265 => function ($stackPos) { + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 266 => function ($stackPos) { + $this->semValue = null; + }, + 267 => function ($stackPos) { + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 268 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 269 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + }, + 270 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 271 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, 272 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 273 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 274 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 275 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 276 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = 0; }, 277 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 278 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + }, + 279 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + }, + 280 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + }, + 281 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 282 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 279 => function ($stackPos) { + 283 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 280 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - }, - 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 282 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 283 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 284 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 285 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 286 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 288 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 290 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 291 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 292 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 293 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 296 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -1893,698 +1916,697 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 299 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 300 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 301 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 302 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 304 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 305 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 306 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); - }, - 310 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 311 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 312 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 313 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 314 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 316 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); - }, - 317 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 318 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 319 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 320 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 309 => function ($stackPos) { + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 310 => function ($stackPos) { + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 311 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 312 => function ($stackPos) { + $this->semValue = null; + }, + 313 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 314 => function ($stackPos) { + $this->semValue = null; + }, + 315 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 316 => function ($stackPos) { + $this->semValue = null; + }, + 317 => function ($stackPos) { + $this->semValue = array(); + }, + 318 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 319 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-2)]); + }, + 320 => function ($stackPos) { + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, 321 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 322 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 327 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 328 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 329 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 330 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 331 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 332 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 333 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 334 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 337 => function ($stackPos) { $this->semValue = array(); }, 338 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 339 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 340 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 341 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 342 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = null; /* will be skipped */ }, 345 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 346 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 347 => function ($stackPos) { - $this->semValue = null; - }, - 348 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 350 => function ($stackPos) { - $this->semValue = 0; - }, - 351 => function ($stackPos) { - $this->semValue = 0; - }, - 352 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 354 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 355 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 356 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 357 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 358 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 359 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 360 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 361 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; - }, - 362 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 363 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 364 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 365 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 366 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 367 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 368 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 369 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 370 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 371 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 372 => function ($stackPos) { $this->semValue = array(); }, - 373 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 374 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 375 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 376 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 377 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 378 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 379 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 380 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 384 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 386 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 398 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 399 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 400 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 401 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 417 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 418 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 419 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 420 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 430 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 431 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, + 347 => function ($stackPos) { + $this->semValue = array(); + }, + 348 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 349 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 350 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 351 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 352 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 353 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 354 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 355 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 356 => function ($stackPos) { + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + }, + 357 => function ($stackPos) { + $this->semValue = null; + }, + 358 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 359 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 360 => function ($stackPos) { + $this->semValue = 0; + }, + 361 => function ($stackPos) { + $this->semValue = 0; + }, + 362 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 363 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 364 => function ($stackPos) { + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 365 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + }, + 366 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + }, + 367 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + }, + 368 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_STATIC; + }, + 369 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + }, + 370 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + }, + 371 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 372 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 373 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 374 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 375 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 376 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 377 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 378 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 379 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 380 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 381 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 382 => function ($stackPos) { + $this->semValue = array(); + }, + 383 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 384 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 385 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 386 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 387 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 388 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 389 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 390 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 391 => function ($stackPos) { + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 392 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 393 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 394 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 395 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 396 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 397 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 398 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 399 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 400 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 401 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 402 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 403 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 404 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 405 => function ($stackPos) { + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 406 => function ($stackPos) { + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 407 => function ($stackPos) { + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 408 => function ($stackPos) { + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 409 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 410 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 411 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 412 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 413 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 414 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 415 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 416 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 417 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 418 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 419 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 420 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 421 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 422 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 423 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 424 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 425 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 426 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 427 => function ($stackPos) { + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 428 => function ($stackPos) { + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 429 => function ($stackPos) { + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 430 => function ($stackPos) { + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 431 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, 432 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 437 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 438 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 440 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 441 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 442 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 443 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 444 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 445 => function ($stackPos) { + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 446 => function ($stackPos) { + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 447 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 448 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 449 => function ($stackPos) { + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 450 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 451 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 452 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 453 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 444 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 459 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 450 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 452 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 468 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 479 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = array(); }, - 471 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 472 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 473 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 474 => function ($stackPos) { + 484 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 475 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 481 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 486 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 488 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 490 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 491 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 496 => function ($stackPos) { - $this->semValue = array(); - }, - 497 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 496 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 497 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, 498 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 499 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 500 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 501 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 502 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 503 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 504 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 505 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 507 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 508 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 509 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 510 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 511 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 512 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 513 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 514 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 515 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 516 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 517 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 518 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 519 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 510 => function ($stackPos) { + 520 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 511 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 512 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)]), $attrs); + 522 => function ($stackPos) { + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 513 => function ($stackPos) { + 523 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, - 514 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 519 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 520 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); - }, - 521 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 522 => function ($stackPos) { - $this->semValue = null; - }, - 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 524 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 525 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 526 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2596,207 +2618,237 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 536 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 537 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 538 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 539 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 542 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 544 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 545 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 544 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 545 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 546 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 548 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = null; }, 550 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 554 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 555 => function ($stackPos) { + 554 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, + 555 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 556 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 557 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 564 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 565 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); - }, - 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 568 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, - 569 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 570 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 573 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 574 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 575 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 578 => function ($stackPos) { - $this->semValue = null; - }, - 579 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 580 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 581 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 582 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 583 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 584 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 586 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 587 => function ($stackPos) { + 563 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 564 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 588 => function ($stackPos) { + 565 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 589 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 566 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 590 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 567 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 591 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + 568 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 592 => function ($stackPos) { + 569 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, + 570 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 571 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 572 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 573 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 574 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 575 => function ($stackPos) { + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 576 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + }, + 577 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 578 => function ($stackPos) { + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + }, + 579 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 580 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 581 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 582 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 583 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 584 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 585 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 586 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 587 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 588 => function ($stackPos) { + $this->semValue = null; + }, + 589 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 590 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 591 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 592 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + }, 593 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 594 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 596 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 597 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 598 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 599 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 600 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 601 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 602 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 603 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 604 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 605 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 606 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/www/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php index 5ee5a64b..301d3c6a 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -664,6 +664,7 @@ abstract class ParserAbstract implements Parser 'false' => true, 'mixed' => true, 'never' => true, + 'true' => true, ]; if (!$name->isUnqualified()) { @@ -875,6 +876,15 @@ abstract class ParserAbstract implements Parser return $attributes; } + protected function checkClassModifier($a, $b, $modifierPos) { + try { + Class_::verifyClassModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + } + protected function checkModifier($a, $b, $modifierPos) { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index bb70de65..c256e897 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -46,7 +46,15 @@ class Standard extends PrettyPrinterAbstract } protected function pUnionType(Node\UnionType $node) { - return $this->pImplode($node->types, '|'); + $types = []; + foreach ($node->types as $typeNode) { + if ($typeNode instanceof Node\IntersectionType) { + $types[] = '('. $this->p($typeNode) . ')'; + continue; + } + $types[] = $this->p($typeNode); + } + return implode('|', $types); } protected function pIntersectionType(Node\IntersectionType $node) { diff --git a/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 2c7fc307..82b1e355 100644 --- a/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/www/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -923,11 +923,14 @@ abstract class PrettyPrinterAbstract foreach ($delayedAdd as $delayedAddNode) { if (!$first) { $result .= $insertStr; + if ($insertNewline) { + $result .= $this->nl; + } } $result .= $this->p($delayedAddNode, true); $first = false; } - $result .= $extraRight; + $result .= $extraRight === "\n" ? $this->nl : $extraRight; } return $result; @@ -1454,6 +1457,16 @@ abstract class PrettyPrinterAbstract 'Stmt_ClassMethod->params' => ['(', '', ''], 'Stmt_Interface->extends' => [null, ' extends ', ''], 'Stmt_Function->params' => ['(', '', ''], + 'Stmt_Interface->attrGroups' => [null, '', "\n"], + 'Stmt_Class->attrGroups' => [null, '', "\n"], + 'Stmt_ClassConst->attrGroups' => [null, '', "\n"], + 'Stmt_ClassMethod->attrGroups' => [null, '', "\n"], + 'Stmt_Function->attrGroups' => [null, '', "\n"], + 'Stmt_Property->attrGroups' => [null, '', "\n"], + 'Stmt_Trait->attrGroups' => [null, '', "\n"], + 'Expr_ArrowFunction->attrGroups' => [null, '', ' '], + 'Expr_Closure->attrGroups' => [null, '', ' '], + 'Expr_PrintableNewAnonClass->attrGroups' => [\T_NEW, ' ', ''], /* These cannot be empty to start with: * Expr_Isset->vars diff --git a/www/vendor/phpdocumentor/reflection-common/.github/dependabot.yml b/www/vendor/phpdocumentor/reflection-common/.github/dependabot.yml deleted file mode 100644 index c630ffa6..00000000 --- a/www/vendor/phpdocumentor/reflection-common/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: composer - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/www/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml b/www/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml deleted file mode 100644 index 484410e9..00000000 --- a/www/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml +++ /dev/null @@ -1,223 +0,0 @@ -on: - push: - branches: - - 2.x - pull_request: -name: Qa workflow -jobs: - setup: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - - name: Restore/cache tools folder - uses: actions/cache@v1 - with: - path: tools - key: all-tools-${{ github.sha }} - restore-keys: | - all-tools-${{ github.sha }}- - all-tools- - - - name: composer - uses: docker://composer - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: install --no-interaction --prefer-dist --optimize-autoloader - - - name: Install phive - run: make install-phive - - - name: Install PHAR dependencies - run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,8A03EA3B385DBAA1 --force-accept-unsigned - - phpunit-with-coverage: - runs-on: ubuntu-latest - name: Unit tests - needs: setup - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.2 - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - coverage: pcov - - - name: Restore/cache tools folder - uses: actions/cache@v1 - with: - path: tools - key: all-tools-${{ github.sha }} - restore-keys: | - all-tools-${{ github.sha }}- - all-tools- - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ubuntu-latest-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ubuntu-latest-composer- - - - name: Install Composer dependencies - run: | - composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - - - name: Run PHPUnit - run: php tools/phpunit - - phpunit: - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: - - ubuntu-latest - - windows-latest - - macOS-latest - php-versions: ['7.2', '7.3', '7.4', '8.0'] - name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }} - needs: - - setup - - phpunit-with-coverage - steps: - - uses: actions/checkout@v2 - - - name: Restore/cache tools folder - uses: actions/cache@v1 - with: - path: tools - key: all-tools-${{ github.sha }} - restore-keys: | - all-tools-${{ github.sha }}- - all-tools- - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer dependencies - run: | - composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - - - name: Run PHPUnit - continue-on-error: true - run: php tools/phpunit - - codestyle: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: Code style check - uses: phpDocumentor/coding-standard@latest - with: - args: -s - - phpstan: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: PHPStan - uses: phpDocumentor/phpstan-ga@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: analyse src --configuration phpstan.neon - - psalm: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.2 - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - tools: psalm - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer dependencies - run: | - composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - - - name: Psalm - run: psalm --output-format=github - - bc_check: - name: BC Check - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - name: fetch tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga diff --git a/www/vendor/phpdocumentor/reflection-common/LICENSE b/www/vendor/phpdocumentor/reflection-common/LICENSE deleted file mode 100644 index ed6926c1..00000000 --- a/www/vendor/phpdocumentor/reflection-common/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 phpDocumentor - -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/www/vendor/phpdocumentor/reflection-common/README.md b/www/vendor/phpdocumentor/reflection-common/README.md deleted file mode 100644 index 70f830dc..00000000 --- a/www/vendor/phpdocumentor/reflection-common/README.md +++ /dev/null @@ -1,11 +0,0 @@ -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -![Qa workflow](https://github.com/phpDocumentor/ReflectionCommon/workflows/Qa%20workflow/badge.svg) -[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/ReflectionCommon.svg)](https://coveralls.io/github/phpDocumentor/ReflectionCommon?branch=master) -[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master) -[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master) -[![Stable Version](https://img.shields.io/packagist/v/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common) -[![Unstable Version](https://img.shields.io/packagist/vpre/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common) - - -ReflectionCommon -================ diff --git a/www/vendor/phpdocumentor/reflection-common/composer.json b/www/vendor/phpdocumentor/reflection-common/composer.json deleted file mode 100644 index 4d128b49..00000000 --- a/www/vendor/phpdocumentor/reflection-common/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "phpdocumentor/reflection-common", - "keywords": ["phpdoc", "phpDocumentor", "reflection", "static analysis", "FQSEN"], - "homepage": "http://www.phpdoc.org", - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "license": "MIT", - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "require": { - "php": "^7.2 || ^8.0" - }, - "autoload" : { - "psr-4" : { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "require-dev": { - }, - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - } -} diff --git a/www/vendor/phpdocumentor/reflection-common/src/Element.php b/www/vendor/phpdocumentor/reflection-common/src/Element.php deleted file mode 100644 index 8923e4fb..00000000 --- a/www/vendor/phpdocumentor/reflection-common/src/Element.php +++ /dev/null @@ -1,30 +0,0 @@ -fqsen = $fqsen; - - if (isset($matches[2])) { - $this->name = $matches[2]; - } else { - $matches = explode('\\', $fqsen); - $name = end($matches); - assert(is_string($name)); - $this->name = trim($name, '()'); - } - } - - /** - * converts this class to string. - */ - public function __toString() : string - { - return $this->fqsen; - } - - /** - * Returns the name of the element without path. - */ - public function getName() : string - { - return $this->name; - } -} diff --git a/www/vendor/phpdocumentor/reflection-common/src/Location.php b/www/vendor/phpdocumentor/reflection-common/src/Location.php deleted file mode 100644 index 177deede..00000000 --- a/www/vendor/phpdocumentor/reflection-common/src/Location.php +++ /dev/null @@ -1,53 +0,0 @@ -lineNumber = $lineNumber; - $this->columnNumber = $columnNumber; - } - - /** - * Returns the line number that is covered by this location. - */ - public function getLineNumber() : int - { - return $this->lineNumber; - } - - /** - * Returns the column number (character position on a line) for this location object. - */ - public function getColumnNumber() : int - { - return $this->columnNumber; - } -} diff --git a/www/vendor/phpdocumentor/reflection-common/src/Project.php b/www/vendor/phpdocumentor/reflection-common/src/Project.php deleted file mode 100644 index 57839fd1..00000000 --- a/www/vendor/phpdocumentor/reflection-common/src/Project.php +++ /dev/null @@ -1,25 +0,0 @@ -create($docComment); -``` - -The `create` method will yield an object of type `\phpDocumentor\Reflection\DocBlock` -whose methods can be queried: - -```php -// Contains the summary for this DocBlock -$summary = $docblock->getSummary(); - -// Contains \phpDocumentor\Reflection\DocBlock\Description object -$description = $docblock->getDescription(); - -// You can either cast it to string -$description = (string) $docblock->getDescription(); - -// Or use the render method to get a string representation of the Description. -$description = $docblock->getDescription()->render(); -``` - -> For more examples it would be best to review the scripts in the [`/examples` folder](/examples). diff --git a/www/vendor/phpdocumentor/reflection-docblock/composer.json b/www/vendor/phpdocumentor/reflection-docblock/composer.json deleted file mode 100644 index d9076302..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "phpdocumentor/reflection-docblock", - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1", - "phpdocumentor/reflection-common": "^2.2", - "ext-filter": "*" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "phpDocumentor\\Reflection\\": ["tests/unit", "tests/integration"] - } - }, - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php deleted file mode 100644 index cc33e60e..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php +++ /dev/null @@ -1,228 +0,0 @@ -summary = $summary; - $this->description = $description ?: new DocBlock\Description(''); - foreach ($tags as $tag) { - $this->addTag($tag); - } - - $this->context = $context; - $this->location = $location; - - $this->isTemplateEnd = $isTemplateEnd; - $this->isTemplateStart = $isTemplateStart; - } - - public function getSummary(): string - { - return $this->summary; - } - - public function getDescription(): DocBlock\Description - { - return $this->description; - } - - /** - * Returns the current context. - */ - public function getContext(): ?Types\Context - { - return $this->context; - } - - /** - * Returns the current location. - */ - public function getLocation(): ?Location - { - return $this->location; - } - - /** - * Returns whether this DocBlock is the start of a Template section. - * - * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker - * (`#@+`) that is appended directly after the opening `/**` of a DocBlock. - * - * An example of such an opening is: - * - * ``` - * /**#@+ - * * My DocBlock - * * / - * ``` - * - * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all - * elements that follow until another DocBlock is found that contains the closing marker (`#@-`). - * - * @see self::isTemplateEnd() for the check whether a closing marker was provided. - */ - public function isTemplateStart(): bool - { - return $this->isTemplateStart; - } - - /** - * Returns whether this DocBlock is the end of a Template section. - * - * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality. - */ - public function isTemplateEnd(): bool - { - return $this->isTemplateEnd; - } - - /** - * Returns the tags for this DocBlock. - * - * @return Tag[] - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * Returns an array of tags matching the given name. If no tags are found - * an empty array is returned. - * - * @param string $name String to search by. - * - * @return Tag[] - */ - public function getTagsByName(string $name): array - { - $result = []; - - foreach ($this->getTags() as $tag) { - if ($tag->getName() !== $name) { - continue; - } - - $result[] = $tag; - } - - return $result; - } - - /** - * Returns an array of tags with type matching the given name. If no tags are found - * an empty array is returned. - * - * @param string $name String to search by. - * - * @return TagWithType[] - */ - public function getTagsWithTypeByName(string $name): array - { - $result = []; - - foreach ($this->getTagsByName($name) as $tag) { - if (!$tag instanceof TagWithType) { - continue; - } - - $result[] = $tag; - } - - return $result; - } - - /** - * Checks if a tag of a certain type is present in this DocBlock. - * - * @param string $name Tag name to check for. - */ - public function hasTag(string $name): bool - { - foreach ($this->getTags() as $tag) { - if ($tag->getName() === $name) { - return true; - } - } - - return false; - } - - /** - * Remove a tag from this DocBlock. - * - * @param Tag $tagToRemove The tag to remove. - */ - public function removeTag(Tag $tagToRemove): void - { - foreach ($this->tags as $key => $tag) { - if ($tag === $tagToRemove) { - unset($this->tags[$key]); - break; - } - } - } - - /** - * Adds a tag to this DocBlock. - * - * @param Tag $tag The tag to add. - */ - private function addTag(Tag $tag): void - { - $this->tags[] = $tag; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php deleted file mode 100644 index a31b2892..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php +++ /dev/null @@ -1,115 +0,0 @@ -create('This is a {@see Description}', $context); - * - * The description factory will interpret the given body and create a body template and list of tags from them, and pass - * that onto the constructor if this class. - * - * > The $context variable is a class of type {@see \phpDocumentor\Reflection\Types\Context} and contains the namespace - * > and the namespace aliases that apply to this DocBlock. These are used by the Factory to resolve and expand partial - * > type names and FQSENs. - * - * If you do not want to use the DescriptionFactory you can pass a body template and tag listing like this: - * - * $description = new Description( - * 'This is a %1$s', - * [ new See(new Fqsen('\phpDocumentor\Reflection\DocBlock\Description')) ] - * ); - * - * It is generally recommended to use the Factory as that will also apply escaping rules, while the Description object - * is mainly responsible for rendering. - * - * @see DescriptionFactory to create a new Description. - * @see Description\Formatter for the formatting of the body and tags. - */ -class Description -{ - /** @var string */ - private $bodyTemplate; - - /** @var Tag[] */ - private $tags; - - /** - * Initializes a Description with its body (template) and a listing of the tags used in the body template. - * - * @param Tag[] $tags - */ - public function __construct(string $bodyTemplate, array $tags = []) - { - $this->bodyTemplate = $bodyTemplate; - $this->tags = $tags; - } - - /** - * Returns the body template. - */ - public function getBodyTemplate(): string - { - return $this->bodyTemplate; - } - - /** - * Returns the tags for this DocBlock. - * - * @return Tag[] - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * Renders this description as a string where the provided formatter will format the tags in the expected string - * format. - */ - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new PassthroughFormatter(); - } - - $tags = []; - foreach ($this->tags as $tag) { - $tags[] = '{' . $formatter->format($tag) . '}'; - } - - return vsprintf($this->bodyTemplate, $tags); - } - - /** - * Returns a plain string representation of this description. - */ - public function __toString(): string - { - return $this->render(); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php deleted file mode 100644 index 1a519ec4..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php +++ /dev/null @@ -1,178 +0,0 @@ -tagFactory = $tagFactory; - } - - /** - * Returns the parsed text of this description. - */ - public function create(string $contents, ?TypeContext $context = null): Description - { - $tokens = $this->lex($contents); - $count = count($tokens); - $tagCount = 0; - $tags = []; - - for ($i = 1; $i < $count; $i += 2) { - $tags[] = $this->tagFactory->create($tokens[$i], $context); - $tokens[$i] = '%' . ++$tagCount . '$s'; - } - - //In order to allow "literal" inline tags, the otherwise invalid - //sequence "{@}" is changed to "@", and "{}" is changed to "}". - //"%" is escaped to "%%" because of vsprintf. - //See unit tests for examples. - for ($i = 0; $i < $count; $i += 2) { - $tokens[$i] = str_replace(['{@}', '{}', '%'], ['@', '}', '%%'], $tokens[$i]); - } - - return new Description(implode('', $tokens), $tags); - } - - /** - * Strips the contents from superfluous whitespace and splits the description into a series of tokens. - * - * @return string[] A series of tokens of which the description text is composed. - */ - private function lex(string $contents): array - { - $contents = $this->removeSuperfluousStartingWhitespace($contents); - - // performance optimalization; if there is no inline tag, don't bother splitting it up. - if (strpos($contents, '{@') === false) { - return [$contents]; - } - - return Utils::pregSplit( - '/\{ - # "{@}" is not a valid inline tag. This ensures that we do not treat it as one, but treat it literally. - (?!@\}) - # We want to capture the whole tag line, but without the inline tag delimiters. - (\@ - # Match everything up to the next delimiter. - [^{}]* - # Nested inline tag content should not be captured, or it will appear in the result separately. - (?: - # Match nested inline tags. - (?: - # Because we did not catch the tag delimiters earlier, we must be explicit with them here. - # Notice that this also matches "{}", as a way to later introduce it as an escape sequence. - \{(?1)?\} - | - # Make sure we match hanging "{". - \{ - ) - # Match content after the nested inline tag. - [^{}]* - )* # If there are more inline tags, match them as well. We use "*" since there may not be any - # nested inline tags. - ) - \}/Sux', - $contents, - 0, - PREG_SPLIT_DELIM_CAPTURE - ); - } - - /** - * Removes the superfluous from a multi-line description. - * - * When a description has more than one line then it can happen that the second and subsequent lines have an - * additional indentation. This is commonly in use with tags like this: - * - * {@}since 1.1.0 This is an example - * description where we have an - * indentation in the second and - * subsequent lines. - * - * If we do not normalize the indentation then we have superfluous whitespace on the second and subsequent - * lines and this may cause rendering issues when, for example, using a Markdown converter. - */ - private function removeSuperfluousStartingWhitespace(string $contents): string - { - $lines = Utils::pregSplit("/\r\n?|\n/", $contents); - - // if there is only one line then we don't have lines with superfluous whitespace and - // can use the contents as-is - if (count($lines) <= 1) { - return $contents; - } - - // determine how many whitespace characters need to be stripped - $startingSpaceCount = 9999999; - for ($i = 1, $iMax = count($lines); $i < $iMax; ++$i) { - // lines with a no length do not count as they are not indented at all - if (trim($lines[$i]) === '') { - continue; - } - - // determine the number of prefixing spaces by checking the difference in line length before and after - // an ltrim - $startingSpaceCount = min($startingSpaceCount, strlen($lines[$i]) - strlen(ltrim($lines[$i]))); - } - - // strip the number of spaces from each line - if ($startingSpaceCount > 0) { - for ($i = 1, $iMax = count($lines); $i < $iMax; ++$i) { - $lines[$i] = substr($lines[$i], $startingSpaceCount); - } - } - - return implode("\n", $lines); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php deleted file mode 100644 index 6a6b4729..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php +++ /dev/null @@ -1,159 +0,0 @@ -getFilePath(); - - $file = $this->getExampleFileContents($filename); - if (!$file) { - return sprintf('** File not found : %s **', $filename); - } - - return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount())); - } - - /** - * Registers the project's root directory where an 'examples' folder can be expected. - */ - public function setSourceDirectory(string $directory = ''): void - { - $this->sourceDirectory = $directory; - } - - /** - * Returns the project's root directory where an 'examples' folder can be expected. - */ - public function getSourceDirectory(): string - { - return $this->sourceDirectory; - } - - /** - * Registers a series of directories that may contain examples. - * - * @param string[] $directories - */ - public function setExampleDirectories(array $directories): void - { - $this->exampleDirectories = $directories; - } - - /** - * Returns a series of directories that may contain examples. - * - * @return string[] - */ - public function getExampleDirectories(): array - { - return $this->exampleDirectories; - } - - /** - * Attempts to find the requested example file and returns its contents or null if no file was found. - * - * This method will try several methods in search of the given example file, the first one it encounters is - * returned: - * - * 1. Iterates through all examples folders for the given filename - * 2. Checks the source folder for the given filename - * 3. Checks the 'examples' folder in the current working directory for examples - * 4. Checks the path relative to the current working directory for the given filename - * - * @return string[] all lines of the example file - */ - private function getExampleFileContents(string $filename): ?array - { - $normalizedPath = null; - - foreach ($this->exampleDirectories as $directory) { - $exampleFileFromConfig = $this->constructExamplePath($directory, $filename); - if (is_readable($exampleFileFromConfig)) { - $normalizedPath = $exampleFileFromConfig; - break; - } - } - - if (!$normalizedPath) { - if (is_readable($this->getExamplePathFromSource($filename))) { - $normalizedPath = $this->getExamplePathFromSource($filename); - } elseif (is_readable($this->getExamplePathFromExampleDirectory($filename))) { - $normalizedPath = $this->getExamplePathFromExampleDirectory($filename); - } elseif (is_readable($filename)) { - $normalizedPath = $filename; - } - } - - $lines = $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : false; - - return $lines !== false ? $lines : null; - } - - /** - * Get example filepath based on the example directory inside your project. - */ - private function getExamplePathFromExampleDirectory(string $file): string - { - return getcwd() . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR . $file; - } - - /** - * Returns a path to the example file in the given directory.. - */ - private function constructExamplePath(string $directory, string $file): string - { - return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file; - } - - /** - * Get example filepath based on sourcecode. - */ - private function getExamplePathFromSource(string $file): string - { - return sprintf( - '%s%s%s', - trim($this->getSourceDirectory(), '\\/'), - DIRECTORY_SEPARATOR, - trim($file, '"') - ); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php deleted file mode 100644 index 77e5fb5f..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php +++ /dev/null @@ -1,157 +0,0 @@ -indent = $indent; - $this->indentString = $indentString; - $this->isFirstLineIndented = $indentFirstLine; - $this->lineLength = $lineLength; - $this->tagFormatter = $tagFormatter ?: new PassthroughFormatter(); - $this->lineEnding = $lineEnding; - } - - /** - * Generate a DocBlock comment. - * - * @param DocBlock $docblock The DocBlock to serialize. - * - * @return string The serialized doc block. - */ - public function getDocComment(DocBlock $docblock): string - { - $indent = str_repeat($this->indentString, $this->indent); - $firstIndent = $this->isFirstLineIndented ? $indent : ''; - // 3 === strlen(' * ') - $wrapLength = $this->lineLength ? $this->lineLength - strlen($indent) - 3 : null; - - $text = $this->removeTrailingSpaces( - $indent, - $this->addAsterisksForEachLine( - $indent, - $this->getSummaryAndDescriptionTextBlock($docblock, $wrapLength) - ) - ); - - $comment = $firstIndent . "/**\n"; - if ($text) { - $comment .= $indent . ' * ' . $text . "\n"; - $comment .= $indent . " *\n"; - } - - $comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment); - - return str_replace("\n", $this->lineEnding, $comment . $indent . ' */'); - } - - private function removeTrailingSpaces(string $indent, string $text): string - { - return str_replace( - sprintf("\n%s * \n", $indent), - sprintf("\n%s *\n", $indent), - $text - ); - } - - private function addAsterisksForEachLine(string $indent, string $text): string - { - return str_replace( - "\n", - sprintf("\n%s * ", $indent), - $text - ); - } - - private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, ?int $wrapLength): string - { - $text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription() - : ''); - if ($wrapLength !== null) { - $text = wordwrap($text, $wrapLength); - - return $text; - } - - return $text; - } - - private function addTagBlock(DocBlock $docblock, ?int $wrapLength, string $indent, string $comment): string - { - foreach ($docblock->getTags() as $tag) { - $tagText = $this->tagFormatter->format($tag); - if ($wrapLength !== null) { - $tagText = wordwrap($tagText, $wrapLength); - } - - $tagText = str_replace( - "\n", - sprintf("\n%s * ", $indent), - $tagText - ); - - $comment .= sprintf("%s * %s\n", $indent, $tagText); - } - - return $comment; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php deleted file mode 100644 index 8d765951..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php +++ /dev/null @@ -1,348 +0,0 @@ - Important: each parameter in addition to the body variable for the `create` method must default to null, otherwise - * > it violates the constraint with the interface; it is recommended to use the {@see Assert::notNull()} method to - * > verify that a dependency is actually passed. - * - * This Factory also features a Service Locator component that is used to pass the right dependencies to the - * `create` method of a tag; each dependency should be registered as a service or as a parameter. - * - * When you want to use a Tag of your own with custom handling you need to call the `registerTagHandler` method, pass - * the name of the tag and a Fully Qualified Class Name pointing to a class that implements the Tag interface. - */ -final class StandardTagFactory implements TagFactory -{ - /** PCRE regular expression matching a tag name. */ - public const REGEX_TAGNAME = '[\w\-\_\\\\:]+'; - - /** - * @var array> An array with a tag as a key, and an - * FQCN to a class that handles it as an array value. - */ - private $tagHandlerMappings = [ - 'author' => Author::class, - 'covers' => Covers::class, - 'deprecated' => Deprecated::class, - // 'example' => '\phpDocumentor\Reflection\DocBlock\Tags\Example', - 'link' => LinkTag::class, - 'method' => Method::class, - 'param' => Param::class, - 'property-read' => PropertyRead::class, - 'property' => Property::class, - 'property-write' => PropertyWrite::class, - 'return' => Return_::class, - 'see' => SeeTag::class, - 'since' => Since::class, - 'source' => Source::class, - 'throw' => Throws::class, - 'throws' => Throws::class, - 'uses' => Uses::class, - 'var' => Var_::class, - 'version' => Version::class, - ]; - - /** - * @var array> An array with a anotation s a key, and an - * FQCN to a class that handles it as an array value. - */ - private $annotationMappings = []; - - /** - * @var ReflectionParameter[][] a lazy-loading cache containing parameters - * for each tagHandler that has been used. - */ - private $tagHandlerParameterCache = []; - - /** @var FqsenResolver */ - private $fqsenResolver; - - /** - * @var mixed[] an array representing a simple Service Locator where we can store parameters and - * services that can be inserted into the Factory Methods of Tag Handlers. - */ - private $serviceLocator = []; - - /** - * Initialize this tag factory with the means to resolve an FQSEN and optionally a list of tag handlers. - * - * If no tag handlers are provided than the default list in the {@see self::$tagHandlerMappings} property - * is used. - * - * @see self::registerTagHandler() to add a new tag handler to the existing default list. - * - * @param array> $tagHandlers - */ - public function __construct(FqsenResolver $fqsenResolver, ?array $tagHandlers = null) - { - $this->fqsenResolver = $fqsenResolver; - if ($tagHandlers !== null) { - $this->tagHandlerMappings = $tagHandlers; - } - - $this->addService($fqsenResolver, FqsenResolver::class); - } - - public function create(string $tagLine, ?TypeContext $context = null): Tag - { - if (!$context) { - $context = new TypeContext(''); - } - - [$tagName, $tagBody] = $this->extractTagParts($tagLine); - - return $this->createTag(trim($tagBody), $tagName, $context); - } - - /** - * @param mixed $value - */ - public function addParameter(string $name, $value): void - { - $this->serviceLocator[$name] = $value; - } - - public function addService(object $service, ?string $alias = null): void - { - $this->serviceLocator[$alias ?: get_class($service)] = $service; - } - - public function registerTagHandler(string $tagName, string $handler): void - { - Assert::stringNotEmpty($tagName); - Assert::classExists($handler); - Assert::implementsInterface($handler, Tag::class); - - if (strpos($tagName, '\\') && $tagName[0] !== '\\') { - throw new InvalidArgumentException( - 'A namespaced tag must have a leading backslash as it must be fully qualified' - ); - } - - $this->tagHandlerMappings[$tagName] = $handler; - } - - /** - * Extracts all components for a tag. - * - * @return string[] - */ - private function extractTagParts(string $tagLine): array - { - $matches = []; - if (!preg_match('/^@(' . self::REGEX_TAGNAME . ')((?:[\s\(\{])\s*([^\s].*)|$)/us', $tagLine, $matches)) { - throw new InvalidArgumentException( - 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' - ); - } - - if (count($matches) < 3) { - $matches[] = ''; - } - - return array_slice($matches, 1); - } - - /** - * Creates a new tag object with the given name and body or returns null if the tag name was recognized but the - * body was invalid. - */ - private function createTag(string $body, string $name, TypeContext $context): Tag - { - $handlerClassName = $this->findHandlerClassName($name, $context); - $arguments = $this->getArgumentsForParametersFromWiring( - $this->fetchParametersForHandlerFactoryMethod($handlerClassName), - $this->getServiceLocatorWithDynamicParameters($context, $name, $body) - ); - - try { - $callable = [$handlerClassName, 'create']; - Assert::isCallable($callable); - /** @phpstan-var callable(string): ?Tag $callable */ - $tag = call_user_func_array($callable, $arguments); - - return $tag ?? InvalidTag::create($body, $name); - } catch (InvalidArgumentException $e) { - return InvalidTag::create($body, $name)->withError($e); - } - } - - /** - * Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`). - * - * @return class-string - */ - private function findHandlerClassName(string $tagName, TypeContext $context): string - { - $handlerClassName = Generic::class; - if (isset($this->tagHandlerMappings[$tagName])) { - $handlerClassName = $this->tagHandlerMappings[$tagName]; - } elseif ($this->isAnnotation($tagName)) { - // TODO: Annotation support is planned for a later stage and as such is disabled for now - $tagName = (string) $this->fqsenResolver->resolve($tagName, $context); - if (isset($this->annotationMappings[$tagName])) { - $handlerClassName = $this->annotationMappings[$tagName]; - } - } - - return $handlerClassName; - } - - /** - * Retrieves the arguments that need to be passed to the Factory Method with the given Parameters. - * - * @param ReflectionParameter[] $parameters - * @param mixed[] $locator - * - * @return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters - * is provided with this method. - */ - private function getArgumentsForParametersFromWiring(array $parameters, array $locator): array - { - $arguments = []; - foreach ($parameters as $parameter) { - $type = $parameter->getType(); - $typeHint = null; - if ($type instanceof ReflectionNamedType) { - $typeHint = $type->getName(); - if ($typeHint === 'self') { - $declaringClass = $parameter->getDeclaringClass(); - if ($declaringClass !== null) { - $typeHint = $declaringClass->getName(); - } - } - } - - if (isset($locator[$typeHint])) { - $arguments[] = $locator[$typeHint]; - continue; - } - - $parameterName = $parameter->getName(); - if (isset($locator[$parameterName])) { - $arguments[] = $locator[$parameterName]; - continue; - } - - $arguments[] = null; - } - - return $arguments; - } - - /** - * Retrieves a series of ReflectionParameter objects for the static 'create' method of the given - * tag handler class name. - * - * @param class-string $handlerClassName - * - * @return ReflectionParameter[] - */ - private function fetchParametersForHandlerFactoryMethod(string $handlerClassName): array - { - if (!isset($this->tagHandlerParameterCache[$handlerClassName])) { - $methodReflection = new ReflectionMethod($handlerClassName, 'create'); - $this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters(); - } - - return $this->tagHandlerParameterCache[$handlerClassName]; - } - - /** - * Returns a copy of this class' Service Locator with added dynamic parameters, - * such as the tag's name, body and Context. - * - * @param TypeContext $context The Context (namespace and aliasses) that may be - * passed and is used to resolve FQSENs. - * @param string $tagName The name of the tag that may be - * passed onto the factory method of the Tag class. - * @param string $tagBody The body of the tag that may be - * passed onto the factory method of the Tag class. - * - * @return mixed[] - */ - private function getServiceLocatorWithDynamicParameters( - TypeContext $context, - string $tagName, - string $tagBody - ): array { - return array_merge( - $this->serviceLocator, - [ - 'name' => $tagName, - 'body' => $tagBody, - TypeContext::class => $context, - ] - ); - } - - /** - * Returns whether the given tag belongs to an annotation. - * - * @todo this method should be populated once we implement Annotation notation support. - */ - private function isAnnotation(string $tagContent): bool - { - // 1. Contains a namespace separator - // 2. Contains parenthesis - // 3. Is present in a list of known annotations (make the algorithm smart by first checking is the last part - // of the annotation class name matches the found tag name - - return false; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php deleted file mode 100644 index 7cf07b4d..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php +++ /dev/null @@ -1,31 +0,0 @@ - $handler FQCN of handler. - * - * @throws InvalidArgumentException If the tag name is not a string. - * @throws InvalidArgumentException If the tag name is namespaced (contains backslashes) but - * does not start with a backslash. - * @throws InvalidArgumentException If the handler is not a string. - * @throws InvalidArgumentException If the handler is not an existing class. - * @throws InvalidArgumentException If the handler does not implement the {@see Tag} interface. - */ - public function registerTagHandler(string $tagName, string $handler): void; -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php deleted file mode 100644 index ae09ecf4..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php +++ /dev/null @@ -1,102 +0,0 @@ -authorName = $authorName; - $this->authorEmail = $authorEmail; - } - - /** - * Gets the author's name. - * - * @return string The author's name. - */ - public function getAuthorName(): string - { - return $this->authorName; - } - - /** - * Returns the author's email. - * - * @return string The author's email. - */ - public function getEmail(): string - { - return $this->authorEmail; - } - - /** - * Returns this tag in string form. - */ - public function __toString(): string - { - if ($this->authorEmail) { - $authorEmail = '<' . $this->authorEmail . '>'; - } else { - $authorEmail = ''; - } - - $authorName = $this->authorName; - - return $authorName . ($authorEmail !== '' ? ($authorName !== '' ? ' ' : '') . $authorEmail : ''); - } - - /** - * Attempts to create a new Author object based on the tag body. - */ - public static function create(string $body): ?self - { - $splitTagContent = preg_match('/^([^\<]*)(?:\<([^\>]*)\>)?$/u', $body, $matches); - if (!$splitTagContent) { - return null; - } - - $authorName = trim($matches[1]); - $email = isset($matches[2]) ? trim($matches[2]) : ''; - - return new static($authorName, $email); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php deleted file mode 100644 index a28d5bf9..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php +++ /dev/null @@ -1,53 +0,0 @@ -name; - } - - public function getDescription(): ?Description - { - return $this->description; - } - - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new Formatter\PassthroughFormatter(); - } - - return $formatter->format($this); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php deleted file mode 100644 index 3eff9d8b..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php +++ /dev/null @@ -1,101 +0,0 @@ -refers = $refers; - $this->description = $description; - } - - public static function create( - string $body, - ?DescriptionFactory $descriptionFactory = null, - ?FqsenResolver $resolver = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($descriptionFactory); - Assert::notNull($resolver); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - - return new static( - self::resolveFqsen($parts[0], $resolver, $context), - $descriptionFactory->create($parts[1] ?? '', $context) - ); - } - - private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen - { - Assert::notNull($fqsenResolver); - $fqsenParts = explode('::', $parts); - $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); - - if (!array_key_exists(1, $fqsenParts)) { - return $resolved; - } - - return new Fqsen($resolved . '::' . $fqsenParts[1]); - } - - /** - * Returns the structural element this tag refers to. - */ - public function getReference(): Fqsen - { - return $this->refers; - } - - /** - * Returns a string representation of this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $refers = (string) $this->refers; - - return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php deleted file mode 100644 index dbcad28c..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php +++ /dev/null @@ -1,109 +0,0 @@ -version = $version; - $this->description = $description; - } - - /** - * @return static - */ - public static function create( - ?string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - if (empty($body)) { - return new static(); - } - - $matches = []; - if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { - return new static( - null, - $descriptionFactory !== null ? $descriptionFactory->create($body, $context) : null - ); - } - - Assert::notNull($descriptionFactory); - - return new static( - $matches[1], - $descriptionFactory->create($matches[2] ?? '', $context) - ); - } - - /** - * Gets the version section of the tag. - */ - public function getVersion(): ?string - { - return $this->version; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $version = (string) $this->version; - - return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php deleted file mode 100644 index 825355aa..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php +++ /dev/null @@ -1,200 +0,0 @@ -filePath = $filePath; - $this->startingLine = $startingLine; - $this->lineCount = $lineCount; - if ($content !== null) { - $this->content = trim($content); - } - - $this->isURI = $isURI; - } - - public function getContent(): string - { - if ($this->content === null || $this->content === '') { - $filePath = $this->filePath; - if ($this->isURI) { - $filePath = $this->isUriRelative($this->filePath) - ? str_replace('%2F', '/', rawurlencode($this->filePath)) - : $this->filePath; - } - - return trim($filePath); - } - - return $this->content; - } - - public function getDescription(): ?string - { - return $this->content; - } - - public static function create(string $body): ?Tag - { - // File component: File path in quotes or File URI / Source information - if (!preg_match('/^\s*(?:(\"[^\"]+\")|(\S+))(?:\s+(.*))?$/sux', $body, $matches)) { - return null; - } - - $filePath = null; - $fileUri = null; - if ($matches[1] !== '') { - $filePath = $matches[1]; - } else { - $fileUri = $matches[2]; - } - - $startingLine = 1; - $lineCount = 0; - $description = null; - - if (array_key_exists(3, $matches)) { - $description = $matches[3]; - - // Starting line / Number of lines / Description - if (preg_match('/^([1-9]\d*)(?:\s+((?1))\s*)?(.*)$/sux', $matches[3], $contentMatches)) { - $startingLine = (int) $contentMatches[1]; - if (isset($contentMatches[2])) { - $lineCount = (int) $contentMatches[2]; - } - - if (array_key_exists(3, $contentMatches)) { - $description = $contentMatches[3]; - } - } - } - - return new static( - $filePath ?? ($fileUri ?? ''), - $fileUri !== null, - $startingLine, - $lineCount, - $description - ); - } - - /** - * Returns the file path. - * - * @return string Path to a file to use as an example. - * May also be an absolute URI. - */ - public function getFilePath(): string - { - return trim($this->filePath, '"'); - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - $filePath = $this->filePath; - $isDefaultLine = $this->startingLine === 1 && $this->lineCount === 0; - $startingLine = !$isDefaultLine ? (string) $this->startingLine : ''; - $lineCount = !$isDefaultLine ? (string) $this->lineCount : ''; - $content = (string) $this->content; - - return $filePath - . ($startingLine !== '' - ? ($filePath !== '' ? ' ' : '') . $startingLine - : '') - . ($lineCount !== '' - ? ($filePath !== '' || $startingLine !== '' ? ' ' : '') . $lineCount - : '') - . ($content !== '' - ? ($filePath !== '' || $startingLine !== '' || $lineCount !== '' ? ' ' : '') . $content - : ''); - } - - /** - * Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute). - */ - private function isUriRelative(string $uri): bool - { - return strpos($uri, ':') === false; - } - - public function getStartingLine(): int - { - return $this->startingLine; - } - - public function getLineCount(): int - { - return $this->lineCount; - } - - public function getName(): string - { - return 'example'; - } - - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new Formatter\PassthroughFormatter(); - } - - return $formatter->format($this); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php deleted file mode 100644 index f6f0bb5a..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php +++ /dev/null @@ -1,25 +0,0 @@ -maxLen = max($this->maxLen, strlen($tag->getName())); - } - } - - /** - * Formats the given tag to return a simple plain text version. - */ - public function format(Tag $tag): string - { - return '@' . $tag->getName() . - str_repeat( - ' ', - $this->maxLen - strlen($tag->getName()) + 1 - ) . - $tag; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php deleted file mode 100644 index 2afdfe55..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php +++ /dev/null @@ -1,30 +0,0 @@ -getName() . ' ' . $tag); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php deleted file mode 100644 index bc1ab10c..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php +++ /dev/null @@ -1,89 +0,0 @@ -validateTagName($name); - - $this->name = $name; - $this->description = $description; - } - - /** - * Creates a new tag that represents any unknown tag type. - * - * @return static - */ - public static function create( - string $body, - string $name = '', - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($name); - Assert::notNull($descriptionFactory); - - $description = $body !== '' ? $descriptionFactory->create($body, $context) : null; - - return new static($name, $description); - } - - /** - * Returns the tag as a serialized string - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - return $description; - } - - /** - * Validates if the tag name matches the expected format, otherwise throws an exception. - */ - private function validateTagName(string $name): void - { - if (!preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) { - throw new InvalidArgumentException( - 'The tag name "' . $name . '" is not wellformed. Tags may only consist of letters, underscores, ' - . 'hyphens and backslashes.' - ); - } - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php deleted file mode 100644 index 4e6abb8c..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php +++ /dev/null @@ -1,145 +0,0 @@ -name = $name; - $this->body = $body; - } - - public function getException(): ?Throwable - { - return $this->throwable; - } - - public function getName(): string - { - return $this->name; - } - - public static function create(string $body, string $name = ''): self - { - return new self($name, $body); - } - - public function withError(Throwable $exception): self - { - $this->flattenExceptionBacktrace($exception); - $tag = new self($this->name, $this->body); - $tag->throwable = $exception; - - return $tag; - } - - /** - * Removes all complex types from backtrace - * - * Not all objects are serializable. So we need to remove them from the - * stored exception to be sure that we do not break existing library usage. - */ - private function flattenExceptionBacktrace(Throwable $exception): void - { - $traceProperty = (new ReflectionClass(Exception::class))->getProperty('trace'); - $traceProperty->setAccessible(true); - - do { - $trace = $exception->getTrace(); - if (isset($trace[0]['args'])) { - $trace = array_map( - function (array $call): array { - $call['args'] = array_map([$this, 'flattenArguments'], $call['args'] ?? []); - - return $call; - }, - $trace - ); - } - - $traceProperty->setValue($exception, $trace); - $exception = $exception->getPrevious(); - } while ($exception !== null); - - $traceProperty->setAccessible(false); - } - - /** - * @param mixed $value - * - * @return mixed - * - * @throws ReflectionException - */ - private function flattenArguments($value) - { - if ($value instanceof Closure) { - $closureReflection = new ReflectionFunction($value); - $value = sprintf( - '(Closure at %s:%s)', - $closureReflection->getFileName(), - $closureReflection->getStartLine() - ); - } elseif (is_object($value)) { - $value = sprintf('object(%s)', get_class($value)); - } elseif (is_resource($value)) { - $value = sprintf('resource(%s)', get_resource_type($value)); - } elseif (is_array($value)) { - $value = array_map([$this, 'flattenArguments'], $value); - } - - return $value; - } - - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new Formatter\PassthroughFormatter(); - } - - return $formatter->format($this); - } - - public function __toString(): string - { - return $this->body; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php deleted file mode 100644 index ee242e3b..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php +++ /dev/null @@ -1,78 +0,0 @@ -link = $link; - $this->description = $description; - } - - public static function create( - string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($descriptionFactory); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; - - return new static($parts[0], $description); - } - - /** - * Gets the link - */ - public function getLink(): string - { - return $this->link; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $link = $this->link; - - return $link . ($description !== '' ? ($link !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php deleted file mode 100644 index f08bfffd..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php +++ /dev/null @@ -1,279 +0,0 @@ - - * @var array> - */ - private $arguments; - - /** @var bool */ - private $isStatic; - - /** @var Type */ - private $returnType; - - /** - * @param array> $arguments - * @phpstan-param array $arguments - */ - public function __construct( - string $methodName, - array $arguments = [], - ?Type $returnType = null, - bool $static = false, - ?Description $description = null - ) { - Assert::stringNotEmpty($methodName); - - if ($returnType === null) { - $returnType = new Void_(); - } - - $this->methodName = $methodName; - $this->arguments = $this->filterArguments($arguments); - $this->returnType = $returnType; - $this->isStatic = $static; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): ?self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - // 1. none or more whitespace - // 2. optionally the keyword "static" followed by whitespace - // 3. optionally a word with underscores followed by whitespace : as - // type for the return value - // 4. then optionally a word with underscores followed by () and - // whitespace : as method name as used by phpDocumentor - // 5. then a word with underscores, followed by ( and any character - // until a ) and whitespace : as method name with signature - // 6. any remaining text : as description - if ( - !preg_match( - '/^ - # Static keyword - # Declares a static method ONLY if type is also present - (?: - (static) - \s+ - )? - # Return type - (?: - ( - (?:[\w\|_\\\\]*\$this[\w\|_\\\\]*) - | - (?: - (?:[\w\|_\\\\]+) - # array notation - (?:\[\])* - )*+ - ) - \s+ - )? - # Method name - ([\w_]+) - # Arguments - (?: - \(([^\)]*)\) - )? - \s* - # Description - (.*) - $/sux', - $body, - $matches - ) - ) { - return null; - } - - [, $static, $returnType, $methodName, $argumentLines, $description] = $matches; - - $static = $static === 'static'; - - if ($returnType === '') { - $returnType = 'void'; - } - - $returnType = $typeResolver->resolve($returnType, $context); - $description = $descriptionFactory->create($description, $context); - - /** @phpstan-var array $arguments */ - $arguments = []; - if ($argumentLines !== '') { - $argumentsExploded = explode(',', $argumentLines); - foreach ($argumentsExploded as $argument) { - $argument = explode(' ', self::stripRestArg(trim($argument)), 2); - if (strpos($argument[0], '$') === 0) { - $argumentName = substr($argument[0], 1); - $argumentType = new Mixed_(); - } else { - $argumentType = $typeResolver->resolve($argument[0], $context); - $argumentName = ''; - if (isset($argument[1])) { - $argument[1] = self::stripRestArg($argument[1]); - $argumentName = substr($argument[1], 1); - } - } - - $arguments[] = ['name' => $argumentName, 'type' => $argumentType]; - } - } - - return new static($methodName, $arguments, $returnType, $static, $description); - } - - /** - * Retrieves the method name. - */ - public function getMethodName(): string - { - return $this->methodName; - } - - /** - * @return array> - * @phpstan-return array - */ - public function getArguments(): array - { - return $this->arguments; - } - - /** - * Checks whether the method tag describes a static method or not. - * - * @return bool TRUE if the method declaration is for a static method, FALSE otherwise. - */ - public function isStatic(): bool - { - return $this->isStatic; - } - - public function getReturnType(): Type - { - return $this->returnType; - } - - public function __toString(): string - { - $arguments = []; - foreach ($this->arguments as $argument) { - $arguments[] = $argument['type'] . ' $' . $argument['name']; - } - - $argumentStr = '(' . implode(', ', $arguments) . ')'; - - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $static = $this->isStatic ? 'static' : ''; - - $returnType = (string) $this->returnType; - - $methodName = $this->methodName; - - return $static - . ($returnType !== '' ? ($static !== '' ? ' ' : '') . $returnType : '') - . ($methodName !== '' ? ($static !== '' || $returnType !== '' ? ' ' : '') . $methodName : '') - . $argumentStr - . ($description !== '' ? ' ' . $description : ''); - } - - /** - * @param mixed[][]|string[] $arguments - * @phpstan-param array $arguments - * - * @return mixed[][] - * @phpstan-return array - */ - private function filterArguments(array $arguments = []): array - { - $result = []; - foreach ($arguments as $argument) { - if (is_string($argument)) { - $argument = ['name' => $argument]; - } - - if (!isset($argument['type'])) { - $argument['type'] = new Mixed_(); - } - - $keys = array_keys($argument); - sort($keys); - if ($keys !== ['name', 'type']) { - throw new InvalidArgumentException( - 'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true) - ); - } - - $result[] = $argument; - } - - return $result; - } - - private static function stripRestArg(string $argument): string - { - if (strpos($argument, '...') === 0) { - $argument = trim(substr($argument, 3)); - } - - return $argument; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php deleted file mode 100644 index 3399649b..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php +++ /dev/null @@ -1,174 +0,0 @@ -name = 'param'; - $this->variableName = $variableName; - $this->type = $type; - $this->isVariadic = $isVariadic; - $this->description = $description; - $this->isReference = $isReference; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - $isVariadic = false; - $isReference = false; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && !self::strStartsWithVariable($firstPart)) { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ or ...$ or &$ or &...$ it must be the variable name - if (isset($parts[0]) && self::strStartsWithVariable($parts[0])) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - if (strpos($variableName, '$') === 0) { - $variableName = substr($variableName, 1); - } elseif (strpos($variableName, '&$') === 0) { - $isReference = true; - $variableName = substr($variableName, 2); - } elseif (strpos($variableName, '...$') === 0) { - $isVariadic = true; - $variableName = substr($variableName, 4); - } elseif (strpos($variableName, '&...$') === 0) { - $isVariadic = true; - $isReference = true; - $variableName = substr($variableName, 5); - } - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $isVariadic, $description, $isReference); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns whether this tag is variadic. - */ - public function isVariadic(): bool - { - return $this->isVariadic; - } - - /** - * Returns whether this tag is passed by reference. - */ - public function isReference(): bool - { - return $this->isReference; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $variableName = ''; - if ($this->variableName) { - $variableName .= ($this->isReference ? '&' : '') . ($this->isVariadic ? '...' : ''); - $variableName .= '$' . $this->variableName; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } - - private static function strStartsWithVariable(string $str): bool - { - return strpos($str, '$') === 0 - || - strpos($str, '...$') === 0 - || - strpos($str, '&$') === 0 - || - strpos($str, '&...$') === 0; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php deleted file mode 100644 index 2521fb3f..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php +++ /dev/null @@ -1,121 +0,0 @@ -name = 'property'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php deleted file mode 100644 index 9491b39c..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php +++ /dev/null @@ -1,121 +0,0 @@ -name = 'property-read'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php deleted file mode 100644 index 2bfdac6a..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php +++ /dev/null @@ -1,121 +0,0 @@ -name = 'property-write'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php deleted file mode 100644 index 532003dd..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php +++ /dev/null @@ -1,38 +0,0 @@ -fqsen = $fqsen; - } - - /** - * @return string string representation of the referenced fqsen - */ - public function __toString(): string - { - return (string) $this->fqsen; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php deleted file mode 100644 index e7dea868..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php +++ /dev/null @@ -1,22 +0,0 @@ -uri = $uri; - } - - public function __toString(): string - { - return $this->uri; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php deleted file mode 100644 index f021b609..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php +++ /dev/null @@ -1,64 +0,0 @@ -name = 'return'; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$type, $description] = self::extractTypeFromBody($body); - - $type = $typeResolver->resolve($type, $context); - $description = $descriptionFactory->create($description, $context); - - return new static($type, $description); - } - - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $type = $this->type ? '' . $this->type : 'mixed'; - - return $type . ($description !== '' ? ' ' . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php deleted file mode 100644 index a194c7de..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php +++ /dev/null @@ -1,106 +0,0 @@ -refers = $refers; - $this->description = $description; - } - - public static function create( - string $body, - ?FqsenResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($descriptionFactory); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; - - // https://tools.ietf.org/html/rfc2396#section-3 - if (preg_match('#\w://\w#', $parts[0])) { - return new static(new Url($parts[0]), $description); - } - - return new static(new FqsenRef(self::resolveFqsen($parts[0], $typeResolver, $context)), $description); - } - - private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen - { - Assert::notNull($fqsenResolver); - $fqsenParts = explode('::', $parts); - $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); - - if (!array_key_exists(1, $fqsenParts)) { - return $resolved; - } - - return new Fqsen($resolved . '::' . $fqsenParts[1]); - } - - /** - * Returns the ref of this tag. - */ - public function getReference(): Reference - { - return $this->refers; - } - - /** - * Returns a string representation of this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $refers = (string) $this->refers; - - return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php deleted file mode 100644 index 54af43cd..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php +++ /dev/null @@ -1,103 +0,0 @@ -version = $version; - $this->description = $description; - } - - public static function create( - ?string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): ?self { - if (empty($body)) { - return new static(); - } - - $matches = []; - if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { - return null; - } - - Assert::notNull($descriptionFactory); - - return new static( - $matches[1], - $descriptionFactory->create($matches[2] ?? '', $context) - ); - } - - /** - * Gets the version section of the tag. - */ - public function getVersion(): ?string - { - return $this->version; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $version = (string) $this->version; - - return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php deleted file mode 100644 index 8b8c0fb4..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php +++ /dev/null @@ -1,116 +0,0 @@ -startingLine = (int) $startingLine; - $this->lineCount = $lineCount !== null ? (int) $lineCount : null; - $this->description = $description; - } - - public static function create( - string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($descriptionFactory); - - $startingLine = 1; - $lineCount = null; - $description = null; - - // Starting line / Number of lines / Description - if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $body, $matches)) { - $startingLine = (int) $matches[1]; - if (isset($matches[2]) && $matches[2] !== '') { - $lineCount = (int) $matches[2]; - } - - $description = $matches[3]; - } - - return new static($startingLine, $lineCount, $descriptionFactory->create($description ?? '', $context)); - } - - /** - * Gets the starting line. - * - * @return int The starting line, relative to the structural element's - * location. - */ - public function getStartingLine(): int - { - return $this->startingLine; - } - - /** - * Returns the number of lines. - * - * @return int|null The number of lines, relative to the starting line. NULL - * means "to the end". - */ - public function getLineCount(): ?int - { - return $this->lineCount; - } - - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $startingLine = (string) $this->startingLine; - - $lineCount = $this->lineCount !== null ? ' ' . $this->lineCount : ''; - - return $startingLine - . $lineCount - . ($description !== '' - ? ' ' . $description - : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php deleted file mode 100644 index 158578bd..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php +++ /dev/null @@ -1,66 +0,0 @@ -type; - } - - /** - * @return string[] - */ - protected static function extractTypeFromBody(string $body): array - { - $type = ''; - $nestingLevel = 0; - for ($i = 0, $iMax = strlen($body); $i < $iMax; $i++) { - $character = $body[$i]; - - if ($nestingLevel === 0 && trim($character) === '') { - break; - } - - $type .= $character; - if (in_array($character, ['<', '(', '[', '{'])) { - $nestingLevel++; - continue; - } - - if (in_array($character, ['>', ')', ']', '}'])) { - $nestingLevel--; - continue; - } - } - - $description = trim(substr($body, strlen($type))); - - return [$type, $description]; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php deleted file mode 100644 index f21c9101..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php +++ /dev/null @@ -1,64 +0,0 @@ -name = 'throws'; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$type, $description] = self::extractTypeFromBody($body); - - $type = $typeResolver->resolve($type, $context); - $description = $descriptionFactory->create($description, $context); - - return new static($type, $description); - } - - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $type = (string) $this->type; - - return $type . ($description !== '' ? ($type !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php deleted file mode 100644 index b72f4034..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php +++ /dev/null @@ -1,100 +0,0 @@ -refers = $refers; - $this->description = $description; - } - - public static function create( - string $body, - ?FqsenResolver $resolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($resolver); - Assert::notNull($descriptionFactory); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - - return new static( - self::resolveFqsen($parts[0], $resolver, $context), - $descriptionFactory->create($parts[1] ?? '', $context) - ); - } - - private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen - { - Assert::notNull($fqsenResolver); - $fqsenParts = explode('::', $parts); - $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); - - if (!array_key_exists(1, $fqsenParts)) { - return $resolved; - } - - return new Fqsen($resolved . '::' . $fqsenParts[1]); - } - - /** - * Returns the structural element this tag refers to. - */ - public function getReference(): Fqsen - { - return $this->refers; - } - - /** - * Returns a string representation of this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $refers = (string) $this->refers; - - return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php deleted file mode 100644 index fa1f9dbf..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php +++ /dev/null @@ -1,122 +0,0 @@ -name = 'var'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $type = null; - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php deleted file mode 100644 index f46e4b8c..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php +++ /dev/null @@ -1,106 +0,0 @@ -version = $version; - $this->description = $description; - } - - public static function create( - ?string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): ?self { - if (empty($body)) { - return new static(); - } - - $matches = []; - if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { - return null; - } - - $description = null; - if ($descriptionFactory !== null) { - $description = $descriptionFactory->create($matches[2] ?? '', $context); - } - - return new static( - $matches[1], - $description - ); - } - - /** - * Gets the version section of the tag. - */ - public function getVersion(): ?string - { - return $this->version; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $version = (string) $this->version; - - return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php deleted file mode 100644 index 37f72dd2..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php +++ /dev/null @@ -1,287 +0,0 @@ -descriptionFactory = $descriptionFactory; - $this->tagFactory = $tagFactory; - } - - /** - * Factory method for easy instantiation. - * - * @param array> $additionalTags - */ - public static function createInstance(array $additionalTags = []): self - { - $fqsenResolver = new FqsenResolver(); - $tagFactory = new StandardTagFactory($fqsenResolver); - $descriptionFactory = new DescriptionFactory($tagFactory); - - $tagFactory->addService($descriptionFactory); - $tagFactory->addService(new TypeResolver($fqsenResolver)); - - $docBlockFactory = new self($descriptionFactory, $tagFactory); - foreach ($additionalTags as $tagName => $tagHandler) { - $docBlockFactory->registerTagHandler($tagName, $tagHandler); - } - - return $docBlockFactory; - } - - /** - * @param object|string $docblock A string containing the DocBlock to parse or an object supporting the - * getDocComment method (such as a ReflectionClass object). - */ - public function create($docblock, ?Types\Context $context = null, ?Location $location = null): DocBlock - { - if (is_object($docblock)) { - if (!method_exists($docblock, 'getDocComment')) { - $exceptionMessage = 'Invalid object passed; the given object must support the getDocComment method'; - - throw new InvalidArgumentException($exceptionMessage); - } - - $docblock = $docblock->getDocComment(); - Assert::string($docblock); - } - - Assert::stringNotEmpty($docblock); - - if ($context === null) { - $context = new Types\Context(''); - } - - $parts = $this->splitDocBlock($this->stripDocComment($docblock)); - - [$templateMarker, $summary, $description, $tags] = $parts; - - return new DocBlock( - $summary, - $description ? $this->descriptionFactory->create($description, $context) : null, - $this->parseTagBlock($tags, $context), - $context, - $location, - $templateMarker === '#@+', - $templateMarker === '#@-' - ); - } - - /** - * @param class-string $handler - */ - public function registerTagHandler(string $tagName, string $handler): void - { - $this->tagFactory->registerTagHandler($tagName, $handler); - } - - /** - * Strips the asterisks from the DocBlock comment. - * - * @param string $comment String containing the comment text. - */ - private function stripDocComment(string $comment): string - { - $comment = preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]?(.*)?#u', '$1', $comment); - Assert::string($comment); - $comment = trim($comment); - - // reg ex above is not able to remove */ from a single line docblock - if (substr($comment, -2) === '*/') { - $comment = trim(substr($comment, 0, -2)); - } - - return str_replace(["\r\n", "\r"], "\n", $comment); - } - - // phpcs:disable - /** - * Splits the DocBlock into a template marker, summary, description and block of tags. - * - * @param string $comment Comment to split into the sub-parts. - * - * @return string[] containing the template marker (if any), summary, description and a string containing the tags. - * - * @author Mike van Riel for extending the regex with template marker support. - * - * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split. - */ - private function splitDocBlock(string $comment) : array - { - // phpcs:enable - // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This - // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the - // performance impact of running a regular expression - if (strpos($comment, '@') === 0) { - return ['', '', '', $comment]; - } - - // clears all extra horizontal whitespace from the line endings to prevent parsing issues - $comment = preg_replace('/\h*$/Sum', '', $comment); - Assert::string($comment); - /* - * Splits the docblock into a template marker, summary, description and tags section. - * - * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may - * occur after it and will be stripped). - * - The short description is started from the first character until a dot is encountered followed by a - * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing - * errors). This is optional. - * - The long description, any character until a new line is encountered followed by an @ and word - * characters (a tag). This is optional. - * - Tags; the remaining characters - * - * Big thanks to RichardJ for contributing this Regular Expression - */ - preg_match( - '/ - \A - # 1. Extract the template marker - (?:(\#\@\+|\#\@\-)\n?)? - - # 2. Extract the summary - (?: - (?! @\pL ) # The summary may not start with an @ - ( - [^\n.]+ - (?: - (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines - [\n.]* (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line - [^\n.]+ # Include anything else - )* - \.? - )? - ) - - # 3. Extract the description - (?: - \s* # Some form of whitespace _must_ precede a description because a summary must be there - (?! @\pL ) # The description may not start with an @ - ( - [^\n]+ - (?: \n+ - (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line - [^\n]+ # Include anything else - )* - ) - )? - - # 4. Extract the tags (anything that follows) - (\s+ [\s\S]*)? # everything that follows - /ux', - $comment, - $matches - ); - array_shift($matches); - - while (count($matches) < 4) { - $matches[] = ''; - } - - return $matches; - } - - /** - * Creates the tag objects. - * - * @param string $tags Tag block to parse. - * @param Types\Context $context Context of the parsed Tag - * - * @return DocBlock\Tag[] - */ - private function parseTagBlock(string $tags, Types\Context $context): array - { - $tags = $this->filterTagBlock($tags); - if ($tags === null) { - return []; - } - - $result = []; - $lines = $this->splitTagBlockIntoTagLines($tags); - foreach ($lines as $key => $tagLine) { - $result[$key] = $this->tagFactory->create(trim($tagLine), $context); - } - - return $result; - } - - /** - * @return string[] - */ - private function splitTagBlockIntoTagLines(string $tags): array - { - $result = []; - foreach (explode("\n", $tags) as $tagLine) { - if ($tagLine !== '' && strpos($tagLine, '@') === 0) { - $result[] = $tagLine; - } else { - $result[count($result) - 1] .= "\n" . $tagLine; - } - } - - return $result; - } - - private function filterTagBlock(string $tags): ?string - { - $tags = trim($tags); - if (!$tags) { - return null; - } - - if ($tags[0] !== '@') { - // @codeCoverageIgnoreStart - // Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that - // we didn't foresee. - - throw new LogicException('A tag block started with text instead of an at-sign(@): ' . $tags); - - // @codeCoverageIgnoreEnd - } - - return $tags; - } -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php b/www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php deleted file mode 100644 index 9995c0c0..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -> $additionalTags - */ - public static function createInstance(array $additionalTags = []): DocBlockFactory; - - /** - * @param string|object $docblock - */ - public function create($docblock, ?Types\Context $context = null, ?Location $location = null): DocBlock; -} diff --git a/www/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php b/www/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php deleted file mode 100644 index b8b6da8c..00000000 --- a/www/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php +++ /dev/null @@ -1,44 +0,0 @@ - please note that if you want to pass partial class names that additional steps are necessary, see the - > chapter `Resolving partial classes and FQSENs` for more information. - -Where the FqsenResolver can resolve: - -- Constant expressions (i.e. `@see \MyNamespace\MY_CONSTANT`) -- Function expressions (i.e. `@see \MyNamespace\myFunction()`) -- Class expressions (i.e. `@see \MyNamespace\MyClass`) -- Interface expressions (i.e. `@see \MyNamespace\MyInterface`) -- Trait expressions (i.e. `@see \MyNamespace\MyTrait`) -- Class constant expressions (i.e. `@see \MyNamespace\MyClass::MY_CONSTANT`) -- Property expressions (i.e. `@see \MyNamespace\MyClass::$myProperty`) -- Method expressions (i.e. `@see \MyNamespace\MyClass::myMethod()`) - -## Resolving a type - -In order to resolve a type you will have to instantiate the class `\phpDocumentor\Reflection\TypeResolver` and call its `resolve` method like this: - -```php -$typeResolver = new \phpDocumentor\Reflection\TypeResolver(); -$type = $typeResolver->resolve('string|integer'); -``` - -In this example you will receive a Value Object of class `\phpDocumentor\Reflection\Types\Compound` that has two -elements, one of type `\phpDocumentor\Reflection\Types\String_` and one of type -`\phpDocumentor\Reflection\Types\Integer`. - -The real power of this resolver is in its capability to expand partial class names into fully qualified class names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. - -### Resolving nullable types - -Php 7.1 introduced nullable types e.g. `?string`. Type resolver will resolve the original type without the nullable notation `?` -just like it would do without the `?`. After that the type is wrapped in a `\phpDocumentor\Reflection\Types\Nullable` object. -The `Nullable` type has a method to fetch the actual type. - -## Resolving an FQSEN - -A Fully Qualified Structural Element Name is a reference to another element in your code bases and can be resolved using the `\phpDocumentor\Reflection\FqsenResolver` class' `resolve` method, like this: - -```php -$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); -$fqsen = $fqsenResolver->resolve('\phpDocumentor\Reflection\FqsenResolver::resolve()'); -``` - -In this example we resolve a Fully Qualified Structural Element Name (meaning that it includes the full namespace, class name and element name) and receive a Value Object of type `\phpDocumentor\Reflection\Fqsen`. - -The real power of this resolver is in its capability to expand partial element names into Fully Qualified Structural Element Names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. - -## Resolving partial Classes and Structural Element Names - -Perhaps the best feature of this library is that it knows how to resolve partial class names into fully qualified class names. - -For example, you have this file: - -```php -namespace My\Example; - -use phpDocumentor\Reflection\Types; - -class Classy -{ - /** - * @var Types\Context - * @see Classy::otherFunction() - */ - public function __construct($context) {} - - public function otherFunction(){} -} -``` - -Suppose that you would want to resolve (and expand) the type in the `@var` tag and the element name in the `@see` tag. - -For the resolvers to know how to expand partial names you have to provide a bit of _Context_ for them by instantiating a new class named `\phpDocumentor\Reflection\Types\Context` with the name of the namespace and the aliases that are in play. - -### Creating a Context - -You can do this by manually creating a Context like this: - -```php -$context = new \phpDocumentor\Reflection\Types\Context( - '\My\Example', - [ 'Types' => '\phpDocumentor\Reflection\Types'] -); -``` - -Or by using the `\phpDocumentor\Reflection\Types\ContextFactory` to instantiate a new context based on a Reflector object or by providing the namespace that you'd like to extract and the source code of the file in which the given type expression occurs. - -```php -$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); -$context = $contextFactory->createFromReflector(new ReflectionMethod('\My\Example\Classy', '__construct')); -``` - -or - -```php -$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); -$context = $contextFactory->createForNamespace('\My\Example', file_get_contents('My/Example/Classy.php')); -``` - -### Using the Context - -After you have obtained a Context it is just a matter of passing it along with the `resolve` method of either Resolver class as second argument and the Resolvers will take this into account when resolving partial names. - -To obtain the resolved class name for the `@var` tag in the example above you can do: - -```php -$typeResolver = new \phpDocumentor\Reflection\TypeResolver(); -$type = $typeResolver->resolve('Types\Context', $context); -``` - -When you do this you will receive an object of class `\phpDocumentor\Reflection\Types\Object_` for which you can call the `getFqsen` method to receive a Value Object that represents the complete FQSEN. So that would be `phpDocumentor\Reflection\Types\Context`. - -> Why is the FQSEN wrapped in another object `Object_`? -> -> The resolve method of the TypeResolver only returns object with the interface `Type` and the FQSEN is a common type that does not represent a Type. Also: in some cases a type can represent an "Untyped Object", meaning that it is an object (signified by the `object` keyword) but does not refer to a specific element using an FQSEN. - -Another example is on how to resolve the FQSEN of a method as can be seen with the `@see` tag in the example above. To resolve that you can do the following: - -```php -$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); -$type = $fqsenResolver->resolve('Classy::otherFunction()', $context); -``` - -Because Classy is a Class in the current namespace its FQSEN will have the `My\Example` namespace and by calling the `resolve` method of the FQSEN Resolver you will receive an `Fqsen` object that refers to `\My\Example\Classy::otherFunction()`. diff --git a/www/vendor/phpdocumentor/type-resolver/composer.json b/www/vendor/phpdocumentor/type-resolver/composer.json deleted file mode 100644 index 4dbf6237..00000000 --- a/www/vendor/phpdocumentor/type-resolver/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "phpdocumentor/type-resolver", - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "phpDocumentor\\Reflection\\": ["tests/unit", "tests/benchmark"] - } - }, - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php b/www/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php deleted file mode 100644 index 068fa208..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php +++ /dev/null @@ -1,80 +0,0 @@ -isFqsen($fqsen)) { - return new Fqsen($fqsen); - } - - return $this->resolvePartialStructuralElementName($fqsen, $context); - } - - /** - * Tests whether the given type is a Fully Qualified Structural Element Name. - */ - private function isFqsen(string $type): bool - { - return strpos($type, self::OPERATOR_NAMESPACE) === 0; - } - - /** - * Resolves a partial Structural Element Name (i.e. `Reflection\DocBlock`) to its FQSEN representation - * (i.e. `\phpDocumentor\Reflection\DocBlock`) based on the Namespace and aliases mentioned in the Context. - * - * @throws InvalidArgumentException When type is not a valid FQSEN. - */ - private function resolvePartialStructuralElementName(string $type, Context $context): Fqsen - { - $typeParts = explode(self::OPERATOR_NAMESPACE, $type, 2); - - $namespaceAliases = $context->getNamespaceAliases(); - - // if the first segment is not an alias; prepend namespace name and return - if (!isset($namespaceAliases[$typeParts[0]])) { - $namespace = $context->getNamespace(); - if ($namespace !== '') { - $namespace .= self::OPERATOR_NAMESPACE; - } - - return new Fqsen(self::OPERATOR_NAMESPACE . $namespace . $type); - } - - $typeParts[0] = $namespaceAliases[$typeParts[0]]; - - return new Fqsen(self::OPERATOR_NAMESPACE . implode(self::OPERATOR_NAMESPACE, $typeParts)); - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/PseudoType.php b/www/vendor/phpdocumentor/type-resolver/src/PseudoType.php deleted file mode 100644 index dd91ed79..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/PseudoType.php +++ /dev/null @@ -1,19 +0,0 @@ -minValue = $minValue; - $this->maxValue = $maxValue; - } - - public function underlyingType(): Type - { - return new Integer(); - } - - public function getMinValue(): string - { - return $this->minValue; - } - - public function getMaxValue(): string - { - return $this->maxValue; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return 'int<' . $this->minValue . ', ' . $this->maxValue . '>'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php b/www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php deleted file mode 100644 index f9f0c6b5..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php +++ /dev/null @@ -1,50 +0,0 @@ -valueType instanceof Mixed_) { - return 'list'; - } - - return 'list<' . $this->valueType . '>'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php b/www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php deleted file mode 100644 index 690f782b..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php +++ /dev/null @@ -1,39 +0,0 @@ - List of recognized keywords and unto which Value Object they map - * @psalm-var array> - */ - private $keywords = [ - 'string' => Types\String_::class, - 'class-string' => Types\ClassString::class, - 'interface-string' => Types\InterfaceString::class, - 'html-escaped-string' => PseudoTypes\HtmlEscapedString::class, - 'lowercase-string' => PseudoTypes\LowercaseString::class, - 'non-empty-lowercase-string' => PseudoTypes\NonEmptyLowercaseString::class, - 'non-empty-string' => PseudoTypes\NonEmptyString::class, - 'numeric-string' => PseudoTypes\NumericString::class, - 'numeric' => PseudoTypes\Numeric_::class, - 'trait-string' => PseudoTypes\TraitString::class, - 'int' => Types\Integer::class, - 'integer' => Types\Integer::class, - 'positive-int' => PseudoTypes\PositiveInteger::class, - 'negative-int' => PseudoTypes\NegativeInteger::class, - 'bool' => Types\Boolean::class, - 'boolean' => Types\Boolean::class, - 'real' => Types\Float_::class, - 'float' => Types\Float_::class, - 'double' => Types\Float_::class, - 'object' => Types\Object_::class, - 'mixed' => Types\Mixed_::class, - 'array' => Types\Array_::class, - 'array-key' => Types\ArrayKey::class, - 'resource' => Types\Resource_::class, - 'void' => Types\Void_::class, - 'null' => Types\Null_::class, - 'scalar' => Types\Scalar::class, - 'callback' => Types\Callable_::class, - 'callable' => Types\Callable_::class, - 'callable-string' => PseudoTypes\CallableString::class, - 'false' => PseudoTypes\False_::class, - 'true' => PseudoTypes\True_::class, - 'literal-string' => PseudoTypes\LiteralString::class, - 'self' => Types\Self_::class, - '$this' => Types\This::class, - 'static' => Types\Static_::class, - 'parent' => Types\Parent_::class, - 'iterable' => Types\Iterable_::class, - 'never' => Types\Never_::class, - 'list' => PseudoTypes\List_::class, - ]; - - /** - * @var FqsenResolver - * @psalm-readonly - */ - private $fqsenResolver; - - /** - * Initializes this TypeResolver with the means to create and resolve Fqsen objects. - */ - public function __construct(?FqsenResolver $fqsenResolver = null) - { - $this->fqsenResolver = $fqsenResolver ?: new FqsenResolver(); - } - - /** - * Analyzes the given type and returns the FQCN variant. - * - * When a type is provided this method checks whether it is not a keyword or - * Fully Qualified Class Name. If so it will use the given namespace and - * aliases to expand the type to a FQCN representation. - * - * This method only works as expected if the namespace and aliases are set; - * no dynamic reflection is being performed here. - * - * @uses Context::getNamespaceAliases() to check whether the first part of the relative type name should not be - * replaced with another namespace. - * @uses Context::getNamespace() to determine with what to prefix the type name. - * - * @param string $type The relative or absolute type. - */ - public function resolve(string $type, ?Context $context = null): Type - { - $type = trim($type); - if (!$type) { - throw new InvalidArgumentException('Attempted to resolve "' . $type . '" but it appears to be empty'); - } - - if ($context === null) { - $context = new Context(''); - } - - // split the type string into tokens `|`, `?`, `<`, `>`, `,`, `(`, `)`, `[]`, '<', '>' and type names - $tokens = preg_split( - '/(\\||\\?|<|>|&|, ?|\\(|\\)|\\[\\]+)/', - $type, - -1, - PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE - ); - - if ($tokens === false) { - throw new InvalidArgumentException('Unable to split the type string "' . $type . '" into tokens'); - } - - /** @var ArrayIterator $tokenIterator */ - $tokenIterator = new ArrayIterator($tokens); - - return $this->parseTypes($tokenIterator, $context, self::PARSER_IN_COMPOUND); - } - - /** - * Analyse each tokens and creates types - * - * @param ArrayIterator $tokens the iterator on tokens - * @param int $parserContext on of self::PARSER_* constants, indicating - * the context where we are in the parsing - */ - private function parseTypes(ArrayIterator $tokens, Context $context, int $parserContext): Type - { - $types = []; - $token = ''; - $compoundToken = '|'; - while ($tokens->valid()) { - $token = $tokens->current(); - if ($token === null) { - throw new RuntimeException( - 'Unexpected nullable character' - ); - } - - if ($token === '|' || $token === '&') { - if (count($types) === 0) { - throw new RuntimeException( - 'A type is missing before a type separator' - ); - } - - if ( - !in_array($parserContext, [ - self::PARSER_IN_COMPOUND, - self::PARSER_IN_ARRAY_EXPRESSION, - self::PARSER_IN_COLLECTION_EXPRESSION, - ], true) - ) { - throw new RuntimeException( - 'Unexpected type separator' - ); - } - - $compoundToken = $token; - $tokens->next(); - } elseif ($token === '?') { - if ( - !in_array($parserContext, [ - self::PARSER_IN_COMPOUND, - self::PARSER_IN_ARRAY_EXPRESSION, - self::PARSER_IN_COLLECTION_EXPRESSION, - ], true) - ) { - throw new RuntimeException( - 'Unexpected nullable character' - ); - } - - $tokens->next(); - $type = $this->parseTypes($tokens, $context, self::PARSER_IN_NULLABLE); - $types[] = new Nullable($type); - } elseif ($token === '(') { - $tokens->next(); - $type = $this->parseTypes($tokens, $context, self::PARSER_IN_ARRAY_EXPRESSION); - - $token = $tokens->current(); - if ($token === null) { // Someone did not properly close their array expression .. - break; - } - - $tokens->next(); - - $resolvedType = new Expression($type); - - $types[] = $resolvedType; - } elseif ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION && isset($token[0]) && $token[0] === ')') { - break; - } elseif ($token === '<') { - if (count($types) === 0) { - throw new RuntimeException( - 'Unexpected collection operator "<", class name is missing' - ); - } - - $classType = array_pop($types); - if ($classType !== null) { - if ((string) $classType === 'class-string') { - $types[] = $this->resolveClassString($tokens, $context); - } elseif ((string) $classType === 'int') { - $types[] = $this->resolveIntRange($tokens); - } elseif ((string) $classType === 'interface-string') { - $types[] = $this->resolveInterfaceString($tokens, $context); - } else { - $types[] = $this->resolveCollection($tokens, $classType, $context); - } - } - - $tokens->next(); - } elseif ( - $parserContext === self::PARSER_IN_COLLECTION_EXPRESSION - && ($token === '>' || trim($token) === ',') - ) { - break; - } elseif ($token === self::OPERATOR_ARRAY) { - end($types); - $last = key($types); - if ($last === null) { - throw new InvalidArgumentException('Unexpected array operator'); - } - - $lastItem = $types[$last]; - if ($lastItem instanceof Expression) { - $lastItem = $lastItem->getValueType(); - } - - $types[$last] = new Array_($lastItem); - - $tokens->next(); - } else { - $type = $this->resolveSingleType($token, $context); - $tokens->next(); - if ($parserContext === self::PARSER_IN_NULLABLE) { - return $type; - } - - $types[] = $type; - } - } - - if ($token === '|' || $token === '&') { - throw new RuntimeException( - 'A type is missing after a type separator' - ); - } - - if (count($types) === 0) { - if ($parserContext === self::PARSER_IN_NULLABLE) { - throw new RuntimeException( - 'A type is missing after a nullable character' - ); - } - - if ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION) { - throw new RuntimeException( - 'A type is missing in an array expression' - ); - } - - if ($parserContext === self::PARSER_IN_COLLECTION_EXPRESSION) { - throw new RuntimeException( - 'A type is missing in a collection expression' - ); - } - } elseif (count($types) === 1) { - return current($types); - } - - if ($compoundToken === '|') { - return new Compound(array_values($types)); - } - - return new Intersection(array_values($types)); - } - - /** - * resolve the given type into a type object - * - * @param string $type the type string, representing a single type - * - * @return Type|Array_|Object_ - * - * @psalm-mutation-free - */ - private function resolveSingleType(string $type, Context $context): object - { - switch (true) { - case $this->isKeyword($type): - return $this->resolveKeyword($type); - - case $this->isFqsen($type): - return $this->resolveTypedObject($type); - - case $this->isPartialStructuralElementName($type): - return $this->resolveTypedObject($type, $context); - - // @codeCoverageIgnoreStart - default: - // I haven't got the foggiest how the logic would come here but added this as a defense. - throw new RuntimeException( - 'Unable to resolve type "' . $type . '", there is no known method to resolve it' - ); - } - - // @codeCoverageIgnoreEnd - } - - /** - * Adds a keyword to the list of Keywords and associates it with a specific Value Object. - * - * @psalm-param class-string $typeClassName - */ - public function addKeyword(string $keyword, string $typeClassName): void - { - if (!class_exists($typeClassName)) { - throw new InvalidArgumentException( - 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class' - . ' but we could not find the class ' . $typeClassName - ); - } - - $interfaces = class_implements($typeClassName); - if ($interfaces === false) { - throw new InvalidArgumentException( - 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class' - . ' but we could not find the class ' . $typeClassName - ); - } - - if (!in_array(Type::class, $interfaces, true)) { - throw new InvalidArgumentException( - 'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"' - ); - } - - $this->keywords[$keyword] = $typeClassName; - } - - /** - * Detects whether the given type represents a PHPDoc keyword. - * - * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. - * - * @psalm-mutation-free - */ - private function isKeyword(string $type): bool - { - return array_key_exists(strtolower($type), $this->keywords); - } - - /** - * Detects whether the given type represents a relative structural element name. - * - * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. - * - * @psalm-mutation-free - */ - private function isPartialStructuralElementName(string $type): bool - { - return (isset($type[0]) && $type[0] !== self::OPERATOR_NAMESPACE) && !$this->isKeyword($type); - } - - /** - * Tests whether the given type is a Fully Qualified Structural Element Name. - * - * @psalm-mutation-free - */ - private function isFqsen(string $type): bool - { - return strpos($type, self::OPERATOR_NAMESPACE) === 0; - } - - /** - * Resolves the given keyword (such as `string`) into a Type object representing that keyword. - * - * @psalm-mutation-free - */ - private function resolveKeyword(string $type): Type - { - $className = $this->keywords[strtolower($type)]; - - return new $className(); - } - - /** - * Resolves the given FQSEN string into an FQSEN object. - * - * @psalm-mutation-free - */ - private function resolveTypedObject(string $type, ?Context $context = null): Object_ - { - return new Object_($this->fqsenResolver->resolve($type, $context)); - } - - /** - * Resolves class string - * - * @param ArrayIterator $tokens - */ - private function resolveClassString(ArrayIterator $tokens, Context $context): Type - { - $tokens->next(); - - $classType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - - if (!$classType instanceof Object_ || $classType->getFqsen() === null) { - throw new RuntimeException( - $classType . ' is not a class string' - ); - } - - $token = $tokens->current(); - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'class-string: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - return new ClassString($classType->getFqsen()); - } - - /** - * Resolves integer ranges - * - * @param ArrayIterator $tokens - */ - private function resolveIntRange(ArrayIterator $tokens): Type - { - $tokens->next(); - - $token = ''; - $minValue = null; - $maxValue = null; - $commaFound = false; - $tokenCounter = 0; - while ($tokens->valid()) { - $tokenCounter++; - $token = $tokens->current(); - if ($token === null) { - throw new RuntimeException( - 'Unexpected nullable character' - ); - } - - $token = trim($token); - - if ($token === '>') { - break; - } - - if ($token === ',') { - $commaFound = true; - } - - if ($commaFound === false && $minValue === null) { - if (is_numeric($token) || $token === 'max' || $token === 'min') { - $minValue = $token; - } - } - - if ($commaFound === true && $maxValue === null) { - if (is_numeric($token) || $token === 'max' || $token === 'min') { - $maxValue = $token; - } - } - - $tokens->next(); - } - - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'interface-string: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - if ($minValue === null || $maxValue === null || $tokenCounter > 4) { - throw new RuntimeException( - 'int has not the correct format' - ); - } - - return new IntegerRange($minValue, $maxValue); - } - - /** - * Resolves class string - * - * @param ArrayIterator $tokens - */ - private function resolveInterfaceString(ArrayIterator $tokens, Context $context): Type - { - $tokens->next(); - - $classType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - - if (!$classType instanceof Object_ || $classType->getFqsen() === null) { - throw new RuntimeException( - $classType . ' is not a interface string' - ); - } - - $token = $tokens->current(); - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'interface-string: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - return new InterfaceString($classType->getFqsen()); - } - - /** - * Resolves the collection values and keys - * - * @param ArrayIterator $tokens - * - * @return Array_|Iterable_|Collection - */ - private function resolveCollection(ArrayIterator $tokens, Type $classType, Context $context): Type - { - $isArray = ((string) $classType === 'array'); - $isIterable = ((string) $classType === 'iterable'); - $isList = ((string) $classType === 'list'); - - // allow only "array", "iterable" or class name before "<" - if ( - !$isArray && !$isIterable && !$isList - && (!$classType instanceof Object_ || $classType->getFqsen() === null) - ) { - throw new RuntimeException( - $classType . ' is not a collection' - ); - } - - $tokens->next(); - - $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - $keyType = null; - - $token = $tokens->current(); - if ($token !== null && trim($token) === ',' && !$isList) { - // if we have a comma, then we just parsed the key type, not the value type - $keyType = $valueType; - if ($isArray) { - // check the key type for an "array" collection. We allow only - // strings or integers. - if ( - !$keyType instanceof ArrayKey && - !$keyType instanceof String_ && - !$keyType instanceof Integer && - !$keyType instanceof Compound - ) { - throw new RuntimeException( - 'An array can have only integers or strings as keys' - ); - } - - if ($keyType instanceof Compound) { - foreach ($keyType->getIterator() as $item) { - if ( - !$item instanceof ArrayKey && - !$item instanceof String_ && - !$item instanceof Integer - ) { - throw new RuntimeException( - 'An array can have only integers or strings as keys' - ); - } - } - } - } - - $tokens->next(); - // now let's parse the value type - $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - } - - $token = $tokens->current(); - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'Collection: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - if ($isArray) { - return new Array_($valueType, $keyType); - } - - if ($isIterable) { - return new Iterable_($valueType, $keyType); - } - - if ($isList) { - return new List_($valueType); - } - - if ($classType instanceof Object_) { - return $this->makeCollectionFromObject($classType, $valueType, $keyType); - } - - throw new RuntimeException('Invalid $classType provided'); - } - - /** - * @psalm-pure - */ - private function makeCollectionFromObject(Object_ $object, Type $valueType, ?Type $keyType = null): Collection - { - return new Collection($object->getFqsen(), $valueType, $keyType); - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php b/www/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php deleted file mode 100644 index b674862a..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php +++ /dev/null @@ -1,83 +0,0 @@ -valueType = $valueType; - $this->defaultKeyType = new Compound([new String_(), new Integer()]); - $this->keyType = $keyType; - } - - /** - * Returns the type for the keys of this array. - */ - public function getKeyType(): Type - { - return $this->keyType ?? $this->defaultKeyType; - } - - /** - * Returns the value for the keys of this array. - */ - public function getValueType(): Type - { - return $this->valueType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - if ($this->keyType) { - return 'array<' . $this->keyType . ',' . $this->valueType . '>'; - } - - if ($this->valueType instanceof Mixed_) { - return 'array'; - } - - if ($this->valueType instanceof Compound) { - return '(' . $this->valueType . ')[]'; - } - - return $this->valueType . '[]'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php b/www/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php deleted file mode 100644 index 472a1cdc..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php +++ /dev/null @@ -1,125 +0,0 @@ - - */ -abstract class AggregatedType implements Type, IteratorAggregate -{ - /** - * @psalm-allow-private-mutation - * @var array - */ - private $types = []; - - /** @var string */ - private $token; - - /** - * @param array $types - */ - public function __construct(array $types, string $token) - { - foreach ($types as $type) { - $this->add($type); - } - - $this->token = $token; - } - - /** - * Returns the type at the given index. - */ - public function get(int $index): ?Type - { - if (!$this->has($index)) { - return null; - } - - return $this->types[$index]; - } - - /** - * Tests if this compound type has a type with the given index. - */ - public function has(int $index): bool - { - return array_key_exists($index, $this->types); - } - - /** - * Tests if this compound type contains the given type. - */ - public function contains(Type $type): bool - { - foreach ($this->types as $typePart) { - // if the type is duplicate; do not add it - if ((string) $typePart === (string) $type) { - return true; - } - } - - return false; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return implode($this->token, $this->types); - } - - /** - * @return ArrayIterator - */ - public function getIterator(): ArrayIterator - { - return new ArrayIterator($this->types); - } - - /** - * @psalm-suppress ImpureMethodCall - */ - private function add(Type $type): void - { - if ($type instanceof self) { - foreach ($type->getIterator() as $subType) { - $this->add($subType); - } - - return; - } - - // if the type is duplicate; do not add it - if ($this->contains($type)) { - return; - } - - $this->types[] = $type; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php b/www/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php deleted file mode 100644 index cf86df00..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php +++ /dev/null @@ -1,42 +0,0 @@ -fqsen = $fqsen; - } - - public function underlyingType(): Type - { - return new String_(); - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - if ($this->fqsen === null) { - return 'class-string'; - } - - return 'class-string<' . (string) $this->fqsen . '>'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Collection.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Collection.php deleted file mode 100644 index 943cc22e..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Collection.php +++ /dev/null @@ -1,68 +0,0 @@ -` - * 2. `ACollectionObject` - * - * - ACollectionObject can be 'array' or an object that can act as an array - * - aValueType and aKeyType can be any type expression - * - * @psalm-immutable - */ -final class Collection extends AbstractList -{ - /** @var Fqsen|null */ - private $fqsen; - - /** - * Initializes this representation of an array with the given Type or Fqsen. - */ - public function __construct(?Fqsen $fqsen, Type $valueType, ?Type $keyType = null) - { - parent::__construct($valueType, $keyType); - - $this->fqsen = $fqsen; - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - $objectType = (string) ($this->fqsen ?? 'object'); - - if ($this->keyType === null) { - return $objectType . '<' . $this->valueType . '>'; - } - - return $objectType . '<' . $this->keyType . ',' . $this->valueType . '>'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Compound.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Compound.php deleted file mode 100644 index ad426cc2..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Compound.php +++ /dev/null @@ -1,38 +0,0 @@ - $types - */ - public function __construct(array $types) - { - parent::__construct($types, '|'); - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Context.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Context.php deleted file mode 100644 index 79aadaf8..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Context.php +++ /dev/null @@ -1,95 +0,0 @@ - Fully Qualified Namespace. - * @psalm-var array - */ - private $namespaceAliases; - - /** - * Initializes the new context and normalizes all passed namespaces to be in Qualified Namespace Name (QNN) - * format (without a preceding `\`). - * - * @param string $namespace The namespace where this DocBlock resides in. - * @param string[] $namespaceAliases List of namespace aliases => Fully Qualified Namespace. - * @psalm-param array $namespaceAliases - */ - public function __construct(string $namespace, array $namespaceAliases = []) - { - $this->namespace = $namespace !== 'global' && $namespace !== 'default' - ? trim($namespace, '\\') - : ''; - - foreach ($namespaceAliases as $alias => $fqnn) { - if ($fqnn[0] === '\\') { - $fqnn = substr($fqnn, 1); - } - - if ($fqnn[strlen($fqnn) - 1] === '\\') { - $fqnn = substr($fqnn, 0, -1); - } - - $namespaceAliases[$alias] = $fqnn; - } - - $this->namespaceAliases = $namespaceAliases; - } - - /** - * Returns the Qualified Namespace Name (thus without `\` in front) where the associated element is in. - */ - public function getNamespace(): string - { - return $this->namespace; - } - - /** - * Returns a list of Qualified Namespace Names (thus without `\` in front) that are imported, the keys represent - * the alias for the imported Namespace. - * - * @return string[] - * @psalm-return array - */ - public function getNamespaceAliases(): array - { - return $this->namespaceAliases; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php b/www/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php deleted file mode 100644 index 892ee0f9..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php +++ /dev/null @@ -1,420 +0,0 @@ - $reflector */ - - return $this->createFromReflectionClass($reflector); - } - - if ($reflector instanceof ReflectionParameter) { - return $this->createFromReflectionParameter($reflector); - } - - if ($reflector instanceof ReflectionMethod) { - return $this->createFromReflectionMethod($reflector); - } - - if ($reflector instanceof ReflectionProperty) { - return $this->createFromReflectionProperty($reflector); - } - - if ($reflector instanceof ReflectionClassConstant) { - return $this->createFromReflectionClassConstant($reflector); - } - - throw new UnexpectedValueException('Unhandled \Reflector instance given: ' . get_class($reflector)); - } - - private function createFromReflectionParameter(ReflectionParameter $parameter): Context - { - $class = $parameter->getDeclaringClass(); - if (!$class) { - throw new InvalidArgumentException('Unable to get class of ' . $parameter->getName()); - } - - return $this->createFromReflectionClass($class); - } - - private function createFromReflectionMethod(ReflectionMethod $method): Context - { - $class = $method->getDeclaringClass(); - - return $this->createFromReflectionClass($class); - } - - private function createFromReflectionProperty(ReflectionProperty $property): Context - { - $class = $property->getDeclaringClass(); - - return $this->createFromReflectionClass($class); - } - - private function createFromReflectionClassConstant(ReflectionClassConstant $constant): Context - { - //phpcs:ignore SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.MissingVariable - /** @phpstan-var ReflectionClass $class */ - $class = $constant->getDeclaringClass(); - - return $this->createFromReflectionClass($class); - } - - /** - * @phpstan-param ReflectionClass $class - */ - private function createFromReflectionClass(ReflectionClass $class): Context - { - $fileName = $class->getFileName(); - $namespace = $class->getNamespaceName(); - - if (is_string($fileName) && file_exists($fileName)) { - $contents = file_get_contents($fileName); - if ($contents === false) { - throw new RuntimeException('Unable to read file "' . $fileName . '"'); - } - - return $this->createForNamespace($namespace, $contents); - } - - return new Context($namespace, []); - } - - /** - * Build a Context for a namespace in the provided file contents. - * - * @see Context for more information on Contexts. - * - * @param string $namespace It does not matter if a `\` precedes the namespace name, - * this method first normalizes. - * @param string $fileContents The file's contents to retrieve the aliases from with the given namespace. - */ - public function createForNamespace(string $namespace, string $fileContents): Context - { - $namespace = trim($namespace, '\\'); - $useStatements = []; - $currentNamespace = ''; - $tokens = new ArrayIterator(token_get_all($fileContents)); - - while ($tokens->valid()) { - $currentToken = $tokens->current(); - switch ($currentToken[0]) { - case T_NAMESPACE: - $currentNamespace = $this->parseNamespace($tokens); - break; - case T_CLASS: - // Fast-forward the iterator through the class so that any - // T_USE tokens found within are skipped - these are not - // valid namespace use statements so should be ignored. - $braceLevel = 0; - $firstBraceFound = false; - while ($tokens->valid() && ($braceLevel > 0 || !$firstBraceFound)) { - $currentToken = $tokens->current(); - if ( - $currentToken === '{' - || in_array($currentToken[0], [T_CURLY_OPEN, T_DOLLAR_OPEN_CURLY_BRACES], true) - ) { - if (!$firstBraceFound) { - $firstBraceFound = true; - } - - ++$braceLevel; - } - - if ($currentToken === '}') { - --$braceLevel; - } - - $tokens->next(); - } - - break; - case T_USE: - if ($currentNamespace === $namespace) { - $useStatements += $this->parseUseStatement($tokens); - } - - break; - } - - $tokens->next(); - } - - return new Context($namespace, $useStatements); - } - - /** - * Deduce the name from tokens when we are at the T_NAMESPACE token. - * - * @param ArrayIterator $tokens - */ - private function parseNamespace(ArrayIterator $tokens): string - { - // skip to the first string or namespace separator - $this->skipToNextStringOrNamespaceSeparator($tokens); - - $name = ''; - $acceptedTokens = [T_STRING, T_NS_SEPARATOR, T_NAME_QUALIFIED]; - while ($tokens->valid() && in_array($tokens->current()[0], $acceptedTokens, true)) { - $name .= $tokens->current()[1]; - $tokens->next(); - } - - return $name; - } - - /** - * Deduce the names of all imports when we are at the T_USE token. - * - * @param ArrayIterator $tokens - * - * @return string[] - * @psalm-return array - */ - private function parseUseStatement(ArrayIterator $tokens): array - { - $uses = []; - - while ($tokens->valid()) { - $this->skipToNextStringOrNamespaceSeparator($tokens); - - $uses += $this->extractUseStatements($tokens); - $currentToken = $tokens->current(); - if ($currentToken[0] === self::T_LITERAL_END_OF_USE) { - return $uses; - } - } - - return $uses; - } - - /** - * Fast-forwards the iterator as longs as we don't encounter a T_STRING or T_NS_SEPARATOR token. - * - * @param ArrayIterator $tokens - */ - private function skipToNextStringOrNamespaceSeparator(ArrayIterator $tokens): void - { - while ($tokens->valid()) { - $currentToken = $tokens->current(); - if (in_array($currentToken[0], [T_STRING, T_NS_SEPARATOR], true)) { - break; - } - - if ($currentToken[0] === T_NAME_QUALIFIED) { - break; - } - - if (defined('T_NAME_FULLY_QUALIFIED') && $currentToken[0] === T_NAME_FULLY_QUALIFIED) { - break; - } - - $tokens->next(); - } - } - - /** - * Deduce the namespace name and alias of an import when we are at the T_USE token or have not reached the end of - * a USE statement yet. This will return a key/value array of the alias => namespace. - * - * @param ArrayIterator $tokens - * - * @return string[] - * @psalm-return array - * - * @psalm-suppress TypeDoesNotContainType - */ - private function extractUseStatements(ArrayIterator $tokens): array - { - $extractedUseStatements = []; - $groupedNs = ''; - $currentNs = ''; - $currentAlias = ''; - $state = 'start'; - - while ($tokens->valid()) { - $currentToken = $tokens->current(); - $tokenId = is_string($currentToken) ? $currentToken : $currentToken[0]; - $tokenValue = is_string($currentToken) ? null : $currentToken[1]; - switch ($state) { - case 'start': - switch ($tokenId) { - case T_STRING: - case T_NS_SEPARATOR: - $currentNs .= (string) $tokenValue; - $currentAlias = $tokenValue; - break; - case T_NAME_QUALIFIED: - case T_NAME_FULLY_QUALIFIED: - $currentNs .= (string) $tokenValue; - $currentAlias = substr( - (string) $tokenValue, - (int) (strrpos((string) $tokenValue, '\\')) + 1 - ); - break; - case T_CURLY_OPEN: - case '{': - $state = 'grouped'; - $groupedNs = $currentNs; - break; - case T_AS: - $state = 'start-alias'; - break; - case self::T_LITERAL_USE_SEPARATOR: - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - - break; - case 'start-alias': - switch ($tokenId) { - case T_STRING: - $currentAlias = $tokenValue; - break; - case self::T_LITERAL_USE_SEPARATOR: - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - - break; - case 'grouped': - switch ($tokenId) { - case T_STRING: - case T_NS_SEPARATOR: - $currentNs .= (string) $tokenValue; - $currentAlias = $tokenValue; - break; - case T_AS: - $state = 'grouped-alias'; - break; - case self::T_LITERAL_USE_SEPARATOR: - $state = 'grouped'; - $extractedUseStatements[(string) $currentAlias] = $currentNs; - $currentNs = $groupedNs; - $currentAlias = ''; - break; - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - - break; - case 'grouped-alias': - switch ($tokenId) { - case T_STRING: - $currentAlias = $tokenValue; - break; - case self::T_LITERAL_USE_SEPARATOR: - $state = 'grouped'; - $extractedUseStatements[(string) $currentAlias] = $currentNs; - $currentNs = $groupedNs; - $currentAlias = ''; - break; - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - } - - if ($state === 'end') { - break; - } - - $tokens->next(); - } - - if ($groupedNs !== $currentNs) { - $extractedUseStatements[(string) $currentAlias] = $currentNs; - } - - return $extractedUseStatements; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Expression.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Expression.php deleted file mode 100644 index da5f65d5..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Expression.php +++ /dev/null @@ -1,51 +0,0 @@ -valueType = $valueType; - } - - /** - * Returns the value for the keys of this array. - */ - public function getValueType(): Type - { - return $this->valueType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return '(' . $this->valueType . ')'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Float_.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Float_.php deleted file mode 100644 index 86138c0e..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Float_.php +++ /dev/null @@ -1,32 +0,0 @@ -fqsen = $fqsen; - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - if ($this->fqsen === null) { - return 'interface-string'; - } - - return 'interface-string<' . (string) $this->fqsen . '>'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php deleted file mode 100644 index ced37b62..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php +++ /dev/null @@ -1,37 +0,0 @@ - $types - */ - public function __construct(array $types) - { - parent::__construct($types, '&'); - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php deleted file mode 100644 index 1ca069f2..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php +++ /dev/null @@ -1,38 +0,0 @@ -keyType) { - return 'iterable<' . $this->keyType . ',' . $this->valueType . '>'; - } - - if ($this->valueType instanceof Mixed_) { - return 'iterable'; - } - - return 'iterable<' . $this->valueType . '>'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php deleted file mode 100644 index 56d1b6da..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php +++ /dev/null @@ -1,32 +0,0 @@ -realType = $realType; - } - - /** - * Provide access to the actual type directly, if needed. - */ - public function getActualType(): Type - { - return $this->realType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return '?' . $this->realType->__toString(); - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Object_.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Object_.php deleted file mode 100644 index 90dee57a..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Object_.php +++ /dev/null @@ -1,69 +0,0 @@ -fqsen = $fqsen; - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - public function __toString(): string - { - if ($this->fqsen) { - return (string) $this->fqsen; - } - - return 'object'; - } -} diff --git a/www/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php b/www/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php deleted file mode 100644 index 34838599..00000000 --- a/www/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php +++ /dev/null @@ -1,34 +0,0 @@ - -Copyright (c) 2013 Marcello Duarte - -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/www/vendor/phpspec/prophecy/README.md b/www/vendor/phpspec/prophecy/README.md deleted file mode 100644 index fbb58f69..00000000 --- a/www/vendor/phpspec/prophecy/README.md +++ /dev/null @@ -1,411 +0,0 @@ -# Prophecy - -[![Stable release](https://poser.pugx.org/phpspec/prophecy/version.svg)](https://packagist.org/packages/phpspec/prophecy) -[![Build Status](https://travis-ci.org/phpspec/prophecy.svg?branch=master)](https://travis-ci.org/phpspec/prophecy) - -Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking -framework. Though initially it was created to fulfil phpspec2 needs, it is flexible -enough to be used inside any testing framework out there with minimal effort. - -## A simple example - -```php -prophet->prophesize('App\Security\Hasher'); - $user = new App\Entity\User($hasher->reveal()); - - $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass'); - - $user->setPassword('qwerty'); - - $this->assertEquals('hashed_pass', $user->getPassword()); - } - - protected function setUp() - { - $this->prophet = new \Prophecy\Prophet; - } - - protected function tearDown() - { - $this->prophet->checkPredictions(); - } -} -``` - -## Installation - -### Prerequisites - -Prophecy requires PHP 7.2.0 or greater. - -### Setup through composer - -First, add Prophecy to the list of dependencies inside your `composer.json`: - -```json -{ - "require-dev": { - "phpspec/prophecy": "~1.0" - } -} -``` - -Then simply install it with composer: - -```bash -$> composer install --prefer-dist -``` - -You can read more about Composer on its [official webpage](http://getcomposer.org). - -## How to use it - -First of all, in Prophecy every word has a logical meaning, even the name of the library -itself (Prophecy). When you start feeling that, you'll become very fluid with this -tool. - -For example, Prophecy has been named that way because it concentrates on describing the future -behavior of objects with very limited knowledge about them. But as with any other prophecy, -those object prophecies can't create themselves - there should be a Prophet: - -```php -$prophet = new Prophecy\Prophet; -``` - -The Prophet creates prophecies by *prophesizing* them: - -```php -$prophecy = $prophet->prophesize(); -``` - -The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes, -that's your specific object prophecy, which describes how your object would behave -in the near future. But first, you need to specify which object you're talking about, -right? - -```php -$prophecy->willExtend('stdClass'); -$prophecy->willImplement('SessionHandlerInterface'); -``` - -There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells -object prophecy that our object should extend a specific class. The second one says that -it should implement some interface. Obviously, objects in PHP can implement multiple -interfaces, but extend only one parent class. - -### Dummies - -Ok, now we have our object prophecy. What can we do with it? First of all, we can get -our object *dummy* by revealing its prophecy: - -```php -$dummy = $prophecy->reveal(); -``` - -The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend -and/or implement preset classes/interfaces by overriding all their public methods. The key -point about dummies is that they do not hold any logic - they just do nothing. Any method -of the dummy will always return `null` and the dummy will never throw any exceptions. -Dummy is your friend if you don't care about the actual behavior of this double and just need -a token object to satisfy a method typehint. - -You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still -assigned to `$prophecy` variable and in order to manipulate with your expectations, you -should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your -prophecy. - -### Stubs - -Ok, now we know how to create basic prophecies and reveal dummies from them. That's -awesome if we don't care about our _doubles_ (objects that reflect originals) -interactions. If we do, we need to use *stubs* or *mocks*. - -A stub is an object double, which doesn't have any expectations about the object behavior, -but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic, -but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called -method signature does different things (has logic). To create stubs in Prophecy: - -```php -$prophecy->read('123')->willReturn('value'); -``` - -Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this -call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific -method with arguments prophecy. Method prophecies give you the ability to create method -promises or predictions. We'll talk about method predictions later in the _Mocks_ section. - -#### Promises - -Promises are logical blocks, that represent your fictional methods in prophecy terms -and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method. -As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple -shortcut to: - -```php -$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value'))); -``` - -This promise will cause any call to our double's `read()` method with exactly one -argument - `'123'` to always return `'value'`. But that's only for this -promise, there's plenty others you can use: - -- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call -- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call -- `ThrowPromise` or `->willThrow($exception)` - causes the method to throw specific exception -- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic - -Keep in mind, that you can always add even more promises by implementing -`Prophecy\Promise\PromiseInterface`. - -#### Method prophecies idempotency - -Prophecy enforces same method prophecies and, as a consequence, same promises and -predictions for the same method calls with the same arguments. This means: - -```php -$methodProphecy1 = $prophecy->read('123'); -$methodProphecy2 = $prophecy->read('123'); -$methodProphecy3 = $prophecy->read('321'); - -$methodProphecy1 === $methodProphecy2; -$methodProphecy1 !== $methodProphecy3; -``` - -That's interesting, right? Now you might ask me how would you define more complex -behaviors where some method call changes behavior of others. In PHPUnit or Mockery -you do that by predicting how many times your method will be called. In Prophecy, -you'll use promises for that: - -```php -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName('everzet')->will(function () { - $this->getName()->willReturn('everzet'); -}); - -// For PHP 5.3 -$user->setName('everzet')->will(function ($args, $user) { - $user->getName()->willReturn('everzet'); -}); - -// Or -$user->setName('everzet')->will(function ($args) use ($user) { - $user->getName()->willReturn('everzet'); -}); -``` - -And now it doesn't matter how many times or in which order your methods are called. -What matters is their behaviors and how well you faked it. - -Note: If the method is called several times, you can use the following syntax to return different -values for each call: - -```php -$prophecy->read('123')->willReturn(1, 2, 3); -``` - -This feature is actually not recommended for most cases. Relying on the order of -calls for the same arguments tends to make test fragile, as adding one more call -can break everything. - -#### Arguments wildcarding - -The previous example is awesome (at least I hope it is for you), but that's not -optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better -way? In fact there is, but it involves understanding what this `'everzet'` -actually is. - -You see, even if method arguments used during method prophecy creation look -like simple method arguments, in reality they are not. They are argument token -wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just -because Prophecy automatically transforms it under the hood into: - -```php -$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet')); -``` - -Those argument tokens are simple PHP classes, that implement -`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments -with your expectations. And yes, those classnames are damn big. That's why there's a -shortcut class `Prophecy\Argument`, which you can use to create tokens like that: - -```php -use Prophecy\Argument; - -$user->setName(Argument::exact('everzet')); -``` - -`ExactValueToken` is not very useful in our case as it forced us to hardcode the username. -That's why Prophecy comes bundled with a bunch of other tokens: - -- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value -- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value -- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or - classname -- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns - a specific value -- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback -- `AnyValueToken` or `Argument::any()` - matches any argument -- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature -- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value -- `InArrayToken` or `Argument::in($array)` - checks if value is in array -- `NotInArrayToken` or `Argument::notIn($array)` - checks if value is not in array - -And you can add even more by implementing `TokenInterface` with your own custom classes. - -So, let's refactor our initial `{set,get}Name()` logic with argument tokens: - -```php -use Prophecy\Argument; - -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName(Argument::type('string'))->will(function ($args) { - $this->getName()->willReturn($args[0]); -}); - -// For PHP 5.3 -$user->setName(Argument::type('string'))->will(function ($args, $user) { - $user->getName()->willReturn($args[0]); -}); - -// Or -$user->setName(Argument::type('string'))->will(function ($args) use ($user) { - $user->getName()->willReturn($args[0]); -}); -``` - -That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it. -We've just described how our stub object should behave, even though the original object could have -no behavior whatsoever. - -One last bit about arguments now. You might ask, what happens in case of: - -```php -use Prophecy\Argument; - -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName(Argument::type('string'))->will(function ($args) { - $this->getName()->willReturn($args[0]); -}); - -// For PHP 5.3 -$user->setName(Argument::type('string'))->will(function ($args, $user) { - $user->getName()->willReturn($args[0]); -}); - -// Or -$user->setName(Argument::type('string'))->will(function ($args) use ($user) { - $user->getName()->willReturn($args[0]); -}); - -$user->setName(Argument::any())->will(function () { -}); -``` - -Nothing. Your stub will continue behaving the way it did before. That's because of how -arguments wildcarding works. Every argument token type has a different score level, which -wildcard then uses to calculate the final arguments match score and use the method prophecy -promise that has the highest score. In this case, `Argument::type()` in case of success -scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first -`setName()` method prophecy and its promise. The simple rule of thumb - more precise token -always wins. - -#### Getting stub objects - -Ok, now we know how to define our prophecy method promises, let's get our stub from -it: - -```php -$stub = $prophecy->reveal(); -``` - -As you might see, the only difference between how we get dummies and stubs is that with -stubs we describe every object conversation instead of just agreeing with `null` returns -(object being *dummy*). As a matter of fact, after you define your first promise -(method call), Prophecy will force you to define all the communications - it throws -the `UnexpectedCallException` for any call you didn't describe with object prophecy before -calling it on a stub. - -### Mocks - -Now we know how to define doubles without behavior (dummies) and doubles with behavior, but -no expectations (stubs). What's left is doubles for which we have some expectations. These -are called mocks and in Prophecy they look almost exactly the same as stubs, except that -they define *predictions* instead of *promises* on method prophecies: - -```php -$entityManager->flush()->shouldBeCalled(); -``` - -#### Predictions - -The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy. -Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime -of your doubles, Prophecy records every single call you're making against it inside your -code. After that, Prophecy can use this collected information to check if it matches defined -predictions. You can assign predictions to method prophecies using the -`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact, -the `shouldBeCalled()` method we used earlier is just a shortcut to: - -```php -$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction()); -``` - -It checks if your method of interest (that matches both the method name and the arguments wildcard) -was called 1 or more times. If the prediction failed then it throws an exception. When does this -check happen? Whenever you call `checkPredictions()` on the main Prophet object: - -```php -$prophet->checkPredictions(); -``` - -In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions -are defined, it would do nothing. So it won't harm to call it after every test. - -There are plenty more predictions you can play with: - -- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times -- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called -- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called - `$count` times -- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback - -Of course, you can always create your own custom prediction any time by implementing -`PredictionInterface`. - -### Spies - -The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous -section, Prophecy records every call made during the double's entire lifetime. This means -you don't need to record predictions in order to check them. You can also do it -manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method: - -```php -$em = $prophet->prophesize('Doctrine\ORM\EntityManager'); - -$controller->createUser($em->reveal()); - -$em->flush()->shouldHaveBeenCalled(); -``` - -Such manipulation with doubles is called spying. And with Prophecy it just works. - - -## FAQ - -### Can I call the original methods on a prophesized class? - -Prophecy does not support calling the original methods on a phrophesized class. If you find yourself needing to mock some methods of a class while calling the original version of other methods, it's likely a sign that your class violates the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) and should be refactored. diff --git a/www/vendor/phpspec/prophecy/composer.json b/www/vendor/phpspec/prophecy/composer.json deleted file mode 100644 index 129a4cf6..00000000 --- a/www/vendor/phpspec/prophecy/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "phpspec/prophecy", - "description": "Highly opinionated mocking framework for PHP 5.3+", - "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"], - "homepage": "https://github.com/phpspec/prophecy", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - - "require": { - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "doctrine/instantiator": "^1.2", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - - "autoload-dev": { - "psr-4": { - "Fixtures\\Prophecy\\": "fixtures" - } - }, - - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument.php deleted file mode 100644 index 674255a2..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument.php +++ /dev/null @@ -1,239 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy; - -use Prophecy\Argument\Token; - -/** - * Argument tokens shortcuts. - * - * @author Konstantin Kudryashov - */ -class Argument -{ - /** - * Checks that argument is exact value or object. - * - * @param mixed $value - * - * @return Token\ExactValueToken - */ - public static function exact($value) - { - return new Token\ExactValueToken($value); - } - - /** - * Checks that argument is of specific type or instance of specific class. - * - * @param string $type Type name (`integer`, `string`) or full class name - * - * @return Token\TypeToken - */ - public static function type($type) - { - return new Token\TypeToken($type); - } - - /** - * Checks that argument object has specific state. - * - * @param string $methodName - * @param mixed $value - * - * @return Token\ObjectStateToken - */ - public static function which($methodName, $value) - { - return new Token\ObjectStateToken($methodName, $value); - } - - /** - * Checks that argument matches provided callback. - * - * @param callable $callback - * - * @return Token\CallbackToken - */ - public static function that($callback) - { - return new Token\CallbackToken($callback); - } - - /** - * Matches any single value. - * - * @return Token\AnyValueToken - */ - public static function any() - { - return new Token\AnyValueToken; - } - - /** - * Matches all values to the rest of the signature. - * - * @return Token\AnyValuesToken - */ - public static function cetera() - { - return new Token\AnyValuesToken; - } - - /** - * Checks that argument matches all tokens - * - * @param mixed ... a list of tokens - * - * @return Token\LogicalAndToken - */ - public static function allOf() - { - return new Token\LogicalAndToken(func_get_args()); - } - - /** - * Checks that argument array or countable object has exact number of elements. - * - * @param integer $value array elements count - * - * @return Token\ArrayCountToken - */ - public static function size($value) - { - return new Token\ArrayCountToken($value); - } - - /** - * Checks that argument array contains (key, value) pair - * - * @param mixed $key exact value or token - * @param mixed $value exact value or token - * - * @return Token\ArrayEntryToken - */ - public static function withEntry($key, $value) - { - return new Token\ArrayEntryToken($key, $value); - } - - /** - * Checks that arguments array entries all match value - * - * @param mixed $value - * - * @return Token\ArrayEveryEntryToken - */ - public static function withEveryEntry($value) - { - return new Token\ArrayEveryEntryToken($value); - } - - /** - * Checks that argument array contains value - * - * @param mixed $value - * - * @return Token\ArrayEntryToken - */ - public static function containing($value) - { - return new Token\ArrayEntryToken(self::any(), $value); - } - - /** - * Checks that argument array has key - * - * @param mixed $key exact value or token - * - * @return Token\ArrayEntryToken - */ - public static function withKey($key) - { - return new Token\ArrayEntryToken($key, self::any()); - } - - /** - * Checks that argument does not match the value|token. - * - * @param mixed $value either exact value or argument token - * - * @return Token\LogicalNotToken - */ - public static function not($value) - { - return new Token\LogicalNotToken($value); - } - - /** - * @param string $value - * - * @return Token\StringContainsToken - */ - public static function containingString($value) - { - return new Token\StringContainsToken($value); - } - - /** - * Checks that argument is identical value. - * - * @param mixed $value - * - * @return Token\IdenticalValueToken - */ - public static function is($value) - { - return new Token\IdenticalValueToken($value); - } - - /** - * Check that argument is same value when rounding to the - * given precision. - * - * @param float $value - * @param float $precision - * - * @return Token\ApproximateValueToken - */ - public static function approximate($value, $precision = 0) - { - return new Token\ApproximateValueToken($value, $precision); - } - - /** - * Checks that argument is in array. - * - * @param array $value - * - * @return Token\InArrayToken - */ - - public static function in($value) - { - return new Token\InArrayToken($value); - } - - /** - * Checks that argument is not in array. - * - * @param array $value - * - * @return Token\NotInArrayToken - */ - - public static function notIn($value) - { - return new Token\NotInArrayToken($value); - } - -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php deleted file mode 100644 index a088f21d..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php +++ /dev/null @@ -1,101 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument; - -/** - * Arguments wildcarding. - * - * @author Konstantin Kudryashov - */ -class ArgumentsWildcard -{ - /** - * @var Token\TokenInterface[] - */ - private $tokens = array(); - private $string; - - /** - * Initializes wildcard. - * - * @param array $arguments Array of argument tokens or values - */ - public function __construct(array $arguments) - { - foreach ($arguments as $argument) { - if (!$argument instanceof Token\TokenInterface) { - $argument = new Token\ExactValueToken($argument); - } - - $this->tokens[] = $argument; - } - } - - /** - * Calculates wildcard match score for provided arguments. - * - * @param array $arguments - * - * @return false|int False OR integer score (higher - better) - */ - public function scoreArguments(array $arguments) - { - if (0 == count($arguments) && 0 == count($this->tokens)) { - return 1; - } - - $arguments = array_values($arguments); - $totalScore = 0; - foreach ($this->tokens as $i => $token) { - $argument = isset($arguments[$i]) ? $arguments[$i] : null; - if (1 >= $score = $token->scoreArgument($argument)) { - return false; - } - - $totalScore += $score; - - if (true === $token->isLast()) { - return $totalScore; - } - } - - if (count($arguments) > count($this->tokens)) { - return false; - } - - return $totalScore; - } - - /** - * Returns string representation for wildcard. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = implode(', ', array_map(function ($token) { - return (string) $token; - }, $this->tokens)); - } - - return $this->string; - } - - /** - * @return array - */ - public function getTokens() - { - return $this->tokens; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php deleted file mode 100644 index 50988112..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Any single value token. - * - * @author Konstantin Kudryashov - */ -class AnyValueToken implements TokenInterface -{ - /** - * Always scores 3 for any argument. - * - * @param $argument - * - * @return int - */ - public function scoreArgument($argument) - { - return 3; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return '*'; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php deleted file mode 100644 index f76b17bc..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Any values token. - * - * @author Konstantin Kudryashov - */ -class AnyValuesToken implements TokenInterface -{ - /** - * Always scores 2 for any argument. - * - * @param $argument - * - * @return int - */ - public function scoreArgument($argument) - { - return 2; - } - - /** - * Returns true to stop wildcard from processing other tokens. - * - * @return bool - */ - public function isLast() - { - return true; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return '* [, ...]'; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php deleted file mode 100644 index 901744ab..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Approximate value token - * - * @author Daniel Leech - */ -class ApproximateValueToken implements TokenInterface -{ - private $value; - private $precision; - - public function __construct($value, $precision = 0) - { - $this->value = $value; - $this->precision = $precision; - } - - /** - * {@inheritdoc} - */ - public function scoreArgument($argument) - { - return round((float)$argument, $this->precision) === round($this->value, $this->precision) ? 10 : false; - } - - /** - * {@inheritdoc} - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('≅%s', round($this->value, $this->precision)); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php deleted file mode 100644 index 96b4befd..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Array elements count token. - * - * @author Boris Mikhaylov - */ - -class ArrayCountToken implements TokenInterface -{ - private $count; - - /** - * @param integer $value - */ - public function __construct($value) - { - $this->count = $value; - } - - /** - * Scores 6 when argument has preset number of elements. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('count(%s)', $this->count); - } - - /** - * Returns true if object is either array or instance of \Countable - * - * @param $argument - * @return bool - */ - private function isCountable($argument) - { - return (is_array($argument) || $argument instanceof \Countable); - } - - /** - * Returns true if $argument has expected number of elements - * - * @param array|\Countable $argument - * - * @return bool - */ - private function hasProperCount($argument) - { - return $this->count === count($argument); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php deleted file mode 100644 index 0305fc72..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php +++ /dev/null @@ -1,143 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Array entry token. - * - * @author Boris Mikhaylov - */ -class ArrayEntryToken implements TokenInterface -{ - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $key; - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $value; - - /** - * @param mixed $key exact value or token - * @param mixed $value exact value or token - */ - public function __construct($key, $value) - { - $this->key = $this->wrapIntoExactValueToken($key); - $this->value = $this->wrapIntoExactValueToken($value); - } - - /** - * Scores half of combined scores from key and value tokens for same entry. Capped at 8. - * If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken. - * - * @param array|\ArrayAccess|\Traversable $argument - * - * @throws \Prophecy\Exception\InvalidArgumentException - * @return bool|int - */ - public function scoreArgument($argument) - { - if ($argument instanceof \Traversable) { - $argument = iterator_to_array($argument); - } - - if ($argument instanceof \ArrayAccess) { - $argument = $this->convertArrayAccessToEntry($argument); - } - - if (!is_array($argument) || empty($argument)) { - return false; - } - - $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); - $valueScores = array_map(array($this->value,'scoreArgument'), $argument); - $scoreEntry = function ($value, $key) { - return $value && $key ? min(8, ($key + $value) / 2) : false; - }; - - return max(array_map($scoreEntry, $valueScores, $keyScores)); - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('[..., %s => %s, ...]', $this->key, $this->value); - } - - /** - * Returns key - * - * @return TokenInterface - */ - public function getKey() - { - return $this->key; - } - - /** - * Returns value - * - * @return TokenInterface - */ - public function getValue() - { - return $this->value; - } - - /** - * Wraps non token $value into ExactValueToken - * - * @param $value - * @return TokenInterface - */ - private function wrapIntoExactValueToken($value) - { - return $value instanceof TokenInterface ? $value : new ExactValueToken($value); - } - - /** - * Converts instance of \ArrayAccess to key => value array entry - * - * @param \ArrayAccess $object - * - * @return array|null - * @throws \Prophecy\Exception\InvalidArgumentException - */ - private function convertArrayAccessToEntry(\ArrayAccess $object) - { - if (!$this->key instanceof ExactValueToken) { - throw new InvalidArgumentException(sprintf( - 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. - 'But you used `%s`.', - $this->key - )); - } - - $key = $this->key->getValue(); - - return $object->offsetExists($key) ? array($key => $object[$key]) : array(); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php deleted file mode 100644 index 5d41fa48..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php +++ /dev/null @@ -1,82 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Array every entry token. - * - * @author Adrien Brault - */ -class ArrayEveryEntryToken implements TokenInterface -{ - /** - * @var TokenInterface - */ - private $value; - - /** - * @param mixed $value exact value or token - */ - public function __construct($value) - { - if (!$value instanceof TokenInterface) { - $value = new ExactValueToken($value); - } - - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function scoreArgument($argument) - { - if (!$argument instanceof \Traversable && !is_array($argument)) { - return false; - } - - $scores = array(); - foreach ($argument as $key => $argumentEntry) { - $scores[] = $this->value->scoreArgument($argumentEntry); - } - - if (empty($scores) || in_array(false, $scores, true)) { - return false; - } - - return array_sum($scores) / count($scores); - } - - /** - * {@inheritdoc} - */ - public function isLast() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return sprintf('[%s, ..., %s]', $this->value, $this->value); - } - - /** - * @return TokenInterface - */ - public function getValue() - { - return $this->value; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php deleted file mode 100644 index f45ba20b..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php +++ /dev/null @@ -1,75 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Callback-verified token. - * - * @author Konstantin Kudryashov - */ -class CallbackToken implements TokenInterface -{ - private $callback; - - /** - * Initializes token. - * - * @param callable $callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackToken, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Scores 7 if callback returns true, false otherwise. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return call_user_func($this->callback, $argument) ? 7 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return 'callback()'; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php deleted file mode 100644 index 045a1b90..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php +++ /dev/null @@ -1,118 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Util\StringUtil; - -/** - * Exact value token. - * - * @author Konstantin Kudryashov - */ -class ExactValueToken implements TokenInterface -{ - private $value; - private $string; - private $util; - private $comparatorFactory; - - /** - * Initializes token. - * - * @param mixed $value - * @param StringUtil $util - * @param ComparatorFactory $comparatorFactory - */ - public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null) - { - $this->value = $value; - $this->util = $util ?: new StringUtil(); - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Scores 10 if argument matches preset value. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (is_object($argument) && is_object($this->value)) { - $comparator = $this->comparatorFactory->getComparatorFor( - $argument, $this->value - ); - - try { - $comparator->assertEquals($argument, $this->value); - return 10; - } catch (ComparisonFailure $failure) { - return false; - } - } - - // If either one is an object it should be castable to a string - if (is_object($argument) xor is_object($this->value)) { - if (is_object($argument) && !method_exists($argument, '__toString')) { - return false; - } - - if (is_object($this->value) && !method_exists($this->value, '__toString')) { - return false; - } - } elseif (is_numeric($argument) && is_numeric($this->value)) { - // noop - } elseif (gettype($argument) !== gettype($this->value)) { - return false; - } - - return $argument == $this->value ? 10 : false; - } - - /** - * Returns preset value against which token checks arguments. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = sprintf('exact(%s)', $this->util->stringify($this->value)); - } - - return $this->string; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php deleted file mode 100644 index 0b6d23ab..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php +++ /dev/null @@ -1,74 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Util\StringUtil; - -/** - * Identical value token. - * - * @author Florian Voutzinos - */ -class IdenticalValueToken implements TokenInterface -{ - private $value; - private $string; - private $util; - - /** - * Initializes token. - * - * @param mixed $value - * @param StringUtil $util - */ - public function __construct($value, StringUtil $util = null) - { - $this->value = $value; - $this->util = $util ?: new StringUtil(); - } - - /** - * Scores 11 if argument matches preset value. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return $argument === $this->value ? 11 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = sprintf('identical(%s)', $this->util->stringify($this->value)); - } - - return $this->string; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php deleted file mode 100644 index f727aea4..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php +++ /dev/null @@ -1,74 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Check if values is in array - * - * @author Vinícius Alonso - */ -class InArrayToken implements TokenInterface -{ - private $token = array(); - private $strict; - - /** - * @param array $arguments tokens - * @param bool $strict - */ - public function __construct(array $arguments, $strict = true) - { - $this->token = $arguments; - $this->strict = $strict; - } - - /** - * Return scores 8 score if argument is in array. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (count($this->token) === 0) { - return false; - } - - if (\in_array($argument, $this->token, $this->strict)) { - return 8; - } - - return false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - $arrayAsString = implode(', ', $this->token); - return "[{$arrayAsString}]"; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php deleted file mode 100644 index 4ee1b25e..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php +++ /dev/null @@ -1,80 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Logical AND token. - * - * @author Boris Mikhaylov - */ -class LogicalAndToken implements TokenInterface -{ - private $tokens = array(); - - /** - * @param array $arguments exact values or tokens - */ - public function __construct(array $arguments) - { - foreach ($arguments as $argument) { - if (!$argument instanceof TokenInterface) { - $argument = new ExactValueToken($argument); - } - $this->tokens[] = $argument; - } - } - - /** - * Scores maximum score from scores returned by tokens for this argument if all of them score. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (0 === count($this->tokens)) { - return false; - } - - $maxScore = 0; - foreach ($this->tokens as $token) { - $score = $token->scoreArgument($argument); - if (false === $score) { - return false; - } - $maxScore = max($score, $maxScore); - } - - return $maxScore; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('bool(%s)', implode(' AND ', $this->tokens)); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php deleted file mode 100644 index 623efa57..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php +++ /dev/null @@ -1,73 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Logical NOT token. - * - * @author Boris Mikhaylov - */ -class LogicalNotToken implements TokenInterface -{ - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $token; - - /** - * @param mixed $value exact value or token - */ - public function __construct($value) - { - $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value); - } - - /** - * Scores 4 when preset token does not match the argument. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return false === $this->token->scoreArgument($argument) ? 4 : false; - } - - /** - * Returns true if preset token is last. - * - * @return bool|int - */ - public function isLast() - { - return $this->token->isLast(); - } - - /** - * Returns originating token. - * - * @return TokenInterface - */ - public function getOriginatingToken() - { - return $this->token; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('not(%s)', $this->token); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php deleted file mode 100644 index 6aed8aa5..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php +++ /dev/null @@ -1,75 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Check if values is not in array - * - * @author Vinícius Alonso - */ -class NotInArrayToken implements TokenInterface -{ - private $token = array(); - private $strict; - - /** - * @param array $arguments tokens - * @param bool $strict - */ - public function __construct(array $arguments, $strict = true) - { - $this->token = $arguments; - $this->strict = $strict; - } - - /** - * Return scores 8 score if argument is in array. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (count($this->token) === 0) { - return false; - } - - if (!\in_array($argument, $this->token, $this->strict)) { - return 8; - } - - return false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - $arrayAsString = implode(', ', $this->token); - return "[{$arrayAsString}]"; - } -} - diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php deleted file mode 100644 index d7710776..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php +++ /dev/null @@ -1,104 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Util\StringUtil; - -/** - * Object state-checker token. - * - * @author Konstantin Kudryashov - */ -class ObjectStateToken implements TokenInterface -{ - private $name; - private $value; - private $util; - private $comparatorFactory; - - /** - * Initializes token. - * - * @param string $methodName - * @param mixed $value Expected return value - * @param null|StringUtil $util - * @param ComparatorFactory $comparatorFactory - */ - public function __construct( - $methodName, - $value, - StringUtil $util = null, - ComparatorFactory $comparatorFactory = null - ) { - $this->name = $methodName; - $this->value = $value; - $this->util = $util ?: new StringUtil; - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Scores 8 if argument is an object, which method returns expected value. - * - * @param mixed $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (is_object($argument) && method_exists($argument, $this->name)) { - $actual = call_user_func(array($argument, $this->name)); - - $comparator = $this->comparatorFactory->getComparatorFor( - $this->value, $actual - ); - - try { - $comparator->assertEquals($this->value, $actual); - return 8; - } catch (ComparisonFailure $failure) { - return false; - } - } - - if (is_object($argument) && property_exists($argument, $this->name)) { - return $argument->{$this->name} === $this->value ? 8 : false; - } - - return false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('state(%s(), %s)', - $this->name, - $this->util->stringify($this->value) - ); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php deleted file mode 100644 index bd8d423f..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * String contains token. - * - * @author Peter Mitchell - */ -class StringContainsToken implements TokenInterface -{ - private $value; - - /** - * Initializes token. - * - * @param string $value - */ - public function __construct($value) - { - $this->value = $value; - } - - public function scoreArgument($argument) - { - return is_string($argument) && strpos($argument, $this->value) !== false ? 6 : false; - } - - /** - * Returns preset value against which token checks arguments. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('contains("%s")', $this->value); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php deleted file mode 100644 index 625d3bad..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Argument token interface. - * - * @author Konstantin Kudryashov - */ -interface TokenInterface -{ - /** - * Calculates token match score for provided argument. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument); - - /** - * Returns true if this token prevents check of other tokens (is last one). - * - * @return bool|int - */ - public function isLast(); - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString(); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php deleted file mode 100644 index cb65132c..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php +++ /dev/null @@ -1,76 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Value type token. - * - * @author Konstantin Kudryashov - */ -class TypeToken implements TokenInterface -{ - private $type; - - /** - * @param string $type - */ - public function __construct($type) - { - $checker = "is_{$type}"; - if (!function_exists($checker) && !interface_exists($type) && !class_exists($type)) { - throw new InvalidArgumentException(sprintf( - 'Type or class name expected as an argument to TypeToken, but got %s.', $type - )); - } - - $this->type = $type; - } - - /** - * Scores 5 if argument has the same type this token was constructed with. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - $checker = "is_{$this->type}"; - if (function_exists($checker)) { - return call_user_func($checker, $argument) ? 5 : false; - } - - return $argument instanceof $this->type ? 5 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('type(%s)', $this->type); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/www/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php deleted file mode 100644 index 26522354..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php +++ /dev/null @@ -1,162 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Call; - -use Exception; -use Prophecy\Argument\ArgumentsWildcard; - -/** - * Call object. - * - * @author Konstantin Kudryashov - */ -class Call -{ - private $methodName; - private $arguments; - private $returnValue; - private $exception; - private $file; - private $line; - private $scores; - - /** - * Initializes call. - * - * @param string $methodName - * @param array $arguments - * @param mixed $returnValue - * @param Exception $exception - * @param null|string $file - * @param null|int $line - */ - public function __construct($methodName, array $arguments, $returnValue, - Exception $exception = null, $file, $line) - { - $this->methodName = $methodName; - $this->arguments = $arguments; - $this->returnValue = $returnValue; - $this->exception = $exception; - $this->scores = new \SplObjectStorage(); - - if ($file) { - $this->file = $file; - $this->line = intval($line); - } - } - - /** - * Returns called method name. - * - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * Returns called method arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Returns called method return value. - * - * @return null|mixed - */ - public function getReturnValue() - { - return $this->returnValue; - } - - /** - * Returns exception that call thrown. - * - * @return null|Exception - */ - public function getException() - { - return $this->exception; - } - - /** - * Returns callee filename. - * - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * Returns callee line number. - * - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * Returns short notation for callee place. - * - * @return string - */ - public function getCallPlace() - { - if (null === $this->file) { - return 'unknown'; - } - - return sprintf('%s:%d', $this->file, $this->line); - } - - /** - * Adds the wildcard match score for the provided wildcard. - * - * @param ArgumentsWildcard $wildcard - * @param false|int $score - * - * @return $this - */ - public function addScore(ArgumentsWildcard $wildcard, $score) - { - $this->scores[$wildcard] = $score; - - return $this; - } - - /** - * Returns wildcard match score for the provided wildcard. The score is - * calculated if not already done. - * - * @param ArgumentsWildcard $wildcard - * - * @return false|int False OR integer score (higher - better) - */ - public function getScore(ArgumentsWildcard $wildcard) - { - if (isset($this->scores[$wildcard])) { - return $this->scores[$wildcard]; - } - - return $this->scores[$wildcard] = $wildcard->scoreArguments($this->getArguments()); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/www/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php deleted file mode 100644 index 00c526d7..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php +++ /dev/null @@ -1,240 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Call; - -use Prophecy\Exception\Prophecy\MethodProphecyException; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Call\UnexpectedCallException; -use SplObjectStorage; - -/** - * Calls receiver & manager. - * - * @author Konstantin Kudryashov - */ -class CallCenter -{ - private $util; - - /** - * @var Call[] - */ - private $recordedCalls = array(); - - /** - * @var SplObjectStorage - */ - private $unexpectedCalls; - - /** - * Initializes call center. - * - * @param StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - $this->unexpectedCalls = new SplObjectStorage(); - } - - /** - * Makes and records specific method call for object prophecy. - * - * @param ObjectProphecy $prophecy - * @param string $methodName - * @param array $arguments - * - * @return mixed Returns null if no promise for prophecy found or promise return value. - * - * @throws \Prophecy\Exception\Call\UnexpectedCallException If no appropriate method prophecy found - */ - public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments) - { - // For efficiency exclude 'args' from the generated backtrace - // Limit backtrace to last 3 calls as we don't use the rest - $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); - - $file = $line = null; - if (isset($backtrace[2]) && isset($backtrace[2]['file'])) { - $file = $backtrace[2]['file']; - $line = $backtrace[2]['line']; - } - - // If no method prophecies defined, then it's a dummy, so we'll just return null - if ('__destruct' === strtolower($methodName) || 0 == count($prophecy->getMethodProphecies())) { - $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); - - return null; - } - - // There are method prophecies, so it's a fake/stub. Searching prophecy for this call - $matches = $this->findMethodProphecies($prophecy, $methodName, $arguments); - - // If fake/stub doesn't have method prophecy for this call - throw exception - if (!count($matches)) { - $this->unexpectedCalls->attach(new Call($methodName, $arguments, null, null, $file, $line), $prophecy); - $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); - - return null; - } - - // Sort matches by their score value - @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); - - $score = $matches[0][0]; - // If Highest rated method prophecy has a promise - execute it or return null instead - $methodProphecy = $matches[0][1]; - $returnValue = null; - $exception = null; - if ($promise = $methodProphecy->getPromise()) { - try { - $returnValue = $promise->execute($arguments, $prophecy, $methodProphecy); - } catch (\Exception $e) { - $exception = $e; - } - } - - if ($methodProphecy->hasReturnVoid() && $returnValue !== null) { - throw new MethodProphecyException( - "The method \"$methodName\" has a void return type, but the promise returned a value", - $methodProphecy - ); - } - - $this->recordedCalls[] = $call = new Call( - $methodName, $arguments, $returnValue, $exception, $file, $line - ); - $call->addScore($methodProphecy->getArgumentsWildcard(), $score); - - if (null !== $exception) { - throw $exception; - } - - return $returnValue; - } - - /** - * Searches for calls by method name & arguments wildcard. - * - * @param string $methodName - * @param ArgumentsWildcard $wildcard - * - * @return Call[] - */ - public function findCalls($methodName, ArgumentsWildcard $wildcard) - { - $methodName = strtolower($methodName); - - return array_values( - array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { - return $methodName === strtolower($call->getMethodName()) - && 0 < $call->getScore($wildcard) - ; - }) - ); - } - - /** - * @throws UnexpectedCallException - */ - public function checkUnexpectedCalls() - { - /** @var Call $call */ - foreach ($this->unexpectedCalls as $call) { - $prophecy = $this->unexpectedCalls[$call]; - - // If fake/stub doesn't have method prophecy for this call - throw exception - if (!count($this->findMethodProphecies($prophecy, $call->getMethodName(), $call->getArguments()))) { - throw $this->createUnexpectedCallException($prophecy, $call->getMethodName(), $call->getArguments()); - } - } - } - - private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName, - array $arguments) - { - $classname = get_class($prophecy->reveal()); - $indentationLength = 8; // looks good - $argstring = implode( - ",\n", - $this->indentArguments( - array_map(array($this->util, 'stringify'), $arguments), - $indentationLength - ) - ); - - $expected = array(); - - foreach (array_merge(...array_values($prophecy->getMethodProphecies())) as $methodProphecy) { - $expected[] = sprintf( - " - %s(\n" . - "%s\n" . - " )", - $methodProphecy->getMethodName(), - implode( - ",\n", - $this->indentArguments( - array_map('strval', $methodProphecy->getArgumentsWildcard()->getTokens()), - $indentationLength - ) - ) - ); - } - - return new UnexpectedCallException( - sprintf( - "Unexpected method call on %s:\n". - " - %s(\n". - "%s\n". - " )\n". - "expected calls were:\n". - "%s", - - $classname, $methodName, $argstring, implode("\n", $expected) - ), - $prophecy, $methodName, $arguments - - ); - } - - private function indentArguments(array $arguments, $indentationLength) - { - return preg_replace_callback( - '/^/m', - function () use ($indentationLength) { - return str_repeat(' ', $indentationLength); - }, - $arguments - ); - } - - /** - * @param ObjectProphecy $prophecy - * @param string $methodName - * @param array $arguments - * - * @return array - */ - private function findMethodProphecies(ObjectProphecy $prophecy, $methodName, array $arguments) - { - $matches = array(); - foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) { - if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) { - $matches[] = array($score, $methodProphecy); - } - } - - return $matches; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php deleted file mode 100644 index fabfbc61..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php +++ /dev/null @@ -1,44 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Closure comparator. - * - * @author Konstantin Kudryashov - */ -final class ClosureComparator extends Comparator -{ - public function accepts($expected, $actual): bool - { - return is_object($expected) && $expected instanceof \Closure - && is_object($actual) && $actual instanceof \Closure; - } - - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void - { - if ($expected !== $actual) { - throw new ComparisonFailure( - $expected, - $actual, - // we don't need a diff - '', - '', - false, - 'all closures are different if not identical' - ); - } - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php b/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php deleted file mode 100644 index 2070db14..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php +++ /dev/null @@ -1,47 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use SebastianBergmann\Comparator\Factory as BaseFactory; - -/** - * Prophecy comparator factory. - * - * @author Konstantin Kudryashov - */ -final class Factory extends BaseFactory -{ - /** - * @var Factory - */ - private static $instance; - - public function __construct() - { - parent::__construct(); - - $this->register(new ClosureComparator()); - $this->register(new ProphecyComparator()); - } - - /** - * @return Factory - */ - public static function getInstance() - { - if (self::$instance === null) { - self::$instance = new Factory; - } - - return self::$instance; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php b/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php deleted file mode 100644 index 2736e410..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use Prophecy\Prophecy\ProphecyInterface; -use SebastianBergmann\Comparator\ObjectComparator; - -/** - * @final - */ -class ProphecyComparator extends ObjectComparator -{ - public function accepts($expected, $actual): bool - { - return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface; - } - - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void - { - parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php deleted file mode 100644 index 2b875211..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php +++ /dev/null @@ -1,66 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use ReflectionClass; - -/** - * Cached class doubler. - * Prevents mirroring/creation of the same structure twice. - * - * @author Konstantin Kudryashov - */ -class CachedDoubler extends Doubler -{ - private static $classes = array(); - - /** - * {@inheritdoc} - */ - protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) - { - $classId = $this->generateClassId($class, $interfaces); - if (isset(self::$classes[$classId])) { - return self::$classes[$classId]; - } - - return self::$classes[$classId] = parent::createDoubleClass($class, $interfaces); - } - - /** - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - private function generateClassId(ReflectionClass $class = null, array $interfaces) - { - $parts = array(); - if (null !== $class) { - $parts[] = $class->getName(); - } - foreach ($interfaces as $interface) { - $parts[] = $interface->getName(); - } - foreach ($this->getClassPatches() as $patch) { - $parts[] = get_class($patch); - } - sort($parts); - - return md5(implode('', $parts)); - } - - public function resetCache() - { - self::$classes = array(); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php deleted file mode 100644 index d6d19685..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Class patch interface. - * Class patches extend doubles functionality or help - * Prophecy to avoid some internal PHP bugs. - * - * @author Konstantin Kudryashov - */ -interface ClassPatchInterface -{ - /** - * Checks if patch supports specific class node. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node); - - /** - * Applies patch to the specific class node. - * - * @param ClassNode $node - * @return void - */ - public function apply(ClassNode $node); - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority(); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php deleted file mode 100644 index 9d843099..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php +++ /dev/null @@ -1,76 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * Disable constructor. - * Makes all constructor arguments optional. - * - * @author Konstantin Kudryashov - */ -class DisableConstructorPatch implements ClassPatchInterface -{ - /** - * Checks if class has `__construct` method. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Makes all class constructor arguments optional. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - if (!$node->isExtendable('__construct')) { - return; - } - - if (!$node->hasMethod('__construct')) { - $node->addMethod(new MethodNode('__construct', '')); - - return; - } - - $constructor = $node->getMethod('__construct'); - foreach ($constructor->getArguments() as $argument) { - $argument->setDefault(null); - } - - $constructor->setCode(<< - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Exception patch for HHVM to remove the stubs from special methods - * - * @author Christophe Coevoet - */ -class HhvmExceptionPatch implements ClassPatchInterface -{ - /** - * Supports exceptions on HHVM. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (!defined('HHVM_VERSION')) { - return false; - } - - return 'Exception' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'Exception'); - } - - /** - * Removes special exception static methods from the doubled methods. - * - * @param ClassNode $node - * - * @return void - */ - public function apply(ClassNode $node) - { - if ($node->hasMethod('setTraceOptions')) { - $node->getMethod('setTraceOptions')->useParentCode(); - } - if ($node->hasMethod('getTraceOptions')) { - $node->getMethod('getTraceOptions')->useParentCode(); - } - } - - /** - * {@inheritdoc} - */ - public function getPriority() - { - return -50; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php deleted file mode 100644 index ab99f74b..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php +++ /dev/null @@ -1,68 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Remove method functionality from the double which will clash with php keywords. - * - * @author Milan Magudia - */ -class KeywordPatch implements ClassPatchInterface -{ - /** - * Support any class - * - * @param ClassNode $node - * - * @return boolean - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Remove methods that clash with php keywords - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $methodNames = array_keys($node->getMethods()); - $methodsToRemove = array_intersect($methodNames, $this->getKeywords()); - foreach ($methodsToRemove as $methodName) { - $node->removeMethod($methodName); - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 49; - } - - /** - * Returns array of php keywords. - * - * @return array - */ - private function getKeywords() - { - return ['__halt_compiler']; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php deleted file mode 100644 index a545eeff..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php +++ /dev/null @@ -1,105 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ArgumentNode; -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\PhpDocumentor\ClassAndInterfaceTagRetriever; -use Prophecy\PhpDocumentor\MethodTagRetrieverInterface; - -/** - * Discover Magical API using "@method" PHPDoc format. - * - * @author Thomas Tourlourat - * @author Kévin Dunglas - * @author Théo FIDRY - */ -class MagicCallPatch implements ClassPatchInterface -{ - const MAGIC_METHODS_WITH_ARGUMENTS = ['__call', '__callStatic', '__get', '__isset', '__set', '__set_state', '__unserialize', '__unset']; - - private $tagRetriever; - - public function __construct(MethodTagRetrieverInterface $tagRetriever = null) - { - $this->tagRetriever = null === $tagRetriever ? new ClassAndInterfaceTagRetriever() : $tagRetriever; - } - - /** - * Support any class - * - * @param ClassNode $node - * - * @return boolean - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Discover Magical API - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $types = array_filter($node->getInterfaces(), function ($interface) { - return 0 !== strpos($interface, 'Prophecy\\'); - }); - $types[] = $node->getParentClass(); - - foreach ($types as $type) { - $reflectionClass = new \ReflectionClass($type); - - while ($reflectionClass) { - $tagList = $this->tagRetriever->getTagList($reflectionClass); - - foreach ($tagList as $tag) { - $methodName = $tag->getMethodName(); - - if (empty($methodName)) { - continue; - } - - if (!$reflectionClass->hasMethod($methodName)) { - $methodNode = new MethodNode($methodName); - - // only magic methods can have a contract that needs to be enforced - if (in_array($methodName, self::MAGIC_METHODS_WITH_ARGUMENTS)) { - foreach($tag->getArguments() as $argument) { - $argumentNode = new ArgumentNode($argument['name']); - $methodNode->addArgument($argumentNode); - } - } - - $methodNode->setStatic($tag->isStatic()); - $node->addMethod($methodNode); - } - } - - $reflectionClass = $reflectionClass->getParentClass(); - } - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return integer Priority number (higher - earlier) - */ - public function getPriority() - { - return 50; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php deleted file mode 100644 index 7573ca50..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php +++ /dev/null @@ -1,113 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ArgumentTypeNode; -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\Doubler\Generator\Node\ArgumentNode; -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; - -/** - * Add Prophecy functionality to the double. - * This is a core class patch for Prophecy. - * - * @author Konstantin Kudryashov - */ -class ProphecySubjectPatch implements ClassPatchInterface -{ - /** - * Always returns true. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Apply Prophecy functionality to class node. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface'); - $node->addProperty('objectProphecyClosure', 'private'); - - foreach ($node->getMethods() as $name => $method) { - if ('__construct' === strtolower($name)) { - continue; - } - - if (!$method->getReturnTypeNode()->hasReturnStatement()) { - $method->setCode( - '$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' - ); - } else { - $method->setCode( - 'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' - ); - } - } - - $prophecySetter = new MethodNode('setProphecy'); - $prophecyArgument = new ArgumentNode('prophecy'); - $prophecyArgument->setTypeNode(new ArgumentTypeNode('Prophecy\Prophecy\ProphecyInterface')); - $prophecySetter->addArgument($prophecyArgument); - $prophecySetter->setCode(<<objectProphecyClosure) { - \$this->objectProphecyClosure = static function () use (\$prophecy) { - return \$prophecy; - }; -} -PHP - ); - - $prophecyGetter = new MethodNode('getProphecy'); - $prophecyGetter->setCode('return \call_user_func($this->objectProphecyClosure);'); - - if ($node->hasMethod('__call')) { - $__call = $node->getMethod('__call'); - } else { - $__call = new MethodNode('__call'); - $__call->addArgument(new ArgumentNode('name')); - $__call->addArgument(new ArgumentNode('arguments')); - - $node->addMethod($__call, true); - } - - $__call->setCode(<<addMethod($prophecySetter, true); - $node->addMethod($prophecyGetter, true); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 0; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php deleted file mode 100644 index 9166aeef..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php +++ /dev/null @@ -1,57 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * ReflectionClass::newInstance patch. - * Makes first argument of newInstance optional, since it works but signature is misleading - * - * @author Florian Klein - */ -class ReflectionClassNewInstancePatch implements ClassPatchInterface -{ - /** - * Supports ReflectionClass - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return 'ReflectionClass' === $node->getParentClass(); - } - - /** - * Updates newInstance's first argument to make it optional - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - foreach ($node->getMethod('newInstance')->getArguments() as $argument) { - $argument->setDefault(null); - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher = earlier) - */ - public function getPriority() - { - return 50; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php deleted file mode 100644 index ceee94a2..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php +++ /dev/null @@ -1,123 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * SplFileInfo patch. - * Makes SplFileInfo and derivative classes usable with Prophecy. - * - * @author Konstantin Kudryashov - */ -class SplFileInfoPatch implements ClassPatchInterface -{ - /** - * Supports everything that extends SplFileInfo. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (null === $node->getParentClass()) { - return false; - } - return 'SplFileInfo' === $node->getParentClass() - || is_subclass_of($node->getParentClass(), 'SplFileInfo') - ; - } - - /** - * Updated constructor code to call parent one with dummy file argument. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - if ($node->hasMethod('__construct')) { - $constructor = $node->getMethod('__construct'); - } else { - $constructor = new MethodNode('__construct'); - $node->addMethod($constructor); - } - - if ($this->nodeIsDirectoryIterator($node)) { - $constructor->setCode('return parent::__construct("' . __DIR__ . '");'); - - return; - } - - if ($this->nodeIsSplFileObject($node)) { - $filePath = str_replace('\\','\\\\',__FILE__); - $constructor->setCode('return parent::__construct("' . $filePath .'");'); - - return; - } - - if ($this->nodeIsSymfonySplFileInfo($node)) { - $filePath = str_replace('\\','\\\\',__FILE__); - $constructor->setCode('return parent::__construct("' . $filePath .'", "", "");'); - - return; - } - - $constructor->useParentCode(); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 50; - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsDirectoryIterator(ClassNode $node) - { - $parent = $node->getParentClass(); - - return 'DirectoryIterator' === $parent - || is_subclass_of($parent, 'DirectoryIterator'); - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsSplFileObject(ClassNode $node) - { - $parent = $node->getParentClass(); - - return 'SplFileObject' === $parent - || is_subclass_of($parent, 'SplFileObject'); - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsSymfonySplFileInfo(ClassNode $node) - { - $parent = $node->getParentClass(); - - return 'Symfony\\Component\\Finder\\SplFileInfo' === $parent; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php deleted file mode 100644 index b98e9432..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php +++ /dev/null @@ -1,95 +0,0 @@ -implementsAThrowableInterface($node) && $this->doesNotExtendAThrowableClass($node); - } - - /** - * @param ClassNode $node - * @return bool - */ - private function implementsAThrowableInterface(ClassNode $node) - { - foreach ($node->getInterfaces() as $type) { - if (is_a($type, 'Throwable', true)) { - return true; - } - } - - return false; - } - - /** - * @param ClassNode $node - * @return bool - */ - private function doesNotExtendAThrowableClass(ClassNode $node) - { - return !is_a($node->getParentClass(), 'Throwable', true); - } - - /** - * Applies patch to the specific class node. - * - * @param ClassNode $node - * - * @return void - */ - public function apply(ClassNode $node) - { - $this->checkItCanBeDoubled($node); - $this->setParentClassToException($node); - } - - private function checkItCanBeDoubled(ClassNode $node) - { - $className = $node->getParentClass(); - if ($className !== 'stdClass') { - throw new ClassCreatorException( - sprintf( - 'Cannot double concrete class %s as well as implement Traversable', - $className - ), - $node - ); - } - } - - private function setParentClassToException(ClassNode $node) - { - $node->setParentClass('Exception'); - - $node->removeMethod('getMessage'); - $node->removeMethod('getCode'); - $node->removeMethod('getFile'); - $node->removeMethod('getLine'); - $node->removeMethod('getTrace'); - $node->removeMethod('getPrevious'); - $node->removeMethod('getNext'); - $node->removeMethod('getTraceAsString'); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 100; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php deleted file mode 100644 index 0e2e0470..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php +++ /dev/null @@ -1,98 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; - -/** - * Traversable interface patch. - * Forces classes that implement interfaces, that extend Traversable to also implement Iterator. - * - * @author Konstantin Kudryashov - */ -class TraversablePatch implements ClassPatchInterface -{ - /** - * Supports nodetree, that implement Traversable, but not Iterator or IteratorAggregate. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (in_array('Iterator', $node->getInterfaces())) { - return false; - } - if (in_array('IteratorAggregate', $node->getInterfaces())) { - return false; - } - - foreach ($node->getInterfaces() as $interface) { - if ('Traversable' !== $interface && !is_subclass_of($interface, 'Traversable')) { - continue; - } - if ('Iterator' === $interface || is_subclass_of($interface, 'Iterator')) { - continue; - } - if ('IteratorAggregate' === $interface || is_subclass_of($interface, 'IteratorAggregate')) { - continue; - } - - return true; - } - - return false; - } - - /** - * Forces class to implement Iterator interface. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $node->addInterface('Iterator'); - - $currentMethod = new MethodNode('current'); - (\PHP_VERSION_ID >= 80100) && $currentMethod->setReturnTypeNode(new ReturnTypeNode('mixed')); - $node->addMethod($currentMethod); - - $keyMethod = new MethodNode('key'); - (\PHP_VERSION_ID >= 80100) && $keyMethod->setReturnTypeNode(new ReturnTypeNode('mixed')); - $node->addMethod($keyMethod); - - $nextMethod = new MethodNode('next'); - (\PHP_VERSION_ID >= 80100) && $nextMethod->setReturnTypeNode(new ReturnTypeNode('void')); - $node->addMethod($nextMethod); - - $rewindMethod = new MethodNode('rewind'); - (\PHP_VERSION_ID >= 80100) && $rewindMethod->setReturnTypeNode(new ReturnTypeNode('void')); - $node->addMethod($rewindMethod); - - $validMethod = new MethodNode('valid'); - (\PHP_VERSION_ID >= 80100) && $validMethod->setReturnTypeNode(new ReturnTypeNode('bool')); - $node->addMethod($validMethod); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 100; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php deleted file mode 100644 index 699be3a2..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -/** - * Core double interface. - * All doubled classes will implement this one. - * - * @author Konstantin Kudryashov - */ -interface DoubleInterface -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php deleted file mode 100644 index a378ae27..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php +++ /dev/null @@ -1,146 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use Doctrine\Instantiator\Instantiator; -use Prophecy\Doubler\ClassPatch\ClassPatchInterface; -use Prophecy\Doubler\Generator\ClassMirror; -use Prophecy\Doubler\Generator\ClassCreator; -use Prophecy\Exception\InvalidArgumentException; -use ReflectionClass; - -/** - * Cached class doubler. - * Prevents mirroring/creation of the same structure twice. - * - * @author Konstantin Kudryashov - */ -class Doubler -{ - private $mirror; - private $creator; - private $namer; - - /** - * @var ClassPatchInterface[] - */ - private $patches = array(); - - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * Initializes doubler. - * - * @param ClassMirror $mirror - * @param ClassCreator $creator - * @param NameGenerator $namer - */ - public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null, - NameGenerator $namer = null) - { - $this->mirror = $mirror ?: new ClassMirror; - $this->creator = $creator ?: new ClassCreator; - $this->namer = $namer ?: new NameGenerator; - } - - /** - * Returns list of registered class patches. - * - * @return ClassPatchInterface[] - */ - public function getClassPatches() - { - return $this->patches; - } - - /** - * Registers new class patch. - * - * @param ClassPatchInterface $patch - */ - public function registerClassPatch(ClassPatchInterface $patch) - { - $this->patches[] = $patch; - - @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) { - return $patch2->getPriority() - $patch1->getPriority(); - }); - } - - /** - * Creates double from specific class or/and list of interfaces. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces Array of ReflectionClass instances - * @param array $args Constructor arguments - * - * @return DoubleInterface - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function double(ReflectionClass $class = null, array $interfaces, array $args = null) - { - foreach ($interfaces as $interface) { - if (!$interface instanceof ReflectionClass) { - throw new InvalidArgumentException(sprintf( - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". - "a second argument to `Doubler::double(...)`, but got %s.", - is_object($interface) ? get_class($interface).' class' : gettype($interface) - )); - } - } - - $classname = $this->createDoubleClass($class, $interfaces); - $reflection = new ReflectionClass($classname); - - if (null !== $args) { - return $reflection->newInstanceArgs($args); - } - if ((null === $constructor = $reflection->getConstructor()) - || ($constructor->isPublic() && !$constructor->isFinal())) { - return $reflection->newInstance(); - } - - if (!$this->instantiator) { - $this->instantiator = new Instantiator(); - } - - return $this->instantiator->instantiate($classname); - } - - /** - * Creates double class and returns its FQN. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) - { - $name = $this->namer->name($class, $interfaces); - $node = $this->mirror->reflect($class, $interfaces); - - foreach ($this->patches as $patch) { - if ($patch->supports($node)) { - $patch->apply($node); - } - } - - $this->creator->create($name, $node); - - return $name; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php deleted file mode 100644 index 52e5e045..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php +++ /dev/null @@ -1,110 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; -use Prophecy\Doubler\Generator\Node\TypeNodeAbstract; - -/** - * Class code creator. - * Generates PHP code for specific class node tree. - * - * @author Konstantin Kudryashov - */ -class ClassCodeGenerator -{ - public function __construct(TypeHintReference $typeHintReference = null) - { - } - - /** - * Generates PHP code for class node. - * - * @param string $classname - * @param Node\ClassNode $class - * - * @return string - */ - public function generate($classname, Node\ClassNode $class) - { - $parts = explode('\\', $classname); - $classname = array_pop($parts); - $namespace = implode('\\', $parts); - - $code = sprintf("class %s extends \%s implements %s {\n", - $classname, $class->getParentClass(), implode(', ', - array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces()) - ) - ); - - foreach ($class->getProperties() as $name => $visibility) { - $code .= sprintf("%s \$%s;\n", $visibility, $name); - } - $code .= "\n"; - - foreach ($class->getMethods() as $method) { - $code .= $this->generateMethod($method)."\n"; - } - $code .= "\n}"; - - return sprintf("namespace %s {\n%s\n}", $namespace, $code); - } - - private function generateMethod(Node\MethodNode $method) - { - $php = sprintf("%s %s function %s%s(%s)%s {\n", - $method->getVisibility(), - $method->isStatic() ? 'static' : '', - $method->returnsReference() ? '&':'', - $method->getName(), - implode(', ', $this->generateArguments($method->getArguments())), - ($ret = $this->generateTypes($method->getReturnTypeNode())) ? ': '.$ret : '' - ); - $php .= $method->getCode()."\n"; - - return $php.'}'; - } - - private function generateTypes(TypeNodeAbstract $typeNode): string - { - if (!$typeNode->getTypes()) { - return ''; - } - - // When we require PHP 8 we can stop generating ?foo nullables and remove this first block - if ($typeNode->canUseNullShorthand()) { - return sprintf( '?%s', $typeNode->getNonNullTypes()[0]); - } else { - return join('|', $typeNode->getTypes()); - } - } - - private function generateArguments(array $arguments) - { - return array_map(function (Node\ArgumentNode $argument){ - - $php = $this->generateTypes($argument->getTypeNode()); - - $php .= ' '.($argument->isPassedByReference() ? '&' : ''); - - $php .= $argument->isVariadic() ? '...' : ''; - - $php .= '$'.$argument->getName(); - - if ($argument->isOptional() && !$argument->isVariadic()) { - $php .= ' = '.var_export($argument->getDefault(), true); - } - - return $php; - }, $arguments); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php deleted file mode 100644 index 882a4a4b..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Exception\Doubler\ClassCreatorException; - -/** - * Class creator. - * Creates specific class in current environment. - * - * @author Konstantin Kudryashov - */ -class ClassCreator -{ - private $generator; - - /** - * Initializes creator. - * - * @param ClassCodeGenerator $generator - */ - public function __construct(ClassCodeGenerator $generator = null) - { - $this->generator = $generator ?: new ClassCodeGenerator; - } - - /** - * Creates class. - * - * @param string $classname - * @param Node\ClassNode $class - * - * @return mixed - * - * @throws \Prophecy\Exception\Doubler\ClassCreatorException - */ - public function create($classname, Node\ClassNode $class) - { - $code = $this->generator->generate($classname, $class); - $return = eval($code); - - if (!class_exists($classname, false)) { - if (count($class->getInterfaces())) { - throw new ClassCreatorException(sprintf( - 'Could not double `%s` and implement interfaces: [%s].', - $class->getParentClass(), implode(', ', $class->getInterfaces()) - ), $class); - } - - throw new ClassCreatorException( - sprintf('Could not double `%s`.', $class->getParentClass()), - $class - ); - } - - return $return; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php deleted file mode 100644 index 5d9cd2d2..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php +++ /dev/null @@ -1,254 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Doubler\Generator\Node\ArgumentTypeNode; -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Exception\Doubler\ClassMirrorException; -use ReflectionClass; -use ReflectionIntersectionType; -use ReflectionMethod; -use ReflectionNamedType; -use ReflectionParameter; -use ReflectionType; -use ReflectionUnionType; - -/** - * Class mirror. - * Core doubler class. Mirrors specific class and/or interfaces into class node tree. - * - * @author Konstantin Kudryashov - */ -class ClassMirror -{ - private static $reflectableMethods = array( - '__construct', - '__destruct', - '__sleep', - '__wakeup', - '__toString', - '__call', - '__invoke' - ); - - /** - * Reflects provided arguments into class node. - * - * @param ReflectionClass|null $class - * @param ReflectionClass[] $interfaces - * - * @return Node\ClassNode - * - */ - public function reflect(?ReflectionClass $class, array $interfaces) - { - $node = new Node\ClassNode; - - if (null !== $class) { - if (true === $class->isInterface()) { - throw new InvalidArgumentException(sprintf( - "Could not reflect %s as a class, because it\n". - "is interface - use the second argument instead.", - $class->getName() - )); - } - - $this->reflectClassToNode($class, $node); - } - - foreach ($interfaces as $interface) { - if (!$interface instanceof ReflectionClass) { - throw new InvalidArgumentException(sprintf( - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". - "a second argument to `ClassMirror::reflect(...)`, but got %s.", - is_object($interface) ? get_class($interface).' class' : gettype($interface) - )); - } - if (false === $interface->isInterface()) { - throw new InvalidArgumentException(sprintf( - "Could not reflect %s as an interface, because it\n". - "is class - use the first argument instead.", - $interface->getName() - )); - } - - $this->reflectInterfaceToNode($interface, $node); - } - - $node->addInterface('Prophecy\Doubler\Generator\ReflectionInterface'); - - return $node; - } - - private function reflectClassToNode(ReflectionClass $class, Node\ClassNode $node) - { - if (true === $class->isFinal()) { - throw new ClassMirrorException(sprintf( - 'Could not reflect class %s as it is marked final.', $class->getName() - ), $class); - } - - $node->setParentClass($class->getName()); - - foreach ($class->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) { - if (false === $method->isProtected()) { - continue; - } - - $this->reflectMethodToNode($method, $node); - } - - foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - if (0 === strpos($method->getName(), '_') - && !in_array($method->getName(), self::$reflectableMethods)) { - continue; - } - - if (true === $method->isFinal()) { - $node->addUnextendableMethod($method->getName()); - continue; - } - - $this->reflectMethodToNode($method, $node); - } - } - - private function reflectInterfaceToNode(ReflectionClass $interface, Node\ClassNode $node) - { - $node->addInterface($interface->getName()); - - foreach ($interface->getMethods() as $method) { - $this->reflectMethodToNode($method, $node); - } - } - - private function reflectMethodToNode(ReflectionMethod $method, Node\ClassNode $classNode) - { - $node = new Node\MethodNode($method->getName()); - - if (true === $method->isProtected()) { - $node->setVisibility('protected'); - } - - if (true === $method->isStatic()) { - $node->setStatic(); - } - - if (true === $method->returnsReference()) { - $node->setReturnsReference(); - } - - if ($method->hasReturnType()) { - $returnTypes = $this->getTypeHints($method->getReturnType(), $method->getDeclaringClass(), $method->getReturnType()->allowsNull()); - $node->setReturnTypeNode(new ReturnTypeNode(...$returnTypes)); - } - elseif (method_exists($method, 'hasTentativeReturnType') && $method->hasTentativeReturnType()) { - $returnTypes = $this->getTypeHints($method->getTentativeReturnType(), $method->getDeclaringClass(), $method->getTentativeReturnType()->allowsNull()); - $node->setReturnTypeNode(new ReturnTypeNode(...$returnTypes)); - } - - if (is_array($params = $method->getParameters()) && count($params)) { - foreach ($params as $param) { - $this->reflectArgumentToNode($param, $node); - } - } - - $classNode->addMethod($node); - } - - private function reflectArgumentToNode(ReflectionParameter $parameter, Node\MethodNode $methodNode) - { - $name = $parameter->getName() == '...' ? '__dot_dot_dot__' : $parameter->getName(); - $node = new Node\ArgumentNode($name); - - $typeHints = $this->getTypeHints($parameter->getType(), $parameter->getDeclaringClass(), $parameter->allowsNull()); - - $node->setTypeNode(new ArgumentTypeNode(...$typeHints)); - - if ($parameter->isVariadic()) { - $node->setAsVariadic(); - } - - if ($this->hasDefaultValue($parameter)) { - $node->setDefault($this->getDefaultValue($parameter)); - } - - if ($parameter->isPassedByReference()) { - $node->setAsPassedByReference(); - } - - - $methodNode->addArgument($node); - } - - private function hasDefaultValue(ReflectionParameter $parameter) - { - if ($parameter->isVariadic()) { - return false; - } - - if ($parameter->isDefaultValueAvailable()) { - return true; - } - - return $parameter->isOptional() || ($parameter->allowsNull() && $parameter->getType() && \PHP_VERSION_ID < 80100); - } - - private function getDefaultValue(ReflectionParameter $parameter) - { - if (!$parameter->isDefaultValueAvailable()) { - return null; - } - - return $parameter->getDefaultValue(); - } - - private function getTypeHints(?ReflectionType $type, ?ReflectionClass $class, bool $allowsNull) : array - { - $types = []; - - if ($type instanceof ReflectionNamedType) { - $types = [$type->getName()]; - - } - elseif ($type instanceof ReflectionUnionType) { - $types = $type->getTypes(); - } - elseif ($type instanceof ReflectionIntersectionType) { - throw new ClassMirrorException('Doubling intersection types is not supported', $class); - } - elseif(is_object($type)) { - throw new ClassMirrorException('Unknown reflection type ' . get_class($type), $class); - } - - $types = array_map( - function(string $type) use ($class) { - if ($type === 'self') { - return $class->getName(); - } - if ($type === 'parent') { - return $class->getParentClass()->getName(); - } - - return $type; - }, - $types - ); - - if ($types && $types != ['mixed'] && $allowsNull) { - $types[] = 'null'; - } - - return $types; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php deleted file mode 100644 index da7fed4e..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php +++ /dev/null @@ -1,133 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -/** - * Argument node. - * - * @author Konstantin Kudryashov - */ -class ArgumentNode -{ - private $name; - private $default; - private $optional = false; - private $byReference = false; - private $isVariadic = false; - - /** @var ArgumentTypeNode */ - private $typeNode; - - /** - * @param string $name - */ - public function __construct($name) - { - $this->name = $name; - $this->typeNode = new ArgumentTypeNode(); - } - - public function getName() - { - return $this->name; - } - - public function setTypeNode(ArgumentTypeNode $typeNode) - { - $this->typeNode = $typeNode; - } - - public function getTypeNode() : ArgumentTypeNode - { - return $this->typeNode; - } - - public function hasDefault() - { - return $this->isOptional() && !$this->isVariadic(); - } - - public function getDefault() - { - return $this->default; - } - - public function setDefault($default = null) - { - $this->optional = true; - $this->default = $default; - } - - public function isOptional() - { - return $this->optional; - } - - public function setAsPassedByReference($byReference = true) - { - $this->byReference = $byReference; - } - - public function isPassedByReference() - { - return $this->byReference; - } - - public function setAsVariadic($isVariadic = true) - { - $this->isVariadic = $isVariadic; - } - - public function isVariadic() - { - return $this->isVariadic; - } - - /** - * @deprecated use getArgumentTypeNode instead - * @return string|null - */ - public function getTypeHint() - { - $type = $this->typeNode->getNonNullTypes() ? $this->typeNode->getNonNullTypes()[0] : null; - - return $type ? ltrim($type, '\\') : null; - } - - /** - * @deprecated use setArgumentTypeNode instead - * @param string|null $typeHint - */ - public function setTypeHint($typeHint = null) - { - $this->typeNode = ($typeHint === null) ? new ArgumentTypeNode() : new ArgumentTypeNode($typeHint); - } - - /** - * @deprecated use getArgumentTypeNode instead - * @return bool - */ - public function isNullable() - { - return $this->typeNode->canUseNullShorthand(); - } - - /** - * @deprecated use getArgumentTypeNode instead - * @param bool $isNullable - */ - public function setAsNullable($isNullable = true) - { - $nonNullTypes = $this->typeNode->getNonNullTypes(); - $this->typeNode = $isNullable ? new ArgumentTypeNode('null', ...$nonNullTypes) : new ArgumentTypeNode(...$nonNullTypes); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php deleted file mode 100644 index 0a18b91e..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php +++ /dev/null @@ -1,10 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -use Prophecy\Exception\Doubler\MethodNotExtendableException; -use Prophecy\Exception\InvalidArgumentException; - -/** - * Class node. - * - * @author Konstantin Kudryashov - */ -class ClassNode -{ - private $parentClass = 'stdClass'; - private $interfaces = array(); - private $properties = array(); - private $unextendableMethods = array(); - - /** - * @var MethodNode[] - */ - private $methods = array(); - - public function getParentClass() - { - return $this->parentClass; - } - - /** - * @param string $class - */ - public function setParentClass($class) - { - $this->parentClass = $class ?: 'stdClass'; - } - - /** - * @return string[] - */ - public function getInterfaces() - { - return $this->interfaces; - } - - /** - * @param string $interface - */ - public function addInterface($interface) - { - if ($this->hasInterface($interface)) { - return; - } - - array_unshift($this->interfaces, $interface); - } - - /** - * @param string $interface - * - * @return bool - */ - public function hasInterface($interface) - { - return in_array($interface, $this->interfaces); - } - - public function getProperties() - { - return $this->properties; - } - - public function addProperty($name, $visibility = 'public') - { - $visibility = strtolower($visibility); - - if (!in_array($visibility, array('public', 'private', 'protected'))) { - throw new InvalidArgumentException(sprintf( - '`%s` property visibility is not supported.', $visibility - )); - } - - $this->properties[$name] = $visibility; - } - - /** - * @return MethodNode[] - */ - public function getMethods() - { - return $this->methods; - } - - public function addMethod(MethodNode $method, $force = false) - { - if (!$this->isExtendable($method->getName())){ - $message = sprintf( - 'Method `%s` is not extendable, so can not be added.', $method->getName() - ); - throw new MethodNotExtendableException($message, $this->getParentClass(), $method->getName()); - } - - if ($force || !isset($this->methods[$method->getName()])) { - $this->methods[$method->getName()] = $method; - } - } - - public function removeMethod($name) - { - unset($this->methods[$name]); - } - - /** - * @param string $name - * - * @return MethodNode|null - */ - public function getMethod($name) - { - return $this->hasMethod($name) ? $this->methods[$name] : null; - } - - /** - * @param string $name - * - * @return bool - */ - public function hasMethod($name) - { - return isset($this->methods[$name]); - } - - /** - * @return string[] - */ - public function getUnextendableMethods() - { - return $this->unextendableMethods; - } - - /** - * @param string $unextendableMethod - */ - public function addUnextendableMethod($unextendableMethod) - { - if (!$this->isExtendable($unextendableMethod)){ - return; - } - $this->unextendableMethods[] = $unextendableMethod; - } - - /** - * @param string $method - * @return bool - */ - public function isExtendable($method) - { - return !in_array($method, $this->unextendableMethods); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php deleted file mode 100644 index ece652f9..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php +++ /dev/null @@ -1,210 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -use Prophecy\Doubler\Generator\TypeHintReference; -use Prophecy\Exception\InvalidArgumentException; - -/** - * Method node. - * - * @author Konstantin Kudryashov - */ -class MethodNode -{ - private $name; - private $code; - private $visibility = 'public'; - private $static = false; - private $returnsReference = false; - - /** @var ReturnTypeNode */ - private $returnTypeNode; - - /** - * @var ArgumentNode[] - */ - private $arguments = array(); - - /** - * @param string $name - * @param string $code - */ - public function __construct($name, $code = null, TypeHintReference $typeHintReference = null) - { - $this->name = $name; - $this->code = $code; - $this->returnTypeNode = new ReturnTypeNode(); - } - - public function getVisibility() - { - return $this->visibility; - } - - /** - * @param string $visibility - */ - public function setVisibility($visibility) - { - $visibility = strtolower($visibility); - - if (!in_array($visibility, array('public', 'private', 'protected'))) { - throw new InvalidArgumentException(sprintf( - '`%s` method visibility is not supported.', $visibility - )); - } - - $this->visibility = $visibility; - } - - public function isStatic() - { - return $this->static; - } - - public function setStatic($static = true) - { - $this->static = (bool) $static; - } - - public function returnsReference() - { - return $this->returnsReference; - } - - public function setReturnsReference() - { - $this->returnsReference = true; - } - - public function getName() - { - return $this->name; - } - - public function addArgument(ArgumentNode $argument) - { - $this->arguments[] = $argument; - } - - /** - * @return ArgumentNode[] - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * @deprecated use getReturnTypeNode instead - * @return bool - */ - public function hasReturnType() - { - return (bool) $this->returnTypeNode->getNonNullTypes(); - } - - public function setReturnTypeNode(ReturnTypeNode $returnTypeNode): void - { - $this->returnTypeNode = $returnTypeNode; - } - - /** - * @deprecated use setReturnTypeNode instead - * @param string $type - */ - public function setReturnType($type = null) - { - $this->returnTypeNode = ($type === '' || $type === null) ? new ReturnTypeNode() : new ReturnTypeNode($type); - } - - /** - * @deprecated use setReturnTypeNode instead - * @param bool $bool - */ - public function setNullableReturnType($bool = true) - { - if ($bool) { - $this->returnTypeNode = new ReturnTypeNode('null', ...$this->returnTypeNode->getTypes()); - } - else { - $this->returnTypeNode = new ReturnTypeNode(...$this->returnTypeNode->getNonNullTypes()); - } - } - - /** - * @deprecated use getReturnTypeNode instead - * @return string|null - */ - public function getReturnType() - { - if ($types = $this->returnTypeNode->getNonNullTypes()) - { - return $types[0]; - } - - return null; - } - - public function getReturnTypeNode() : ReturnTypeNode - { - return $this->returnTypeNode; - } - - /** - * @deprecated use getReturnTypeNode instead - * @return bool - */ - public function hasNullableReturnType() - { - return $this->returnTypeNode->canUseNullShorthand(); - } - - /** - * @param string $code - */ - public function setCode($code) - { - $this->code = $code; - } - - public function getCode() - { - if ($this->returnsReference) - { - return "throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), '{$this->name}');"; - } - - return (string) $this->code; - } - - public function useParentCode() - { - $this->code = sprintf( - 'return parent::%s(%s);', $this->getName(), implode(', ', - array_map(array($this, 'generateArgument'), $this->arguments) - ) - ); - } - - private function generateArgument(ArgumentNode $arg) - { - $argument = '$'.$arg->getName(); - - if ($arg->isVariadic()) { - $argument = '...'.$argument; - } - - return $argument; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php deleted file mode 100644 index 5b582498..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php +++ /dev/null @@ -1,45 +0,0 @@ -types['void']) && count($this->types) !== 1) { - throw new DoubleException('void cannot be part of a union'); - } - if (isset($this->types['never']) && count($this->types) !== 1) { - throw new DoubleException('never cannot be part of a union'); - } - - parent::guardIsValidType(); - } - - /** - * @deprecated use hasReturnStatement - */ - public function isVoid() - { - return $this->types == ['void' => 'void']; - } - - public function hasReturnStatement(): bool - { - return $this->types !== ['void' => 'void'] - && $this->types !== ['never' => 'never']; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php deleted file mode 100644 index 97fc5497..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php +++ /dev/null @@ -1,97 +0,0 @@ -getRealType($type); - $this->types[$type] = $type; - } - - $this->guardIsValidType(); - } - - public function canUseNullShorthand(): bool - { - return isset($this->types['null']) && count($this->types) <= 2; - } - - public function getTypes(): array - { - return array_values($this->types); - } - - public function getNonNullTypes(): array - { - $nonNullTypes = $this->types; - unset($nonNullTypes['null']); - - return array_values($nonNullTypes); - } - - protected function prefixWithNsSeparator(string $type): string - { - return '\\' . ltrim($type, '\\'); - } - - protected function getRealType(string $type): string - { - switch ($type) { - // type aliases - case 'double': - case 'real': - return 'float'; - case 'boolean': - return 'bool'; - case 'integer': - return 'int'; - - // built in types - case 'self': - case 'static': - case 'array': - case 'callable': - case 'bool': - case 'false': - case 'float': - case 'int': - case 'string': - case 'iterable': - case 'object': - case 'null': - return $type; - case 'mixed': - return \PHP_VERSION_ID < 80000 ? $this->prefixWithNsSeparator($type) : $type; - - default: - return $this->prefixWithNsSeparator($type); - } - } - - protected function guardIsValidType() - { - if ($this->types == ['null' => 'null']) { - throw new DoubleException('Type cannot be standalone null'); - } - - if ($this->types == ['false' => 'false']) { - throw new DoubleException('Type cannot be standalone false'); - } - - if ($this->types == ['false' => 'false', 'null' => 'null']) { - throw new DoubleException('Type cannot be nullable false'); - } - - if (\PHP_VERSION_ID >= 80000 && isset($this->types['mixed']) && count($this->types) !== 1) { - throw new DoubleException('mixed cannot be part of a union'); - } - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php deleted file mode 100644 index d720b151..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -/** - * Reflection interface. - * All reflected classes implement this interface. - * - * @author Konstantin Kudryashov - */ -interface ReflectionInterface -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php deleted file mode 100644 index 5e8aa303..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php +++ /dev/null @@ -1,43 +0,0 @@ -= 80000; - - default: - return false; - } - } - - public function isBuiltInReturnTypeHint($type) - { - if ($type === 'void') { - return true; - } - - return $this->isBuiltInParamTypeHint($type); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php deleted file mode 100644 index 8a99c4ce..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php +++ /dev/null @@ -1,127 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use Prophecy\Exception\Doubler\DoubleException; -use Prophecy\Exception\Doubler\ClassNotFoundException; -use Prophecy\Exception\Doubler\InterfaceNotFoundException; -use ReflectionClass; - -/** - * Lazy double. - * Gives simple interface to describe double before creating it. - * - * @author Konstantin Kudryashov - */ -class LazyDouble -{ - private $doubler; - private $class; - private $interfaces = array(); - private $arguments = null; - private $double; - - /** - * Initializes lazy double. - * - * @param Doubler $doubler - */ - public function __construct(Doubler $doubler) - { - $this->doubler = $doubler; - } - - /** - * Tells doubler to use specific class as parent one for double. - * - * @param string|ReflectionClass $class - * - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - */ - public function setParentClass($class) - { - if (null !== $this->double) { - throw new DoubleException('Can not extend class with already instantiated double.'); - } - - if (!$class instanceof ReflectionClass) { - if (!class_exists($class)) { - throw new ClassNotFoundException(sprintf('Class %s not found.', $class), $class); - } - - $class = new ReflectionClass($class); - } - - $this->class = $class; - } - - /** - * Tells doubler to implement specific interface with double. - * - * @param string|ReflectionClass $interface - * - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - */ - public function addInterface($interface) - { - if (null !== $this->double) { - throw new DoubleException( - 'Can not implement interface with already instantiated double.' - ); - } - - if (!$interface instanceof ReflectionClass) { - if (!interface_exists($interface)) { - throw new InterfaceNotFoundException( - sprintf('Interface %s not found.', $interface), - $interface - ); - } - - $interface = new ReflectionClass($interface); - } - - $this->interfaces[] = $interface; - } - - /** - * Sets constructor arguments. - * - * @param array $arguments - */ - public function setArguments(array $arguments = null) - { - $this->arguments = $arguments; - } - - /** - * Creates double instance or returns already created one. - * - * @return DoubleInterface - */ - public function getInstance() - { - if (null === $this->double) { - if (null !== $this->arguments) { - return $this->double = $this->doubler->double( - $this->class, $this->interfaces, $this->arguments - ); - } - - $this->double = $this->doubler->double($this->class, $this->interfaces); - } - - return $this->double; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php deleted file mode 100644 index d67ec6a4..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use ReflectionClass; - -/** - * Name generator. - * Generates classname for double. - * - * @author Konstantin Kudryashov - */ -class NameGenerator -{ - private static $counter = 1; - - /** - * Generates name. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - public function name(ReflectionClass $class = null, array $interfaces) - { - $parts = array(); - - if (null !== $class) { - $parts[] = $class->getName(); - } else { - foreach ($interfaces as $interface) { - $parts[] = $interface->getShortName(); - } - } - - if (!count($parts)) { - $parts[] = 'stdClass'; - } - - return sprintf('Double\%s\P%d', implode('\\', $parts), self::$counter++); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php deleted file mode 100644 index 48ed2254..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php +++ /dev/null @@ -1,40 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Call; - -use Prophecy\Exception\Prophecy\ObjectProphecyException; -use Prophecy\Prophecy\ObjectProphecy; - -class UnexpectedCallException extends ObjectProphecyException -{ - private $methodName; - private $arguments; - - public function __construct($message, ObjectProphecy $objectProphecy, - $methodName, array $arguments) - { - parent::__construct($message, $objectProphecy); - - $this->methodName = $methodName; - $this->arguments = $arguments; - } - - public function getMethodName() - { - return $this->methodName; - } - - public function getArguments() - { - return $this->arguments; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php deleted file mode 100644 index 822918a2..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -class ClassCreatorException extends \RuntimeException implements DoublerException -{ - private $node; - - public function __construct($message, ClassNode $node) - { - parent::__construct($message); - - $this->node = $node; - } - - public function getClassNode() - { - return $this->node; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php deleted file mode 100644 index 8fc53b8b..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use ReflectionClass; - -class ClassMirrorException extends \RuntimeException implements DoublerException -{ - private $class; - - public function __construct($message, ReflectionClass $class) - { - parent::__construct($message); - - $this->class = $class; - } - - public function getReflectedClass() - { - return $this->class; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php deleted file mode 100644 index 5bc826d7..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class ClassNotFoundException extends DoubleException -{ - private $classname; - - /** - * @param string $message - * @param string $classname - */ - public function __construct($message, $classname) - { - parent::__construct($message); - - $this->classname = $classname; - } - - public function getClassname() - { - return $this->classname; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php deleted file mode 100644 index 6642a58f..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use RuntimeException; - -class DoubleException extends RuntimeException implements DoublerException -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php deleted file mode 100644 index 9d6be179..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use Prophecy\Exception\Exception; - -interface DoublerException extends Exception -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php deleted file mode 100644 index e344dead..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class InterfaceNotFoundException extends ClassNotFoundException -{ - public function getInterfaceName() - { - return $this->getClassname(); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php deleted file mode 100644 index 56f47b11..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php +++ /dev/null @@ -1,41 +0,0 @@ -methodName = $methodName; - $this->className = $className; - } - - - /** - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * @return string - */ - public function getClassName() - { - return $this->className; - } - - } diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php deleted file mode 100644 index a5383494..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class MethodNotFoundException extends DoubleException -{ - /** - * @var string|object - */ - private $classname; - - /** - * @var string - */ - private $methodName; - - /** - * @var array - */ - private $arguments; - - /** - * @param string $message - * @param string|object $classname - * @param string $methodName - * @param null|Argument\ArgumentsWildcard|array $arguments - */ - public function __construct($message, $classname, $methodName, $arguments = null) - { - parent::__construct($message); - - $this->classname = $classname; - $this->methodName = $methodName; - $this->arguments = $arguments; - } - - public function getClassname() - { - return $this->classname; - } - - public function getMethodName() - { - return $this->methodName; - } - - public function getArguments() - { - return $this->arguments; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php deleted file mode 100644 index 63030497..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php +++ /dev/null @@ -1,41 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class ReturnByReferenceException extends DoubleException -{ - private $classname; - private $methodName; - - /** - * @param string $message - * @param string $classname - * @param string $methodName - */ - public function __construct($message, $classname, $methodName) - { - parent::__construct($message); - - $this->classname = $classname; - $this->methodName = $methodName; - } - - public function getClassname() - { - return $this->classname; - } - - public function getMethodName() - { - return $this->methodName; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php deleted file mode 100644 index 41619128..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception; - -/** - * Core Prophecy exception interface. - * All Prophecy exceptions implement it. - * - * @author Konstantin Kudryashov - */ -interface Exception extends \Throwable -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php deleted file mode 100644 index bc91c690..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php deleted file mode 100644 index a00dfb03..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php +++ /dev/null @@ -1,51 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\ObjectProphecy; - -class AggregateException extends \RuntimeException implements PredictionException -{ - private $exceptions = array(); - private $objectProphecy; - - public function append(PredictionException $exception) - { - $message = $exception->getMessage(); - $message = strtr($message, array("\n" => "\n "))."\n"; - $message = empty($this->exceptions) ? $message : "\n" . $message; - - $this->message = rtrim($this->message.$message); - $this->exceptions[] = $exception; - } - - /** - * @return PredictionException[] - */ - public function getExceptions() - { - return $this->exceptions; - } - - public function setObjectProphecy(ObjectProphecy $objectProphecy) - { - $this->objectProphecy = $objectProphecy; - } - - /** - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php deleted file mode 100644 index bbbbc3d9..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use RuntimeException; - -/** - * Basic failed prediction exception. - * Use it for custom prediction failures. - * - * @author Konstantin Kudryashov - */ -class FailedPredictionException extends RuntimeException implements PredictionException -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php deleted file mode 100644 index 05ea4aad..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Exception\Prophecy\MethodProphecyException; - -class NoCallsException extends MethodProphecyException implements PredictionException -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php deleted file mode 100644 index 2596b1ef..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Exception\Exception; - -interface PredictionException extends Exception -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php deleted file mode 100644 index 9d905431..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\MethodProphecy; - -class UnexpectedCallsCountException extends UnexpectedCallsException -{ - private $expectedCount; - - public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) - { - parent::__construct($message, $methodProphecy, $calls); - - $this->expectedCount = intval($count); - } - - public function getExpectedCount() - { - return $this->expectedCount; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php deleted file mode 100644 index 7a99c2d7..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\Prophecy\MethodProphecyException; - -class UnexpectedCallsException extends MethodProphecyException implements PredictionException -{ - private $calls = array(); - - public function __construct($message, MethodProphecy $methodProphecy, array $calls) - { - parent::__construct($message, $methodProphecy); - - $this->calls = $calls; - } - - public function getCalls() - { - return $this->calls; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php deleted file mode 100644 index 1b03eaf4..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Prophecy\MethodProphecy; - -class MethodProphecyException extends ObjectProphecyException -{ - private $methodProphecy; - - public function __construct($message, MethodProphecy $methodProphecy) - { - parent::__construct($message, $methodProphecy->getObjectProphecy()); - - $this->methodProphecy = $methodProphecy; - } - - /** - * @return MethodProphecy - */ - public function getMethodProphecy() - { - return $this->methodProphecy; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php deleted file mode 100644 index e345402e..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Prophecy\ObjectProphecy; - -class ObjectProphecyException extends \RuntimeException implements ProphecyException -{ - private $objectProphecy; - - public function __construct($message, ObjectProphecy $objectProphecy) - { - parent::__construct($message); - - $this->objectProphecy = $objectProphecy; - } - - /** - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php deleted file mode 100644 index 91573328..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Exception\Exception; - -interface ProphecyException extends Exception -{ -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php b/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php deleted file mode 100644 index 209821ce..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php +++ /dev/null @@ -1,69 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; -use phpDocumentor\Reflection\DocBlock\Tags\Method; - -/** - * @author Théo FIDRY - * - * @internal - */ -final class ClassAndInterfaceTagRetriever implements MethodTagRetrieverInterface -{ - private $classRetriever; - - public function __construct(MethodTagRetrieverInterface $classRetriever = null) - { - if (null !== $classRetriever) { - $this->classRetriever = $classRetriever; - - return; - } - - $this->classRetriever = class_exists('phpDocumentor\Reflection\DocBlockFactory') && class_exists('phpDocumentor\Reflection\Types\ContextFactory') - ? new ClassTagRetriever() - : new LegacyClassTagRetriever() - ; - } - - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[]|Method[] - */ - public function getTagList(\ReflectionClass $reflectionClass) - { - return array_merge( - $this->classRetriever->getTagList($reflectionClass), - $this->getInterfacesTagList($reflectionClass) - ); - } - - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[]|Method[] - */ - private function getInterfacesTagList(\ReflectionClass $reflectionClass) - { - $interfaces = $reflectionClass->getInterfaces(); - $tagList = array(); - - foreach($interfaces as $interface) { - $tagList = array_merge($tagList, $this->classRetriever->getTagList($interface)); - } - - return $tagList; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php b/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php deleted file mode 100644 index 9817a447..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock\Tags\Method; -use phpDocumentor\Reflection\DocBlockFactory; -use phpDocumentor\Reflection\Types\ContextFactory; - -/** - * @author Théo FIDRY - * - * @internal - */ -final class ClassTagRetriever implements MethodTagRetrieverInterface -{ - private $docBlockFactory; - private $contextFactory; - - public function __construct() - { - $this->docBlockFactory = DocBlockFactory::createInstance(); - $this->contextFactory = new ContextFactory(); - } - - /** - * @param \ReflectionClass $reflectionClass - * - * @return Method[] - */ - public function getTagList(\ReflectionClass $reflectionClass) - { - try { - $phpdoc = $this->docBlockFactory->create( - $reflectionClass, - $this->contextFactory->createFromReflector($reflectionClass) - ); - - $methods = array(); - - foreach ($phpdoc->getTagsByName('method') as $tag) { - if ($tag instanceof Method) { - $methods[] = $tag; - } - } - - return $methods; - } catch (\InvalidArgumentException $e) { - return array(); - } - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php b/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php deleted file mode 100644 index c0dec3de..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php +++ /dev/null @@ -1,35 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; - -/** - * @author Théo FIDRY - * - * @internal - */ -final class LegacyClassTagRetriever implements MethodTagRetrieverInterface -{ - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[] - */ - public function getTagList(\ReflectionClass $reflectionClass) - { - $phpdoc = new DocBlock($reflectionClass->getDocComment()); - - return $phpdoc->getTagsByName('method'); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php deleted file mode 100644 index d3989dad..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; -use phpDocumentor\Reflection\DocBlock\Tags\Method; - -/** - * @author Théo FIDRY - * - * @internal - */ -interface MethodTagRetrieverInterface -{ - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[]|Method[] - */ - public function getTagList(\ReflectionClass $reflectionClass); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php deleted file mode 100644 index b4787366..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Argument\Token\AnyValuesToken; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\NoCallsException; - -/** - * Call prediction. - * - * @author Konstantin Kudryashov - */ -class CallPrediction implements PredictionInterface -{ - private $util; - - /** - * Initializes prediction. - * - * @param StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there was at least one call. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\NoCallsException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if (count($calls)) { - return; - } - - $methodCalls = $object->findProphecyMethodCalls( - $method->getMethodName(), - new ArgumentsWildcard(array(new AnyValuesToken)) - ); - - if (count($methodCalls)) { - throw new NoCallsException(sprintf( - "No calls have been made that match:\n". - " %s->%s(%s)\n". - "but expected at least one.\n". - "Recorded `%s(...)` calls:\n%s", - - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - $method->getMethodName(), - $this->util->stringifyCalls($methodCalls) - ), $method); - } - - throw new NoCallsException(sprintf( - "No calls have been made that match:\n". - " %s->%s(%s)\n". - "but expected at least one.", - - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard() - ), $method); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php deleted file mode 100644 index 31c6c575..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php +++ /dev/null @@ -1,107 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Argument\Token\AnyValuesToken; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\UnexpectedCallsCountException; - -/** - * Prediction interface. - * Predictions are logical test blocks, tied to `should...` keyword. - * - * @author Konstantin Kudryashov - */ -class CallTimesPrediction implements PredictionInterface -{ - private $times; - private $util; - - /** - * Initializes prediction. - * - * @param int $times - * @param StringUtil $util - */ - public function __construct($times, StringUtil $util = null) - { - $this->times = intval($times); - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there was exact amount of calls made. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\UnexpectedCallsCountException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if ($this->times == count($calls)) { - return; - } - - $methodCalls = $object->findProphecyMethodCalls( - $method->getMethodName(), - new ArgumentsWildcard(array(new AnyValuesToken)) - ); - - if (count($calls)) { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but %d were made:\n%s", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - count($calls), - $this->util->stringifyCalls($calls) - ); - } elseif (count($methodCalls)) { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but none were made.\n". - "Recorded `%s(...)` calls:\n%s", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - $method->getMethodName(), - $this->util->stringifyCalls($methodCalls) - ); - } else { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but none were made.", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard() - ); - } - - throw new UnexpectedCallsCountException($message, $method, $this->times, $calls); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php deleted file mode 100644 index 727931f3..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php +++ /dev/null @@ -1,66 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use Closure; -use ReflectionFunction; - -/** - * Callback prediction. - * - * @author Konstantin Kudryashov - */ -class CallbackPrediction implements PredictionInterface -{ - private $callback; - - /** - * Initializes callback prediction. - * - * @param callable $callback Custom callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackPrediction, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Executes preset callback. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - $callback = $this->callback; - - if ($callback instanceof Closure && method_exists('Closure', 'bind') && (new ReflectionFunction($callback))->getClosureThis() !== null) { - $callback = Closure::bind($callback, $object); - } - - call_user_func($callback, $calls, $object, $method); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php deleted file mode 100644 index 46ac5bfc..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php +++ /dev/null @@ -1,68 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\UnexpectedCallsException; - -/** - * No calls prediction. - * - * @author Konstantin Kudryashov - */ -class NoCallsPrediction implements PredictionInterface -{ - private $util; - - /** - * Initializes prediction. - * - * @param null|StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there were no calls made. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\UnexpectedCallsException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if (!count($calls)) { - return; - } - - $verb = count($calls) === 1 ? 'was' : 'were'; - - throw new UnexpectedCallsException(sprintf( - "No calls expected that match:\n". - " %s->%s(%s)\n". - "but %d %s made:\n%s", - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - count($calls), - $verb, - $this->util->stringifyCalls($calls) - ), $method, $calls); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php deleted file mode 100644 index f7fb06a9..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Prediction interface. - * Predictions are logical test blocks, tied to `should...` keyword. - * - * @author Konstantin Kudryashov - */ -interface PredictionInterface -{ - /** - * Tests that double fulfilled prediction. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws object - * @return void - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/www/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php deleted file mode 100644 index f766e6e6..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use Closure; -use ReflectionFunction; - -/** - * Callback promise. - * - * @author Konstantin Kudryashov - */ -class CallbackPromise implements PromiseInterface -{ - private $callback; - - /** - * Initializes callback promise. - * - * @param callable $callback Custom callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackPromise, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Evaluates promise callback. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - $callback = $this->callback; - - if ($callback instanceof Closure && method_exists('Closure', 'bind') && (new ReflectionFunction($callback))->getClosureThis() !== null) { - $callback = Closure::bind($callback, $object); - } - - return call_user_func($callback, $args, $object, $method); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php deleted file mode 100644 index 382537b4..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Promise interface. - * Promises are logical blocks, tied to `will...` keyword. - * - * @author Konstantin Kudryashov - */ -interface PromiseInterface -{ - /** - * Evaluates promise. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php deleted file mode 100644 index 39bfeea0..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php +++ /dev/null @@ -1,61 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Return argument promise. - * - * @author Konstantin Kudryashov - */ -class ReturnArgumentPromise implements PromiseInterface -{ - /** - * @var int - */ - private $index; - - /** - * Initializes callback promise. - * - * @param int $index The zero-indexed number of the argument to return - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($index = 0) - { - if (!is_int($index) || $index < 0) { - throw new InvalidArgumentException(sprintf( - 'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.', - $index - )); - } - $this->index = $index; - } - - /** - * Returns nth argument if has one, null otherwise. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return null|mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - return count($args) > $this->index ? $args[$this->index] : null; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php deleted file mode 100644 index c7d5ac59..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Return promise. - * - * @author Konstantin Kudryashov - */ -class ReturnPromise implements PromiseInterface -{ - private $returnValues = array(); - - /** - * Initializes promise. - * - * @param array $returnValues Array of values - */ - public function __construct(array $returnValues) - { - $this->returnValues = $returnValues; - } - - /** - * Returns saved values one by one until last one, then continuously returns last value. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - $value = array_shift($this->returnValues); - - if (!count($this->returnValues)) { - $this->returnValues[] = $value; - } - - return $value; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php deleted file mode 100644 index 26ec19ed..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php +++ /dev/null @@ -1,100 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Doctrine\Instantiator\Instantiator; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use ReflectionClass; - -/** - * Throw promise. - * - * @author Konstantin Kudryashov - */ -class ThrowPromise implements PromiseInterface -{ - private $exception; - - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * Initializes promise. - * - * @param string|\Exception|\Throwable $exception Exception class name or instance - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($exception) - { - if (is_string($exception)) { - if ((!class_exists($exception) && !interface_exists($exception)) || !$this->isAValidThrowable($exception)) { - throw new InvalidArgumentException(sprintf( - 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', - $exception - )); - } - } elseif (!$exception instanceof \Exception && !$exception instanceof \Throwable) { - throw new InvalidArgumentException(sprintf( - 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', - is_object($exception) ? get_class($exception) : gettype($exception) - )); - } - - $this->exception = $exception; - } - - /** - * Throws predefined exception. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws object - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - if (is_string($this->exception)) { - $classname = $this->exception; - $reflection = new ReflectionClass($classname); - $constructor = $reflection->getConstructor(); - - if ($constructor->isPublic() && 0 == $constructor->getNumberOfRequiredParameters()) { - throw $reflection->newInstance(); - } - - if (!$this->instantiator) { - $this->instantiator = new Instantiator(); - } - - throw $this->instantiator->instantiate($classname); - } - - throw $this->exception; - } - - /** - * @param string $exception - * - * @return bool - */ - private function isAValidThrowable($exception) - { - return is_a($exception, 'Exception', true) - || is_a($exception, 'Throwable', true); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php deleted file mode 100644 index c45c281d..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php +++ /dev/null @@ -1,573 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -use Prophecy\Argument; -use Prophecy\Prophet; -use Prophecy\Promise; -use Prophecy\Prediction; -use Prophecy\Exception\Doubler\MethodNotFoundException; -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Exception\Prophecy\MethodProphecyException; -use ReflectionNamedType; -use ReflectionType; -use ReflectionUnionType; - -/** - * Method prophecy. - * - * @author Konstantin Kudryashov - */ -class MethodProphecy -{ - private $objectProphecy; - private $methodName; - private $argumentsWildcard; - private $promise; - private $prediction; - private $checkedPredictions = array(); - private $bound = false; - private $voidReturnType = false; - - /** - * Initializes method prophecy. - * - * @param ObjectProphecy $objectProphecy - * @param string $methodName - * @param null|Argument\ArgumentsWildcard|array $arguments - * - * @throws \Prophecy\Exception\Doubler\MethodNotFoundException If method not found - */ - public function __construct(ObjectProphecy $objectProphecy, $methodName, $arguments = null) - { - $double = $objectProphecy->reveal(); - if (!method_exists($double, $methodName)) { - throw new MethodNotFoundException(sprintf( - 'Method `%s::%s()` is not defined.', get_class($double), $methodName - ), get_class($double), $methodName, $arguments); - } - - $this->objectProphecy = $objectProphecy; - $this->methodName = $methodName; - - $reflectedMethod = new \ReflectionMethod($double, $methodName); - if ($reflectedMethod->isFinal()) { - throw new MethodProphecyException(sprintf( - "Can not add prophecy for a method `%s::%s()`\n". - "as it is a final method.", - get_class($double), - $methodName - ), $this); - } - - if (null !== $arguments) { - $this->withArguments($arguments); - } - - $hasTentativeReturnType = method_exists($reflectedMethod, 'hasTentativeReturnType') - && $reflectedMethod->hasTentativeReturnType(); - - if (true === $reflectedMethod->hasReturnType() || $hasTentativeReturnType) { - if ($hasTentativeReturnType) { - $reflectionType = $reflectedMethod->getTentativeReturnType(); - } - else { - $reflectionType = $reflectedMethod->getReturnType(); - } - - if ($reflectionType instanceof ReflectionNamedType) { - $types = [$reflectionType]; - } - elseif ($reflectionType instanceof ReflectionUnionType) { - $types = $reflectionType->getTypes(); - } - - $types = array_map( - function(ReflectionType $type) { return $type->getName(); }, - $types - ); - - usort( - $types, - static function(string $type1, string $type2) { - - // null is lowest priority - if ($type2 == 'null') { - return -1; - } - elseif ($type1 == 'null') { - return 1; - } - - // objects are higher priority than scalars - $isObject = static function($type) { - return class_exists($type) || interface_exists($type); - }; - - if($isObject($type1) && !$isObject($type2)) { - return -1; - } - elseif(!$isObject($type1) && $isObject($type2)) - { - return 1; - } - - // don't sort both-scalars or both-objects - return 0; - } - ); - - $defaultType = $types[0]; - - if ('void' === $defaultType) { - $this->voidReturnType = true; - } - - $this->will(function () use ($defaultType) { - switch ($defaultType) { - case 'void': return; - case 'string': return ''; - case 'float': return 0.0; - case 'int': return 0; - case 'bool': return false; - case 'array': return array(); - - case 'callable': - case 'Closure': - return function () {}; - - case 'Traversable': - case 'Generator': - return (function () { yield; })(); - - default: - $prophet = new Prophet; - return $prophet->prophesize($defaultType)->reveal(); - } - }); - } - } - - /** - * Sets argument wildcard. - * - * @param array|Argument\ArgumentsWildcard $arguments - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function withArguments($arguments) - { - if (is_array($arguments)) { - $arguments = new Argument\ArgumentsWildcard($arguments); - } - - if (!$arguments instanceof Argument\ArgumentsWildcard) { - throw new InvalidArgumentException(sprintf( - "Either an array or an instance of ArgumentsWildcard expected as\n". - 'a `MethodProphecy::withArguments()` argument, but got %s.', - gettype($arguments) - )); - } - - $this->argumentsWildcard = $arguments; - - return $this; - } - - /** - * Sets custom promise to the prophecy. - * - * @param callable|Promise\PromiseInterface $promise - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function will($promise) - { - if (is_callable($promise)) { - $promise = new Promise\CallbackPromise($promise); - } - - if (!$promise instanceof Promise\PromiseInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PromiseInterface, but got %s.', - gettype($promise) - )); - } - - $this->bindToObjectProphecy(); - $this->promise = $promise; - - return $this; - } - - /** - * Sets return promise to the prophecy. - * - * @see \Prophecy\Promise\ReturnPromise - * - * @return $this - */ - public function willReturn() - { - if ($this->voidReturnType) { - throw new MethodProphecyException( - "The method \"$this->methodName\" has a void return type, and so cannot return anything", - $this - ); - } - - return $this->will(new Promise\ReturnPromise(func_get_args())); - } - - /** - * @param array $items - * @param mixed $return - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function willYield($items, $return = null) - { - if ($this->voidReturnType) { - throw new MethodProphecyException( - "The method \"$this->methodName\" has a void return type, and so cannot yield anything", - $this - ); - } - - if (!is_array($items)) { - throw new InvalidArgumentException(sprintf( - 'Expected array, but got %s.', - gettype($items) - )); - } - - $generator = function() use ($items, $return) { - yield from $items; - - return $return; - }; - - return $this->will($generator); - } - - /** - * Sets return argument promise to the prophecy. - * - * @param int $index The zero-indexed number of the argument to return - * - * @see \Prophecy\Promise\ReturnArgumentPromise - * - * @return $this - */ - public function willReturnArgument($index = 0) - { - if ($this->voidReturnType) { - throw new MethodProphecyException("The method \"$this->methodName\" has a void return type", $this); - } - - return $this->will(new Promise\ReturnArgumentPromise($index)); - } - - /** - * Sets throw promise to the prophecy. - * - * @see \Prophecy\Promise\ThrowPromise - * - * @param string|\Exception $exception Exception class or instance - * - * @return $this - */ - public function willThrow($exception) - { - return $this->will(new Promise\ThrowPromise($exception)); - } - - /** - * Sets custom prediction to the prophecy. - * - * @param callable|Prediction\PredictionInterface $prediction - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function should($prediction) - { - if (is_callable($prediction)) { - $prediction = new Prediction\CallbackPrediction($prediction); - } - - if (!$prediction instanceof Prediction\PredictionInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PredictionInterface, but got %s.', - gettype($prediction) - )); - } - - $this->bindToObjectProphecy(); - $this->prediction = $prediction; - - return $this; - } - - /** - * Sets call prediction to the prophecy. - * - * @see \Prophecy\Prediction\CallPrediction - * - * @return $this - */ - public function shouldBeCalled() - { - return $this->should(new Prediction\CallPrediction); - } - - /** - * Sets no calls prediction to the prophecy. - * - * @see \Prophecy\Prediction\NoCallsPrediction - * - * @return $this - */ - public function shouldNotBeCalled() - { - return $this->should(new Prediction\NoCallsPrediction); - } - - /** - * Sets call times prediction to the prophecy. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @param $count - * - * @return $this - */ - public function shouldBeCalledTimes($count) - { - return $this->should(new Prediction\CallTimesPrediction($count)); - } - - /** - * Sets call times prediction to the prophecy. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @return $this - */ - public function shouldBeCalledOnce() - { - return $this->shouldBeCalledTimes(1); - } - - /** - * Checks provided prediction immediately. - * - * @param callable|Prediction\PredictionInterface $prediction - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function shouldHave($prediction) - { - if (is_callable($prediction)) { - $prediction = new Prediction\CallbackPrediction($prediction); - } - - if (!$prediction instanceof Prediction\PredictionInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PredictionInterface, but got %s.', - gettype($prediction) - )); - } - - if (null === $this->promise && !$this->voidReturnType) { - $this->willReturn(); - } - - $calls = $this->getObjectProphecy()->findProphecyMethodCalls( - $this->getMethodName(), - $this->getArgumentsWildcard() - ); - - try { - $prediction->check($calls, $this->getObjectProphecy(), $this); - $this->checkedPredictions[] = $prediction; - } catch (\Exception $e) { - $this->checkedPredictions[] = $prediction; - - throw $e; - } - - return $this; - } - - /** - * Checks call prediction. - * - * @see \Prophecy\Prediction\CallPrediction - * - * @return $this - */ - public function shouldHaveBeenCalled() - { - return $this->shouldHave(new Prediction\CallPrediction); - } - - /** - * Checks no calls prediction. - * - * @see \Prophecy\Prediction\NoCallsPrediction - * - * @return $this - */ - public function shouldNotHaveBeenCalled() - { - return $this->shouldHave(new Prediction\NoCallsPrediction); - } - - /** - * Checks no calls prediction. - * - * @see \Prophecy\Prediction\NoCallsPrediction - * @deprecated - * - * @return $this - */ - public function shouldNotBeenCalled() - { - return $this->shouldNotHaveBeenCalled(); - } - - /** - * Checks call times prediction. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @param int $count - * - * @return $this - */ - public function shouldHaveBeenCalledTimes($count) - { - return $this->shouldHave(new Prediction\CallTimesPrediction($count)); - } - - /** - * Checks call times prediction. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @return $this - */ - public function shouldHaveBeenCalledOnce() - { - return $this->shouldHaveBeenCalledTimes(1); - } - - /** - * Checks currently registered [with should(...)] prediction. - */ - public function checkPrediction() - { - if (null === $this->prediction) { - return; - } - - $this->shouldHave($this->prediction); - } - - /** - * Returns currently registered promise. - * - * @return null|Promise\PromiseInterface - */ - public function getPromise() - { - return $this->promise; - } - - /** - * Returns currently registered prediction. - * - * @return null|Prediction\PredictionInterface - */ - public function getPrediction() - { - return $this->prediction; - } - - /** - * Returns predictions that were checked on this object. - * - * @return Prediction\PredictionInterface[] - */ - public function getCheckedPredictions() - { - return $this->checkedPredictions; - } - - /** - * Returns object prophecy this method prophecy is tied to. - * - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } - - /** - * Returns method name. - * - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * Returns arguments wildcard. - * - * @return Argument\ArgumentsWildcard - */ - public function getArgumentsWildcard() - { - return $this->argumentsWildcard; - } - - /** - * @return bool - */ - public function hasReturnVoid() - { - return $this->voidReturnType; - } - - private function bindToObjectProphecy() - { - if ($this->bound) { - return; - } - - $this->getObjectProphecy()->addMethodProphecy($this); - $this->bound = true; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php deleted file mode 100644 index 11b87cf1..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php +++ /dev/null @@ -1,286 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Call\Call; -use Prophecy\Doubler\LazyDouble; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Call\CallCenter; -use Prophecy\Exception\Prophecy\ObjectProphecyException; -use Prophecy\Exception\Prophecy\MethodProphecyException; -use Prophecy\Exception\Prediction\AggregateException; -use Prophecy\Exception\Prediction\PredictionException; - -/** - * Object prophecy. - * - * @author Konstantin Kudryashov - */ -class ObjectProphecy implements ProphecyInterface -{ - private $lazyDouble; - private $callCenter; - private $revealer; - private $comparatorFactory; - - /** - * @var MethodProphecy[][] - */ - private $methodProphecies = array(); - - /** - * Initializes object prophecy. - * - * @param LazyDouble $lazyDouble - * @param CallCenter $callCenter - * @param RevealerInterface $revealer - * @param ComparatorFactory $comparatorFactory - */ - public function __construct( - LazyDouble $lazyDouble, - CallCenter $callCenter = null, - RevealerInterface $revealer = null, - ComparatorFactory $comparatorFactory = null - ) { - $this->lazyDouble = $lazyDouble; - $this->callCenter = $callCenter ?: new CallCenter; - $this->revealer = $revealer ?: new Revealer; - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Forces double to extend specific class. - * - * @param string $class - * - * @return $this - */ - public function willExtend($class) - { - $this->lazyDouble->setParentClass($class); - - return $this; - } - - /** - * Forces double to implement specific interface. - * - * @param string $interface - * - * @return $this - */ - public function willImplement($interface) - { - $this->lazyDouble->addInterface($interface); - - return $this; - } - - /** - * Sets constructor arguments. - * - * @param array $arguments - * - * @return $this - */ - public function willBeConstructedWith(array $arguments = null) - { - $this->lazyDouble->setArguments($arguments); - - return $this; - } - - /** - * Reveals double. - * - * @return object - * - * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface - */ - public function reveal() - { - $double = $this->lazyDouble->getInstance(); - - if (null === $double || !$double instanceof ProphecySubjectInterface) { - throw new ObjectProphecyException( - "Generated double must implement ProphecySubjectInterface, but it does not.\n". - 'It seems you have wrongly configured doubler without required ClassPatch.', - $this - ); - } - - $double->setProphecy($this); - - return $double; - } - - /** - * Adds method prophecy to object prophecy. - * - * @param MethodProphecy $methodProphecy - * - * @throws \Prophecy\Exception\Prophecy\MethodProphecyException If method prophecy doesn't - * have arguments wildcard - */ - public function addMethodProphecy(MethodProphecy $methodProphecy) - { - $argumentsWildcard = $methodProphecy->getArgumentsWildcard(); - if (null === $argumentsWildcard) { - throw new MethodProphecyException(sprintf( - "Can not add prophecy for a method `%s::%s()`\n". - "as you did not specify arguments wildcard for it.", - get_class($this->reveal()), - $methodProphecy->getMethodName() - ), $methodProphecy); - } - - $methodName = strtolower($methodProphecy->getMethodName()); - - if (!isset($this->methodProphecies[$methodName])) { - $this->methodProphecies[$methodName] = array(); - } - - $this->methodProphecies[$methodName][] = $methodProphecy; - } - - /** - * Returns either all or related to single method prophecies. - * - * @param null|string $methodName - * - * @return MethodProphecy[] - */ - public function getMethodProphecies($methodName = null) - { - if (null === $methodName) { - return $this->methodProphecies; - } - - $methodName = strtolower($methodName); - - if (!isset($this->methodProphecies[$methodName])) { - return array(); - } - - return $this->methodProphecies[$methodName]; - } - - /** - * Makes specific method call. - * - * @param string $methodName - * @param array $arguments - * - * @return mixed - */ - public function makeProphecyMethodCall($methodName, array $arguments) - { - $arguments = $this->revealer->reveal($arguments); - $return = $this->callCenter->makeCall($this, $methodName, $arguments); - - return $this->revealer->reveal($return); - } - - /** - * Finds calls by method name & arguments wildcard. - * - * @param string $methodName - * @param ArgumentsWildcard $wildcard - * - * @return Call[] - */ - public function findProphecyMethodCalls($methodName, ArgumentsWildcard $wildcard) - { - return $this->callCenter->findCalls($methodName, $wildcard); - } - - /** - * Checks that registered method predictions do not fail. - * - * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail - * @throws \Prophecy\Exception\Call\UnexpectedCallException - */ - public function checkProphecyMethodsPredictions() - { - $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal()))); - $exception->setObjectProphecy($this); - - $this->callCenter->checkUnexpectedCalls(); - - foreach ($this->methodProphecies as $prophecies) { - foreach ($prophecies as $prophecy) { - try { - $prophecy->checkPrediction(); - } catch (PredictionException $e) { - $exception->append($e); - } - } - } - - if (count($exception->getExceptions())) { - throw $exception; - } - } - - /** - * Creates new method prophecy using specified method name and arguments. - * - * @param string $methodName - * @param array $arguments - * - * @return MethodProphecy - */ - public function __call($methodName, array $arguments) - { - $arguments = new ArgumentsWildcard($this->revealer->reveal($arguments)); - - foreach ($this->getMethodProphecies($methodName) as $prophecy) { - $argumentsWildcard = $prophecy->getArgumentsWildcard(); - $comparator = $this->comparatorFactory->getComparatorFor( - $argumentsWildcard, $arguments - ); - - try { - $comparator->assertEquals($argumentsWildcard, $arguments); - return $prophecy; - } catch (ComparisonFailure $failure) {} - } - - return new MethodProphecy($this, $methodName, $arguments); - } - - /** - * Tries to get property value from double. - * - * @param string $name - * - * @return mixed - */ - public function __get($name) - { - return $this->reveal()->$name; - } - - /** - * Tries to set property value to double. - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - $this->reveal()->$name = $this->revealer->reveal($value); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php deleted file mode 100644 index 462f15a9..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Core Prophecy interface. - * - * @author Konstantin Kudryashov - */ -interface ProphecyInterface -{ - /** - * Reveals prophecy object (double) . - * - * @return object - */ - public function reveal(); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php deleted file mode 100644 index 2d839585..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Controllable doubles interface. - * - * @author Konstantin Kudryashov - */ -interface ProphecySubjectInterface -{ - /** - * Sets subject prophecy. - * - * @param ProphecyInterface $prophecy - */ - public function setProphecy(ProphecyInterface $prophecy); - - /** - * Returns subject prophecy. - * - * @return ProphecyInterface - */ - public function getProphecy(); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php deleted file mode 100644 index 60ecdac8..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php +++ /dev/null @@ -1,44 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Basic prophecies revealer. - * - * @author Konstantin Kudryashov - */ -class Revealer implements RevealerInterface -{ - /** - * Unwraps value(s). - * - * @param mixed $value - * - * @return mixed - */ - public function reveal($value) - { - if (is_array($value)) { - return array_map(array($this, __FUNCTION__), $value); - } - - if (!is_object($value)) { - return $value; - } - - if ($value instanceof ProphecyInterface) { - $value = $value->reveal(); - } - - return $value; - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php deleted file mode 100644 index ffc82bb6..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Prophecies revealer interface. - * - * @author Konstantin Kudryashov - */ -interface RevealerInterface -{ - /** - * Unwraps value(s). - * - * @param mixed $value - * - * @return mixed - */ - public function reveal($value); -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/www/vendor/phpspec/prophecy/src/Prophecy/Prophet.php deleted file mode 100644 index d37c92a3..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Prophet.php +++ /dev/null @@ -1,138 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy; - -use Prophecy\Doubler\CachedDoubler; -use Prophecy\Doubler\Doubler; -use Prophecy\Doubler\LazyDouble; -use Prophecy\Doubler\ClassPatch; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\RevealerInterface; -use Prophecy\Prophecy\Revealer; -use Prophecy\Call\CallCenter; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\PredictionException; -use Prophecy\Exception\Prediction\AggregateException; - -/** - * Prophet creates prophecies. - * - * @author Konstantin Kudryashov - */ -class Prophet -{ - private $doubler; - private $revealer; - private $util; - - /** - * @var ObjectProphecy[] - */ - private $prophecies = array(); - - /** - * Initializes Prophet. - * - * @param null|Doubler $doubler - * @param null|RevealerInterface $revealer - * @param null|StringUtil $util - */ - public function __construct( - Doubler $doubler = null, - RevealerInterface $revealer = null, - StringUtil $util = null - ) { - if (null === $doubler) { - $doubler = new CachedDoubler(); - $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch); - $doubler->registerClassPatch(new ClassPatch\TraversablePatch); - $doubler->registerClassPatch(new ClassPatch\ThrowablePatch); - $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch); - $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch); - $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch); - $doubler->registerClassPatch(new ClassPatch\HhvmExceptionPatch()); - $doubler->registerClassPatch(new ClassPatch\MagicCallPatch); - $doubler->registerClassPatch(new ClassPatch\KeywordPatch); - } - - $this->doubler = $doubler; - $this->revealer = $revealer ?: new Revealer; - $this->util = $util ?: new StringUtil; - } - - /** - * Creates new object prophecy. - * - * @param null|string $classOrInterface Class or interface name - * - * @return ObjectProphecy - */ - public function prophesize($classOrInterface = null) - { - $this->prophecies[] = $prophecy = new ObjectProphecy( - new LazyDouble($this->doubler), - new CallCenter($this->util), - $this->revealer - ); - - if ($classOrInterface && class_exists($classOrInterface)) { - return $prophecy->willExtend($classOrInterface); - } - - if ($classOrInterface && interface_exists($classOrInterface)) { - return $prophecy->willImplement($classOrInterface); - } - - return $prophecy; - } - - /** - * Returns all created object prophecies. - * - * @return ObjectProphecy[] - */ - public function getProphecies() - { - return $this->prophecies; - } - - /** - * Returns Doubler instance assigned to this Prophet. - * - * @return Doubler - */ - public function getDoubler() - { - return $this->doubler; - } - - /** - * Checks all predictions defined by prophecies of this Prophet. - * - * @throws Exception\Prediction\AggregateException If any prediction fails - */ - public function checkPredictions() - { - $exception = new AggregateException("Some predictions failed:\n"); - foreach ($this->prophecies as $prophecy) { - try { - $prophecy->checkProphecyMethodsPredictions(); - } catch (PredictionException $e) { - $exception->append($e); - } - } - - if (count($exception->getExceptions())) { - throw $exception; - } - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/www/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php deleted file mode 100644 index 1090a801..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php +++ /dev/null @@ -1,210 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * This class is a modification from sebastianbergmann/exporter - * @see https://github.com/sebastianbergmann/exporter - */ -class ExportUtil -{ - /** - * Exports a value as a string - * - * The output of this method is similar to the output of print_r(), but - * improved in various aspects: - * - * - NULL is rendered as "null" (instead of "") - * - TRUE is rendered as "true" (instead of "1") - * - FALSE is rendered as "false" (instead of "") - * - Strings are always quoted with single quotes - * - Carriage returns and newlines are normalized to \n - * - Recursion and repeated rendering is treated properly - * - * @param mixed $value - * @param int $indentation The indentation level of the 2nd+ line - * @return string - */ - public static function export($value, $indentation = 0) - { - return self::recursiveExport($value, $indentation); - } - - /** - * Converts an object to an array containing all of its private, protected - * and public properties. - * - * @param mixed $value - * @return array - */ - public static function toArray($value) - { - if (!is_object($value)) { - return (array) $value; - } - - $array = array(); - - foreach ((array) $value as $key => $val) { - // properties are transformed to keys in the following way: - // private $property => "\0Classname\0property" - // protected $property => "\0*\0property" - // public $property => "property" - if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) { - $key = $matches[1]; - } - - // See https://github.com/php/php-src/commit/5721132 - if ($key === "\0gcdata") { - continue; - } - - $array[$key] = $val; - } - - // Some internal classes like SplObjectStorage don't work with the - // above (fast) mechanism nor with reflection in Zend. - // Format the output similarly to print_r() in this case - if ($value instanceof \SplObjectStorage) { - // However, the fast method does work in HHVM, and exposes the - // internal implementation. Hide it again. - if (property_exists('\SplObjectStorage', '__storage')) { - unset($array['__storage']); - } elseif (property_exists('\SplObjectStorage', 'storage')) { - unset($array['storage']); - } - - if (property_exists('\SplObjectStorage', '__key')) { - unset($array['__key']); - } - - foreach ($value as $key => $val) { - $array[spl_object_hash($val)] = array( - 'obj' => $val, - 'inf' => $value->getInfo(), - ); - } - } - - return $array; - } - - /** - * Recursive implementation of export - * - * @param mixed $value The value to export - * @param int $indentation The indentation level of the 2nd+ line - * @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects - * @return string - * @see SebastianBergmann\Exporter\Exporter::export - */ - protected static function recursiveExport(&$value, $indentation, $processed = null) - { - if ($value === null) { - return 'null'; - } - - if ($value === true) { - return 'true'; - } - - if ($value === false) { - return 'false'; - } - - if (is_float($value) && floatval(intval($value)) === $value) { - return "$value.0"; - } - - if (is_resource($value)) { - return sprintf( - 'resource(%d) of type (%s)', - $value, - get_resource_type($value) - ); - } - - if (is_string($value)) { - // Match for most non printable chars somewhat taking multibyte chars into account - if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { - return 'Binary String: 0x' . bin2hex($value); - } - - return "'" . - str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . - "'"; - } - - $whitespace = str_repeat(' ', 4 * $indentation); - - if (!$processed) { - $processed = new Context; - } - - if (is_array($value)) { - if (($key = $processed->contains($value)) !== false) { - return 'Array &' . $key; - } - - $array = $value; - $key = $processed->add($value); - $values = ''; - - if (count($array) > 0) { - foreach ($array as $k => $v) { - $values .= sprintf( - '%s %s => %s' . "\n", - $whitespace, - self::recursiveExport($k, $indentation), - self::recursiveExport($value[$k], $indentation + 1, $processed) - ); - } - - $values = "\n" . $values . $whitespace; - } - - return sprintf('Array &%s (%s)', $key, $values); - } - - if (is_object($value)) { - $class = get_class($value); - - if ($hash = $processed->contains($value)) { - return sprintf('%s:%s Object', $class, $hash); - } - - $hash = $processed->add($value); - $values = ''; - $array = self::toArray($value); - - if (count($array) > 0) { - foreach ($array as $k => $v) { - $values .= sprintf( - '%s %s => %s' . "\n", - $whitespace, - self::recursiveExport($k, $indentation), - self::recursiveExport($v, $indentation + 1, $processed) - ); - } - - $values = "\n" . $values . $whitespace; - } - - return sprintf('%s:%s Object (%s)', $class, $hash, $values); - } - - return var_export($value, true); - } -} diff --git a/www/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/www/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php deleted file mode 100644 index ba4faff5..00000000 --- a/www/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php +++ /dev/null @@ -1,99 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Util; - -use Prophecy\Call\Call; - -/** - * String utility. - * - * @author Konstantin Kudryashov - */ -class StringUtil -{ - private $verbose; - - /** - * @param bool $verbose - */ - public function __construct($verbose = true) - { - $this->verbose = $verbose; - } - - /** - * Stringifies any provided value. - * - * @param mixed $value - * @param boolean $exportObject - * - * @return string - */ - public function stringify($value, $exportObject = true) - { - if (is_array($value)) { - if (range(0, count($value) - 1) === array_keys($value)) { - return '['.implode(', ', array_map(array($this, __FUNCTION__), $value)).']'; - } - - $stringify = array($this, __FUNCTION__); - - return '['.implode(', ', array_map(function ($item, $key) use ($stringify) { - return (is_integer($key) ? $key : '"'.$key.'"'). - ' => '.call_user_func($stringify, $item); - }, $value, array_keys($value))).']'; - } - if (is_resource($value)) { - return get_resource_type($value).':'.$value; - } - if (is_object($value)) { - return $exportObject ? ExportUtil::export($value) : sprintf('%s:%s', get_class($value), spl_object_hash($value)); - } - if (true === $value || false === $value) { - return $value ? 'true' : 'false'; - } - if (is_string($value)) { - $str = sprintf('"%s"', str_replace("\n", '\\n', $value)); - - if (!$this->verbose && 50 <= strlen($str)) { - return substr($str, 0, 50).'"...'; - } - - return $str; - } - if (null === $value) { - return 'null'; - } - - return (string) $value; - } - - /** - * Stringifies provided array of calls. - * - * @param Call[] $calls Array of Call instances - * - * @return string - */ - public function stringifyCalls(array $calls) - { - $self = $this; - - return implode(PHP_EOL, array_map(function (Call $call) use ($self) { - return sprintf(' - %s(%s) @ %s', - $call->getMethodName(), - implode(', ', array_map(array($self, 'stringify'), $call->getArguments())), - str_replace(GETCWD().DIRECTORY_SEPARATOR, '', $call->getCallPlace()) - ); - }, $calls)); - } -} diff --git a/www/vendor/phpunit/php-code-coverage/ChangeLog.md b/www/vendor/phpunit/php-code-coverage/ChangeLog.md index 2e5df9c3..8332f7c6 100644 --- a/www/vendor/phpunit/php-code-coverage/ChangeLog.md +++ b/www/vendor/phpunit/php-code-coverage/ChangeLog.md @@ -2,6 +2,23 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [9.2.17] - 2022-08-30 + +### Changed + +* [#928](https://github.com/sebastianbergmann/php-code-coverage/pull/928): Avoid unnecessary `is_file()` calls +* [#931](https://github.com/sebastianbergmann/php-code-coverage/pull/931): Use MD5 instead of CRC32 for static analysis cache file identifier + +### Fixed + +* [#926](https://github.com/sebastianbergmann/php-code-coverage/pull/926): Static Analysis cache does not work with `open_basedir` + +## [9.2.16] - 2022-08-20 + +### Fixed + +* [#926](https://github.com/sebastianbergmann/php-code-coverage/issues/926): File view has wrong colouring for the first column + ## [9.2.15] - 2022-03-07 ### Fixed @@ -398,6 +415,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 7.1 +[9.2.17]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.16...9.2.17 +[9.2.16]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.15...9.2.16 [9.2.15]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.14...9.2.15 [9.2.14]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.13...9.2.14 [9.2.13]: https://github.com/sebastianbergmann/php-code-coverage/compare/c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631...9.2.13 diff --git a/www/vendor/phpunit/php-code-coverage/composer.json b/www/vendor/phpunit/php-code-coverage/composer.json index 11c3add6..b09bd647 100644 --- a/www/vendor/phpunit/php-code-coverage/composer.json +++ b/www/vendor/phpunit/php-code-coverage/composer.json @@ -32,7 +32,7 @@ "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", "sebastian/code-unit-reverse-lookup": "^2.0.2", diff --git a/www/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/www/vendor/phpunit/php-code-coverage/src/CodeCoverage.php index c53d602c..d80d1cc5 100644 --- a/www/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ b/www/vendor/phpunit/php-code-coverage/src/CodeCoverage.php @@ -77,7 +77,7 @@ final class CodeCoverage private $ignoreDeprecatedCode = false; /** - * @var PhptTestCase|string|TestCase + * @var null|PhptTestCase|string|TestCase */ private $currentId; diff --git a/www/vendor/phpunit/php-code-coverage/src/Filter.php b/www/vendor/phpunit/php-code-coverage/src/Filter.php index ef0a2c62..5a0a142a 100644 --- a/www/vendor/phpunit/php-code-coverage/src/Filter.php +++ b/www/vendor/phpunit/php-code-coverage/src/Filter.php @@ -100,11 +100,7 @@ final class Filter public function isExcluded(string $filename): bool { - if (!$this->isFile($filename)) { - return true; - } - - return !isset($this->files[$filename]); + return !isset($this->files[$filename]) || !$this->isFile($filename); } /** diff --git a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist index 335f0ccc..b1c0fca4 100644 --- a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist +++ b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist index 90e25eaa..50502517 100644 --- a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist +++ b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist index c117adc4..2311d456 100644 --- a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist +++ b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist index e8cbe068..36d6cb74 100644 --- a/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist +++ b/www/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/www/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php b/www/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php index cdaad561..ceb39d51 100644 --- a/www/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php +++ b/www/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php @@ -9,15 +9,14 @@ */ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; -use function assert; -use function crc32; use function file_get_contents; use function file_put_contents; +use function implode; use function is_file; +use function md5; use function serialize; -use GlobIterator; use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SplFileInfo; +use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage @@ -50,10 +49,6 @@ final class CachingFileAnalyser implements FileAnalyser $this->analyser = $analyser; $this->directory = $directory; - - if (self::$cacheVersion === null) { - $this->calculateCacheVersion(); - } } public function classesIn(string $filename): array @@ -165,19 +160,24 @@ final class CachingFileAnalyser implements FileAnalyser private function cacheFile(string $filename): string { - return $this->directory . DIRECTORY_SEPARATOR . hash('sha256', $filename . crc32(file_get_contents($filename)) . self::$cacheVersion); + return $this->directory . DIRECTORY_SEPARATOR . md5($filename . "\0" . file_get_contents($filename) . "\0" . self::cacheVersion()); } - private function calculateCacheVersion(): void + private static function cacheVersion(): string { - $buffer = ''; - - foreach (new GlobIterator(__DIR__ . '/*.php') as $file) { - assert($file instanceof SplFileInfo); - - $buffer .= file_get_contents($file->getPathname()); + if (self::$cacheVersion !== null) { + return self::$cacheVersion; } - self::$cacheVersion = (string) crc32($buffer); + $buffer = []; + + foreach ((new FileIteratorFacade)->getFilesAsArray(__DIR__, '.php') as $file) { + $buffer[] = $file; + $buffer[] = file_get_contents($file); + } + + self::$cacheVersion = md5(implode("\0", $buffer)); + + return self::$cacheVersion; } } diff --git a/www/vendor/phpunit/php-code-coverage/src/Version.php b/www/vendor/phpunit/php-code-coverage/src/Version.php index 285279df..4d6a69ef 100644 --- a/www/vendor/phpunit/php-code-coverage/src/Version.php +++ b/www/vendor/phpunit/php-code-coverage/src/Version.php @@ -22,7 +22,7 @@ final class Version public static function id(): string { if (self::$version === null) { - self::$version = (new VersionId('9.2.15', dirname(__DIR__)))->getVersion(); + self::$version = (new VersionId('9.2.17', dirname(__DIR__)))->getVersion(); } return self::$version; diff --git a/www/vendor/phpunit/phpunit/ChangeLog-8.5.md b/www/vendor/phpunit/phpunit/ChangeLog-8.5.md index 75592129..11287e37 100644 --- a/www/vendor/phpunit/phpunit/ChangeLog-8.5.md +++ b/www/vendor/phpunit/phpunit/ChangeLog-8.5.md @@ -2,6 +2,32 @@ All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [8.5.30] - 2022-MM-DD + +### Fixed + +* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace + +## [8.5.29] - 2022-08-22 + +### Changed + +* [#5033](https://github.com/sebastianbergmann/phpunit/issues/5033): Do not depend on phpspec/prophecy + +## [8.5.28] - 2022-07-29 + +### Fixed + +* [#5015](https://github.com/sebastianbergmann/phpunit/pull/5015): Ukraine banner unreadable on black background +* [#5016](https://github.com/sebastianbergmann/phpunit/issues/5016): PHPUnit 8.5.27 does not work on PHP 7.2.0-7.2.18 and PHP 7.3.0-7.3.5 + +## [8.5.27] - 2022-06-19 + +### Fixed + +* [#4950](https://github.com/sebastianbergmann/phpunit/issues/4950): False error on `atMost()` invocation rule without call +* [#4962](https://github.com/sebastianbergmann/phpunit/issues/4962): Ukraine banner unreadable on white background + ## [8.5.26] - 2022-04-01 ### Fixed @@ -219,6 +245,10 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil * [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable` * [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside +[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5 +[8.5.29]: https://github.com/sebastianbergmann/phpunit/compare/8.5.28...8.5.29 +[8.5.28]: https://github.com/sebastianbergmann/phpunit/compare/8.5.27...8.5.28 +[8.5.27]: https://github.com/sebastianbergmann/phpunit/compare/8.5.26...8.5.27 [8.5.26]: https://github.com/sebastianbergmann/phpunit/compare/8.5.25...8.5.26 [8.5.25]: https://github.com/sebastianbergmann/phpunit/compare/8.5.24...8.5.25 [8.5.24]: https://github.com/sebastianbergmann/phpunit/compare/8.5.23...8.5.24 diff --git a/www/vendor/phpunit/phpunit/ChangeLog-9.5.md b/www/vendor/phpunit/phpunit/ChangeLog-9.5.md index 2193963f..9b536346 100644 --- a/www/vendor/phpunit/phpunit/ChangeLog-9.5.md +++ b/www/vendor/phpunit/phpunit/ChangeLog-9.5.md @@ -2,6 +2,39 @@ All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [9.5.24] - 2022-08-30 + +### Added + +* [#4931](https://github.com/sebastianbergmann/phpunit/issues/4931): Support `null` and `false` as stand-alone types +* [#4955](https://github.com/sebastianbergmann/phpunit/issues/4955): Support `true` as stand-alone type + +### Fixed + +* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace +* [#5012](https://github.com/sebastianbergmann/phpunit/pull/5012): Memory leak in `ExceptionWrapper` + +## [9.5.23] - 2022-08-22 + +### Changed + +* [#5033](https://github.com/sebastianbergmann/phpunit/issues/5033): Do not depend on phpspec/prophecy + +## [9.5.22] - 2022-08-20 + +### Fixed + +* [#5015](https://github.com/sebastianbergmann/phpunit/pull/5015): Ukraine banner unreadable on black background +* [#5020](https://github.com/sebastianbergmann/phpunit/issues/5020): PHPUnit 9 breaks loading of PSR-0/PEAR style classes +* [#5022](https://github.com/sebastianbergmann/phpunit/issues/5022): `ExcludeList::addDirectory()` does not work correctly + +## [9.5.21] - 2022-06-19 + +### Fixed + +* [#4950](https://github.com/sebastianbergmann/phpunit/issues/4950): False error on `atMost()` invocation rule without call +* [#4962](https://github.com/sebastianbergmann/phpunit/issues/4962): Ukraine banner unreadable on white background + ## [9.5.20] - 2022-04-01 ### Fixed @@ -157,6 +190,10 @@ All notable changes of the PHPUnit 9.5 release series are documented in this fil * [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly +[9.5.24]: https://github.com/sebastianbergmann/phpunit/compare/9.5.23...9.5.24 +[9.5.23]: https://github.com/sebastianbergmann/phpunit/compare/9.5.22...9.5.23 +[9.5.22]: https://github.com/sebastianbergmann/phpunit/compare/9.5.21...9.5.22 +[9.5.21]: https://github.com/sebastianbergmann/phpunit/compare/9.5.20...9.5.21 [9.5.20]: https://github.com/sebastianbergmann/phpunit/compare/9.5.19...9.5.20 [9.5.19]: https://github.com/sebastianbergmann/phpunit/compare/9.5.18...9.5.19 [9.5.18]: https://github.com/sebastianbergmann/phpunit/compare/9.5.17...9.5.18 diff --git a/www/vendor/phpunit/phpunit/composer.json b/www/vendor/phpunit/phpunit/composer.json index e399e175..1e8cf969 100644 --- a/www/vendor/phpunit/phpunit/composer.json +++ b/www/vendor/phpunit/phpunit/composer.json @@ -32,7 +32,6 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -47,13 +46,9 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.1", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-PDO": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "config": { "platform": { "php": "7.3.0" diff --git a/www/vendor/phpunit/phpunit/phpunit.xsd b/www/vendor/phpunit/phpunit/phpunit.xsd index cf44e8a4..eabefac3 100644 --- a/www/vendor/phpunit/phpunit/phpunit.xsd +++ b/www/vendor/phpunit/phpunit/phpunit.xsd @@ -279,8 +279,10 @@ - - + + + + diff --git a/www/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php b/www/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php index d1ff4abc..00d40353 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php +++ b/www/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php @@ -9,11 +9,13 @@ */ namespace PHPUnit\Framework; +use const PHP_VERSION_ID; use function array_keys; use function get_class; use function spl_object_hash; use PHPUnit\Util\Filter; use Throwable; +use WeakReference; /** * Wraps Exceptions thrown by code under test. @@ -38,6 +40,11 @@ final class ExceptionWrapper extends Exception */ protected $previous; + /** + * @var null|WeakReference + */ + private $originalException; + public function __construct(Throwable $t) { // PDOException::getCode() is a string. @@ -109,14 +116,23 @@ final class ExceptionWrapper extends Exception */ private function originalException(Throwable $exceptionToStore = null): ?Throwable { - static $originalExceptions; + // drop once PHP 7.3 support is removed + if (PHP_VERSION_ID < 70400) { + static $originalExceptions; - $instanceId = spl_object_hash($this); + $instanceId = spl_object_hash($this); - if ($exceptionToStore) { - $originalExceptions[$instanceId] = $exceptionToStore; + if ($exceptionToStore) { + $originalExceptions[$instanceId] = $exceptionToStore; + } + + return $originalExceptions[$instanceId] ?? null; } - return $originalExceptions[$instanceId] ?? null; + if ($exceptionToStore) { + $this->originalException = WeakReference::create($exceptionToStore); + } + + return $this->originalException !== null ? $this->originalException->get() : null; } } diff --git a/www/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php b/www/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php index 0166c58c..6a71dad2 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php +++ b/www/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php @@ -144,6 +144,10 @@ final class Invocation implements SelfDescribing return null; } + if (in_array('true', $types, true)) { + return true; + } + if (in_array('false', $types, true) || in_array('bool', $types, true)) { return false; diff --git a/www/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php b/www/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php index a0f8817b..7c81a0ea 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php +++ b/www/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php @@ -16,6 +16,7 @@ use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; use PHPUnit\Framework\MockObject\Rule\AnyParameters; use PHPUnit\Framework\MockObject\Rule\InvocationOrder; +use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount; use PHPUnit\Framework\MockObject\Rule\InvokedCount; use PHPUnit\Framework\MockObject\Rule\MethodName; use PHPUnit\Framework\MockObject\Rule\ParametersRule; @@ -225,10 +226,11 @@ final class Matcher $this->parametersRule = new AnyParameters; } - $invocationIsAny = $this->invocationRule instanceof AnyInvokedCount; - $invocationIsNever = $this->invocationRule instanceof InvokedCount && $this->invocationRule->isNever(); + $invocationIsAny = $this->invocationRule instanceof AnyInvokedCount; + $invocationIsNever = $this->invocationRule instanceof InvokedCount && $this->invocationRule->isNever(); + $invocationIsAtMost = $this->invocationRule instanceof InvokedAtMostCount; - if (!$invocationIsAny && !$invocationIsNever) { + if (!$invocationIsAny && !$invocationIsNever && !$invocationIsAtMost) { $this->parametersRule->verify(); } } catch (ExpectationFailedException $e) { diff --git a/www/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php b/www/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php index d3bd3266..09a14e60 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php +++ b/www/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php @@ -309,7 +309,11 @@ final class MockMethod } if ($type !== null) { - if ($typeName !== 'mixed' && $parameter->allowsNull() && !$type instanceof ReflectionIntersectionType && !$type instanceof ReflectionUnionType) { + if ($typeName !== 'mixed' && + $typeName !== 'null' && + !$type instanceof ReflectionIntersectionType && + !$type instanceof ReflectionUnionType && + $parameter->allowsNull()) { $nullable = '?'; } diff --git a/www/vendor/phpunit/phpunit/src/Framework/TestCase.php b/www/vendor/phpunit/phpunit/src/Framework/TestCase.php index f90245bd..59bf4ec6 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/www/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -600,22 +600,22 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T case Deprecated::class: $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Deprecated is deprecated and will be removed in PHPUnit 10. Use expectDeprecation() instead.'); - break; + break; case Error::class: $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Error is deprecated and will be removed in PHPUnit 10. Use expectError() instead.'); - break; + break; case Notice::class: $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Notice is deprecated and will be removed in PHPUnit 10. Use expectNotice() instead.'); - break; + break; case WarningError::class: $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Warning is deprecated and will be removed in PHPUnit 10. Use expectWarning() instead.'); - break; + break; } // @codeCoverageIgnoreEnd @@ -1954,6 +1954,10 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T */ protected function prophesize(?string $classOrInterface = null): ObjectProphecy { + if (!class_exists(Prophet::class)) { + throw new Exception('This test uses TestCase::prophesize(), but phpspec/prophecy is not installed. Please run "composer require --dev phpspec/prophecy".'); + } + $this->addWarning('PHPUnit\Framework\TestCase::prophesize() is deprecated and will be removed in PHPUnit 10. Please use the trait provided by phpspec/prophecy-phpunit.'); if (is_string($classOrInterface)) { @@ -2299,7 +2303,6 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $excludeList->addClassNamePrefix('SebastianBergmann\Invoker'); $excludeList->addClassNamePrefix('SebastianBergmann\Template'); $excludeList->addClassNamePrefix('SebastianBergmann\Timer'); - $excludeList->addClassNamePrefix('Symfony'); $excludeList->addClassNamePrefix('Doctrine\Instantiator'); $excludeList->addClassNamePrefix('Prophecy'); $excludeList->addStaticAttribute(ComparatorFactory::class, 'instance'); diff --git a/www/vendor/phpunit/phpunit/src/Framework/TestResult.php b/www/vendor/phpunit/phpunit/src/Framework/TestResult.php index 99b4246c..794b5136 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/TestResult.php +++ b/www/vendor/phpunit/phpunit/src/Framework/TestResult.php @@ -757,7 +757,9 @@ final class TestResult implements Countable $e->getMessage(), $frame['file'] ?? $e->getFile(), $frame['line'] ?? $e->getLine() - ) + ), + 0, + $e ); } catch (Warning $e) { $warning = true; diff --git a/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php index 0bb81844..a1b3c4a4 100644 --- a/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ b/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php @@ -38,6 +38,7 @@ use PHPUnit\Runner\BaseTestRunner; use PHPUnit\Runner\Filter\Factory; use PHPUnit\Runner\PhptTestCase; use PHPUnit\Util\FileLoader; +use PHPUnit\Util\Reflection; use PHPUnit\Util\Test as TestUtil; use ReflectionClass; use ReflectionException; @@ -219,15 +220,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test return; } - foreach ($theClass->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() === Assert::class) { - continue; - } - - if ($method->getDeclaringClass()->getName() === TestCase::class) { - continue; - } - + foreach ((new Reflection)->publicMethodsInTestClass($theClass) as $method) { if (!TestUtil::isTestMethod($method)) { continue; } @@ -480,7 +473,9 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test $this->addTest($method->invoke(null, $className)); } } elseif ($class->implementsInterface(Test::class)) { - $expectedClassName = $shortName; + // Do we have modern namespacing ('Foo\Bar\WhizBangTest') or old-school namespacing ('Foo_Bar_WhizBangTest')? + $isPsr0 = (!$class->inNamespace()) && (strpos($class->getName(), '_') !== false); + $expectedClassName = $isPsr0 ? $className : $shortName; if (($pos = strpos($expectedClassName, '.')) !== false) { $expectedClassName = substr( diff --git a/www/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php b/www/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php index f6de4e93..3752d4c1 100644 --- a/www/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php +++ b/www/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php @@ -52,11 +52,12 @@ final class StandardTestSuiteLoader implements TestSuiteLoader } if (!class_exists($suiteClassName, false)) { - // this block will handle namespaced classes $offset = 0 - strlen($suiteClassName); foreach ($loadedClasses as $loadedClass) { - if (stripos(substr($loadedClass, $offset - 1), '\\' . $suiteClassName) === 0) { + // @see https://github.com/sebastianbergmann/phpunit/issues/5020 + if (stripos(substr($loadedClass, $offset - 1), '\\' . $suiteClassName) === 0 || + stripos(substr($loadedClass, $offset - 1), '_' . $suiteClassName) === 0) { $suiteClassName = $loadedClass; break; diff --git a/www/vendor/phpunit/phpunit/src/Runner/Version.php b/www/vendor/phpunit/phpunit/src/Runner/Version.php index 3f637e47..3afe74e0 100644 --- a/www/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/www/vendor/phpunit/phpunit/src/Runner/Version.php @@ -41,7 +41,7 @@ final class Version } if (self::$version === '') { - self::$version = (new VersionId('9.5.20', dirname(__DIR__, 2)))->getVersion(); + self::$version = (new VersionId('9.5.24', dirname(__DIR__, 2)))->getVersion(); } return self::$version; diff --git a/www/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php b/www/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php index 6a0ad2c7..99f0fa9d 100644 --- a/www/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php +++ b/www/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php @@ -23,6 +23,7 @@ use function sprintf; use function str_pad; use function str_repeat; use function strlen; +use function trim; use function vsprintf; use PHPUnit\Framework\AssertionFailedError; use PHPUnit\Framework\Exception; @@ -374,7 +375,7 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->write((string) $e); while ($e = $e->getPrevious()) { - $this->write("\nCaused by\n" . $e); + $this->write("\nCaused by\n" . trim((string) $e) . "\n"); } } diff --git a/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php index a1189f6d..87bdc09b 100644 --- a/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ b/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php @@ -331,8 +331,8 @@ final class TestRunner extends BaseTestRunner 'PHPUnit ' . Version::id() . ' ' . - Color::colorize('bg-blue', '#StandWith') . - Color::colorize('bg-yellow', 'Ukraine') . + Color::colorize('bg-blue,fg-white', '#StandWith') . + Color::colorize('bg-yellow,fg-black', 'Ukraine') . "\n" ); } else { diff --git a/www/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php b/www/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php index 8a703aee..8803f2e9 100644 --- a/www/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php +++ b/www/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php @@ -45,17 +45,17 @@ final class TestSuiteMapper $testSuite = new TestSuiteObject($testSuiteConfiguration->name()); $testSuiteEmpty = true; + $exclude = []; + + foreach ($testSuiteConfiguration->exclude()->asArray() as $file) { + $exclude[] = $file->path(); + } + foreach ($testSuiteConfiguration->directories() as $directory) { if (!version_compare(PHP_VERSION, $directory->phpVersion(), $directory->phpVersionOperator()->asString())) { continue; } - $exclude = []; - - foreach ($testSuiteConfiguration->exclude()->asArray() as $file) { - $exclude[] = $file->path(); - } - $files = (new Facade)->getFilesAsArray( $directory->path(), $directory->suffix(), diff --git a/www/vendor/phpunit/phpunit/src/Util/ExcludeList.php b/www/vendor/phpunit/phpunit/src/Util/ExcludeList.php index c7e6704a..91a5a66b 100644 --- a/www/vendor/phpunit/phpunit/src/Util/ExcludeList.php +++ b/www/vendor/phpunit/phpunit/src/Util/ExcludeList.php @@ -30,7 +30,6 @@ use PhpParser\Parser; use PHPUnit\Framework\TestCase; use Prophecy\Prophet; use ReflectionClass; -use ReflectionException; use SebastianBergmann\CliParser\Parser as CliParser; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeUnit\CodeUnit; @@ -51,7 +50,6 @@ use SebastianBergmann\Template\Template; use SebastianBergmann\Timer\Timer; use SebastianBergmann\Type\TypeName; use SebastianBergmann\Version; -use Symfony\Polyfill\Ctype\Ctype; use TheSeer\Tokenizer\Tokenizer; use Webmozart\Assert\Assert; @@ -157,9 +155,6 @@ final class ExcludeList // sebastian/version Version::class => 1, - // symfony/polyfill-ctype - Ctype::class => 1, - // theseer/tokenizer Tokenizer::class => 1, @@ -170,7 +165,12 @@ final class ExcludeList /** * @var string[] */ - private static $directories; + private static $directories = []; + + /** + * @var bool + */ + private static $initialized = false; public static function addDirectory(string $directory): void { @@ -223,39 +223,31 @@ final class ExcludeList */ private function initialize(): void { - if (self::$directories === null) { - self::$directories = []; - - foreach (self::EXCLUDED_CLASS_NAMES as $className => $parent) { - if (!class_exists($className)) { - continue; - } - - try { - $directory = (new ReflectionClass($className))->getFileName(); - // @codeCoverageIgnoreStart - } catch (ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - // @codeCoverageIgnoreEnd - - for ($i = 0; $i < $parent; $i++) { - $directory = dirname($directory); - } - - self::$directories[] = $directory; - } - - // Hide process isolation workaround on Windows. - if (DIRECTORY_SEPARATOR === '\\') { - // tempnam() prefix is limited to first 3 chars. - // @see https://php.net/manual/en/function.tempnam.php - self::$directories[] = sys_get_temp_dir() . '\\PHP'; - } + if (self::$initialized) { + return; } + + foreach (self::EXCLUDED_CLASS_NAMES as $className => $parent) { + if (!class_exists($className)) { + continue; + } + + $directory = (new ReflectionClass($className))->getFileName(); + + for ($i = 0; $i < $parent; $i++) { + $directory = dirname($directory); + } + + self::$directories[] = $directory; + } + + // Hide process isolation workaround on Windows. + if (DIRECTORY_SEPARATOR === '\\') { + // tempnam() prefix is limited to first 3 chars. + // @see https://php.net/manual/en/function.tempnam.php + self::$directories[] = sys_get_temp_dir() . '\\PHP'; + } + + self::$initialized = true; } } diff --git a/www/vendor/phpunit/phpunit/src/Util/Reflection.php b/www/vendor/phpunit/phpunit/src/Util/Reflection.php new file mode 100644 index 00000000..3ffc2d5e --- /dev/null +++ b/www/vendor/phpunit/phpunit/src/Util/Reflection.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Util; + +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\TestCase; +use ReflectionClass; +use ReflectionMethod; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Reflection +{ + /** + * @psalm-return list + */ + public function publicMethodsInTestClass(ReflectionClass $class): array + { + return $this->filterMethods($class, ReflectionMethod::IS_PUBLIC); + } + + /** + * @psalm-return list + */ + public function methodsInTestClass(ReflectionClass $class): array + { + return $this->filterMethods($class, null); + } + + /** + * @psalm-return list + */ + private function filterMethods(ReflectionClass $class, ?int $filter): array + { + $methods = []; + + // PHP <7.3.5 throw error when null is passed + // to ReflectionClass::getMethods() when strict_types is enabled. + $classMethods = $filter === null ? $class->getMethods() : $class->getMethods($filter); + + foreach ($classMethods as $method) { + if ($method->getDeclaringClass()->getName() === TestCase::class) { + continue; + } + + if ($method->getDeclaringClass()->getName() === Assert::class) { + continue; + } + + $methods[] = $method; + } + + return $methods; + } +} diff --git a/www/vendor/phpunit/phpunit/src/Util/Test.php b/www/vendor/phpunit/phpunit/src/Util/Test.php index 1de7e9d4..773b0ef0 100644 --- a/www/vendor/phpunit/phpunit/src/Util/Test.php +++ b/www/vendor/phpunit/phpunit/src/Util/Test.php @@ -37,7 +37,6 @@ use function strpos; use function strtolower; use function trim; use function version_compare; -use PHPUnit\Framework\Assert; use PHPUnit\Framework\CodeCoverageException; use PHPUnit\Framework\ExecutionOrderDependency; use PHPUnit\Framework\InvalidCoversTargetException; @@ -526,15 +525,7 @@ final class Test self::$hookMethods[$className] = self::emptyHookMethodsArray(); try { - foreach ((new ReflectionClass($className))->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() === Assert::class) { - continue; - } - - if ($method->getDeclaringClass()->getName() === TestCase::class) { - continue; - } - + foreach ((new Reflection)->methodsInTestClass(new ReflectionClass($className)) as $method) { $docBlock = Registry::getInstance()->forMethod($className, $method->getName()); if ($method->isStatic()) { diff --git a/www/vendor/sebastian/type/ChangeLog.md b/www/vendor/sebastian/type/ChangeLog.md index 258f6b70..2d87fc38 100644 --- a/www/vendor/sebastian/type/ChangeLog.md +++ b/www/vendor/sebastian/type/ChangeLog.md @@ -2,11 +2,11 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [4.0.0] - 2022-MM-DD +## [3.1.0] - 2022-08-29 -### Removed +### Added -* This component is no longer supported on PHP 7.3 and PHP 7.4 +* [#21](https://github.com/sebastianbergmann/type/issues/21): Support `true` as stand-alone type ## [3.0.0] - 2022-03-15 @@ -130,7 +130,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release based on [code contributed by Michel Hartmann to PHPUnit](https://github.com/sebastianbergmann/phpunit/pull/3673) -[4.0.0]: https://github.com/sebastianbergmann/type/compare/3.0...master +[3.1.0]: https://github.com/sebastianbergmann/type/compare/3.0.0...3.1.0 [3.0.0]: https://github.com/sebastianbergmann/type/compare/2.3.4...3.0.0 [2.3.4]: https://github.com/sebastianbergmann/type/compare/ca39369c41313ed12c071ed38ecda8fcdb248859...2.3.4 [2.3.3]: https://github.com/sebastianbergmann/type/compare/2.3.2...ca39369c41313ed12c071ed38ecda8fcdb248859 diff --git a/www/vendor/sebastian/type/composer.json b/www/vendor/sebastian/type/composer.json index 10b32cd8..cccfab29 100644 --- a/www/vendor/sebastian/type/composer.json +++ b/www/vendor/sebastian/type/composer.json @@ -44,7 +44,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } } } diff --git a/www/vendor/sebastian/type/src/type/SimpleType.php b/www/vendor/sebastian/type/src/type/SimpleType.php index b31ec124..5bfd23b7 100644 --- a/www/vendor/sebastian/type/src/type/SimpleType.php +++ b/www/vendor/sebastian/type/src/type/SimpleType.php @@ -41,6 +41,10 @@ final class SimpleType extends Type return true; } + if ($this->name === 'bool' && $other->name() === 'true') { + return true; + } + if ($this->name === 'bool' && $other->name() === 'false') { return true; } diff --git a/www/vendor/sebastian/type/src/type/TrueType.php b/www/vendor/sebastian/type/src/type/TrueType.php new file mode 100644 index 00000000..02e47d45 --- /dev/null +++ b/www/vendor/sebastian/type/src/type/TrueType.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\Type; + +final class TrueType extends Type +{ + public function isAssignable(Type $other): bool + { + if ($other instanceof self) { + return true; + } + + return $other instanceof SimpleType && + $other->name() === 'bool' && + $other->value() === true; + } + + public function name(): string + { + return 'true'; + } + + public function allowsNull(): bool + { + return false; + } + + public function isTrue(): bool + { + return true; + } +} diff --git a/www/vendor/sebastian/type/src/type/Type.php b/www/vendor/sebastian/type/src/type/Type.php index bd923702..51baf764 100644 --- a/www/vendor/sebastian/type/src/type/Type.php +++ b/www/vendor/sebastian/type/src/type/Type.php @@ -19,8 +19,14 @@ abstract class Type { public static function fromValue($value, bool $allowsNull): self { - if ($value === false) { - return new FalseType; + if ($allowsNull === false) { + if ($value === true) { + return new TrueType; + } + + if ($value === false) { + return new FalseType; + } } $typeName = gettype($value); @@ -48,6 +54,9 @@ abstract class Type case 'callable': return new CallableType($allowsNull); + case 'true': + return new TrueType; + case 'false': return new FalseType; @@ -94,6 +103,11 @@ abstract class Type return false; } + public function isTrue(): bool + { + return false; + } + public function isFalse(): bool { return false; diff --git a/www/vendor/symfony/polyfill-ctype/Ctype.php b/www/vendor/symfony/polyfill-ctype/Ctype.php deleted file mode 100644 index ba75a2c9..00000000 --- a/www/vendor/symfony/polyfill-ctype/Ctype.php +++ /dev/null @@ -1,232 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Ctype; - -/** - * Ctype implementation through regex. - * - * @internal - * - * @author Gert de Pagter - */ -final class Ctype -{ - /** - * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. - * - * @see https://php.net/ctype-alnum - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-alpha - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-cntrl - * - * @param mixed $text - * - * @return bool - */ - 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); - } - - /** - * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. - * - * @see https://php.net/ctype-digit - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-graph - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-lower - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-print - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-punct - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_punct($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 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. - * - * @see https://php.net/ctype-space - * - * @param mixed $text - * - * @return bool - */ - 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); - } - - /** - * Returns TRUE if every character in text is an uppercase letter. - * - * @see https://php.net/ctype-upper - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * @see https://php.net/ctype-xdigit - * - * @param mixed $text - * - * @return bool - */ - 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. - * - * If an integer between -128 and 255 inclusive is provided, - * it is interpreted as the ASCII value of a single character - * (negative values have 256 added in order to allow characters in the Extended ASCII range). - * Any other integer is interpreted as a string containing the decimal digits of the integer. - * - * @param mixed $int - * @param string $function - * - * @return mixed - */ - 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); - } - - if ($int < 0) { - $int += 256; - } - - return \chr($int); - } -} diff --git a/www/vendor/symfony/polyfill-ctype/LICENSE b/www/vendor/symfony/polyfill-ctype/LICENSE deleted file mode 100644 index 3f853aaf..00000000 --- a/www/vendor/symfony/polyfill-ctype/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier - -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/www/vendor/symfony/polyfill-ctype/README.md b/www/vendor/symfony/polyfill-ctype/README.md deleted file mode 100644 index 8add1ab0..00000000 --- a/www/vendor/symfony/polyfill-ctype/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Symfony Polyfill / Ctype -======================== - -This component provides `ctype_*` functions to users who run php versions without the ctype extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/www/vendor/symfony/polyfill-ctype/bootstrap.php b/www/vendor/symfony/polyfill-ctype/bootstrap.php deleted file mode 100644 index d54524b3..00000000 --- a/www/vendor/symfony/polyfill-ctype/bootstrap.php +++ /dev/null @@ -1,50 +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 (\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/www/vendor/symfony/polyfill-ctype/bootstrap80.php b/www/vendor/symfony/polyfill-ctype/bootstrap80.php deleted file mode 100644 index ab2f8611..00000000 --- a/www/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/www/vendor/symfony/polyfill-ctype/composer.json b/www/vendor/symfony/polyfill-ctype/composer.json deleted file mode 100644 index ccb8e570..00000000 --- a/www/vendor/symfony/polyfill-ctype/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "symfony/polyfill-ctype", - "type": "library", - "description": "Symfony polyfill for ctype functions", - "keywords": ["polyfill", "compatibility", "portable", "ctype"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/www/vendor/webmozart/assert/.editorconfig b/www/vendor/webmozart/assert/.editorconfig deleted file mode 100644 index 384453bf..00000000 --- a/www/vendor/webmozart/assert/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -charset=utf-8 -end_of_line=lf -trim_trailing_whitespace=true -insert_final_newline=true -indent_style=space -indent_size=4 - -[*.yml] -indent_size=2 diff --git a/www/vendor/webmozart/assert/.github/workflows/ci.yaml b/www/vendor/webmozart/assert/.github/workflows/ci.yaml deleted file mode 100644 index 636fc5ab..00000000 --- a/www/vendor/webmozart/assert/.github/workflows/ci.yaml +++ /dev/null @@ -1,120 +0,0 @@ -# https://docs.github.com/en/actions - -name: "CI" - -on: - pull_request: ~ - push: - branches: - - "master" - -env: - COMPOSER_ROOT_VERSION: 1.99 - -jobs: - coding-standards: - name: "Coding Standards" - - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "7.4" - tools: "composer-normalize" - - - name: "Validate composer.json" - run: "composer validate --strict" - - - name: "Normalize composer.json" - run: "composer-normalize --dry-run" - - - name: "PHP-CS-Fixer" - uses: "docker://oskarstark/php-cs-fixer-ga:2.18.0" - with: - args: "--dry-run --diff-format udiff" - - static-code-analysis: - name: "Static Code Analysis" - - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "7.4" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress && composer i --working-dir=ci" - - - name: "Run vimeo/psalm" - run: "ci/vendor/bin/psalm --threads=4" - - tests: - name: "Tests" - - runs-on: "ubuntu-latest" - - strategy: - matrix: - php-version: - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "${{ matrix.php-version }}" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" - - - name: "Run unit tests" - run: "vendor/bin/phpunit" - - windows-tests: - name: "Windows tests" - - runs-on: "windows-latest" - - strategy: - matrix: - php-version: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "${{ matrix.php-version }}" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" - - - name: "Run unit tests" - run: "vendor/bin/phpunit tests/AssertTest.php" diff --git a/www/vendor/webmozart/assert/.php_cs b/www/vendor/webmozart/assert/.php_cs deleted file mode 100644 index f7afd3ed..00000000 --- a/www/vendor/webmozart/assert/.php_cs +++ /dev/null @@ -1,24 +0,0 @@ -in(__DIR__.'/src') - ->in(__DIR__.'/tests') -; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules([ - '@PSR2' => true, - '@Symfony' => true, - 'ordered_imports' => true, - 'array_syntax' => ['syntax' => 'long'], - 'no_superfluous_phpdoc_tags' => false, - 'phpdoc_annotation_without_dot' => false, - 'phpdoc_types_order' => false, - 'phpdoc_summary' => false, - 'phpdoc_to_comment' => false, - 'phpdoc_align' => false, - 'yoda_style' => false, - ]) - ->setFinder($finder) -; diff --git a/www/vendor/webmozart/assert/CHANGELOG.md b/www/vendor/webmozart/assert/CHANGELOG.md deleted file mode 100644 index 8629248b..00000000 --- a/www/vendor/webmozart/assert/CHANGELOG.md +++ /dev/null @@ -1,190 +0,0 @@ -Changelog -========= - -## UNRELEASED - -## 1.10.0 - -### Added - -* On invalid assertion, we throw a `Webmozart\Assert\InvalidArgumentException` -* Added `Assert::positiveInteger()` - -### Changed - -* Using a trait with real implementations of `all*()` and `nullOr*()` methods to improve psalm compatibility. - -### Removed - -* Support for PHP <7.2 - -## 1.9.1 - -## Fixed - -* provisional support for PHP 8.0 - -## 1.9.0 - -* added better Psalm support for `all*` & `nullOr*` methods -* These methods are now understood by Psalm through a mixin. You may need a newer version of Psalm in order to use this -* added `@psalm-pure` annotation to `Assert::notFalse()` -* added more `@psalm-assert` annotations where appropriate - -## Changed - -* the `all*` & `nullOr*` methods are now declared on an interface, instead of `@method` annotations. -This interface is linked to the `Assert` class with a `@mixin` annotation. Most IDE's have supported this -for a long time, and you should not lose any autocompletion capabilities. PHPStan has supported this since -version `0.12.20`. This package is marked incompatible (with a composer conflict) with phpstan version prior to that. -If you do not use PHPStan than this does not matter. - -## 1.8.0 - -### Added - -* added `Assert::notStartsWith()` -* added `Assert::notEndsWith()` -* added `Assert::inArray()` -* added `@psalm-pure` annotations to pure assertions - -### Fixed - -* Exception messages of comparisons between `DateTime(Immutable)` objects now display their date & time. -* Custom Exception messages for `Assert::count()` now use the values to render the exception message. - -## 1.7.0 (2020-02-14) - -### Added - -* added `Assert::notFalse()` -* added `Assert::isAOf()` -* added `Assert::isAnyOf()` -* added `Assert::isNotA()` - -## 1.6.0 (2019-11-24) - -### Added - -* added `Assert::validArrayKey()` -* added `Assert::isNonEmptyList()` -* added `Assert::isNonEmptyMap()` -* added `@throws InvalidArgumentException` annotations to all methods that throw. -* added `@psalm-assert` for the list type to the `isList` assertion. - -### Fixed - -* `ResourceBundle` & `SimpleXMLElement` now pass the `isCountable` assertions. -They are countable, without implementing the `Countable` interface. -* The doc block of `range` now has the proper variables. -* An empty array will now pass `isList` and `isMap`. As it is a valid form of both. -If a non-empty variant is needed, use `isNonEmptyList` or `isNonEmptyMap`. - -### Changed - -* Removed some `@psalm-assert` annotations, that were 'side effect' assertions See: - * [#144](https://github.com/webmozart/assert/pull/144) - * [#145](https://github.com/webmozart/assert/issues/145) - * [#146](https://github.com/webmozart/assert/pull/146) - * [#150](https://github.com/webmozart/assert/pull/150) -* If you use Psalm, the minimum version needed is `3.6.0`. Which is enforced through a composer conflict. -If you don't use Psalm, then this has no impact. - -## 1.5.0 (2019-08-24) - -### Added - -* added `Assert::uniqueValues()` -* added `Assert::unicodeLetters()` -* added: `Assert::email()` -* added support for [Psalm](https://github.com/vimeo/psalm), by adding `@psalm-assert` annotations where appropriate. - -### Fixed - -* `Assert::endsWith()` would not give the correct result when dealing with a multibyte suffix. -* `Assert::length(), minLength, maxLength, lengthBetween` would not give the correct result when dealing with multibyte characters. - -**NOTE**: These 2 changes may break your assertions if you relied on the fact that multibyte characters didn't behave correctly. - -### Changed - -* The names of some variables have been updated to better reflect what they are. -* All function calls are now in their FQN form, slightly increasing performance. -* Tests are now properly ran against HHVM-3.30 and PHP nightly. - -### Deprecation - -* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` - * This was already done in 1.3.0, but it was only done through a silenced `trigger_error`. It is now annotated as well. - -## 1.4.0 (2018-12-25) - -### Added - -* added `Assert::ip()` -* added `Assert::ipv4()` -* added `Assert::ipv6()` -* added `Assert::notRegex()` -* added `Assert::interfaceExists()` -* added `Assert::isList()` -* added `Assert::isMap()` -* added polyfill for ctype - -### Fixed - -* Special case when comparing objects implementing `__toString()` - -## 1.3.0 (2018-01-29) - -### Added - -* added `Assert::minCount()` -* added `Assert::maxCount()` -* added `Assert::countBetween()` -* added `Assert::isCountable()` -* added `Assert::notWhitespaceOnly()` -* added `Assert::natural()` -* added `Assert::notContains()` -* added `Assert::isArrayAccessible()` -* added `Assert::isInstanceOfAny()` -* added `Assert::isIterable()` - -### Fixed - -* `stringNotEmpty` will no longer report "0" is an empty string - -### Deprecation - -* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` - -## 1.2.0 (2016-11-23) - - * added `Assert::throws()` - * added `Assert::count()` - * added extension point `Assert::reportInvalidArgument()` for custom subclasses - -## 1.1.0 (2016-08-09) - - * added `Assert::object()` - * added `Assert::propertyExists()` - * added `Assert::propertyNotExists()` - * added `Assert::methodExists()` - * added `Assert::methodNotExists()` - * added `Assert::uuid()` - -## 1.0.2 (2015-08-24) - - * integrated Style CI - * add tests for minimum package dependencies on Travis CI - -## 1.0.1 (2015-05-12) - - * added support for PHP 5.3.3 - -## 1.0.0 (2015-05-12) - - * first stable release - -## 1.0.0-beta (2015-03-19) - - * first beta release diff --git a/www/vendor/webmozart/assert/LICENSE b/www/vendor/webmozart/assert/LICENSE deleted file mode 100644 index 9e2e3075..00000000 --- a/www/vendor/webmozart/assert/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Bernhard Schussek - -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/www/vendor/webmozart/assert/README.md b/www/vendor/webmozart/assert/README.md deleted file mode 100644 index b85d5981..00000000 --- a/www/vendor/webmozart/assert/README.md +++ /dev/null @@ -1,287 +0,0 @@ -Webmozart Assert -================ - -[![Latest Stable Version](https://poser.pugx.org/webmozart/assert/v/stable.svg)](https://packagist.org/packages/webmozart/assert) -[![Total Downloads](https://poser.pugx.org/webmozart/assert/downloads.svg)](https://packagist.org/packages/webmozart/assert) - -This library contains efficient assertions to test the input and output of -your methods. With these assertions, you can greatly reduce the amount of coding -needed to write a safe implementation. - -All assertions in the [`Assert`] class throw an `Webmozart\Assert\InvalidArgumentException` if -they fail. - -FAQ ---- - -**What's the difference to [beberlei/assert]?** - -This library is heavily inspired by Benjamin Eberlei's wonderful [assert package], -but fixes a usability issue with error messages that can't be fixed there without -breaking backwards compatibility. - -This package features usable error messages by default. However, you can also -easily write custom error messages: - -``` -Assert::string($path, 'The path is expected to be a string. Got: %s'); -``` - -In [beberlei/assert], the ordering of the `%s` placeholders is different for -every assertion. This package, on the contrary, provides consistent placeholder -ordering for all assertions: - -* `%s`: The tested value as string, e.g. `"/foo/bar"`. -* `%2$s`, `%3$s`, ...: Additional assertion-specific values, e.g. the - minimum/maximum length, allowed values, etc. - -Check the source code of the assertions to find out details about the additional -available placeholders. - -Installation ------------- - -Use [Composer] to install the package: - -``` -$ composer require webmozart/assert -``` - -Example -------- - -```php -use Webmozart\Assert\Assert; - -class Employee -{ - public function __construct($id) - { - Assert::integer($id, 'The employee ID must be an integer. Got: %s'); - Assert::greaterThan($id, 0, 'The employee ID must be a positive integer. Got: %s'); - } -} -``` - -If you create an employee with an invalid ID, an exception is thrown: - -```php -new Employee('foobar'); -// => Webmozart\Assert\InvalidArgumentException: -// The employee ID must be an integer. Got: string - -new Employee(-10); -// => Webmozart\Assert\InvalidArgumentException: -// The employee ID must be a positive integer. Got: -10 -``` - -Assertions ----------- - -The [`Assert`] class provides the following assertions: - -### Type Assertions - -Method | Description --------------------------------------------------------- | -------------------------------------------------- -`string($value, $message = '')` | Check that a value is a string -`stringNotEmpty($value, $message = '')` | Check that a value is a non-empty string -`integer($value, $message = '')` | Check that a value is an integer -`integerish($value, $message = '')` | Check that a value casts to an integer -`positiveInteger($value, $message = '')` | Check that a value is a positive (non-zero) integer -`float($value, $message = '')` | Check that a value is a float -`numeric($value, $message = '')` | Check that a value is numeric -`natural($value, $message= ''')` | Check that a value is a non-negative integer -`boolean($value, $message = '')` | Check that a value is a boolean -`scalar($value, $message = '')` | Check that a value is a scalar -`object($value, $message = '')` | Check that a value is an object -`resource($value, $type = null, $message = '')` | Check that a value is a resource -`isCallable($value, $message = '')` | Check that a value is a callable -`isArray($value, $message = '')` | Check that a value is an array -`isTraversable($value, $message = '')` (deprecated) | Check that a value is an array or a `\Traversable` -`isIterable($value, $message = '')` | Check that a value is an array or a `\Traversable` -`isCountable($value, $message = '')` | Check that a value is an array or a `\Countable` -`isInstanceOf($value, $class, $message = '')` | Check that a value is an `instanceof` a class -`isInstanceOfAny($value, array $classes, $message = '')` | Check that a value is an `instanceof` at least one class on the array of classes -`notInstanceOf($value, $class, $message = '')` | Check that a value is not an `instanceof` a class -`isAOf($value, $class, $message = '')` | Check that a value is of the class or has one of its parents -`isAnyOf($value, array $classes, $message = '')` | Check that a value is of at least one of the classes or has one of its parents -`isNotA($value, $class, $message = '')` | Check that a value is not of the class or has not one of its parents -`isArrayAccessible($value, $message = '')` | Check that a value can be accessed as an array -`uniqueValues($values, $message = '')` | Check that the given array contains unique values - -### Comparison Assertions - -Method | Description ------------------------------------------------ | ------------------------------------------------------------------ -`true($value, $message = '')` | Check that a value is `true` -`false($value, $message = '')` | Check that a value is `false` -`notFalse($value, $message = '')` | Check that a value is not `false` -`null($value, $message = '')` | Check that a value is `null` -`notNull($value, $message = '')` | Check that a value is not `null` -`isEmpty($value, $message = '')` | Check that a value is `empty()` -`notEmpty($value, $message = '')` | Check that a value is not `empty()` -`eq($value, $value2, $message = '')` | Check that a value equals another (`==`) -`notEq($value, $value2, $message = '')` | Check that a value does not equal another (`!=`) -`same($value, $value2, $message = '')` | Check that a value is identical to another (`===`) -`notSame($value, $value2, $message = '')` | Check that a value is not identical to another (`!==`) -`greaterThan($value, $value2, $message = '')` | Check that a value is greater than another -`greaterThanEq($value, $value2, $message = '')` | Check that a value is greater than or equal to another -`lessThan($value, $value2, $message = '')` | Check that a value is less than another -`lessThanEq($value, $value2, $message = '')` | Check that a value is less than or equal to another -`range($value, $min, $max, $message = '')` | Check that a value is within a range -`inArray($value, array $values, $message = '')` | Check that a value is one of a list of values -`oneOf($value, array $values, $message = '')` | Check that a value is one of a list of values (alias of `inArray`) - -### String Assertions - -You should check that a value is a string with `Assert::string()` before making -any of the following assertions. - -Method | Description ---------------------------------------------------- | ----------------------------------------------------------------- -`contains($value, $subString, $message = '')` | Check that a string contains a substring -`notContains($value, $subString, $message = '')` | Check that a string does not contain a substring -`startsWith($value, $prefix, $message = '')` | Check that a string has a prefix -`notStartsWith($value, $prefix, $message = '')` | Check that a string does not have a prefix -`startsWithLetter($value, $message = '')` | Check that a string starts with a letter -`endsWith($value, $suffix, $message = '')` | Check that a string has a suffix -`notEndsWith($value, $suffix, $message = '')` | Check that a string does not have a suffix -`regex($value, $pattern, $message = '')` | Check that a string matches a regular expression -`notRegex($value, $pattern, $message = '')` | Check that a string does not match a regular expression -`unicodeLetters($value, $message = '')` | Check that a string contains Unicode letters only -`alpha($value, $message = '')` | Check that a string contains letters only -`digits($value, $message = '')` | Check that a string contains digits only -`alnum($value, $message = '')` | Check that a string contains letters and digits only -`lower($value, $message = '')` | Check that a string contains lowercase characters only -`upper($value, $message = '')` | Check that a string contains uppercase characters only -`length($value, $length, $message = '')` | Check that a string has a certain number of characters -`minLength($value, $min, $message = '')` | Check that a string has at least a certain number of characters -`maxLength($value, $max, $message = '')` | Check that a string has at most a certain number of characters -`lengthBetween($value, $min, $max, $message = '')` | Check that a string has a length in the given range -`uuid($value, $message = '')` | Check that a string is a valid UUID -`ip($value, $message = '')` | Check that a string is a valid IP (either IPv4 or IPv6) -`ipv4($value, $message = '')` | Check that a string is a valid IPv4 -`ipv6($value, $message = '')` | Check that a string is a valid IPv6 -`email($value, $message = '')` | Check that a string is a valid e-mail address -`notWhitespaceOnly($value, $message = '')` | Check that a string contains at least one non-whitespace character - -### File Assertions - -Method | Description ------------------------------------ | -------------------------------------------------- -`fileExists($value, $message = '')` | Check that a value is an existing path -`file($value, $message = '')` | Check that a value is an existing file -`directory($value, $message = '')` | Check that a value is an existing directory -`readable($value, $message = '')` | Check that a value is a readable path -`writable($value, $message = '')` | Check that a value is a writable path - -### Object Assertions - -Method | Description ------------------------------------------------------ | -------------------------------------------------- -`classExists($value, $message = '')` | Check that a value is an existing class name -`subclassOf($value, $class, $message = '')` | Check that a class is a subclass of another -`interfaceExists($value, $message = '')` | Check that a value is an existing interface name -`implementsInterface($value, $class, $message = '')` | Check that a class implements an interface -`propertyExists($value, $property, $message = '')` | Check that a property exists in a class/object -`propertyNotExists($value, $property, $message = '')` | Check that a property does not exist in a class/object -`methodExists($value, $method, $message = '')` | Check that a method exists in a class/object -`methodNotExists($value, $method, $message = '')` | Check that a method does not exist in a class/object - -### Array Assertions - -Method | Description --------------------------------------------------- | ------------------------------------------------------------------ -`keyExists($array, $key, $message = '')` | Check that a key exists in an array -`keyNotExists($array, $key, $message = '')` | Check that a key does not exist in an array -`validArrayKey($key, $message = '')` | Check that a value is a valid array key (int or string) -`count($array, $number, $message = '')` | Check that an array contains a specific number of elements -`minCount($array, $min, $message = '')` | Check that an array contains at least a certain number of elements -`maxCount($array, $max, $message = '')` | Check that an array contains at most a certain number of elements -`countBetween($array, $min, $max, $message = '')` | Check that an array has a count in the given range -`isList($array, $message = '')` | Check that an array is a non-associative list -`isNonEmptyList($array, $message = '')` | Check that an array is a non-associative list, and not empty -`isMap($array, $message = '')` | Check that an array is associative and has strings as keys -`isNonEmptyMap($array, $message = '')` | Check that an array is associative and has strings as keys, and is not empty - -### Function Assertions - -Method | Description -------------------------------------------- | ----------------------------------------------------------------------------------------------------- -`throws($closure, $class, $message = '')` | Check that a function throws a certain exception. Subclasses of the exception class will be accepted. - -### Collection Assertions - -All of the above assertions can be prefixed with `all*()` to test the contents -of an array or a `\Traversable`: - -```php -Assert::allIsInstanceOf($employees, 'Acme\Employee'); -``` - -### Nullable Assertions - -All of the above assertions can be prefixed with `nullOr*()` to run the -assertion only if it the value is not `null`: - -```php -Assert::nullOrString($middleName, 'The middle name must be a string or null. Got: %s'); -``` - -### Extending Assert - -The `Assert` class comes with a few methods, which can be overridden to change the class behaviour. You can also extend it to -add your own assertions. - -#### Overriding methods - -Overriding the following methods in your assertion class allows you to change the behaviour of the assertions: - -* `public static function __callStatic($name, $arguments)` - * This method is used to 'create' the `nullOr` and `all` versions of the assertions. -* `protected static function valueToString($value)` - * This method is used for error messages, to convert the value to a string value for displaying. You could use this for representing a value object with a `__toString` method for example. -* `protected static function typeToString($value)` - * This method is used for error messages, to convert the a value to a string representing its type. -* `protected static function strlen($value)` - * This method is used to calculate string length for relevant methods, using the `mb_strlen` if available and useful. -* `protected static function reportInvalidArgument($message)` - * This method is called when an assertion fails, with the specified error message. Here you can throw your own exception, or log something. - -## Static analysis support - -Where applicable, assertion functions are annotated to support Psalm's -[Assertion syntax](https://psalm.dev/docs/annotating_code/assertion_syntax/). -A dedicated [PHPStan Plugin](https://github.com/phpstan/phpstan-webmozart-assert) is -required for proper type support. - -Authors -------- - -* [Bernhard Schussek] a.k.a. [@webmozart] -* [The Community Contributors] - -Contribute ----------- - -Contributions to the package are always welcome! - -* Report any bugs or issues you find on the [issue tracker]. -* You can grab the source code at the package's [Git repository]. - -License -------- - -All contents of this package are licensed under the [MIT license]. - -[beberlei/assert]: https://github.com/beberlei/assert -[assert package]: https://github.com/beberlei/assert -[Composer]: https://getcomposer.org -[Bernhard Schussek]: https://webmozarts.com -[The Community Contributors]: https://github.com/webmozart/assert/graphs/contributors -[issue tracker]: https://github.com/webmozart/assert/issues -[Git repository]: https://github.com/webmozart/assert -[@webmozart]: https://twitter.com/webmozart -[MIT license]: LICENSE -[`Assert`]: src/Assert.php diff --git a/www/vendor/webmozart/assert/composer.json b/www/vendor/webmozart/assert/composer.json deleted file mode 100644 index cfae60e5..00000000 --- a/www/vendor/webmozart/assert/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "webmozart/assert", - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "license": "MIT", - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Webmozart\\Assert\\Tests\\": "tests/", - "Webmozart\\Assert\\Bin\\": "bin/src" - } - } -} diff --git a/www/vendor/webmozart/assert/psalm.xml b/www/vendor/webmozart/assert/psalm.xml deleted file mode 100644 index 9a430081..00000000 --- a/www/vendor/webmozart/assert/psalm.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/www/vendor/webmozart/assert/src/Assert.php b/www/vendor/webmozart/assert/src/Assert.php deleted file mode 100644 index e0fbabc8..00000000 --- a/www/vendor/webmozart/assert/src/Assert.php +++ /dev/null @@ -1,2066 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Webmozart\Assert; - -use ArrayAccess; -use BadMethodCallException; -use Closure; -use Countable; -use DateTime; -use DateTimeImmutable; -use Exception; -use ResourceBundle; -use SimpleXMLElement; -use Throwable; -use Traversable; - -/** - * Efficient assertions to validate the input/output of your methods. - * - * @since 1.0 - * - * @author Bernhard Schussek - */ -class Assert -{ - use Mixin; - - /** - * @psalm-pure - * @psalm-assert string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function string($value, $message = '') - { - if (!\is_string($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a string. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function stringNotEmpty($value, $message = '') - { - static::string($value, $message); - static::notEq($value, '', $message); - } - - /** - * @psalm-pure - * @psalm-assert int $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function integer($value, $message = '') - { - if (!\is_int($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an integer. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function integerish($value, $message = '') - { - if (!\is_numeric($value) || $value != (int) $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an integerish value. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function positiveInteger($value, $message = '') - { - if (!(\is_int($value) && $value > 0)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a positive integer. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert float $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function float($value, $message = '') - { - if (!\is_float($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a float. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function numeric($value, $message = '') - { - if (!\is_numeric($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a numeric. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int|0 $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function natural($value, $message = '') - { - if (!\is_int($value) || $value < 0) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-negative integer. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert bool $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function boolean($value, $message = '') - { - if (!\is_bool($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a boolean. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert scalar $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function scalar($value, $message = '') - { - if (!\is_scalar($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a scalar. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert object $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function object($value, $message = '') - { - if (!\is_object($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an object. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert resource $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function resource($value, $type = null, $message = '') - { - if (!\is_resource($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a resource. Got: %s', - static::typeToString($value) - )); - } - - if ($type && $type !== \get_resource_type($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a resource of type %2$s. Got: %s', - static::typeToString($value), - $type - )); - } - } - - /** - * @psalm-pure - * @psalm-assert callable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isCallable($value, $message = '') - { - if (!\is_callable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a callable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert array $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isArray($value, $message = '') - { - if (!\is_array($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isTraversable($value, $message = '') - { - @\trigger_error( - \sprintf( - 'The "%s" assertion is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "isIterable" or "isInstanceOf" instead.', - __METHOD__ - ), - \E_USER_DEPRECATED - ); - - if (!\is_array($value) && !($value instanceof Traversable)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a traversable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert array|ArrayAccess $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isArrayAccessible($value, $message = '') - { - if (!\is_array($value) && !($value instanceof ArrayAccess)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array accessible. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert countable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isCountable($value, $message = '') - { - if ( - !\is_array($value) - && !($value instanceof Countable) - && !($value instanceof ResourceBundle) - && !($value instanceof SimpleXMLElement) - ) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a countable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isIterable($value, $message = '') - { - if (!\is_array($value) && !($value instanceof Traversable)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an iterable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isInstanceOf($value, $class, $message = '') - { - if (!($value instanceof $class)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance of %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert !ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notInstanceOf($value, $class, $message = '') - { - if ($value instanceof $class) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance other than %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isInstanceOfAny($value, array $classes, $message = '') - { - foreach ($classes as $class) { - if ($value instanceof $class) { - return; - } - } - - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance of any of %2$s. Got: %s', - static::typeToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $classes)) - )); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string $value - * - * @param object|string $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isAOf($value, $class, $message = '') - { - static::string($class, 'Expected class as a string. Got: %s'); - - if (!\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * @psalm-assert !UnexpectedType $value - * @psalm-assert !class-string $value - * - * @param object|string $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNotA($value, $class, $message = '') - { - static::string($class, 'Expected class as a string. Got: %s'); - - if (\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param object|string $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isAnyOf($value, array $classes, $message = '') - { - foreach ($classes as $class) { - static::string($class, 'Expected class as a string. Got: %s'); - - if (\is_a($value, $class, \is_string($value))) { - return; - } - } - - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s', - static::typeToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $classes)) - )); - } - - /** - * @psalm-pure - * @psalm-assert empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isEmpty($value, $message = '') - { - if (!empty($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an empty value. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEmpty($value, $message = '') - { - if (empty($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-empty value. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function null($value, $message = '') - { - if (null !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected null. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notNull($value, $message = '') - { - if (null === $value) { - static::reportInvalidArgument( - $message ?: 'Expected a value other than null.' - ); - } - } - - /** - * @psalm-pure - * @psalm-assert true $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function true($value, $message = '') - { - if (true !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be true. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert false $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function false($value, $message = '') - { - if (false !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be false. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !false $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notFalse($value, $message = '') - { - if (false === $value) { - static::reportInvalidArgument( - $message ?: 'Expected a value other than false.' - ); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ip($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IP. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ipv4($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IPv4. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ipv6($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IPv6. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function email($value, $message = '') - { - if (false === \filter_var($value, FILTER_VALIDATE_EMAIL)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be a valid e-mail address. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. - * - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function uniqueValues(array $values, $message = '') - { - $allValues = \count($values); - $uniqueValues = \count(\array_unique($values)); - - if ($allValues !== $uniqueValues) { - $difference = $allValues - $uniqueValues; - - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array of unique values, but %s of them %s duplicated', - $difference, - (1 === $difference ? 'is' : 'are') - )); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function eq($value, $expect, $message = '') - { - if ($expect != $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($expect) - )); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEq($value, $expect, $message = '') - { - if ($expect == $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a different value than %s.', - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function same($value, $expect, $message = '') - { - if ($expect !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value identical to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notSame($value, $expect, $message = '') - { - if ($expect === $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not identical to %s.', - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function greaterThan($value, $limit, $message = '') - { - if ($value <= $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value greater than %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function greaterThanEq($value, $limit, $message = '') - { - if ($value < $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value greater than or equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lessThan($value, $limit, $message = '') - { - if ($value >= $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value less than %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lessThanEq($value, $limit, $message = '') - { - if ($value > $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value less than or equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * Inclusive range, so Assert::(3, 3, 5) passes. - * - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function range($value, $min, $max, $message = '') - { - if ($value < $min || $value > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value between %2$s and %3$s. Got: %s', - static::valueToString($value), - static::valueToString($min), - static::valueToString($max) - )); - } - } - - /** - * A more human-readable alias of Assert::inArray(). - * - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function oneOf($value, array $values, $message = '') - { - static::inArray($value, $values, $message); - } - - /** - * Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. - * - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function inArray($value, array $values, $message = '') - { - if (!\in_array($value, $values, true)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected one of: %2$s. Got: %s', - static::valueToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $values)) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function contains($value, $subString, $message = '') - { - if (false === \strpos($value, $subString)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain %2$s. Got: %s', - static::valueToString($value), - static::valueToString($subString) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notContains($value, $subString, $message = '') - { - if (false !== \strpos($value, $subString)) { - static::reportInvalidArgument(\sprintf( - $message ?: '%2$s was not expected to be contained in a value. Got: %s', - static::valueToString($value), - static::valueToString($subString) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notWhitespaceOnly($value, $message = '') - { - if (\preg_match('/^\s*$/', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-whitespace string. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function startsWith($value, $prefix, $message = '') - { - if (0 !== \strpos($value, $prefix)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to start with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($prefix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notStartsWith($value, $prefix, $message = '') - { - if (0 === \strpos($value, $prefix)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not to start with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($prefix) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function startsWithLetter($value, $message = '') - { - static::string($value); - - $valid = isset($value[0]); - - if ($valid) { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = \ctype_alpha($value[0]); - \setlocale(LC_CTYPE, $locale); - } - - if (!$valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to start with a letter. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function endsWith($value, $suffix, $message = '') - { - if ($suffix !== \substr($value, -\strlen($suffix))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to end with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($suffix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEndsWith($value, $suffix, $message = '') - { - if ($suffix === \substr($value, -\strlen($suffix))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not to end with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($suffix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function regex($value, $pattern, $message = '') - { - if (!\preg_match($pattern, $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The value %s does not match the expected pattern.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notRegex($value, $pattern, $message = '') - { - if (\preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The value %s matches the pattern %s (at offset %d).', - static::valueToString($value), - static::valueToString($pattern), - $matches[0][1] - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function unicodeLetters($value, $message = '') - { - static::string($value); - - if (!\preg_match('/^\p{L}+$/u', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain only Unicode letters. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function alpha($value, $message = '') - { - static::string($value); - - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_alpha($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain only letters. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function digits($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_digit($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain digits only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function alnum($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_alnum($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain letters and digits only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert lowercase-string $value - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lower($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_lower($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain lowercase characters only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !lowercase-string $value - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function upper($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_upper($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain uppercase characters only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function length($value, $length, $message = '') - { - if ($length !== static::strlen($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain %2$s characters. Got: %s', - static::valueToString($value), - $length - )); - } - } - - /** - * Inclusive min. - * - * @psalm-pure - * - * @param string $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function minLength($value, $min, $message = '') - { - if (static::strlen($value) < $min) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain at least %2$s characters. Got: %s', - static::valueToString($value), - $min - )); - } - } - - /** - * Inclusive max. - * - * @psalm-pure - * - * @param string $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function maxLength($value, $max, $message = '') - { - if (static::strlen($value) > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain at most %2$s characters. Got: %s', - static::valueToString($value), - $max - )); - } - } - - /** - * Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. - * - * @psalm-pure - * - * @param string $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lengthBetween($value, $min, $max, $message = '') - { - $length = static::strlen($value); - - if ($length < $min || $length > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s', - static::valueToString($value), - $min, - $max - )); - } - } - - /** - * Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function fileExists($value, $message = '') - { - static::string($value); - - if (!\file_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The file %s does not exist.', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function file($value, $message = '') - { - static::fileExists($value, $message); - - if (!\is_file($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not a file.', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function directory($value, $message = '') - { - static::fileExists($value, $message); - - if (!\is_dir($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is no directory.', - static::valueToString($value) - )); - } - } - - /** - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function readable($value, $message = '') - { - if (!\is_readable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not readable.', - static::valueToString($value) - )); - } - } - - /** - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function writable($value, $message = '') - { - if (!\is_writable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not writable.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-assert class-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function classExists($value, $message = '') - { - if (!\class_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an existing class name. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert class-string|ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function subclassOf($value, $class, $message = '') - { - if (!\is_subclass_of($value, $class)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a sub-class of %2$s. Got: %s', - static::valueToString($value), - static::valueToString($class) - )); - } - } - - /** - * @psalm-assert class-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function interfaceExists($value, $message = '') - { - if (!\interface_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an existing interface name. got %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert class-string $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function implementsInterface($value, $interface, $message = '') - { - if (!\in_array($interface, \class_implements($value))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an implementation of %2$s. Got: %s', - static::valueToString($value), - static::valueToString($interface) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function propertyExists($classOrObject, $property, $message = '') - { - if (!\property_exists($classOrObject, $property)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the property %s to exist.', - static::valueToString($property) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function propertyNotExists($classOrObject, $property, $message = '') - { - if (\property_exists($classOrObject, $property)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the property %s to not exist.', - static::valueToString($property) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function methodExists($classOrObject, $method, $message = '') - { - if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the method %s to exist.', - static::valueToString($method) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function methodNotExists($classOrObject, $method, $message = '') - { - if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the method %s to not exist.', - static::valueToString($method) - )); - } - } - - /** - * @psalm-pure - * - * @param array $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function keyExists($array, $key, $message = '') - { - if (!(isset($array[$key]) || \array_key_exists($key, $array))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the key %s to exist.', - static::valueToString($key) - )); - } - } - - /** - * @psalm-pure - * - * @param array $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function keyNotExists($array, $key, $message = '') - { - if (isset($array[$key]) || \array_key_exists($key, $array)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the key %s to not exist.', - static::valueToString($key) - )); - } - } - - /** - * Checks if a value is a valid array key (int or string). - * - * @psalm-pure - * @psalm-assert array-key $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function validArrayKey($value, $message = '') - { - if (!(\is_int($value) || \is_string($value))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected string or integer. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function count($array, $number, $message = '') - { - static::eq( - \count($array), - $number, - \sprintf( - $message ?: 'Expected an array to contain %d elements. Got: %d.', - $number, - \count($array) - ) - ); - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function minCount($array, $min, $message = '') - { - if (\count($array) < $min) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain at least %2$d elements. Got: %d', - \count($array), - $min - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function maxCount($array, $max, $message = '') - { - if (\count($array) > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain at most %2$d elements. Got: %d', - \count($array), - $max - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function countBetween($array, $min, $max, $message = '') - { - $count = \count($array); - - if ($count < $min || $count > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain between %2$d and %3$d elements. Got: %d', - $count, - $min, - $max - )); - } - } - - /** - * @psalm-pure - * @psalm-assert list $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isList($array, $message = '') - { - if (!\is_array($array) || $array !== \array_values($array)) { - static::reportInvalidArgument( - $message ?: 'Expected list - non-associative array.' - ); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-list $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNonEmptyList($array, $message = '') - { - static::isList($array, $message); - static::notEmpty($array, $message); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array $array - * @psalm-assert array $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isMap($array, $message = '') - { - if ( - !\is_array($array) || - \array_keys($array) !== \array_filter(\array_keys($array), '\is_string') - ) { - static::reportInvalidArgument( - $message ?: 'Expected map - associative array with string keys.' - ); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array $array - * @psalm-assert array $array - * @psalm-assert !empty $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNonEmptyMap($array, $message = '') - { - static::isMap($array, $message); - static::notEmpty($array, $message); - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function uuid($value, $message = '') - { - $value = \str_replace(array('urn:', 'uuid:', '{', '}'), '', $value); - - // The nil UUID is special form of UUID that is specified to have all - // 128 bits set to zero. - if ('00000000-0000-0000-0000-000000000000' === $value) { - return; - } - - if (!\preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Value %s is not a valid UUID.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-param class-string $class - * - * @param Closure $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function throws(Closure $expression, $class = 'Exception', $message = '') - { - static::string($class); - - $actual = 'none'; - - try { - $expression(); - } catch (Exception $e) { - $actual = \get_class($e); - if ($e instanceof $class) { - return; - } - } catch (Throwable $e) { - $actual = \get_class($e); - if ($e instanceof $class) { - return; - } - } - - static::reportInvalidArgument($message ?: \sprintf( - 'Expected to throw "%s", got "%s"', - $class, - $actual - )); - } - - /** - * @throws BadMethodCallException - */ - public static function __callStatic($name, $arguments) - { - if ('nullOr' === \substr($name, 0, 6)) { - if (null !== $arguments[0]) { - $method = \lcfirst(\substr($name, 6)); - \call_user_func_array(array('static', $method), $arguments); - } - - return; - } - - if ('all' === \substr($name, 0, 3)) { - static::isIterable($arguments[0]); - - $method = \lcfirst(\substr($name, 3)); - $args = $arguments; - - foreach ($arguments[0] as $entry) { - $args[0] = $entry; - - \call_user_func_array(array('static', $method), $args); - } - - return; - } - - throw new BadMethodCallException('No such method: '.$name); - } - - /** - * @param mixed $value - * - * @return string - */ - protected static function valueToString($value) - { - if (null === $value) { - return 'null'; - } - - if (true === $value) { - return 'true'; - } - - if (false === $value) { - return 'false'; - } - - if (\is_array($value)) { - return 'array'; - } - - if (\is_object($value)) { - if (\method_exists($value, '__toString')) { - return \get_class($value).': '.self::valueToString($value->__toString()); - } - - if ($value instanceof DateTime || $value instanceof DateTimeImmutable) { - return \get_class($value).': '.self::valueToString($value->format('c')); - } - - return \get_class($value); - } - - if (\is_resource($value)) { - return 'resource'; - } - - if (\is_string($value)) { - return '"'.$value.'"'; - } - - return (string) $value; - } - - /** - * @param mixed $value - * - * @return string - */ - protected static function typeToString($value) - { - return \is_object($value) ? \get_class($value) : \gettype($value); - } - - protected static function strlen($value) - { - if (!\function_exists('mb_detect_encoding')) { - return \strlen($value); - } - - if (false === $encoding = \mb_detect_encoding($value)) { - return \strlen($value); - } - - return \mb_strlen($value, $encoding); - } - - /** - * @param string $message - * - * @throws InvalidArgumentException - * - * @psalm-pure this method is not supposed to perform side-effects - */ - protected static function reportInvalidArgument($message) - { - throw new InvalidArgumentException($message); - } - - private function __construct() - { - } -} diff --git a/www/vendor/webmozart/assert/src/InvalidArgumentException.php b/www/vendor/webmozart/assert/src/InvalidArgumentException.php deleted file mode 100644 index 9d95a58c..00000000 --- a/www/vendor/webmozart/assert/src/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Webmozart\Assert; - -class InvalidArgumentException extends \InvalidArgumentException -{ -} diff --git a/www/vendor/webmozart/assert/src/Mixin.php b/www/vendor/webmozart/assert/src/Mixin.php deleted file mode 100644 index 5e98823d..00000000 --- a/www/vendor/webmozart/assert/src/Mixin.php +++ /dev/null @@ -1,2916 +0,0 @@ - $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allString($value, $message = '') - { - static::__callStatic('allString', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert non-empty-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStringNotEmpty($value, $message = '') - { - static::__callStatic('nullOrStringNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStringNotEmpty($value, $message = '') - { - static::__callStatic('allStringNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert int|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInteger($value, $message = '') - { - static::__callStatic('nullOrInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInteger($value, $message = '') - { - static::__callStatic('allInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert numeric|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIntegerish($value, $message = '') - { - static::__callStatic('nullOrIntegerish', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIntegerish($value, $message = '') - { - static::__callStatic('allIntegerish', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert positive-int|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPositiveInteger($value, $message = '') - { - static::__callStatic('nullOrPositiveInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPositiveInteger($value, $message = '') - { - static::__callStatic('allPositiveInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert float|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFloat($value, $message = '') - { - static::__callStatic('nullOrFloat', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFloat($value, $message = '') - { - static::__callStatic('allFloat', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert numeric|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNumeric($value, $message = '') - { - static::__callStatic('nullOrNumeric', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNumeric($value, $message = '') - { - static::__callStatic('allNumeric', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert positive-int|0|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNatural($value, $message = '') - { - static::__callStatic('nullOrNatural', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNatural($value, $message = '') - { - static::__callStatic('allNatural', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert bool|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrBoolean($value, $message = '') - { - static::__callStatic('nullOrBoolean', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allBoolean($value, $message = '') - { - static::__callStatic('allBoolean', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert scalar|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrScalar($value, $message = '') - { - static::__callStatic('nullOrScalar', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allScalar($value, $message = '') - { - static::__callStatic('allScalar', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert object|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrObject($value, $message = '') - { - static::__callStatic('nullOrObject', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allObject($value, $message = '') - { - static::__callStatic('allObject', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert resource|null $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrResource($value, $type = null, $message = '') - { - static::__callStatic('nullOrResource', array($value, $type, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allResource($value, $type = null, $message = '') - { - static::__callStatic('allResource', array($value, $type, $message)); - } - - /** - * @psalm-pure - * @psalm-assert callable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsCallable($value, $message = '') - { - static::__callStatic('nullOrIsCallable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsCallable($value, $message = '') - { - static::__callStatic('allIsCallable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert array|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsArray($value, $message = '') - { - static::__callStatic('nullOrIsArray', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsArray($value, $message = '') - { - static::__callStatic('allIsArray', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable|null $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsTraversable($value, $message = '') - { - static::__callStatic('nullOrIsTraversable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsTraversable($value, $message = '') - { - static::__callStatic('allIsTraversable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert array|ArrayAccess|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsArrayAccessible($value, $message = '') - { - static::__callStatic('nullOrIsArrayAccessible', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsArrayAccessible($value, $message = '') - { - static::__callStatic('allIsArrayAccessible', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert countable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsCountable($value, $message = '') - { - static::__callStatic('nullOrIsCountable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsCountable($value, $message = '') - { - static::__callStatic('allIsCountable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsIterable($value, $message = '') - { - static::__callStatic('nullOrIsIterable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsIterable($value, $message = '') - { - static::__callStatic('allIsIterable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|null $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsInstanceOf($value, $class, $message = '') - { - static::__callStatic('nullOrIsInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsInstanceOf($value, $class, $message = '') - { - static::__callStatic('allIsInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotInstanceOf($value, $class, $message = '') - { - static::__callStatic('nullOrNotInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotInstanceOf($value, $class, $message = '') - { - static::__callStatic('allNotInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsInstanceOfAny($value, $classes, $message = '') - { - static::__callStatic('nullOrIsInstanceOfAny', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsInstanceOfAny($value, $classes, $message = '') - { - static::__callStatic('allIsInstanceOfAny', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string|null $value - * - * @param object|string|null $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsAOf($value, $class, $message = '') - { - static::__callStatic('nullOrIsAOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable> $value - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsAOf($value, $class, $message = '') - { - static::__callStatic('allIsAOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * - * @param object|string|null $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNotA($value, $class, $message = '') - { - static::__callStatic('nullOrIsNotA', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNotA($value, $class, $message = '') - { - static::__callStatic('allIsNotA', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param object|string|null $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsAnyOf($value, $classes, $message = '') - { - static::__callStatic('nullOrIsAnyOf', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param iterable $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsAnyOf($value, $classes, $message = '') - { - static::__callStatic('allIsAnyOf', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-assert empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsEmpty($value, $message = '') - { - static::__callStatic('nullOrIsEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsEmpty($value, $message = '') - { - static::__callStatic('allIsEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEmpty($value, $message = '') - { - static::__callStatic('nullOrNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEmpty($value, $message = '') - { - static::__callStatic('allNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNull($value, $message = '') - { - static::__callStatic('allNull', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotNull($value, $message = '') - { - static::__callStatic('allNotNull', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert true|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrTrue($value, $message = '') - { - static::__callStatic('nullOrTrue', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allTrue($value, $message = '') - { - static::__callStatic('allTrue', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert false|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFalse($value, $message = '') - { - static::__callStatic('nullOrFalse', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFalse($value, $message = '') - { - static::__callStatic('allFalse', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotFalse($value, $message = '') - { - static::__callStatic('nullOrNotFalse', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotFalse($value, $message = '') - { - static::__callStatic('allNotFalse', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIp($value, $message = '') - { - static::__callStatic('nullOrIp', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIp($value, $message = '') - { - static::__callStatic('allIp', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIpv4($value, $message = '') - { - static::__callStatic('nullOrIpv4', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIpv4($value, $message = '') - { - static::__callStatic('allIpv4', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIpv6($value, $message = '') - { - static::__callStatic('nullOrIpv6', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIpv6($value, $message = '') - { - static::__callStatic('allIpv6', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEmail($value, $message = '') - { - static::__callStatic('nullOrEmail', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEmail($value, $message = '') - { - static::__callStatic('allEmail', array($value, $message)); - } - - /** - * @param array|null $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUniqueValues($values, $message = '') - { - static::__callStatic('nullOrUniqueValues', array($values, $message)); - } - - /** - * @param iterable $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUniqueValues($values, $message = '') - { - static::__callStatic('allUniqueValues', array($values, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEq($value, $expect, $message = '') - { - static::__callStatic('nullOrEq', array($value, $expect, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEq($value, $expect, $message = '') - { - static::__callStatic('allEq', array($value, $expect, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEq($value, $expect, $message = '') - { - static::__callStatic('nullOrNotEq', array($value, $expect, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEq($value, $expect, $message = '') - { - static::__callStatic('allNotEq', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrSame($value, $expect, $message = '') - { - static::__callStatic('nullOrSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allSame($value, $expect, $message = '') - { - static::__callStatic('allSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotSame($value, $expect, $message = '') - { - static::__callStatic('nullOrNotSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotSame($value, $expect, $message = '') - { - static::__callStatic('allNotSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrGreaterThan($value, $limit, $message = '') - { - static::__callStatic('nullOrGreaterThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allGreaterThan($value, $limit, $message = '') - { - static::__callStatic('allGreaterThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrGreaterThanEq($value, $limit, $message = '') - { - static::__callStatic('nullOrGreaterThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allGreaterThanEq($value, $limit, $message = '') - { - static::__callStatic('allGreaterThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLessThan($value, $limit, $message = '') - { - static::__callStatic('nullOrLessThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLessThan($value, $limit, $message = '') - { - static::__callStatic('allLessThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLessThanEq($value, $limit, $message = '') - { - static::__callStatic('nullOrLessThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLessThanEq($value, $limit, $message = '') - { - static::__callStatic('allLessThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrRange($value, $min, $max, $message = '') - { - static::__callStatic('nullOrRange', array($value, $min, $max, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allRange($value, $min, $max, $message = '') - { - static::__callStatic('allRange', array($value, $min, $max, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrOneOf($value, $values, $message = '') - { - static::__callStatic('nullOrOneOf', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allOneOf($value, $values, $message = '') - { - static::__callStatic('allOneOf', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInArray($value, $values, $message = '') - { - static::__callStatic('nullOrInArray', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInArray($value, $values, $message = '') - { - static::__callStatic('allInArray', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrContains($value, $subString, $message = '') - { - static::__callStatic('nullOrContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allContains($value, $subString, $message = '') - { - static::__callStatic('allContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotContains($value, $subString, $message = '') - { - static::__callStatic('nullOrNotContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotContains($value, $subString, $message = '') - { - static::__callStatic('allNotContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotWhitespaceOnly($value, $message = '') - { - static::__callStatic('nullOrNotWhitespaceOnly', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotWhitespaceOnly($value, $message = '') - { - static::__callStatic('allNotWhitespaceOnly', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStartsWith($value, $prefix, $message = '') - { - static::__callStatic('nullOrStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStartsWith($value, $prefix, $message = '') - { - static::__callStatic('allStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotStartsWith($value, $prefix, $message = '') - { - static::__callStatic('nullOrNotStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotStartsWith($value, $prefix, $message = '') - { - static::__callStatic('allNotStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStartsWithLetter($value, $message = '') - { - static::__callStatic('nullOrStartsWithLetter', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStartsWithLetter($value, $message = '') - { - static::__callStatic('allStartsWithLetter', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEndsWith($value, $suffix, $message = '') - { - static::__callStatic('nullOrEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEndsWith($value, $suffix, $message = '') - { - static::__callStatic('allEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEndsWith($value, $suffix, $message = '') - { - static::__callStatic('nullOrNotEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEndsWith($value, $suffix, $message = '') - { - static::__callStatic('allNotEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrRegex($value, $pattern, $message = '') - { - static::__callStatic('nullOrRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allRegex($value, $pattern, $message = '') - { - static::__callStatic('allRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotRegex($value, $pattern, $message = '') - { - static::__callStatic('nullOrNotRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotRegex($value, $pattern, $message = '') - { - static::__callStatic('allNotRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUnicodeLetters($value, $message = '') - { - static::__callStatic('nullOrUnicodeLetters', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUnicodeLetters($value, $message = '') - { - static::__callStatic('allUnicodeLetters', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrAlpha($value, $message = '') - { - static::__callStatic('nullOrAlpha', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allAlpha($value, $message = '') - { - static::__callStatic('allAlpha', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrDigits($value, $message = '') - { - static::__callStatic('nullOrDigits', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allDigits($value, $message = '') - { - static::__callStatic('allDigits', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrAlnum($value, $message = '') - { - static::__callStatic('nullOrAlnum', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allAlnum($value, $message = '') - { - static::__callStatic('allAlnum', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert lowercase-string|null $value - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLower($value, $message = '') - { - static::__callStatic('nullOrLower', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLower($value, $message = '') - { - static::__callStatic('allLower', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUpper($value, $message = '') - { - static::__callStatic('nullOrUpper', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUpper($value, $message = '') - { - static::__callStatic('allUpper', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLength($value, $length, $message = '') - { - static::__callStatic('nullOrLength', array($value, $length, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLength($value, $length, $message = '') - { - static::__callStatic('allLength', array($value, $length, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMinLength($value, $min, $message = '') - { - static::__callStatic('nullOrMinLength', array($value, $min, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMinLength($value, $min, $message = '') - { - static::__callStatic('allMinLength', array($value, $min, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMaxLength($value, $max, $message = '') - { - static::__callStatic('nullOrMaxLength', array($value, $max, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMaxLength($value, $max, $message = '') - { - static::__callStatic('allMaxLength', array($value, $max, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLengthBetween($value, $min, $max, $message = '') - { - static::__callStatic('nullOrLengthBetween', array($value, $min, $max, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLengthBetween($value, $min, $max, $message = '') - { - static::__callStatic('allLengthBetween', array($value, $min, $max, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFileExists($value, $message = '') - { - static::__callStatic('nullOrFileExists', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFileExists($value, $message = '') - { - static::__callStatic('allFileExists', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFile($value, $message = '') - { - static::__callStatic('nullOrFile', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFile($value, $message = '') - { - static::__callStatic('allFile', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrDirectory($value, $message = '') - { - static::__callStatic('nullOrDirectory', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allDirectory($value, $message = '') - { - static::__callStatic('allDirectory', array($value, $message)); - } - - /** - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrReadable($value, $message = '') - { - static::__callStatic('nullOrReadable', array($value, $message)); - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allReadable($value, $message = '') - { - static::__callStatic('allReadable', array($value, $message)); - } - - /** - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrWritable($value, $message = '') - { - static::__callStatic('nullOrWritable', array($value, $message)); - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allWritable($value, $message = '') - { - static::__callStatic('allWritable', array($value, $message)); - } - - /** - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrClassExists($value, $message = '') - { - static::__callStatic('nullOrClassExists', array($value, $message)); - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allClassExists($value, $message = '') - { - static::__callStatic('allClassExists', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert class-string|ExpectedType|null $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrSubclassOf($value, $class, $message = '') - { - static::__callStatic('nullOrSubclassOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable|ExpectedType> $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allSubclassOf($value, $class, $message = '') - { - static::__callStatic('allSubclassOf', array($value, $class, $message)); - } - - /** - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInterfaceExists($value, $message = '') - { - static::__callStatic('nullOrInterfaceExists', array($value, $message)); - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInterfaceExists($value, $message = '') - { - static::__callStatic('allInterfaceExists', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrImplementsInterface($value, $interface, $message = '') - { - static::__callStatic('nullOrImplementsInterface', array($value, $interface, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert iterable> $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allImplementsInterface($value, $interface, $message = '') - { - static::__callStatic('allImplementsInterface', array($value, $interface, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPropertyExists($classOrObject, $property, $message = '') - { - static::__callStatic('nullOrPropertyExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPropertyExists($classOrObject, $property, $message = '') - { - static::__callStatic('allPropertyExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPropertyNotExists($classOrObject, $property, $message = '') - { - static::__callStatic('nullOrPropertyNotExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPropertyNotExists($classOrObject, $property, $message = '') - { - static::__callStatic('allPropertyNotExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMethodExists($classOrObject, $method, $message = '') - { - static::__callStatic('nullOrMethodExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMethodExists($classOrObject, $method, $message = '') - { - static::__callStatic('allMethodExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMethodNotExists($classOrObject, $method, $message = '') - { - static::__callStatic('nullOrMethodNotExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMethodNotExists($classOrObject, $method, $message = '') - { - static::__callStatic('allMethodNotExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * - * @param array|null $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrKeyExists($array, $key, $message = '') - { - static::__callStatic('nullOrKeyExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allKeyExists($array, $key, $message = '') - { - static::__callStatic('allKeyExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * - * @param array|null $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrKeyNotExists($array, $key, $message = '') - { - static::__callStatic('nullOrKeyNotExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allKeyNotExists($array, $key, $message = '') - { - static::__callStatic('allKeyNotExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * @psalm-assert array-key|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrValidArrayKey($value, $message = '') - { - static::__callStatic('nullOrValidArrayKey', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allValidArrayKey($value, $message = '') - { - static::__callStatic('allValidArrayKey', array($value, $message)); - } - - /** - * @param Countable|array|null $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrCount($array, $number, $message = '') - { - static::__callStatic('nullOrCount', array($array, $number, $message)); - } - - /** - * @param iterable $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allCount($array, $number, $message = '') - { - static::__callStatic('allCount', array($array, $number, $message)); - } - - /** - * @param Countable|array|null $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMinCount($array, $min, $message = '') - { - static::__callStatic('nullOrMinCount', array($array, $min, $message)); - } - - /** - * @param iterable $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMinCount($array, $min, $message = '') - { - static::__callStatic('allMinCount', array($array, $min, $message)); - } - - /** - * @param Countable|array|null $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMaxCount($array, $max, $message = '') - { - static::__callStatic('nullOrMaxCount', array($array, $max, $message)); - } - - /** - * @param iterable $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMaxCount($array, $max, $message = '') - { - static::__callStatic('allMaxCount', array($array, $max, $message)); - } - - /** - * @param Countable|array|null $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrCountBetween($array, $min, $max, $message = '') - { - static::__callStatic('nullOrCountBetween', array($array, $min, $max, $message)); - } - - /** - * @param iterable $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allCountBetween($array, $min, $max, $message = '') - { - static::__callStatic('allCountBetween', array($array, $min, $max, $message)); - } - - /** - * @psalm-pure - * @psalm-assert list|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsList($array, $message = '') - { - static::__callStatic('nullOrIsList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsList($array, $message = '') - { - static::__callStatic('allIsList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-assert non-empty-list|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNonEmptyList($array, $message = '') - { - static::__callStatic('nullOrIsNonEmptyList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNonEmptyList($array, $message = '') - { - static::__callStatic('allIsNonEmptyList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array|null $array - * @psalm-assert array|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsMap($array, $message = '') - { - static::__callStatic('nullOrIsMap', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable> $array - * @psalm-assert iterable> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsMap($array, $message = '') - { - static::__callStatic('allIsMap', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNonEmptyMap($array, $message = '') - { - static::__callStatic('nullOrIsNonEmptyMap', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNonEmptyMap($array, $message = '') - { - static::__callStatic('allIsNonEmptyMap', array($array, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUuid($value, $message = '') - { - static::__callStatic('nullOrUuid', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUuid($value, $message = '') - { - static::__callStatic('allUuid', array($value, $message)); - } - - /** - * @psalm-param class-string $class - * - * @param Closure|null $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrThrows($expression, $class = 'Exception', $message = '') - { - static::__callStatic('nullOrThrows', array($expression, $class, $message)); - } - - /** - * @psalm-param class-string $class - * - * @param iterable $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allThrows($expression, $class = 'Exception', $message = '') - { - static::__callStatic('allThrows', array($expression, $class, $message)); - } -}