From 755eda01ea6b9c696024a5da30c960e909b17282 Mon Sep 17 00:00:00 2001 From: Arab Hossain Date: Sat, 12 Oct 2019 17:19:03 +0600 Subject: [PATCH] removed unnessaray files --- gitignore => .gitignore | 0 .idea/misc.xml | 6 - .idea/modules.xml | 8 - .idea/php-card-detector.iml | 40 - .idea/php-test-framework.xml | 14 - .idea/php.xml | 43 - .idea/vcs.xml | 6 - .idea/workspace.xml | 433 --- composer.lock | 1537 -------- vendor/autoload.php | 7 - vendor/bin/phpunit | 1 - vendor/composer/ClassLoader.php | 445 --- vendor/composer/LICENSE | 56 - vendor/composer/autoload_classmap.php | 584 --- vendor/composer/autoload_files.php | 11 - vendor/composer/autoload_namespaces.php | 9 - vendor/composer/autoload_psr4.php | 16 - vendor/composer/autoload_real.php | 70 - vendor/composer/autoload_static.php | 662 ---- vendor/composer/installed.json | 1577 -------- .../instantiator/.doctrine-project.json | 26 - vendor/doctrine/instantiator/CONTRIBUTING.md | 35 - vendor/doctrine/instantiator/LICENSE | 19 - vendor/doctrine/instantiator/README.md | 39 - vendor/doctrine/instantiator/composer.json | 47 - .../doctrine/instantiator/docs/en/index.rst | 68 - .../doctrine/instantiator/docs/en/sidebar.rst | 4 - vendor/doctrine/instantiator/phpbench.json | 4 - vendor/doctrine/instantiator/phpcs.xml.dist | 35 - .../doctrine/instantiator/phpstan.neon.dist | 19 - .../Exception/ExceptionInterface.php | 12 - .../Exception/InvalidArgumentException.php | 37 - .../Exception/UnexpectedValueException.php | 48 - .../Doctrine/Instantiator/Instantiator.php | 198 - .../Instantiator/InstantiatorInterface.php | 20 - vendor/myclabs/deep-copy/LICENSE | 20 - vendor/myclabs/deep-copy/README.md | 376 -- vendor/myclabs/deep-copy/composer.json | 38 - vendor/myclabs/deep-copy/doc/clone.png | Bin 12380 -> 0 bytes vendor/myclabs/deep-copy/doc/deep-clone.png | Bin 14009 -> 0 bytes vendor/myclabs/deep-copy/doc/deep-copy.png | Bin 10895 -> 0 bytes vendor/myclabs/deep-copy/doc/graph.png | Bin 6436 -> 0 bytes .../deep-copy/src/DeepCopy/DeepCopy.php | 289 -- .../src/DeepCopy/Exception/CloneException.php | 9 - .../DeepCopy/Exception/PropertyException.php | 9 - .../Doctrine/DoctrineCollectionFilter.php | 33 - .../DoctrineEmptyCollectionFilter.php | 28 - .../Filter/Doctrine/DoctrineProxyFilter.php | 22 - .../deep-copy/src/DeepCopy/Filter/Filter.php | 18 - .../src/DeepCopy/Filter/KeepFilter.php | 16 - .../src/DeepCopy/Filter/ReplaceFilter.php | 39 - .../src/DeepCopy/Filter/SetNullFilter.php | 24 - .../Matcher/Doctrine/DoctrineProxyMatcher.php | 22 - .../src/DeepCopy/Matcher/Matcher.php | 14 - .../src/DeepCopy/Matcher/PropertyMatcher.php | 39 - .../DeepCopy/Matcher/PropertyNameMatcher.php | 32 - .../DeepCopy/Matcher/PropertyTypeMatcher.php | 46 - .../DeepCopy/Reflection/ReflectionHelper.php | 78 - .../TypeFilter/Date/DateIntervalFilter.php | 33 - .../src/DeepCopy/TypeFilter/ReplaceFilter.php | 30 - .../DeepCopy/TypeFilter/ShallowCopyFilter.php | 17 - .../TypeFilter/Spl/SplDoublyLinkedList.php | 10 - .../Spl/SplDoublyLinkedListFilter.php | 51 - .../src/DeepCopy/TypeFilter/TypeFilter.php | 13 - .../src/DeepCopy/TypeMatcher/TypeMatcher.php | 29 - .../deep-copy/src/DeepCopy/deep_copy.php | 20 - vendor/phar-io/manifest/.gitignore | 7 - vendor/phar-io/manifest/.php_cs | 67 - vendor/phar-io/manifest/.travis.yml | 33 - vendor/phar-io/manifest/LICENSE | 31 - vendor/phar-io/manifest/README.md | 30 - vendor/phar-io/manifest/build.xml | 50 - vendor/phar-io/manifest/composer.json | 42 - vendor/phar-io/manifest/composer.lock | 69 - .../phar-io/manifest/examples/example-01.php | 23 - vendor/phar-io/manifest/phive.xml | 4 - vendor/phar-io/manifest/phpunit.xml | 20 - .../manifest/src/ManifestDocumentMapper.php | 193 - .../phar-io/manifest/src/ManifestLoader.php | 66 - .../manifest/src/ManifestSerializer.php | 163 - .../manifest/src/exceptions/Exception.php | 14 - .../InvalidApplicationNameException.php | 16 - .../src/exceptions/InvalidEmailException.php | 14 - .../src/exceptions/InvalidUrlException.php | 14 - .../exceptions/ManifestDocumentException.php | 6 - .../ManifestDocumentMapperException.php | 6 - .../exceptions/ManifestElementException.php | 6 - .../exceptions/ManifestLoaderException.php | 6 - .../manifest/src/values/Application.php | 20 - .../manifest/src/values/ApplicationName.php | 65 - vendor/phar-io/manifest/src/values/Author.php | 57 - .../manifest/src/values/AuthorCollection.php | 43 - .../src/values/AuthorCollectionIterator.php | 56 - .../manifest/src/values/BundledComponent.php | 48 - .../src/values/BundledComponentCollection.php | 43 - .../BundledComponentCollectionIterator.php | 56 - .../src/values/CopyrightInformation.php | 42 - vendor/phar-io/manifest/src/values/Email.php | 47 - .../phar-io/manifest/src/values/Extension.php | 75 - .../phar-io/manifest/src/values/Library.php | 20 - .../phar-io/manifest/src/values/License.php | 42 - .../phar-io/manifest/src/values/Manifest.php | 138 - .../src/values/PhpExtensionRequirement.php | 32 - .../src/values/PhpVersionRequirement.php | 31 - .../manifest/src/values/Requirement.php | 14 - .../src/values/RequirementCollection.php | 43 - .../values/RequirementCollectionIterator.php | 56 - vendor/phar-io/manifest/src/values/Type.php | 60 - vendor/phar-io/manifest/src/values/Url.php | 47 - .../manifest/src/xml/AuthorElement.php | 21 - .../src/xml/AuthorElementCollection.php | 19 - .../manifest/src/xml/BundlesElement.php | 19 - .../manifest/src/xml/ComponentElement.php | 21 - .../src/xml/ComponentElementCollection.php | 19 - .../manifest/src/xml/ContainsElement.php | 31 - .../manifest/src/xml/CopyrightElement.php | 25 - .../manifest/src/xml/ElementCollection.php | 58 - .../phar-io/manifest/src/xml/ExtElement.php | 17 - .../manifest/src/xml/ExtElementCollection.php | 20 - .../manifest/src/xml/ExtensionElement.php | 21 - .../manifest/src/xml/LicenseElement.php | 21 - .../manifest/src/xml/ManifestDocument.php | 118 - .../xml/ManifestDocumentLoadingException.php | 48 - .../manifest/src/xml/ManifestElement.php | 100 - .../phar-io/manifest/src/xml/PhpElement.php | 27 - .../manifest/src/xml/RequiresElement.php | 19 - .../tests/ManifestDocumentMapperTest.php | 110 - .../manifest/tests/ManifestLoaderTest.php | 83 - .../manifest/tests/ManifestSerializerTest.php | 114 - .../manifest/tests/_fixture/custom.xml | 10 - .../_fixture/extension-invalidcompatible.xml | 13 - .../manifest/tests/_fixture/extension.xml | 13 - .../tests/_fixture/invalidversion.xml | 11 - .../_fixture/invalidversionconstraint.xml | 11 - .../manifest/tests/_fixture/library.xml | 11 - .../manifest/tests/_fixture/manifest.xml | 11 - .../manifest/tests/_fixture/phpunit-5.6.5.xml | 46 - .../phar-io/manifest/tests/_fixture/test.phar | Bin 7165 -> 0 bytes .../ManifestDocumentLoadingExceptionTest.php | 19 - .../tests/values/ApplicationNameTest.php | 57 - .../manifest/tests/values/ApplicationTest.php | 44 - .../tests/values/AuthorCollectionTest.php | 62 - .../manifest/tests/values/AuthorTest.php | 45 - .../values/BundledComponentCollectionTest.php | 63 - .../tests/values/BundledComponentTest.php | 42 - .../tests/values/CopyrightInformationTest.php | 62 - .../manifest/tests/values/EmailTest.php | 35 - .../manifest/tests/values/ExtensionTest.php | 109 - .../manifest/tests/values/LibraryTest.php | 44 - .../manifest/tests/values/LicenseTest.php | 41 - .../manifest/tests/values/ManifestTest.php | 187 - .../values/PhpExtensionRequirementTest.php | 26 - .../values/PhpVersionRequirementTest.php | 38 - .../values/RequirementCollectionTest.php | 63 - .../phar-io/manifest/tests/values/UrlTest.php | 35 - .../tests/xml/AuthorElementCollectionTest.php | 18 - .../manifest/tests/xml/AuthorElementTest.php | 25 - .../manifest/tests/xml/BundlesElementTest.php | 41 - .../xml/ComponentElementCollectionTest.php | 18 - .../tests/xml/ComponentElementTest.php | 25 - .../tests/xml/ContainsElementTest.php | 63 - .../tests/xml/CopyrightElementTest.php | 52 - .../tests/xml/ExtElementCollectionTest.php | 19 - .../manifest/tests/xml/ExtElementTest.php | 21 - .../tests/xml/ExtensionElementTest.php | 25 - .../manifest/tests/xml/LicenseElementTest.php | 25 - .../tests/xml/ManifestDocumentTest.php | 110 - .../manifest/tests/xml/PhpElementTest.php | 48 - .../tests/xml/RequiresElementTest.php | 37 - vendor/phar-io/version/.gitignore | 7 - vendor/phar-io/version/.php_cs | 67 - vendor/phar-io/version/.travis.yml | 33 - vendor/phar-io/version/CHANGELOG.md | 44 - vendor/phar-io/version/LICENSE | 31 - vendor/phar-io/version/README.md | 61 - vendor/phar-io/version/build.xml | 41 - vendor/phar-io/version/composer.json | 34 - vendor/phar-io/version/phive.xml | 5 - vendor/phar-io/version/phpunit.xml | 19 - .../phar-io/version/src/PreReleaseSuffix.php | 95 - vendor/phar-io/version/src/Version.php | 175 - .../version/src/VersionConstraintParser.php | 122 - .../version/src/VersionConstraintValue.php | 123 - vendor/phar-io/version/src/VersionNumber.php | 41 - .../constraints/AbstractVersionConstraint.php | 32 - .../constraints/AndVersionConstraintGroup.php | 43 - .../src/constraints/AnyVersionConstraint.php | 29 - .../constraints/ExactVersionConstraint.php | 22 - .../GreaterThanOrEqualToVersionConstraint.php | 38 - .../constraints/OrVersionConstraintGroup.php | 43 - ...SpecificMajorAndMinorVersionConstraint.php | 48 - .../SpecificMajorVersionConstraint.php | 37 - .../src/constraints/VersionConstraint.php | 26 - .../version/src/exceptions/Exception.php | 14 - .../InvalidPreReleaseSuffixException.php | 7 - .../exceptions/InvalidVersionException.php | 6 - .../UnsupportedVersionConstraintException.php | 14 - .../VersionConstraintParserTest.php | 146 - .../Unit/AbstractVersionConstraintTest.php | 25 - .../Unit/AndVersionConstraintGroupTest.php | 52 - .../tests/Unit/AnyVersionConstraintTest.php | 41 - .../tests/Unit/ExactVersionConstraintTest.php | 58 - ...aterThanOrEqualToVersionConstraintTest.php | 47 - .../Unit/OrVersionConstraintGroupTest.php | 65 - .../tests/Unit/PreReleaseSuffixTest.php | 46 - ...ificMajorAndMinorVersionConstraintTest.php | 45 - .../SpecificMajorVersionConstraintTest.php | 44 - .../version/tests/Unit/VersionTest.php | 113 - .../reflection-common/.scrutinizer.yml | 48 - .../reflection-common/.travis.yml | 53 - .../phpdocumentor/reflection-common/LICENSE | 22 - .../phpdocumentor/reflection-common/README.md | 12 - .../reflection-common/appveyor.yml | 52 - .../reflection-common/composer.json | 29 - .../easy-coding-standard.neon | 17 - .../phpdocumentor/reflection-common/phive.xml | 5 - .../reflection-common/phpmd.xml.dist | 23 - .../reflection-common/phpstan.neon | 0 .../reflection-common/src/Element.php | 31 - .../reflection-common/src/File.php | 36 - .../reflection-common/src/Fqsen.php | 81 - .../reflection-common/src/Location.php | 52 - .../reflection-common/src/Project.php | 26 - .../reflection-common/src/ProjectFactory.php | 31 - .../reflection-docblock/.coveralls.yml | 3 - .../phpdocumentor/reflection-docblock/LICENSE | 21 - .../reflection-docblock/README.md | 67 - .../reflection-docblock/appveyor.yml | 54 - .../reflection-docblock/composer.json | 34 - .../easy-coding-standard.neon | 31 - .../reflection-docblock/src/DocBlock.php | 236 -- .../src/DocBlock/Description.php | 114 - .../src/DocBlock/DescriptionFactory.php | 191 - .../src/DocBlock/ExampleFinder.php | 170 - .../src/DocBlock/Serializer.php | 155 - .../src/DocBlock/StandardTagFactory.php | 319 -- .../reflection-docblock/src/DocBlock/Tag.php | 26 - .../src/DocBlock/TagFactory.php | 93 - .../src/DocBlock/Tags/Author.php | 100 - .../src/DocBlock/Tags/BaseTag.php | 52 - .../src/DocBlock/Tags/Covers.php | 83 - .../src/DocBlock/Tags/Deprecated.php | 97 - .../src/DocBlock/Tags/Example.php | 176 - .../DocBlock/Tags/Factory/StaticMethod.php | 18 - .../src/DocBlock/Tags/Factory/Strategy.php | 18 - .../src/DocBlock/Tags/Formatter.php | 27 - .../Tags/Formatter/AlignFormatter.php | 47 - .../Tags/Formatter/PassthroughFormatter.php | 31 - .../src/DocBlock/Tags/Generic.php | 91 - .../src/DocBlock/Tags/Link.php | 77 - .../src/DocBlock/Tags/Method.php | 242 -- .../src/DocBlock/Tags/Param.php | 141 - .../src/DocBlock/Tags/Property.php | 118 - .../src/DocBlock/Tags/PropertyRead.php | 118 - .../src/DocBlock/Tags/PropertyWrite.php | 118 - .../src/DocBlock/Tags/Reference/Fqsen.php | 42 - .../src/DocBlock/Tags/Reference/Reference.php | 21 - .../src/DocBlock/Tags/Reference/Url.php | 40 - .../src/DocBlock/Tags/Return_.php | 72 - .../src/DocBlock/Tags/See.php | 88 - .../src/DocBlock/Tags/Since.php | 94 - .../src/DocBlock/Tags/Source.php | 97 - .../src/DocBlock/Tags/Throws.php | 72 - .../src/DocBlock/Tags/Uses.php | 83 - .../src/DocBlock/Tags/Var_.php | 118 - .../src/DocBlock/Tags/Version.php | 94 - .../src/DocBlockFactory.php | 277 -- .../src/DocBlockFactoryInterface.php | 23 - .../type-resolver/.github/workflows/push.yml | 35 - vendor/phpdocumentor/type-resolver/LICENSE | 21 - vendor/phpdocumentor/type-resolver/README.md | 179 - .../phpdocumentor/type-resolver/appveyor.yml | 52 - .../composer-require-config.json | 15 - .../phpdocumentor/type-resolver/composer.json | 36 - .../phpdocumentor/type-resolver/composer.lock | 1448 ------- vendor/phpdocumentor/type-resolver/phive.xml | 5 - .../type-resolver/phpcs.xml.dist | 30 - .../phpdocumentor/type-resolver/phpstan.neon | 7 - vendor/phpdocumentor/type-resolver/psalm.xml | 18 - .../type-resolver/src/FqsenResolver.php | 74 - .../phpdocumentor/type-resolver/src/Type.php | 22 - .../type-resolver/src/TypeResolver.php | 470 --- .../type-resolver/src/Types/AbstractList.php | 85 - .../type-resolver/src/Types/Array_.php | 27 - .../type-resolver/src/Types/Boolean.php | 30 - .../type-resolver/src/Types/Callable_.php | 30 - .../type-resolver/src/Types/Collection.php | 66 - .../type-resolver/src/Types/Compound.php | 88 - .../type-resolver/src/Types/Context.php | 88 - .../src/Types/ContextFactory.php | 350 -- .../type-resolver/src/Types/Float_.php | 30 - .../type-resolver/src/Types/Integer.php | 27 - .../type-resolver/src/Types/Iterable_.php | 30 - .../type-resolver/src/Types/Mixed_.php | 30 - .../type-resolver/src/Types/Null_.php | 30 - .../type-resolver/src/Types/Nullable.php | 49 - .../type-resolver/src/Types/Object_.php | 66 - .../type-resolver/src/Types/Parent_.php | 32 - .../type-resolver/src/Types/Resource_.php | 30 - .../type-resolver/src/Types/Scalar.php | 30 - .../type-resolver/src/Types/Self_.php | 32 - .../type-resolver/src/Types/Static_.php | 37 - .../type-resolver/src/Types/String_.php | 30 - .../type-resolver/src/Types/This.php | 33 - .../type-resolver/src/Types/Void_.php | 33 - vendor/phpspec/prophecy/CHANGES.md | 225 -- vendor/phpspec/prophecy/LICENSE | 23 - vendor/phpspec/prophecy/README.md | 402 -- vendor/phpspec/prophecy/composer.json | 50 - .../prophecy/src/Prophecy/Argument.php | 212 -- .../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 | 116 - .../Argument/Token/IdenticalValueToken.php | 74 - .../Argument/Token/LogicalAndToken.php | 80 - .../Argument/Token/LogicalNotToken.php | 73 - .../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 | 206 - .../Prophecy/Comparator/ClosureComparator.php | 42 - .../src/Prophecy/Comparator/Factory.php | 47 - .../Comparator/ProphecyComparator.php | 28 - .../src/Prophecy/Doubler/CachedDoubler.php | 68 - .../ClassPatch/ClassPatchInterface.php | 48 - .../ClassPatch/DisableConstructorPatch.php | 76 - .../Doubler/ClassPatch/HhvmExceptionPatch.php | 63 - .../Doubler/ClassPatch/KeywordPatch.php | 140 - .../Doubler/ClassPatch/MagicCallPatch.php | 94 - .../ClassPatch/ProphecySubjectPatch.php | 104 - .../ReflectionClassNewInstancePatch.php | 57 - .../Doubler/ClassPatch/SplFileInfoPatch.php | 123 - .../Doubler/ClassPatch/ThrowablePatch.php | 95 - .../Doubler/ClassPatch/TraversablePatch.php | 83 - .../src/Prophecy/Doubler/DoubleInterface.php | 22 - .../prophecy/src/Prophecy/Doubler/Doubler.php | 146 - .../Doubler/Generator/ClassCodeGenerator.php | 129 - .../Doubler/Generator/ClassCreator.php | 67 - .../Doubler/Generator/ClassMirror.php | 260 -- .../Doubler/Generator/Node/ArgumentNode.php | 102 - .../Doubler/Generator/Node/ClassNode.php | 169 - .../Doubler/Generator/Node/MethodNode.php | 198 - .../Doubler/Generator/ReflectionInterface.php | 22 - .../Doubler/Generator/TypeHintReference.php | 46 - .../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 | 26 - .../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 | 52 - .../PhpDocumentor/LegacyClassTagRetriever.php | 35 - .../MethodTagRetrieverInterface.php | 30 - .../Prophecy/Prediction/CallPrediction.php | 86 - .../Prediction/CallTimesPrediction.php | 107 - .../Prediction/CallbackPrediction.php | 65 - .../Prophecy/Prediction/NoCallsPrediction.php | 68 - .../Prediction/PredictionInterface.php | 37 - .../src/Prophecy/Promise/CallbackPromise.php | 66 - .../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 | 522 --- .../src/Prophecy/Prophecy/ObjectProphecy.php | 281 -- .../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 | 135 - .../prophecy/src/Prophecy/Util/ExportUtil.php | 212 -- .../prophecy/src/Prophecy/Util/StringUtil.php | 99 - .../phpunit/php-code-coverage/.gitattributes | 3 - .../php-code-coverage/.github/CONTRIBUTING.md | 1 - .../php-code-coverage/.github/FUNDING.yml | 1 - .../.github/ISSUE_TEMPLATE.md | 18 - vendor/phpunit/php-code-coverage/.gitignore | 7 - vendor/phpunit/php-code-coverage/.php_cs.dist | 197 - vendor/phpunit/php-code-coverage/.travis.yml | 60 - vendor/phpunit/php-code-coverage/ChangeLog.md | 117 - vendor/phpunit/php-code-coverage/LICENSE | 33 - vendor/phpunit/php-code-coverage/README.md | 40 - vendor/phpunit/php-code-coverage/build.xml | 30 - .../phpunit/php-code-coverage/composer.json | 61 - vendor/phpunit/php-code-coverage/phive.xml | 4 - vendor/phpunit/php-code-coverage/phpunit.xml | 21 - .../php-code-coverage/src/CodeCoverage.php | 1010 ----- .../php-code-coverage/src/Driver/Driver.php | 47 - .../php-code-coverage/src/Driver/PCOV.php | 45 - .../php-code-coverage/src/Driver/PHPDBG.php | 96 - .../php-code-coverage/src/Driver/Xdebug.php | 112 - .../CoveredCodeNotExecutedException.php | 17 - .../src/Exception/Exception.php | 17 - .../Exception/InvalidArgumentException.php | 36 - .../MissingCoversAnnotationException.php | 17 - .../src/Exception/RuntimeException.php | 14 - .../UnintentionallyCoveredCodeException.php | 44 - .../phpunit/php-code-coverage/src/Filter.php | 174 - .../src/Node/AbstractNode.php | 328 -- .../php-code-coverage/src/Node/Builder.php | 227 -- .../php-code-coverage/src/Node/Directory.php | 427 --- .../php-code-coverage/src/Node/File.php | 611 --- .../php-code-coverage/src/Node/Iterator.php | 89 - .../php-code-coverage/src/Report/Clover.php | 258 -- .../php-code-coverage/src/Report/Crap4j.php | 165 - .../src/Report/Html/Facade.php | 167 - .../src/Report/Html/Renderer.php | 277 -- .../src/Report/Html/Renderer/Dashboard.php | 281 -- .../src/Report/Html/Renderer/Directory.php | 98 - .../src/Report/Html/Renderer/File.php | 529 --- .../Renderer/Template/coverage_bar.html.dist | 5 - .../Renderer/Template/css/bootstrap.min.css | 7 - .../Html/Renderer/Template/css/custom.css | 0 .../Html/Renderer/Template/css/nv.d3.min.css | 1 - .../Html/Renderer/Template/css/octicons.css | 5 - .../Html/Renderer/Template/css/style.css | 122 - .../Renderer/Template/dashboard.html.dist | 281 -- .../Renderer/Template/directory.html.dist | 60 - .../Template/directory_item.html.dist | 13 - .../Html/Renderer/Template/file.html.dist | 72 - .../Renderer/Template/file_item.html.dist | 14 - .../Renderer/Template/icons/file-code.svg | 1 - .../Template/icons/file-directory.svg | 1 - .../Renderer/Template/js/bootstrap.min.js | 7 - .../Html/Renderer/Template/js/d3.min.js | 5 - .../Report/Html/Renderer/Template/js/file.js | 62 - .../Html/Renderer/Template/js/jquery.min.js | 2 - .../Html/Renderer/Template/js/nv.d3.min.js | 8 - .../Html/Renderer/Template/js/popper.min.js | 5 - .../Renderer/Template/method_item.html.dist | 11 - .../php-code-coverage/src/Report/PHP.php | 64 - .../php-code-coverage/src/Report/Text.php | 283 -- .../src/Report/Xml/BuildInformation.php | 81 - .../src/Report/Xml/Coverage.php | 69 - .../src/Report/Xml/Directory.php | 14 - .../src/Report/Xml/Facade.php | 287 -- .../php-code-coverage/src/Report/Xml/File.php | 81 - .../src/Report/Xml/Method.php | 56 - .../php-code-coverage/src/Report/Xml/Node.php | 87 - .../src/Report/Xml/Project.php | 85 - .../src/Report/Xml/Report.php | 92 - .../src/Report/Xml/Source.php | 38 - .../src/Report/Xml/Tests.php | 46 - .../src/Report/Xml/Totals.php | 140 - .../php-code-coverage/src/Report/Xml/Unit.php | 95 - vendor/phpunit/php-code-coverage/src/Util.php | 40 - .../phpunit/php-code-coverage/src/Version.php | 30 - .../php-code-coverage/tests/TestCase.php | 395 -- .../tests/_files/BankAccount-clover.xml | 26 - .../tests/_files/BankAccount-crap4j.xml | 59 - .../tests/_files/BankAccount-text.txt | 12 - .../tests/_files/BankAccount.php | 33 - .../tests/_files/BankAccountTest.php | 66 - .../_files/CoverageClassExtendedTest.php | 14 - .../tests/_files/CoverageClassTest.php | 14 - .../CoverageFunctionParenthesesTest.php | 13 - ...erageFunctionParenthesesWhitespaceTest.php | 13 - .../tests/_files/CoverageFunctionTest.php | 13 - .../CoverageMethodOneLineAnnotationTest.php | 12 - .../_files/CoverageMethodParenthesesTest.php | 14 - ...overageMethodParenthesesWhitespaceTest.php | 14 - .../tests/_files/CoverageMethodTest.php | 14 - .../tests/_files/CoverageNoneTest.php | 11 - .../tests/_files/CoverageNotPrivateTest.php | 14 - .../tests/_files/CoverageNotProtectedTest.php | 14 - .../tests/_files/CoverageNotPublicTest.php | 14 - .../tests/_files/CoverageNothingTest.php | 15 - .../tests/_files/CoveragePrivateTest.php | 14 - .../tests/_files/CoverageProtectedTest.php | 14 - .../tests/_files/CoveragePublicTest.php | 14 - .../CoverageTwoDefaultClassAnnotations.php | 17 - .../tests/_files/CoveredClass.php | 36 - .../tests/_files/CoveredFunction.php | 4 - .../php-code-coverage/tests/_files/Crash.php | 2 - .../NamespaceCoverageClassExtendedTest.php | 14 - .../_files/NamespaceCoverageClassTest.php | 14 - ...NamespaceCoverageCoversClassPublicTest.php | 17 - .../NamespaceCoverageCoversClassTest.php | 22 - .../_files/NamespaceCoverageMethodTest.php | 14 - .../NamespaceCoverageNotPrivateTest.php | 14 - .../NamespaceCoverageNotProtectedTest.php | 14 - .../_files/NamespaceCoverageNotPublicTest.php | 14 - .../_files/NamespaceCoveragePrivateTest.php | 14 - .../_files/NamespaceCoverageProtectedTest.php | 14 - .../_files/NamespaceCoveragePublicTest.php | 14 - .../tests/_files/NamespaceCoveredClass.php | 38 - .../_files/NotExistingCoveredElementTest.php | 26 - .../BankAccount.php.html | 249 -- .../CoverageForBankAccount/dashboard.html | 287 -- .../HTML/CoverageForBankAccount/index.html | 118 - .../dashboard.html | 285 -- .../index.html | 118 - ...with_class_and_anonymous_function.php.html | 172 - .../dashboard.html | 283 -- .../index.html | 108 - .../source_with_ignore.php.html | 196 - .../BankAccount.php.xml | 262 -- .../XML/CoverageForBankAccount/index.xml | 33 - .../index.xml | 30 - ..._with_class_and_anonymous_function.php.xml | 161 - .../CoverageForFileWithIgnoredLines/index.xml | 30 - .../source_with_ignore.php.xml | 187 - .../class-with-anonymous-function-clover.xml | 21 - .../class-with-anonymous-function-crap4j.xml | 26 - .../class-with-anonymous-function-text.txt | 12 - .../tests/_files/ignored-lines-clover.xml | 17 - .../tests/_files/ignored-lines-crap4j.xml | 37 - .../tests/_files/ignored-lines-text.txt | 10 - ...urce_with_class_and_anonymous_function.php | 19 - .../tests/_files/source_with_ignore.php | 37 - .../tests/_files/source_with_namespace.php | 20 - .../source_with_oneline_annotations.php | 36 - .../_files/source_with_use_statements.php | 23 - .../tests/_files/source_without_ignore.php | 4 - .../tests/_files/source_without_namespace.php | 18 - .../php-code-coverage/tests/bootstrap.php | 7 - .../tests/tests/BuilderTest.php | 246 -- .../tests/tests/CloverTest.php | 48 - .../tests/tests/CodeCoverageTest.php | 359 -- .../tests/tests/Crap4jTest.php | 48 - ...nintentionallyCoveredCodeExceptionTest.php | 51 - .../tests/tests/FilterTest.php | 213 -- .../tests/tests/HTMLTest.php | 102 - .../tests/tests/TextTest.php | 48 - .../tests/tests/UtilTest.php | 28 - .../php-code-coverage/tests/tests/XmlTest.php | 97 - .../phpunit/php-file-iterator/.gitattributes | 1 - .../php-file-iterator/.github/stale.yml | 40 - vendor/phpunit/php-file-iterator/.gitignore | 5 - vendor/phpunit/php-file-iterator/.php_cs.dist | 168 - vendor/phpunit/php-file-iterator/.travis.yml | 32 - vendor/phpunit/php-file-iterator/ChangeLog.md | 70 - vendor/phpunit/php-file-iterator/LICENSE | 33 - vendor/phpunit/php-file-iterator/README.md | 14 - .../phpunit/php-file-iterator/composer.json | 37 - vendor/phpunit/php-file-iterator/phpunit.xml | 21 - .../phpunit/php-file-iterator/src/Facade.php | 112 - .../phpunit/php-file-iterator/src/Factory.php | 83 - .../php-file-iterator/src/Iterator.php | 112 - .../php-file-iterator/tests/FactoryTest.php | 50 - .../phpunit/php-text-template/.gitattributes | 1 - vendor/phpunit/php-text-template/.gitignore | 5 - vendor/phpunit/php-text-template/LICENSE | 33 - vendor/phpunit/php-text-template/README.md | 14 - .../phpunit/php-text-template/composer.json | 29 - .../php-text-template/src/Template.php | 135 - vendor/phpunit/php-timer/.gitattributes | 1 - vendor/phpunit/php-timer/.github/FUNDING.yml | 1 - vendor/phpunit/php-timer/.github/stale.yml | 40 - vendor/phpunit/php-timer/.gitignore | 5 - vendor/phpunit/php-timer/.php_cs.dist | 197 - vendor/phpunit/php-timer/.travis.yml | 23 - vendor/phpunit/php-timer/ChangeLog.md | 36 - vendor/phpunit/php-timer/LICENSE | 33 - vendor/phpunit/php-timer/README.md | 49 - vendor/phpunit/php-timer/build.xml | 20 - vendor/phpunit/php-timer/composer.json | 42 - vendor/phpunit/php-timer/phpunit.xml | 19 - vendor/phpunit/php-timer/src/Exception.php | 14 - .../php-timer/src/RuntimeException.php | 14 - vendor/phpunit/php-timer/src/Timer.php | 100 - vendor/phpunit/php-timer/tests/TimerTest.php | 134 - .../phpunit/php-token-stream/.gitattributes | 1 - .../php-token-stream/.github/FUNDING.yml | 1 - vendor/phpunit/php-token-stream/.gitignore | 3 - vendor/phpunit/php-token-stream/.travis.yml | 26 - vendor/phpunit/php-token-stream/ChangeLog.md | 57 - vendor/phpunit/php-token-stream/LICENSE | 33 - vendor/phpunit/php-token-stream/README.md | 14 - vendor/phpunit/php-token-stream/build.xml | 21 - vendor/phpunit/php-token-stream/composer.json | 39 - vendor/phpunit/php-token-stream/phpunit.xml | 21 - vendor/phpunit/php-token-stream/src/Token.php | 1361 ------- .../php-token-stream/src/Token/Stream.php | 609 --- .../src/Token/Stream/CachingFactory.php | 46 - .../php-token-stream/src/Token/Util.php | 19 - .../tests/Token/ClassTest.php | 152 - .../tests/Token/ClosureTest.php | 64 - .../tests/Token/FunctionTest.php | 124 - .../tests/Token/IncludeTest.php | 53 - .../tests/Token/InterfaceTest.php | 169 - .../tests/Token/NamespaceTest.php | 62 - .../_fixture/classExtendsNamespacedClass.php | 10 - .../tests/_fixture/classInNamespace.php | 6 - .../tests/_fixture/classInScopedNamespace.php | 9 - .../_fixture/classUsesNamespacedFunction.php | 8 - .../class_with_method_named_empty.php | 7 - ...h_method_that_declares_anonymous_class.php | 15 - ..._method_that_declares_anonymous_class2.php | 16 - ...ltiple_anonymous_classes_and_functions.php | 26 - .../tests/_fixture/closure.php | 7 - .../tests/_fixture/issue19.php | 3 - .../tests/_fixture/issue30.php | 8 - ...tipleNamespacesWithOneClassUsingBraces.php | 12 - ...espacesWithOneClassUsingNonBraceSyntax.php | 14 - .../_fixture/php-code-coverage-issue-424.php | 13 - .../tests/_fixture/source.php | 42 - .../tests/_fixture/source2.php | 6 - .../tests/_fixture/source3.php | 14 - .../tests/_fixture/source4.php | 30 - .../tests/_fixture/source5.php | 5 - .../php-token-stream/tests/bootstrap.php | 15 - vendor/phpunit/phpunit/.editorconfig | 14 - vendor/phpunit/phpunit/.gitattributes | 6 - .../phpunit/.github/CODE_OF_CONDUCT.md | 28 - .../phpunit/phpunit/.github/CONTRIBUTING.md | 68 - vendor/phpunit/phpunit/.github/FUNDING.yml | 2 - .../BACKWARD_COMPATIBILITY_BREAK.md | 39 - .../phpunit/.github/ISSUE_TEMPLATE/BUG.md | 38 - .../.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 7 - .../ISSUE_TEMPLATE/SUPPORT_QUESTION.md | 27 - .../PULL_REQUEST_TEMPLATE/FAILING_TEST.md | 10 - .../.github/PULL_REQUEST_TEMPLATE/FIX.md | 10 - .../PULL_REQUEST_TEMPLATE/IMPROVEMENT.md | 9 - .../PULL_REQUEST_TEMPLATE/NEW_FEATURE.md | 9 - .../phpunit/phpunit/.github/workflows/ci.yml | 44 - vendor/phpunit/phpunit/.gitignore | 21 - vendor/phpunit/phpunit/.php_cs.dist | 207 -- vendor/phpunit/phpunit/.phpstorm.meta.php | 45 - vendor/phpunit/phpunit/.psalm/baseline.xml | 493 --- vendor/phpunit/phpunit/.psalm/config.xml | 54 - .../phpunit/.psalm/static-analysis.xml | 51 - vendor/phpunit/phpunit/.travis.yml | 49 - vendor/phpunit/phpunit/ChangeLog-8.4.md | 26 - vendor/phpunit/phpunit/LICENSE | 33 - vendor/phpunit/phpunit/README.md | 41 - vendor/phpunit/phpunit/build.xml | 467 --- vendor/phpunit/phpunit/composer.json | 89 - vendor/phpunit/phpunit/phive.xml | 8 - vendor/phpunit/phpunit/phpunit | 61 - vendor/phpunit/phpunit/phpunit.xml | 31 - vendor/phpunit/phpunit/phpunit.xsd | 317 -- vendor/phpunit/phpunit/src/Exception.php | 17 - .../phpunit/phpunit/src/Framework/Assert.php | 3312 ----------------- .../src/Framework/Assert/Functions.php | 2474 ------------ .../src/Framework/Constraint/ArrayHasKey.php | 80 - .../src/Framework/Constraint/ArraySubset.php | 129 - .../src/Framework/Constraint/Attribute.php | 79 - .../src/Framework/Constraint/Callback.php | 45 - .../Constraint/ClassHasAttribute.php | 85 - .../Constraint/ClassHasStaticAttribute.php | 58 - .../src/Framework/Constraint/Composite.php | 68 - .../src/Framework/Constraint/Constraint.php | 152 - .../src/Framework/Constraint/Count.php | 123 - .../Framework/Constraint/DirectoryExists.php | 53 - .../src/Framework/Constraint/Exception.php | 80 - .../Framework/Constraint/ExceptionCode.php | 61 - .../Framework/Constraint/ExceptionMessage.php | 71 - .../ExceptionMessageRegularExpression.php | 69 - .../src/Framework/Constraint/FileExists.php | 53 - .../src/Framework/Constraint/GreaterThan.php | 51 - .../src/Framework/Constraint/IsAnything.php | 51 - .../src/Framework/Constraint/IsEmpty.php | 65 - .../src/Framework/Constraint/IsEqual.php | 138 - .../src/Framework/Constraint/IsFalse.php | 35 - .../src/Framework/Constraint/IsFinite.php | 35 - .../src/Framework/Constraint/IsIdentical.php | 138 - .../src/Framework/Constraint/IsInfinite.php | 35 - .../src/Framework/Constraint/IsInstanceOf.php | 89 - .../src/Framework/Constraint/IsJson.php | 73 - .../src/Framework/Constraint/IsNan.php | 35 - .../src/Framework/Constraint/IsNull.php | 35 - .../src/Framework/Constraint/IsReadable.php | 53 - .../src/Framework/Constraint/IsTrue.php | 35 - .../src/Framework/Constraint/IsType.php | 199 - .../src/Framework/Constraint/IsWritable.php | 53 - .../src/Framework/Constraint/JsonMatches.php | 105 - .../JsonMatchesErrorMessageProvider.php | 62 - .../src/Framework/Constraint/LessThan.php | 51 - .../src/Framework/Constraint/LogicalAnd.php | 119 - .../src/Framework/Constraint/LogicalNot.php | 165 - .../src/Framework/Constraint/LogicalOr.php | 116 - .../src/Framework/Constraint/LogicalXor.php | 121 - .../Constraint/ObjectHasAttribute.php | 32 - .../Constraint/RegularExpression.php | 54 - .../src/Framework/Constraint/SameSize.php | 18 - .../Framework/Constraint/StringContains.php | 74 - .../Framework/Constraint/StringEndsWith.php | 46 - .../StringMatchesFormatDescription.php | 101 - .../Framework/Constraint/StringStartsWith.php | 52 - .../Constraint/TraversableContains.php | 114 - .../Constraint/TraversableContainsOnly.php | 87 - .../src/Framework/DataProviderTestSuite.php | 61 - .../src/Framework/Error/Deprecated.php | 14 - .../phpunit/src/Framework/Error/Error.php | 23 - .../phpunit/src/Framework/Error/Notice.php | 14 - .../phpunit/src/Framework/Error/Warning.php | 14 - .../Exception/AssertionFailedError.php | 24 - .../Exception/CodeCoverageException.php | 17 - .../CoveredCodeNotExecutedException.php | 17 - .../src/Framework/Exception/Exception.php | 77 - .../Exception/ExpectationFailedException.php | 41 - .../Exception/IncompleteTestError.php | 17 - .../Exception/InvalidArgumentException.php | 37 - .../InvalidCoversTargetException.php | 17 - .../InvalidDataProviderException.php | 17 - .../MissingCoversAnnotationException.php | 17 - .../src/Framework/Exception/OutputError.php | 17 - .../Exception/PHPTAssertionFailedError.php | 32 - .../Framework/Exception/RiskyTestError.php | 17 - .../Framework/Exception/SkippedTestError.php | 17 - .../Exception/SkippedTestSuiteError.php | 17 - .../Framework/Exception/SyntheticError.php | 61 - .../Exception/SyntheticSkippedError.php | 17 - .../Exception/UnexpectedValueException.php | 14 - .../UnintentionallyCoveredCodeError.php | 17 - .../src/Framework/Exception/Warning.php | 24 - .../src/Framework/ExceptionWrapper.php | 117 - .../phpunit/src/Framework/IncompleteTest.php | 17 - .../src/Framework/IncompleteTestCase.php | 71 - .../InvalidParameterGroupException.php | 17 - .../src/Framework/MockObject/Api/Api.php | 97 - .../src/Framework/MockObject/Api/Method.php | 28 - .../MockObject/Api/MockedCloneMethod.php | 21 - .../MockObject/Api/UnmockedCloneMethod.php | 23 - .../Framework/MockObject/Builder/Identity.php | 25 - .../MockObject/Builder/InvocationMocker.php | 276 -- .../MockObject/Builder/InvocationStubber.php | 61 - .../Framework/MockObject/Builder/Match.php | 26 - .../MockObject/Builder/MethodNameMatch.php | 26 - .../MockObject/Builder/ParametersMatch.php | 50 - .../src/Framework/MockObject/Builder/Stub.php | 24 - .../MockObject/ConfigurableMethod.php | 53 - .../Exception/BadMethodCallException.php | 17 - ...ableMethodsAlreadyInitializedException.php | 17 - .../MockObject/Exception/Exception.php | 17 - .../IncompatibleReturnValueException.php | 17 - .../MockObject/Exception/RuntimeException.php | 17 - .../src/Framework/MockObject/Generator.php | 961 ----- .../MockObject/Generator/deprecation.tpl | 2 - .../MockObject/Generator/mocked_class.tpl | 6 - .../MockObject/Generator/mocked_method.tpl | 22 - .../Generator/mocked_method_void.tpl | 20 - .../Generator/mocked_static_method.tpl | 5 - .../MockObject/Generator/proxied_method.tpl | 22 - .../Generator/proxied_method_void.tpl | 22 - .../MockObject/Generator/trait_class.tpl | 6 - .../MockObject/Generator/wsdl_class.tpl | 9 - .../MockObject/Generator/wsdl_method.tpl | 4 - .../src/Framework/MockObject/Invocation.php | 190 - .../MockObject/InvocationHandler.php | 194 - .../src/Framework/MockObject/Matcher.php | 274 -- .../MockObject/MethodNameConstraint.php | 45 - .../src/Framework/MockObject/MockBuilder.php | 483 --- .../src/Framework/MockObject/MockClass.php | 60 - .../src/Framework/MockObject/MockMethod.php | 367 -- .../Framework/MockObject/MockMethodSet.php | 41 - .../src/Framework/MockObject/MockObject.php | 25 - .../src/Framework/MockObject/MockTrait.php | 46 - .../src/Framework/MockObject/MockType.php | 18 - .../MockObject/Rule/AnyInvokedCount.php | 36 - .../MockObject/Rule/AnyParameters.php | 31 - .../MockObject/Rule/ConsecutiveParameters.php | 132 - .../MockObject/Rule/InvocationOrder.php | 46 - .../MockObject/Rule/InvokedAtIndex.php | 71 - .../MockObject/Rule/InvokedAtLeastCount.php | 64 - .../MockObject/Rule/InvokedAtLeastOnce.php | 50 - .../MockObject/Rule/InvokedAtMostCount.php | 64 - .../MockObject/Rule/InvokedCount.php | 101 - .../Framework/MockObject/Rule/MethodName.php | 64 - .../Framework/MockObject/Rule/Parameters.php | 156 - .../MockObject/Rule/ParametersRule.php | 25 - .../phpunit/src/Framework/MockObject/Stub.php | 24 - .../MockObject/Stub/ConsecutiveCalls.php | 55 - .../Framework/MockObject/Stub/Exception.php | 44 - .../MockObject/Stub/ReturnArgument.php | 40 - .../MockObject/Stub/ReturnCallback.php | 54 - .../MockObject/Stub/ReturnReference.php | 44 - .../Framework/MockObject/Stub/ReturnSelf.php | 32 - .../Framework/MockObject/Stub/ReturnStub.php | 44 - .../MockObject/Stub/ReturnValueMap.php | 50 - .../src/Framework/MockObject/Stub/Stub.php | 27 - .../src/Framework/MockObject/Verifiable.php | 26 - .../phpunit/src/Framework/SelfDescribing.php | 21 - .../phpunit/src/Framework/SkippedTest.php | 17 - .../phpunit/src/Framework/SkippedTestCase.php | 71 - vendor/phpunit/phpunit/src/Framework/Test.php | 23 - .../phpunit/src/Framework/TestBuilder.php | 214 -- .../phpunit/src/Framework/TestCase.php | 2505 ------------- .../phpunit/src/Framework/TestFailure.php | 154 - .../phpunit/src/Framework/TestListener.php | 82 - .../TestListenerDefaultImplementation.php | 56 - .../phpunit/src/Framework/TestResult.php | 1211 ------ .../phpunit/src/Framework/TestSuite.php | 750 ---- .../src/Framework/TestSuiteIterator.php | 101 - .../phpunit/src/Framework/WarningTestCase.php | 71 - .../phpunit/src/Runner/BaseTestRunner.php | 156 - .../src/Runner/DefaultTestResultCache.php | 217 -- .../phpunit/phpunit/src/Runner/Exception.php | 17 - .../Filter/ExcludeGroupFilterIterator.php | 21 - .../phpunit/src/Runner/Filter/Factory.php | 54 - .../src/Runner/Filter/GroupFilterIterator.php | 54 - .../Filter/IncludeGroupFilterIterator.php | 21 - .../src/Runner/Filter/NameFilterIterator.php | 126 - .../Runner/Hook/AfterIncompleteTestHook.php | 15 - .../src/Runner/Hook/AfterLastTestHook.php | 15 - .../src/Runner/Hook/AfterRiskyTestHook.php | 15 - .../src/Runner/Hook/AfterSkippedTestHook.php | 15 - .../Runner/Hook/AfterSuccessfulTestHook.php | 15 - .../src/Runner/Hook/AfterTestErrorHook.php | 15 - .../src/Runner/Hook/AfterTestFailureHook.php | 15 - .../phpunit/src/Runner/Hook/AfterTestHook.php | 21 - .../src/Runner/Hook/AfterTestWarningHook.php | 15 - .../src/Runner/Hook/BeforeFirstTestHook.php | 15 - .../src/Runner/Hook/BeforeTestHook.php | 15 - .../phpunit/phpunit/src/Runner/Hook/Hook.php | 14 - .../phpunit/src/Runner/Hook/TestHook.php | 14 - .../src/Runner/Hook/TestListenerAdapter.php | 140 - .../src/Runner/NullTestResultCache.php | 42 - .../phpunit/src/Runner/PhptTestCase.php | 751 ---- .../src/Runner/ResultCacheExtension.php | 107 - .../src/Runner/StandardTestSuiteLoader.php | 85 - .../phpunit/src/Runner/TestResultCache.php | 28 - .../phpunit/src/Runner/TestSuiteLoader.php | 22 - .../phpunit/src/Runner/TestSuiteSorter.php | 434 --- vendor/phpunit/phpunit/src/Runner/Version.php | 66 - vendor/phpunit/phpunit/src/TextUI/Command.php | 1315 ------- .../phpunit/phpunit/src/TextUI/Exception.php | 17 - vendor/phpunit/phpunit/src/TextUI/Help.php | 245 -- .../phpunit/src/TextUI/ResultPrinter.php | 571 --- .../phpunit/phpunit/src/TextUI/TestRunner.php | 1341 ------- .../phpunit/src/Util/Annotation/DocBlock.php | 575 --- .../phpunit/src/Util/Annotation/Registry.php | 85 - vendor/phpunit/phpunit/src/Util/Blacklist.php | 214 -- vendor/phpunit/phpunit/src/Util/Color.php | 143 - .../phpunit/src/Util/Configuration.php | 1205 ------ .../src/Util/ConfigurationGenerator.php | 64 - .../phpunit/phpunit/src/Util/ErrorHandler.php | 145 - vendor/phpunit/phpunit/src/Util/Exception.php | 17 - .../phpunit/phpunit/src/Util/FileLoader.php | 77 - .../phpunit/phpunit/src/Util/Filesystem.php | 35 - vendor/phpunit/phpunit/src/Util/Filter.php | 89 - vendor/phpunit/phpunit/src/Util/Getopt.php | 181 - .../phpunit/phpunit/src/Util/GlobalState.php | 179 - vendor/phpunit/phpunit/src/Util/Json.php | 86 - vendor/phpunit/phpunit/src/Util/Log/JUnit.php | 406 -- .../phpunit/phpunit/src/Util/Log/TeamCity.php | 377 -- .../src/Util/PHP/AbstractPhpProcess.php | 390 -- .../src/Util/PHP/DefaultPhpProcess.php | 216 -- .../src/Util/PHP/Template/PhptTestCase.tpl | 40 - .../src/Util/PHP/Template/TestCaseClass.tpl | 108 - .../src/Util/PHP/Template/TestCaseMethod.tpl | 111 - .../src/Util/PHP/WindowsPhpProcess.php | 46 - .../phpunit/src/Util/PHP/eval-stdin.php | 10 - vendor/phpunit/phpunit/src/Util/Printer.php | 135 - .../phpunit/src/Util/RegularExpression.php | 28 - vendor/phpunit/phpunit/src/Util/Test.php | 905 ----- .../src/Util/TestDox/CliTestDoxPrinter.php | 352 -- .../src/Util/TestDox/HtmlResultPrinter.php | 131 - .../src/Util/TestDox/NamePrettifier.php | 282 -- .../src/Util/TestDox/ResultPrinter.php | 339 -- .../src/Util/TestDox/TestDoxPrinter.php | 377 -- .../src/Util/TestDox/TextResultPrinter.php | 46 - .../src/Util/TestDox/XmlResultPrinter.php | 247 -- .../phpunit/src/Util/TextTestListRenderer.php | 49 - vendor/phpunit/phpunit/src/Util/Type.php | 50 - .../src/Util/XdebugFilterScriptGenerator.php | 75 - vendor/phpunit/phpunit/src/Util/Xml.php | 290 -- .../phpunit/src/Util/XmlTestListRenderer.php | 85 - vendor/phpunit/phpunit/tests/README.md | 59 - vendor/phpunit/phpunit/tests/_files/3194.php | 42 - vendor/phpunit/phpunit/tests/_files/3530.wsdl | 33 - .../tests/_files/AbstractMockTestClass.php | 18 - .../phpunit/tests/_files/AbstractTest.php | 18 - .../phpunit/tests/_files/AbstractTrait.php | 23 - ...bstractVariousIterableDataProviderTest.php | 62 - .../phpunit/tests/_files/ActualOutputTest.php | 22 - .../phpunit/tests/_files/AnInterface.php | 13 - .../_files/AnInterfaceWithReturnType.php | 13 - .../phpunit/tests/_files/AnotherInterface.php | 13 - .../phpunit/tests/_files/ArrayAccessible.php | 47 - .../phpunit/tests/_files/AssertionExample.php | 16 - .../tests/_files/AssertionExampleTest.php | 20 - .../phpunit/phpunit/tests/_files/Author.php | 25 - .../phpunit/tests/_files/BankAccount.php | 80 - .../phpunit/tests/_files/BankAccountTest.php | 93 - .../tests/_files/BankAccountTest.test.php | 86 - .../phpunit/tests/_files/BankAccountTest2.php | 56 - vendor/phpunit/phpunit/tests/_files/Bar.php | 16 - .../tests/_files/BeforeAndAfterTest.php | 47 - .../_files/BeforeClassAndAfterClassTest.php | 47 - .../BeforeClassWithOnlyDataProviderTest.php | 48 - vendor/phpunit/phpunit/tests/_files/Book.php | 18 - .../phpunit/tests/_files/Calculator.php | 22 - .../ChangeCurrentWorkingDirectoryTest.php | 19 - .../ClassThatImplementsSerializable.php | 23 - .../ClassWithAllPossibleReturnTypes.php | 64 - .../_files/ClassWithNonPublicAttributes.php | 47 - .../ClassWithScalarTypeDeclarations.php | 15 - .../tests/_files/ClassWithSelfTypeHint.php | 15 - .../tests/_files/ClassWithStaticMethod.php | 15 - .../tests/_files/ClassWithToString.php | 20 - .../ClassWithVariadicArgumentMethod.php | 20 - .../phpunit/tests/_files/ConcreteTest.my.php | 16 - .../phpunit/tests/_files/ConcreteTest.php | 16 - .../phpunit/tests/_files/CountConstraint.php | 45 - .../_files/CoverageClassExtendedTest.php | 22 - .../tests/_files/CoverageClassNothingTest.php | 22 - .../tests/_files/CoverageClassTest.php | 22 - .../CoverageClassWithoutAnnotationsTest.php | 19 - ...verageCoversOverridesCoversNothingTest.php | 25 - .../CoverageFunctionParenthesesTest.php | 21 - ...erageFunctionParenthesesWhitespaceTest.php | 21 - .../tests/_files/CoverageFunctionTest.php | 21 - .../CoverageMethodNothingCoversMethod.php | 23 - .../_files/CoverageMethodNothingTest.php | 22 - .../CoverageMethodOneLineAnnotationTest.php | 20 - .../_files/CoverageMethodParenthesesTest.php | 22 - ...overageMethodParenthesesWhitespaceTest.php | 22 - .../tests/_files/CoverageMethodTest.php | 22 - .../_files/CoverageNamespacedFunctionTest.php | 21 - .../phpunit/tests/_files/CoverageNoneTest.php | 19 - .../tests/_files/CoverageNotPrivateTest.php | 22 - .../tests/_files/CoverageNotProtectedTest.php | 22 - .../tests/_files/CoverageNotPublicTest.php | 22 - .../tests/_files/CoveragePrivateTest.php | 22 - .../tests/_files/CoverageProtectedTest.php | 22 - .../tests/_files/CoveragePublicTest.php | 22 - .../CoverageTwoDefaultClassAnnotations.php | 25 - .../phpunit/tests/_files/CoveredClass.php | 44 - .../phpunit/tests/_files/CoveredFunction.php | 12 - .../phpunit/tests/_files/CustomPrinter.php | 14 - .../tests/_files/DataProviderDebugTest.php | 58 - .../_files/DataProviderDependencyTest.php | 33 - .../tests/_files/DataProviderFilterTest.php | 49 - .../_files/DataProviderIncompleteTest.php | 47 - .../DataProviderIssue2833/FirstTest.php | 30 - .../DataProviderIssue2833/SecondTest.php | 22 - .../_files/DataProviderIssue2859/phpunit.xml | 10 - .../another/TestWithDataProviderTest.php | 28 - .../DataProviderIssue2922/FirstTest.php | 31 - .../DataProviderIssue2922/SecondTest.php | 21 - .../tests/_files/DataProviderSkippedTest.php | 47 - .../phpunit/tests/_files/DataProviderTest.php | 31 - .../_files/DataproviderExecutionOrderTest.php | 48 - ...roviderExecutionOrderTest_result_cache.txt | 1 - .../tests/_files/DependencyFailureTest.php | 63 - .../tests/_files/DependencySuccessTest.php | 34 - .../tests/_files/DoNoAssertionTestCase.php | 17 - ...mAssertionsButPerformingAssertionsTest.php | 22 - .../phpunit/tests/_files/DoubleTestCase.php | 39 - .../phpunit/tests/_files/DummyBarTest.php | 18 - .../phpunit/tests/_files/DummyException.php | 12 - .../phpunit/tests/_files/DummyFooTest.php | 18 - .../_files/DuplicateKeyDataProviderTest.php | 27 - .../tests/_files/EmptyDataProviderTest.php | 25 - .../tests/_files/EmptyTestCaseTest.php | 14 - .../phpunit/tests/_files/ExampleTrait.php | 16 - .../ExceptionInAssertPostConditionsTest.php | 50 - .../ExceptionInAssertPreConditionsTest.php | 50 - .../tests/_files/ExceptionInSetUpTest.php | 50 - .../ExceptionInTearDownAfterClassTest.php | 28 - .../tests/_files/ExceptionInTearDownTest.php | 50 - .../phpunit/tests/_files/ExceptionInTest.php | 50 - .../ExceptionInTestDetectedInTeardown.php | 29 - .../tests/_files/ExceptionNamespaceTest.php | 45 - .../tests/_files/ExceptionStackTest.php | 34 - .../phpunit/tests/_files/ExceptionTest.php | 149 - .../tests/_files/ExceptionWithThrowable.php | 13 - .../phpunit/phpunit/tests/_files/Failure.php | 18 - .../phpunit/tests/_files/FailureTest.php | 85 - .../phpunit/tests/_files/FalsyConstraint.php | 26 - .../phpunit/tests/_files/FatalTest.php | 22 - .../phpunit/tests/_files/FinalClass.php | 24 - vendor/phpunit/phpunit/tests/_files/Foo.php | 16 - .../phpunit/tests/_files/FunctionCallback.php | 20 - .../phpunit/tests/_files/Go ogle-Sea.rch.wsdl | 198 - .../phpunit/tests/_files/GoogleSearch.wsdl | 198 - .../tests/_files/IgnoreCodeCoverageClass.php | 25 - .../_files/IgnoreCodeCoverageClassTest.php | 25 - .../phpunit/tests/_files/IncompleteTest.php | 18 - .../tests/_files/Inheritance/InheritanceA.php | 14 - .../tests/_files/Inheritance/InheritanceB.php | 17 - .../tests/_files/InheritedTestCase.php | 15 - .../phpunit/phpunit/tests/_files/IniTest.php | 18 - .../InterfaceWithSemiReservedMethodName.php | 13 - .../_files/InterfaceWithStaticMethod.php | 13 - .../phpunit/tests/_files/IsolationTest.php | 23 - .../tests/_files/JsonData/arrayObject.json | 1 - .../tests/_files/JsonData/simpleObject.json | 1 - .../phpunit/tests/_files/MethodCallback.php | 29 - .../_files/MethodCallbackByReference.php | 21 - .../phpunit/tests/_files/MockRunner.php | 17 - .../tests/_files/MockTestInterface.php | 15 - .../phpunit/phpunit/tests/_files/Mockable.php | 37 - .../_files/ModifiedConstructorTestCase.php | 22 - .../tests/_files/MultipleDataProviderTest.php | 89 - .../phpunit/tests/_files/MyTestListener.php | 121 - .../phpunit/tests/_files/NamedConstraint.php | 37 - .../NamespaceCoverageClassExtendedTest.php | 22 - .../_files/NamespaceCoverageClassTest.php | 22 - ...NamespaceCoverageCoversClassPublicTest.php | 25 - .../NamespaceCoverageCoversClassTest.php | 30 - .../_files/NamespaceCoverageMethodTest.php | 22 - .../NamespaceCoverageNotPrivateTest.php | 22 - .../NamespaceCoverageNotProtectedTest.php | 22 - .../_files/NamespaceCoverageNotPublicTest.php | 22 - .../_files/NamespaceCoveragePrivateTest.php | 22 - .../_files/NamespaceCoverageProtectedTest.php | 22 - .../_files/NamespaceCoveragePublicTest.php | 22 - .../tests/_files/NamespaceCoveredClass.php | 46 - .../tests/_files/NamespaceCoveredFunction.php | 15 - .../tests/_files/NoArgTestCaseTest.php | 17 - .../phpunit/tests/_files/NoTestCaseClass.php | 12 - .../phpunit/tests/_files/NoTestCases.php | 17 - .../phpunit/tests/_files/NonStatic.php | 15 - .../_files/NotExistingCoveredElementTest.php | 34 - .../tests/_files/NotPublicTestCase.php | 21 - .../tests/_files/NotSelfDescribingTest.php | 29 - .../phpunit/tests/_files/NotVoidTestCase.php | 14 - .../phpunit/tests/_files/NothingTest.php | 17 - .../_files/NumericGroupAnnotationTest.php | 38 - .../phpunit/tests/_files/OneTestCase.php | 21 - .../phpunit/tests/_files/OutputTestCase.php | 37 - .../phpunit/tests/_files/OverrideTestCase.php | 15 - .../_files/ParseTestMethodAnnotationsMock.php | 24 - .../tests/_files/PartialMockTestClass.php | 26 - .../RequirementsClassBeforeClassHookTest.php | 21 - .../_files/RequirementsClassDocBlockTest.php | 30 - .../phpunit/tests/_files/RequirementsTest.php | 484 --- .../phpunit/tests/_files/RouterTest.php | 34 - .../tests/_files/SampleArrayAccess.php | 42 - .../phpunit/tests/_files/SampleClass.php | 24 - .../phpunit/tests/_files/Singleton.php | 30 - .../phpunit/tests/_files/SingletonClass.php | 35 - .../phpunit/tests/_files/SomeClass.php | 21 - .../tests/_files/StaticMockTestClass.php | 20 - .../tests/_files/StopOnErrorTestSuite.php | 29 - .../tests/_files/StopOnWarningTestSuite.php | 23 - .../tests/_files/StopsOnWarningTest.php | 17 - .../phpunit/tests/_files/StringableClass.php | 16 - .../phpunit/phpunit/tests/_files/Struct.php | 18 - .../phpunit/phpunit/tests/_files/Success.php | 18 - .../tests/_files/TemplateMethodsTest.php | 62 - .../tests/_files/TestAutoreferenced.php | 20 - .../tests/_files/TestGeneratorMaker.php | 18 - .../phpunit/tests/_files/TestIncomplete.php | 18 - .../phpunit/tests/_files/TestIterator.php | 45 - .../phpunit/tests/_files/TestIterator2.php | 43 - .../tests/_files/TestIteratorAggregate.php | 23 - .../tests/_files/TestIteratorAggregate2.php | 24 - .../phpunit/tests/_files/TestProxyFixture.php | 49 - .../phpunit/tests/_files/TestRisky.php | 18 - .../phpunit/tests/_files/TestSkipped.php | 18 - .../phpunit/tests/_files/TestTestError.php | 18 - .../phpunit/tests/_files/TestWarning.php | 19 - .../tests/_files/TestWithAnnotations.php | 69 - .../tests/_files/TestWithDifferentNames.php | 17 - .../tests/_files/TestWithDifferentOutput.php | 39 - .../tests/_files/TestWithDifferentSizes.php | 69 - .../_files/TestWithDifferentStatuses.php | 59 - .../phpunit/tests/_files/TestWithTest.php | 34 - .../_files/TestableCliTestDoxPrinter.php | 25 - .../tests/_files/ThrowExceptionTestCase.php | 26 - .../tests/_files/ThrowNoExceptionTestCase.php | 17 - .../tests/_files/TraitWithConstructor.php | 23 - .../_files/TraversableMockTestInterface.php | 12 - .../phpunit/tests/_files/TruthyConstraint.php | 26 - .../VariousDocblockDefinedDataProvider.php | 82 - .../VariousIterableDataProviderTest.php | 92 - .../phpunit/phpunit/tests/_files/WasRun.php | 20 - .../tests/_files/WrapperIteratorAggregate.php | 29 - vendor/phpunit/phpunit/tests/_files/bar.xml | 1 - .../_files/configuration.colors.empty.xml | 1 - .../_files/configuration.colors.false.xml | 1 - .../_files/configuration.colors.invalid.xml | 1 - .../_files/configuration.colors.true.xml | 1 - .../_files/configuration.columns.default.xml | 1 - .../_files/configuration.defaulttestsuite.xml | 10 - .../_files/configuration.one-file-suite.xml | 7 - .../tests/_files/configuration.suites.xml | 6 - .../phpunit/tests/_files/configuration.xml | 163 - .../tests/_files/configuration_empty.xml | 49 - .../configuration_execution_order_options.xml | 8 - .../_files/configuration_stop_on_defect.xml | 2 - .../_files/configuration_stop_on_error.xml | 2 - .../configuration_stop_on_incomplete.xml | 2 - .../_files/configuration_stop_on_warning.xml | 2 - .../tests/_files/configuration_testdox.xml | 2 - .../configuration_testdox_printerClass.xml | 2 - .../tests/_files/configuration_whitelist.xml | 15 - .../tests/_files/configuration_xinclude.xml | 85 - .../tests/_files/expectedFileFormat.txt | 1 - vendor/phpunit/phpunit/tests/_files/foo.xml | 1 - .../AnotherClassUsingConfigurableMethods.php | 22 - .../tests/_files/mock-object/ChildClass.php | 14 - .../ClassUsingConfigurableMethods.php | 22 - .../mock-object/ClassWithImplicitProtocol.php | 21 - .../ClassWithoutParentButParentReturnType.php | 17 - .../_files/mock-object/MockClassGenerated.tpl | 13 - .../MockClassWithConfigurableMethods.php | 22 - .../_files/mock-object/MockTraitGenerated.tpl | 5 - .../tests/_files/mock-object/ParentClass.php | 17 - .../ReinitializeConfigurableMethods.php | 17 - .../someNamespaceA/NamespacedClass.php | 14 - .../someNamespaceB/NamespacedClass.php | 14 - .../tests/_files/phpt-for-coverage.phpt | 8 - .../_files/phpt-unsupported-section.phpt | 9 - .../phpunit/tests/_files/phpt-xfail.phpt | 10 - .../phpunit-example-extension/phpunit.xml | 10 - .../tests/OneTest.php | 21 - .../phpunit-example-extension-3.0.3.phar | Bin 7706 -> 0 bytes ...uctureAttributesAreSameButValuesAreNot.xml | 10 - .../tests/_files/structureExpected.xml | 10 - .../tests/_files/structureIgnoreTextNodes.xml | 13 - .../_files/structureIsSameButDataIsNot.xml | 10 - .../structureWrongNumberOfAttributes.xml | 10 - .../_files/structureWrongNumberOfNodes.xml | 9 - vendor/phpunit/phpunit/tests/basic/README.md | 16 - .../tests/basic/configuration.basic.xml | 16 - .../tests/basic/unit/SetUpBeforeClassTest.php | 48 - .../phpunit/tests/basic/unit/SetUpTest.php | 41 - .../phpunit/tests/basic/unit/StatusTest.php | 94 - .../basic/unit/TearDownAfterClassTest.php | 38 - vendor/phpunit/phpunit/tests/bootstrap.php | 17 - .../tests/end-to-end/_files/Extension.php | 93 - .../tests/end-to-end/_files/NullPrinter.php | 19 - .../end-to-end/_files/expect_external.txt | 3 - .../end-to-end/_files/phpt-env.expected.txt | 1 - ...expect-external-location-hint-example.phpt | 9 - .../phpt-expect-location-hint-example.phpt | 9 - .../phpt-skipif-location-hint-example.phpt | 10 - .../tests/end-to-end/_files/phpt_external.php | 12 - .../tests/end-to-end/abstract-test-class.phpt | 24 - .../phpunit/tests/end-to-end/assertion.phpt | 37 - .../tests/end-to-end/cli/_files/MyCommand.php | 24 - .../cli/_files/output-cli-help-color.txt | 132 - .../cli/_files/output-cli-usage.txt | 103 - .../tests/end-to-end/cli/columns-max.phpt | 19 - .../phpunit/tests/end-to-end/cli/columns.phpt | 19 - .../cli/generate-configuration.phpt | 21 - .../tests/end-to-end/cli/help-color.phpt | 13 - .../phpunit/tests/end-to-end/cli/help.phpt | 10 - .../phpunit/tests/end-to-end/cli/help2.phpt | 10 - .../tests/end-to-end/cli/mycommand.phpt | 26 - .../cli/options-after-arguments.phpt | 21 - .../end-to-end/cli/test-file-not-found.phpt | 12 - .../end-to-end/code-coverage-ignore.phpt | 35 - .../tests/end-to-end/code-coverage-phpt.phpt | 42 - .../tests/end-to-end/concrete-test-class.phpt | 18 - .../end-to-end/dataprovider-issue-2833.phpt | 17 - .../end-to-end/dataprovider-issue-2859.phpt | 17 - .../end-to-end/dataprovider-issue-2922.phpt | 18 - .../dataprovider-log-xml-isolation.phpt | 46 - .../end-to-end/dataprovider-log-xml.phpt | 45 - .../tests/end-to-end/default-isolation.phpt | 19 - .../phpunit/tests/end-to-end/default.phpt | 18 - .../defaulttestsuite-using-testsuite.phpt | 21 - .../tests/end-to-end/defaulttestsuite.phpt | 19 - .../disable-code-coverage-ignore.phpt | 39 - .../tests/end-to-end/dump-xdebug-filter.phpt | 32 - .../tests/end-to-end/empty-testcase.phpt | 24 - .../tests/end-to-end/exception-stack.phpt | 64 - .../end-to-end/exclude-group-isolation.phpt | 21 - .../tests/end-to-end/exclude-group.phpt | 20 - .../_files/ClonedDependencyTest.php | 67 - .../_files/DependencyTestSuite.php | 23 - .../_files/MultiDependencyTest.php | 50 - .../MultiDependencyTest_result_cache.txt | 1 - .../execution-order/_files/StackTest.php | 34 - .../_files/TestWithDifferentDurations.php | 28 - ...ifferentDurations.phpunit.result.cache.txt | 1 - .../_files/order-by-duration.phpunit.xml | 11 - .../execution-order/cache-result.phpt | 33 - .../defects-first-order-via-cli.phpt | 40 - .../execution-order/dependencies-clone.phpt | 25 - .../dependencies-isolation.phpt | 55 - .../depends-as-parameter-with-isolation.phpt | 22 - .../execution-order/depends-as-parameter.phpt | 21 - ...nds-multiple-parameter-with-isolation.phpt | 22 - .../depends-multiple-parameters.phpt | 21 - .../execution-order-options-via-config.phpt | 34 - .../order-by-default-invalid-via-cli.phpt | 17 - .../order-by-duration-via-cli.phpt | 33 - .../order-by-duration-via-phpunit-xml.phpt | 33 - .../end-to-end/execution-order/repeat.phpt | 23 - .../stop-on-defect-via-cli.phpt | 28 - .../stop-on-defect-via-config.phpt | 28 - .../stop-on-error-via-cli.phpt | 30 - .../stop-on-error-via-config.phpt | 30 - .../stop-on-incomplete-via-cli.phpt | 23 - .../stop-on-incomplete-via-config.phpt | 23 - .../stop-on-warning-via-cli.phpt | 28 - .../stop-on-warning-via-config.phpt | 29 - ...mized-seed-with-dependency-resolution.phpt | 36 - ...randomized-with-dependency-resolution.phpt | 27 - ...r-reversed-with-dependency-resolution.phpt | 36 - ...eversed-without-dependency-resolution.phpt | 45 - ...order-size-with-dependency-resolution.phpt | 42 - .../tests/end-to-end/failure-isolation.phpt | 140 - .../phpunit/tests/end-to-end/failure.phpt | 139 - .../tests/end-to-end/fatal-isolation.phpt | 24 - .../end-to-end/filter-class-isolation.phpt | 21 - .../tests/end-to-end/filter-class.phpt | 20 - ...ider-by-classname-and-range-isolation.phpt | 21 - ...r-dataprovider-by-classname-and-range.phpt | 20 - ...lter-dataprovider-by-number-isolation.phpt | 21 - .../filter-dataprovider-by-number.phpt | 20 - ...-dataprovider-by-only-range-isolation.phpt | 21 - .../filter-dataprovider-by-only-range.phpt | 20 - ...dataprovider-by-only-regexp-isolation.phpt | 21 - .../filter-dataprovider-by-only-regexp.phpt | 20 - ...dataprovider-by-only-string-isolation.phpt | 21 - .../filter-dataprovider-by-only-string.phpt | 20 - ...ilter-dataprovider-by-range-isolation.phpt | 21 - .../filter-dataprovider-by-range.phpt | 20 - ...lter-dataprovider-by-regexp-isolation.phpt | 21 - .../filter-dataprovider-by-regexp.phpt | 20 - ...lter-dataprovider-by-string-isolation.phpt | 21 - .../filter-dataprovider-by-string.phpt | 20 - .../filter-method-case-insensitive.phpt | 20 - ...ilter-method-case-sensitive-no-result.phpt | 20 - .../end-to-end/filter-method-isolation.phpt | 21 - .../tests/end-to-end/filter-method.phpt | 20 - .../tests/end-to-end/filter-no-results.phpt | 20 - .../end-to-end/forward-compatibility.phpt | 18 - .../getActualOutputForAssertion.phpt | 19 - .../tests/end-to-end/group-isolation.phpt | 21 - .../phpunit/tests/end-to-end/group.phpt | 23 - .../tests/end-to-end/ini-isolation.phpt | 21 - .../phpunit/tests/end-to-end/list-groups.phpt | 18 - .../phpunit/tests/end-to-end/list-suites.phpt | 16 - .../end-to-end/list-tests-dataprovider.phpt | 19 - .../list-tests-xml-dataprovider.phpt | 31 - .../end-to-end/loggers/_files/HookTest.php | 52 - .../loggers/_files/TestDoxGroupTest.php | 29 - .../_files/configuration.custom-printer.xml | 2 - .../tests/end-to-end/loggers/_files/hooks.xml | 14 - .../loggers/_files/raw_output_ColorTest.txt | 30 - .../loggers/_files/raw_output_StatusTest.txt | 133 - .../loggers/custom-printer-debug.phpt | 29 - .../loggers/custom-printer-verbose.phpt | 34 - .../tests/end-to-end/loggers/debug.phpt | 143 - .../loggers/failure-reverse-list.phpt | 143 - .../tests/end-to-end/loggers/hooks.phpt | 41 - .../end-to-end/loggers/log-junit-phpt.phpt | 30 - .../tests/end-to-end/loggers/log-junit.phpt | 147 - .../end-to-end/loggers/log-teamcity-phpt.phpt | 28 - .../end-to-end/loggers/log-teamcity.phpt | 41 - .../loggers/teamcity-inner-exceptions.phpt | 42 - .../tests/end-to-end/loggers/teamcity.phpt | 40 - .../loggers/testdox-colors-verbose.phpt | 17 - .../testdox-dataprovider-placeholder.phpt | 17 - .../loggers/testdox-exclude-group.phpt | 28 - .../loggers/testdox-force-flush.phpt | 25 - .../end-to-end/loggers/testdox-group.phpt | 28 - .../end-to-end/loggers/testdox-html.phpt | 60 - .../end-to-end/loggers/testdox-text.phpt | 28 - .../tests/end-to-end/loggers/testdox-xml.phpt | 152 - .../tests/end-to-end/loggers/testdox.phpt | 46 - .../mock-objects/generator/232.phpt | 84 - .../3154_namespaced_constant_resolving.phpt | 69 - .../mock-objects/generator/3530.phpt | 29 - .../mock-objects/generator/397.phpt | 55 - .../generator/abstract_class.phpt | 103 - .../mock-objects/generator/class.phpt | 81 - .../generator/class_call_parent_clone.phpt | 32 - .../class_call_parent_constructor.phpt | 32 - .../class_dont_call_parent_clone.phpt | 32 - .../class_dont_call_parent_constructor.phpt | 32 - ...ing_interface_call_parent_constructor.phpt | 37 - ...nterface_dont_call_parent_constructor.phpt | 37 - .../generator/class_nonexistent_method.phpt | 55 - .../mock-objects/generator/class_partial.phpt | 59 - .../class_with_deprecated_method.phpt | 61 - .../generator/class_with_final_method.phpt | 33 - .../class_with_method_named_method.phpt | 54 - ...ullable_typehinted_variadic_arguments.phpt | 55 - ...od_with_typehinted_variadic_arguments.phpt | 55 - ...s_with_method_with_variadic_arguments.phpt | 55 - .../constant_as_parameter_default_value.phpt | 55 - .../mock-objects/generator/interface.phpt | 53 - .../invocation_object_clone_object.phpt | 82 - .../generator/namespaced_class.phpt | 83 - .../namespaced_class_call_parent_clone.phpt | 34 - ...espaced_class_call_parent_constructor.phpt | 34 - ...mespaced_class_dont_call_parent_clone.phpt | 34 - ...ed_class_dont_call_parent_constructor.phpt | 34 - ...ing_interface_call_parent_constructor.phpt | 39 - ...nterface_dont_call_parent_constructor.phpt | 39 - .../generator/namespaced_class_partial.phpt | 61 - .../generator/namespaced_interface.phpt | 55 - .../generator/nonexistent_class.phpt | 30 - .../nonexistent_class_with_namespace.phpt | 38 - ...ith_namespace_starting_with_separator.phpt | 38 - .../generator/nullable_types.phpt | 55 - .../mock-objects/generator/proxy.phpt | 77 - .../return_type_declarations_closure.phpt | 53 - .../return_type_declarations_final.phpt | 60 - .../return_type_declarations_generator.phpt | 53 - .../return_type_declarations_nullable.phpt | 53 - ...eturn_type_declarations_object_method.phpt | 56 - .../return_type_declarations_parent.phpt | 60 - .../return_type_declarations_self.phpt | 53 - ...eturn_type_declarations_static_method.phpt | 39 - .../return_type_declarations_void.phpt | 51 - .../generator/scalar_type_declarations.phpt | 55 - .../mock-objects/generator/wsdl_class.phpt | 37 - .../generator/wsdl_class_namespace.phpt | 39 - .../generator/wsdl_class_partial.phpt | 30 - .../mock-method/call_original.phpt | 44 - .../call_original_with_argument.phpt | 44 - .../call_original_with_argument_variadic.phpt | 44 - .../call_original_with_return_type_void.phpt | 44 - .../mock-method/clone_method_arguments.phpt | 44 - .../deprecated_with_description.phpt | 49 - .../deprecated_without_description.phpt | 49 - .../mock-method/private_method.phpt | 44 - .../mock-method/protected_method.phpt | 44 - .../mock-method/return_by_reference.phpt | 44 - .../return_by_reference_with_return_type.phpt | 44 - .../mock-objects/mock-method/return_type.phpt | 44 - .../mock-method/return_type_parent.phpt | 48 - .../mock-method/return_type_self.phpt | 44 - .../mock-method/static_method.phpt | 27 - .../static_method_with_return_type.phpt | 27 - .../mock-method/with_argument.phpt | 44 - .../mock-method/with_argument_default.phpt | 44 - .../with_argument_default_constant.phpt | 49 - .../with_argument_default_null.phpt | 44 - .../mock-method/with_argument_nullable.phpt | 44 - .../mock-method/with_argument_reference.phpt | 44 - .../with_argument_typed_array.phpt | 44 - .../with_argument_typed_callable.phpt | 44 - .../with_argument_typed_class.phpt | 44 - .../with_argument_typed_scalar.phpt | 44 - .../mock-method/with_argument_typed_self.phpt | 44 - .../with_argument_typed_unkown_class.phpt | 44 - .../with_argument_typed_variadic.phpt | 44 - .../mock-method/with_argument_variadic.phpt | 44 - .../mock-method/with_arguments.phpt | 44 - .../tests/end-to-end/output-isolation.phpt | 20 - .../end-to-end/phar-extension-suppressed.phpt | 12 - .../tests/end-to-end/phar-extension.phpt | 21 - .../phpunit/tests/end-to-end/phpt-args.phpt | 11 - .../phpunit/tests/end-to-end/phpt-env.phpt | 11 - .../tests/end-to-end/phpt-external.phpt | 6 - .../tests/end-to-end/phpt-parsing.phpt | 26 - .../phpunit/tests/end-to-end/phpt-stderr.phpt | 8 - .../phpunit/tests/end-to-end/phpt-stdin.phpt | 10 - .../phpunit/tests/end-to-end/phpt-xfail.phpt | 18 - .../phpt/expect-external-location-hint.phpt | 41 - .../end-to-end/phpt/expect-location-hint.phpt | 39 - .../end-to-end/phpt/skipif-location-hint.phpt | 31 - .../end-to-end/regression/GitHub/1149.phpt | 18 - .../regression/GitHub/1149/Issue1149Test.php | 28 - .../end-to-end/regression/GitHub/1216.phpt | 23 - .../regression/GitHub/1216/Issue1216Test.php | 18 - .../regression/GitHub/1216/bootstrap1216.php | 10 - .../regression/GitHub/1216/phpunit1216.xml | 8 - .../end-to-end/regression/GitHub/1265.phpt | 19 - .../regression/GitHub/1265/Issue1265Test.php | 18 - .../regression/GitHub/1265/phpunit1265.xml | 2 - .../end-to-end/regression/GitHub/1330.phpt | 22 - .../regression/GitHub/1330/Issue1330Test.php | 18 - .../regression/GitHub/1330/phpunit1330.xml | 5 - .../end-to-end/regression/GitHub/1335.phpt | 19 - .../regression/GitHub/1335/Issue1335Test.php | 77 - .../regression/GitHub/1335/bootstrap1335.php | 21 - .../end-to-end/regression/GitHub/1337.phpt | 19 - .../regression/GitHub/1337/Issue1337Test.php | 29 - .../end-to-end/regression/GitHub/1348.phpt | 32 - .../regression/GitHub/1348/Issue1348Test.php | 24 - .../end-to-end/regression/GitHub/1351.phpt | 45 - .../GitHub/1351/ChildProcessClass1351.php | 12 - .../regression/GitHub/1351/Issue1351Test.php | 59 - .../end-to-end/regression/GitHub/1374.phpt | 19 - .../regression/GitHub/1374/Issue1374Test.php | 31 - .../end-to-end/regression/GitHub/1437.phpt | 26 - .../regression/GitHub/1437/Issue1437Test.php | 19 - .../end-to-end/regression/GitHub/1468.phpt | 20 - .../regression/GitHub/1468/Issue1468Test.php | 21 - .../end-to-end/regression/GitHub/1471.phpt | 26 - .../regression/GitHub/1471/Issue1471Test.php | 22 - .../end-to-end/regression/GitHub/1472.phpt | 18 - .../regression/GitHub/1472/Issue1472Test.php | 31 - .../end-to-end/regression/GitHub/1570.phpt | 27 - .../regression/GitHub/1570/Issue1570Test.php | 18 - ...it-options-via-config-without-invoker.phpt | 33 - .../GitHub/2085-without-invoker.phpt | 34 - .../end-to-end/regression/GitHub/2085.phpt | 38 - .../regression/GitHub/2085/Issue2085Test.php | 20 - ...nfiguration_enforce_time_limit_options.xml | 2 - .../regression/GitHub/2137-filter.phpt | 27 - .../regression/GitHub/2137-no_filter.phpt | 29 - .../regression/GitHub/2137/Issue2137Test.php | 43 - .../end-to-end/regression/GitHub/2145.phpt | 25 - .../regression/GitHub/2145/Issue2145Test.php | 24 - .../end-to-end/regression/GitHub/2158.phpt | 18 - .../regression/GitHub/2158/Issue2158Test.php | 33 - .../regression/GitHub/2158/constant.inc | 4 - .../end-to-end/regression/GitHub/2366.phpt | 18 - .../regression/GitHub/2366/Issue2366Test.php | 41 - .../end-to-end/regression/GitHub/2380.phpt | 18 - .../regression/GitHub/2380/Issue2380Test.php | 29 - .../end-to-end/regression/GitHub/2382.phpt | 18 - .../regression/GitHub/2382/Issue2382Test.php | 30 - .../end-to-end/regression/GitHub/2435.phpt | 18 - .../regression/GitHub/2435/Issue2435Test.php | 16 - .../regression/GitHub/2448-existing-test.phpt | 21 - .../GitHub/2448-not-existing-test.phpt | 13 - .../regression/GitHub/2448/Test.php | 16 - .../2724-diff-pid-from-master-process.phpt | 21 - ...SeparateClassRunMethodInNewProcessTest.php | 53 - .../2725-separate-class-before-after-pid.phpt | 17 - .../GitHub/2725/BeforeAfterClassPidTest.php | 50 - .../end-to-end/regression/GitHub/2731.phpt | 25 - .../regression/GitHub/2731/Issue2731Test.php | 19 - .../end-to-end/regression/GitHub/2811.phpt | 19 - .../regression/GitHub/2811/Issue2811Test.php | 18 - .../end-to-end/regression/GitHub/2830.phpt | 19 - .../regression/GitHub/2830/Issue2830Test.php | 27 - .../end-to-end/regression/GitHub/2972.phpt | 17 - .../GitHub/2972/issue-2972-test.phpt | 10 - .../2972/unconventiallyNamedIssue2972Test.php | 20 - .../regression/GitHub/3093/Issue3093Test.php | 30 - .../GitHub/3093/issue-3093-test.phpt | 18 - .../regression/GitHub/3156/Issue3156Test.php | 40 - .../end-to-end/regression/GitHub/322.phpt | 25 - .../regression/GitHub/322/Issue322Test.php | 29 - .../regression/GitHub/322/phpunit322.xml | 11 - .../end-to-end/regression/GitHub/3379.phpt | 20 - .../regression/GitHub/3379/Issue3379Test.php | 28 - .../GitHub/3379/Issue3379TestListener.php | 26 - .../regression/GitHub/3379/phpunit.xml | 13 - .../GitHub/3380/issue-3380-test.phpt | 63 - .../GitHub/3396/issue-3396-test.phpt | 55 - .../end-to-end/regression/GitHub/3739.phpt | 28 - .../regression/GitHub/3739/Issue3739Test.php | 38 - .../end-to-end/regression/GitHub/3881.phpt | 18 - .../regression/GitHub/3881/Issue3881Test.php | 22 - .../end-to-end/regression/GitHub/433.phpt | 29 - .../regression/GitHub/433/Issue433Test.php | 31 - .../end-to-end/regression/GitHub/445.phpt | 30 - .../regression/GitHub/445/Issue445Test.php | 31 - .../end-to-end/regression/GitHub/498.phpt | 27 - .../regression/GitHub/498/Issue498Test.php | 53 - .../end-to-end/regression/GitHub/503.phpt | 33 - .../regression/GitHub/503/Issue503Test.php | 21 - .../end-to-end/regression/GitHub/581.phpt | 38 - .../regression/GitHub/581/Issue581Test.php | 21 - .../end-to-end/regression/GitHub/74.phpt | 27 - .../regression/GitHub/74/Issue74Test.php | 20 - .../regression/GitHub/74/NewException.php | 12 - .../end-to-end/regression/GitHub/765.phpt | 24 - .../regression/GitHub/765/Issue765Test.php | 32 - .../end-to-end/regression/GitHub/797.phpt | 20 - .../regression/GitHub/797/Issue797Test.php | 20 - .../regression/GitHub/797/bootstrap797.php | 13 - .../end-to-end/regression/GitHub/863.phpt | 22 - .../end-to-end/regression/GitHub/873.phpt | 19 - .../regression/GitHub/873/Issue873Test.php | 16 - .../end-to-end/regression/Trac/1021.phpt | 18 - .../regression/Trac/1021/Issue1021Test.php | 34 - .../tests/end-to-end/regression/Trac/578.phpt | 36 - .../regression/Trac/578/Issue578Test.php | 30 - .../tests/end-to-end/regression/Trac/684.phpt | 24 - .../regression/Trac/684/Issue684Test.php | 14 - .../tests/end-to-end/regression/Trac/783.phpt | 20 - .../regression/Trac/783/ChildSuite.php | 26 - .../regression/Trac/783/OneTest.php | 21 - .../regression/Trac/783/ParentSuite.php | 23 - .../regression/Trac/783/TwoTest.php | 21 - ...ated-with-does-not-perform-assertions.phpt | 24 - .../report-useless-tests-incomplete.phpt | 19 - .../report-useless-tests-isolation.phpt | 27 - .../end-to-end/report-useless-tests.phpt | 26 - .../requires-skip-code-location-hints.phpt | 120 - .../end-to-end/test-suffix-multiple.phpt | 19 - .../tests/end-to-end/test-suffix-single.phpt | 19 - vendor/phpunit/phpunit/tests/fail/fail.phpt | 5 - .../tests/static-analysis/TestUsingMocks.php | 94 - .../happy-path/assert-empty.php | 20 - .../happy-path/assert-false.php | 24 - .../happy-path/assert-instance-of.php | 19 - .../happy-path/assert-is-array.php | 20 - .../happy-path/assert-is-bool.php | 20 - .../happy-path/assert-is-callable.php | 20 - .../happy-path/assert-is-float.php | 20 - .../happy-path/assert-is-int.php | 20 - .../happy-path/assert-is-iterable.php | 20 - .../happy-path/assert-is-not-array.php | 20 - .../happy-path/assert-is-not-bool.php | 20 - .../happy-path/assert-is-not-callable.php | 20 - .../happy-path/assert-is-not-float.php | 20 - .../happy-path/assert-is-not-int.php | 20 - .../happy-path/assert-is-not-iterable.php | 20 - .../happy-path/assert-is-not-numeric.php | 20 - .../happy-path/assert-is-not-object.php | 20 - .../happy-path/assert-is-not-resource.php | 20 - .../happy-path/assert-is-not-scalar.php | 20 - .../happy-path/assert-is-not-string.php | 20 - .../happy-path/assert-is-numeric.php | 24 - .../happy-path/assert-is-object.php | 20 - .../happy-path/assert-is-resource.php | 24 - .../happy-path/assert-is-scalar.php | 24 - .../happy-path/assert-is-string.php | 20 - .../happy-path/assert-not-empty.php | 19 - .../happy-path/assert-not-false.php | 20 - .../happy-path/assert-not-instance-of.php | 27 - .../happy-path/assert-not-null.php | 19 - .../happy-path/assert-not-true.php | 20 - .../happy-path/assert-null.php | 24 - .../happy-path/assert-same.php | 19 - .../happy-path/assert-true.php | 24 - .../tests/static-analysis/happy-path/fail.php | 22 - .../unit/Framework/Assert/FunctionsTest.php | 61 - .../tests/unit/Framework/AssertTest.php | 2534 ------------- .../Framework/Constraint/ArrayHasKeyTest.php | 85 - .../Framework/Constraint/ArraySubsetTest.php | 89 - .../Framework/Constraint/CallbackTest.php | 68 - .../Constraint/ClassHasAttributeTest.php | 73 - .../ClassHasStaticAttributeTest.php | 69 - .../Constraint/ConstraintTestCase.php | 57 - .../unit/Framework/Constraint/CountTest.php | 186 - .../Constraint/DirectoryExistsTest.php | 69 - .../Constraint/ExceptionCodeTest.php | 46 - .../Constraint/ExceptionMessageRegExpTest.php | 55 - .../Constraint/ExceptionMessageTest.php | 64 - .../Framework/Constraint/ExceptionTest.php | 22 - .../Framework/Constraint/FileExistsTest.php | 68 - .../Framework/Constraint/GreaterThanTest.php | 69 - .../unit/Framework/Constraint/IsEmptyTest.php | 80 - .../unit/Framework/Constraint/IsEqualTest.php | 331 -- .../Framework/Constraint/IsIdenticalTest.php | 200 - .../Framework/Constraint/IsInstanceOfTest.php | 56 - .../unit/Framework/Constraint/IsJsonTest.php | 66 - .../unit/Framework/Constraint/IsNullTest.php | 69 - .../Framework/Constraint/IsReadableTest.php | 45 - .../unit/Framework/Constraint/IsTypeTest.php | 140 - .../Framework/Constraint/IsWritableTest.php | 45 - .../JsonMatchesErrorMessageProviderTest.php | 91 - .../Framework/Constraint/JsonMatchesTest.php | 136 - .../Framework/Constraint/LessThanTest.php | 69 - .../Framework/Constraint/LogicalAndTest.php | 238 -- .../Framework/Constraint/LogicalNotTest.php | 22 - .../Framework/Constraint/LogicalOrTest.php | 233 -- .../Framework/Constraint/LogicalXorTest.php | 56 - .../Constraint/ObjectHasAttributeTest.php | 69 - .../Constraint/RegularExpressionTest.php | 69 - .../Framework/Constraint/SameSizeTest.php | 65 - .../Constraint/StringContainsTest.php | 108 - .../Constraint/StringEndsWithTest.php | 106 - .../StringMatchesFormatDescriptionTest.php | 281 -- .../Constraint/StringStartsWithTest.php | 113 - .../Constraint/TraversableContainsTest.php | 201 - .../tests/unit/Framework/ConstraintTest.php | 1441 ------- .../Framework/Exception/ExceptionTest.php | 28 - .../InvalidArgumentExceptionTest.php | 34 - .../unit/Framework/ExceptionWrapperTest.php | 58 - .../unit/Framework/IncompleteTestCaseTest.php | 88 - .../Builder/InvocationMockerTest.php | 241 -- .../MockObject/ConfigurableMethodTest.php | 34 - .../MockObject/ConfigurableMethodsTest.php | 37 - .../Framework/MockObject/GeneratorTest.php | 317 -- .../MockObject/InvocationHandlerTest.php | 26 - .../Matcher/ConsecutiveParametersTest.php | 89 - .../unit/Framework/MockObject/MatcherTest.php | 118 - .../Framework/MockObject/MockBuilderTest.php | 263 -- .../Framework/MockObject/MockClassTest.php | 47 - .../Framework/MockObject/MockMethodTest.php | 50 - .../Framework/MockObject/MockObjectTest.php | 1145 ------ .../Framework/MockObject/MockTraitTest.php | 36 - .../Framework/MockObject/ProxyObjectTest.php | 96 - .../unit/Framework/SkippedTestCaseTest.php | 88 - .../tests/unit/Framework/TestBuilderTest.php | 118 - .../tests/unit/Framework/TestCaseTest.php | 1226 ------ .../tests/unit/Framework/TestFailureTest.php | 144 - .../unit/Framework/TestImplementorTest.php | 28 - .../tests/unit/Framework/TestListenerTest.php | 63 - .../unit/Framework/TestSuiteIteratorTest.php | 216 -- .../tests/unit/Framework/TestSuiteTest.php | 231 -- .../Runner/DefaultTestResultCacheTest.php | 34 - .../Runner/Filter/NameFilterIteratorTest.php | 41 - .../tests/unit/Runner/PhptTestCaseTest.php | 352 -- .../unit/Runner/ResultCacheExtensionTest.php | 141 - .../tests/unit/Runner/TestSuiteSorterTest.php | 633 ---- .../unit/Util/Annotation/RegistryTest.php | 87 - .../unit/Util/ConfigurationGeneratorTest.php | 56 - .../tests/unit/Util/ConfigurationTest.php | 651 ---- .../phpunit/tests/unit/Util/GetoptTest.php | 217 -- .../tests/unit/Util/GlobalStateTest.php | 38 - .../phpunit/tests/unit/Util/JsonTest.php | 85 - .../unit/Util/NullTestResultCacheTest.php | 29 - .../unit/Util/PHP/AbstractPhpProcessTest.php | 122 - .../tests/unit/Util/RegularExpressionTest.php | 61 - .../TestDox/CliTestDoxPrinterColorTest.php | 51 - .../Util/TestDox/CliTestDoxPrinterTest.php | 213 -- .../tests/unit/Util/TestDox/ColorTest.php | 173 - .../unit/Util/TestDox/NamePrettifierTest.php | 176 - .../tests/unit/Util/TestResultCacheTest.php | 96 - .../phpunit/tests/unit/Util/TestTest.php | 1460 -------- .../Util/XDebugFilterScriptGeneratorTest.php | 86 - .../phpunit/tests/unit/Util/XmlTest.php | 131 - .../code-unit-reverse-lookup/.gitignore | 4 - .../code-unit-reverse-lookup/.php_cs | 67 - .../code-unit-reverse-lookup/.travis.yml | 25 - .../code-unit-reverse-lookup/ChangeLog.md | 10 - .../code-unit-reverse-lookup/LICENSE | 33 - .../code-unit-reverse-lookup/README.md | 14 - .../code-unit-reverse-lookup/build.xml | 22 - .../code-unit-reverse-lookup/composer.json | 28 - .../code-unit-reverse-lookup/phpunit.xml | 21 - .../code-unit-reverse-lookup/src/Wizard.php | 111 - .../tests/WizardTest.php | 45 - vendor/sebastian/comparator/.github/stale.yml | 40 - vendor/sebastian/comparator/.gitignore | 4 - vendor/sebastian/comparator/.php_cs.dist | 189 - vendor/sebastian/comparator/.travis.yml | 33 - vendor/sebastian/comparator/ChangeLog.md | 59 - vendor/sebastian/comparator/LICENSE | 33 - vendor/sebastian/comparator/README.md | 37 - vendor/sebastian/comparator/build.xml | 21 - vendor/sebastian/comparator/composer.json | 54 - vendor/sebastian/comparator/phpunit.xml | 21 - .../comparator/src/ArrayComparator.php | 130 - .../sebastian/comparator/src/Comparator.php | 61 - .../comparator/src/ComparisonFailure.php | 128 - .../comparator/src/DOMNodeComparator.php | 86 - .../comparator/src/DateTimeComparator.php | 86 - .../comparator/src/DoubleComparator.php | 56 - .../comparator/src/ExceptionComparator.php | 52 - vendor/sebastian/comparator/src/Factory.php | 138 - .../comparator/src/MockObjectComparator.php | 47 - .../comparator/src/NumericComparator.php | 68 - .../comparator/src/ObjectComparator.php | 106 - .../comparator/src/ResourceComparator.php | 52 - .../comparator/src/ScalarComparator.php | 91 - .../src/SplObjectStorageComparator.php | 69 - .../comparator/src/TypeComparator.php | 59 - .../comparator/tests/ArrayComparatorTest.php | 161 - .../tests/ComparisonFailureTest.php | 59 - .../tests/DOMNodeComparatorTest.php | 180 - .../tests/DateTimeComparatorTest.php | 213 -- .../comparator/tests/DoubleComparatorTest.php | 135 - .../tests/ExceptionComparatorTest.php | 136 - .../comparator/tests/FactoryTest.php | 117 - .../tests/MockObjectComparatorTest.php | 168 - .../tests/NumericComparatorTest.php | 123 - .../comparator/tests/ObjectComparatorTest.php | 150 - .../tests/ResourceComparatorTest.php | 122 - .../comparator/tests/ScalarComparatorTest.php | 164 - .../tests/SplObjectStorageComparatorTest.php | 145 - .../comparator/tests/TypeComparatorTest.php | 107 - .../comparator/tests/_fixture/Author.php | 26 - .../comparator/tests/_fixture/Book.php | 19 - .../tests/_fixture/ClassWithToString.php | 18 - .../comparator/tests/_fixture/SampleClass.php | 29 - .../comparator/tests/_fixture/Struct.php | 23 - .../comparator/tests/_fixture/TestClass.php | 14 - .../tests/_fixture/TestClassComparator.php | 14 - vendor/sebastian/diff/.github/stale.yml | 40 - vendor/sebastian/diff/.gitignore | 6 - vendor/sebastian/diff/.php_cs.dist | 168 - vendor/sebastian/diff/.travis.yml | 26 - vendor/sebastian/diff/ChangeLog.md | 53 - vendor/sebastian/diff/LICENSE | 33 - vendor/sebastian/diff/README.md | 195 - vendor/sebastian/diff/build.xml | 22 - vendor/sebastian/diff/composer.json | 39 - vendor/sebastian/diff/phpunit.xml | 21 - vendor/sebastian/diff/src/Chunk.php | 90 - vendor/sebastian/diff/src/Diff.php | 67 - vendor/sebastian/diff/src/Differ.php | 330 -- .../src/Exception/ConfigurationException.php | 40 - .../diff/src/Exception/Exception.php | 15 - .../Exception/InvalidArgumentException.php | 15 - vendor/sebastian/diff/src/Line.php | 44 - .../LongestCommonSubsequenceCalculator.php | 24 - ...ientLongestCommonSubsequenceCalculator.php | 81 - .../src/Output/AbstractChunkOutputBuilder.php | 56 - .../diff/src/Output/DiffOnlyOutputBuilder.php | 68 - .../src/Output/DiffOutputBuilderInterface.php | 20 - .../Output/StrictUnifiedDiffOutputBuilder.php | 318 -- .../src/Output/UnifiedDiffOutputBuilder.php | 264 -- vendor/sebastian/diff/src/Parser.php | 106 - ...ientLongestCommonSubsequenceCalculator.php | 66 - vendor/sebastian/diff/tests/ChunkTest.php | 73 - vendor/sebastian/diff/tests/DiffTest.php | 55 - vendor/sebastian/diff/tests/DifferTest.php | 444 --- .../Exception/ConfigurationExceptionTest.php | 41 - .../InvalidArgumentExceptionTest.php | 33 - vendor/sebastian/diff/tests/LineTest.php | 44 - .../tests/LongestCommonSubsequenceTest.php | 201 - .../MemoryEfficientImplementationTest.php | 22 - .../Output/AbstractChunkOutputBuilderTest.php | 152 - .../Output/DiffOnlyOutputBuilderTest.php | 76 - ...nifiedDiffOutputBuilderIntegrationTest.php | 299 -- ...nifiedDiffOutputBuilderIntegrationTest.php | 163 - ...ctUnifiedDiffOutputBuilderDataProvider.php | 189 - .../StrictUnifiedDiffOutputBuilderTest.php | 684 ---- .../UnifiedDiffOutputBuilderDataProvider.php | 396 -- .../Output/UnifiedDiffOutputBuilderTest.php | 90 - vendor/sebastian/diff/tests/ParserTest.php | 170 - .../tests/TimeEfficientImplementationTest.php | 22 - .../sebastian/diff/tests/Utils/FileUtils.php | 31 - .../tests/Utils/UnifiedDiffAssertTrait.php | 277 -- .../UnifiedDiffAssertTraitIntegrationTest.php | 129 - .../Utils/UnifiedDiffAssertTraitTest.php | 434 --- .../diff/tests/fixtures/.editorconfig | 1 - .../1_a.txt | 1 - .../1_b.txt | 0 .../2_a.txt | 35 - .../2_b.txt | 18 - .../diff/tests/fixtures/out/.editorconfig | 1 - .../diff/tests/fixtures/out/.gitignore | 2 - .../sebastian/diff/tests/fixtures/patch.txt | 9 - .../sebastian/diff/tests/fixtures/patch2.txt | 21 - .../diff/tests/fixtures/serialized_diff.bin | Bin 4143 -> 0 bytes .../sebastian/environment/.github/stale.yml | 40 - vendor/sebastian/environment/.gitignore | 5 - vendor/sebastian/environment/.php_cs.dist | 199 - vendor/sebastian/environment/.travis.yml | 28 - vendor/sebastian/environment/ChangeLog.md | 109 - vendor/sebastian/environment/LICENSE | 33 - vendor/sebastian/environment/README.md | 17 - vendor/sebastian/environment/build.xml | 19 - vendor/sebastian/environment/composer.json | 37 - vendor/sebastian/environment/phpunit.xml | 20 - vendor/sebastian/environment/src/Console.php | 160 - .../environment/src/OperatingSystem.php | 48 - vendor/sebastian/environment/src/Runtime.php | 265 -- .../environment/tests/ConsoleTest.php | 64 - .../environment/tests/OperatingSystemTest.php | 52 - .../environment/tests/RuntimeTest.php | 165 - vendor/sebastian/exporter/.github/FUNDING.yml | 1 - vendor/sebastian/exporter/.gitignore | 5 - vendor/sebastian/exporter/.php_cs.dist | 190 - vendor/sebastian/exporter/.travis.yml | 24 - vendor/sebastian/exporter/ChangeLog.md | 15 - vendor/sebastian/exporter/LICENSE | 33 - vendor/sebastian/exporter/README.md | 171 - vendor/sebastian/exporter/build.xml | 19 - vendor/sebastian/exporter/composer.json | 53 - vendor/sebastian/exporter/phpunit.xml | 19 - vendor/sebastian/exporter/src/Exporter.php | 303 -- .../sebastian/exporter/tests/ExporterTest.php | 432 --- .../sebastian/global-state/.github/stale.yml | 40 - vendor/sebastian/global-state/.gitignore | 6 - vendor/sebastian/global-state/.php_cs.dist | 197 - vendor/sebastian/global-state/.travis.yml | 24 - vendor/sebastian/global-state/ChangeLog.md | 16 - vendor/sebastian/global-state/LICENSE | 33 - vendor/sebastian/global-state/README.md | 16 - vendor/sebastian/global-state/build.xml | 19 - vendor/sebastian/global-state/composer.json | 48 - vendor/sebastian/global-state/phpunit.xml | 27 - .../sebastian/global-state/src/Blacklist.php | 118 - .../global-state/src/CodeExporter.php | 91 - .../sebastian/global-state/src/Restorer.php | 132 - .../sebastian/global-state/src/Snapshot.php | 419 --- .../global-state/src/exceptions/Exception.php | 14 - .../src/exceptions/RuntimeException.php | 14 - .../global-state/tests/BlacklistTest.php | 117 - .../global-state/tests/CodeExporterTest.php | 35 - .../global-state/tests/RestorerTest.php | 68 - .../global-state/tests/SnapshotTest.php | 120 - .../tests/_fixture/BlacklistedChildClass.php | 14 - .../tests/_fixture/BlacklistedClass.php | 15 - .../tests/_fixture/BlacklistedImplementor.php | 15 - .../tests/_fixture/BlacklistedInterface.php | 14 - .../tests/_fixture/SnapshotClass.php | 35 - .../tests/_fixture/SnapshotDomDocument.php | 16 - .../tests/_fixture/SnapshotFunctions.php | 14 - .../tests/_fixture/SnapshotTrait.php | 14 - vendor/sebastian/object-enumerator/.gitignore | 8 - vendor/sebastian/object-enumerator/.php_cs | 67 - .../sebastian/object-enumerator/.travis.yml | 26 - .../sebastian/object-enumerator/ChangeLog.md | 53 - vendor/sebastian/object-enumerator/LICENSE | 33 - vendor/sebastian/object-enumerator/README.md | 14 - vendor/sebastian/object-enumerator/build.xml | 22 - .../sebastian/object-enumerator/composer.json | 35 - .../sebastian/object-enumerator/phpunit.xml | 20 - .../object-enumerator/src/Enumerator.php | 85 - .../object-enumerator/src/Exception.php | 15 - .../src/InvalidArgumentException.php | 15 - .../tests/EnumeratorTest.php | 139 - .../tests/_fixture/ExceptionThrower.php | 28 - vendor/sebastian/object-reflector/.gitignore | 4 - vendor/sebastian/object-reflector/.php_cs | 79 - vendor/sebastian/object-reflector/.travis.yml | 26 - .../sebastian/object-reflector/ChangeLog.md | 20 - vendor/sebastian/object-reflector/LICENSE | 33 - vendor/sebastian/object-reflector/README.md | 14 - vendor/sebastian/object-reflector/build.xml | 22 - .../sebastian/object-reflector/composer.json | 33 - vendor/sebastian/object-reflector/phpunit.xml | 19 - .../object-reflector/src/Exception.php | 17 - .../src/InvalidArgumentException.php | 17 - .../object-reflector/src/ObjectReflector.php | 51 - .../tests/ObjectReflectorTest.php | 70 - .../tests/_fixture/ChildClass.php | 25 - .../ClassWithIntegerAttributeName.php | 22 - .../tests/_fixture/ParentClass.php | 20 - vendor/sebastian/recursion-context/.gitignore | 3 - .../sebastian/recursion-context/.travis.yml | 23 - vendor/sebastian/recursion-context/LICENSE | 33 - vendor/sebastian/recursion-context/README.md | 14 - vendor/sebastian/recursion-context/build.xml | 21 - .../sebastian/recursion-context/composer.json | 36 - .../sebastian/recursion-context/phpunit.xml | 19 - .../recursion-context/src/Context.php | 167 - .../recursion-context/src/Exception.php | 17 - .../src/InvalidArgumentException.php | 17 - .../recursion-context/tests/ContextTest.php | 142 - .../resource-operations/.github/stale.yml | 40 - .../sebastian/resource-operations/.gitignore | 5 - .../resource-operations/.php_cs.dist | 191 - .../resource-operations/ChangeLog.md | 26 - vendor/sebastian/resource-operations/LICENSE | 33 - .../sebastian/resource-operations/README.md | 14 - .../sebastian/resource-operations/build.xml | 38 - .../resource-operations/build/generate.php | 65 - .../resource-operations/composer.json | 33 - .../src/ResourceOperations.php | 2232 ----------- .../tests/ResourceOperationsTest.php | 26 - vendor/sebastian/type/.gitattributes | 2 - vendor/sebastian/type/.github/FUNDING.yml | 1 - vendor/sebastian/type/.gitignore | 72 - .../inspectionProfiles/Project_Default.xml | 499 --- vendor/sebastian/type/.idea/misc.xml | 6 - vendor/sebastian/type/.idea/modules.xml | 8 - .../.idea/php-inspections-ea-ultimate.xml | 20 - vendor/sebastian/type/.idea/php.xml | 42 - vendor/sebastian/type/.idea/type.iml | 40 - vendor/sebastian/type/.idea/vcs.xml | 6 - vendor/sebastian/type/.php_cs.dist | 200 - vendor/sebastian/type/.travis.yml | 53 - vendor/sebastian/type/ChangeLog.md | 38 - vendor/sebastian/type/LICENSE | 33 - vendor/sebastian/type/README.md | 17 - vendor/sebastian/type/build.xml | 31 - vendor/sebastian/type/composer.json | 49 - vendor/sebastian/type/phive.xml | 5 - vendor/sebastian/type/phpunit.xml | 23 - vendor/sebastian/type/psalm.xml | 53 - vendor/sebastian/type/src/CallableType.php | 182 - .../sebastian/type/src/GenericObjectType.php | 46 - vendor/sebastian/type/src/IterableType.php | 67 - vendor/sebastian/type/src/NullType.php | 28 - vendor/sebastian/type/src/ObjectType.php | 63 - vendor/sebastian/type/src/SimpleType.php | 86 - vendor/sebastian/type/src/Type.php | 75 - vendor/sebastian/type/src/TypeName.php | 77 - vendor/sebastian/type/src/UnknownType.php | 28 - vendor/sebastian/type/src/VoidType.php | 28 - .../type/src/exception/Exception.php | 14 - .../type/src/exception/RuntimeException.php | 14 - .../type/tests/_fixture/ChildClass.php | 14 - .../_fixture/ClassWithCallbackMethods.php | 21 - .../tests/_fixture/ClassWithInvokeMethod.php | 17 - .../type/tests/_fixture/Iterator.php | 33 - .../type/tests/_fixture/ParentClass.php | 17 - .../type/tests/_fixture/callback_function.php | 14 - .../type/tests/unit/CallableTypeTest.php | 150 - .../type/tests/unit/GenericObjectTypeTest.php | 86 - .../type/tests/unit/IterableTypeTest.php | 97 - .../type/tests/unit/NullTypeTest.php | 72 - .../type/tests/unit/ObjectTypeTest.php | 140 - .../type/tests/unit/SimpleTypeTest.php | 162 - .../type/tests/unit/TypeNameTest.php | 59 - vendor/sebastian/type/tests/unit/TypeTest.php | 85 - .../type/tests/unit/UnknownTypeTest.php | 58 - .../type/tests/unit/VoidTypeTest.php | 70 - vendor/sebastian/version/.gitattributes | 1 - vendor/sebastian/version/.gitignore | 1 - vendor/sebastian/version/.php_cs | 66 - vendor/sebastian/version/LICENSE | 33 - vendor/sebastian/version/README.md | 43 - vendor/sebastian/version/composer.json | 29 - vendor/sebastian/version/src/Version.php | 109 - vendor/symfony/polyfill-ctype/Ctype.php | 227 -- vendor/symfony/polyfill-ctype/LICENSE | 19 - vendor/symfony/polyfill-ctype/README.md | 12 - vendor/symfony/polyfill-ctype/bootstrap.php | 26 - vendor/symfony/polyfill-ctype/composer.json | 34 - vendor/theseer/tokenizer/.gitignore | 8 - vendor/theseer/tokenizer/.php_cs | 67 - vendor/theseer/tokenizer/.travis.yml | 34 - vendor/theseer/tokenizer/CHANGELOG.md | 32 - vendor/theseer/tokenizer/LICENSE | 30 - vendor/theseer/tokenizer/README.md | 49 - vendor/theseer/tokenizer/build.xml | 41 - vendor/theseer/tokenizer/composer.json | 27 - vendor/theseer/tokenizer/phive.xml | 5 - vendor/theseer/tokenizer/phpunit.xml | 25 - vendor/theseer/tokenizer/src/Exception.php | 6 - vendor/theseer/tokenizer/src/NamespaceUri.php | 28 - .../tokenizer/src/NamespaceUriException.php | 6 - vendor/theseer/tokenizer/src/Token.php | 55 - .../theseer/tokenizer/src/TokenCollection.php | 128 - .../src/TokenCollectionException.php | 6 - vendor/theseer/tokenizer/src/Tokenizer.php | 87 - .../theseer/tokenizer/src/XMLSerializer.php | 97 - .../tokenizer/tests/NamespaceUriTest.php | 29 - .../tokenizer/tests/TokenCollectionTest.php | 72 - vendor/theseer/tokenizer/tests/TokenTest.php | 31 - .../theseer/tokenizer/tests/TokenizerTest.php | 21 - .../tokenizer/tests/XMLSerializerTest.php | 50 - .../tokenizer/tests/_files/customns.xml | 177 - .../theseer/tokenizer/tests/_files/empty.xml | 2 - .../theseer/tokenizer/tests/_files/test.php | 25 - .../tokenizer/tests/_files/test.php.tokens | Bin 29474 -> 0 bytes .../tokenizer/tests/_files/test.php.xml | 177 - vendor/webmozart/assert/.editorconfig | 12 - vendor/webmozart/assert/CHANGELOG.md | 103 - vendor/webmozart/assert/LICENSE | 20 - vendor/webmozart/assert/README.md | 251 -- vendor/webmozart/assert/ci/composer.json | 5 - vendor/webmozart/assert/composer.json | 38 - vendor/webmozart/assert/psalm.xml | 15 - vendor/webmozart/assert/src/Assert.php | 1702 --------- 1939 files changed, 149274 deletions(-) rename gitignore => .gitignore (100%) delete mode 100755 .idea/misc.xml delete mode 100755 .idea/modules.xml delete mode 100755 .idea/php-card-detector.iml delete mode 100644 .idea/php-test-framework.xml delete mode 100755 .idea/php.xml delete mode 100755 .idea/vcs.xml delete mode 100755 .idea/workspace.xml delete mode 100644 composer.lock delete mode 100644 vendor/autoload.php delete mode 120000 vendor/bin/phpunit delete mode 100644 vendor/composer/ClassLoader.php delete mode 100644 vendor/composer/LICENSE delete mode 100644 vendor/composer/autoload_classmap.php delete mode 100644 vendor/composer/autoload_files.php delete mode 100644 vendor/composer/autoload_namespaces.php delete mode 100644 vendor/composer/autoload_psr4.php delete mode 100644 vendor/composer/autoload_real.php delete mode 100644 vendor/composer/autoload_static.php delete mode 100644 vendor/composer/installed.json delete mode 100644 vendor/doctrine/instantiator/.doctrine-project.json delete mode 100644 vendor/doctrine/instantiator/CONTRIBUTING.md delete mode 100644 vendor/doctrine/instantiator/LICENSE delete mode 100644 vendor/doctrine/instantiator/README.md delete mode 100644 vendor/doctrine/instantiator/composer.json delete mode 100644 vendor/doctrine/instantiator/docs/en/index.rst delete mode 100644 vendor/doctrine/instantiator/docs/en/sidebar.rst delete mode 100644 vendor/doctrine/instantiator/phpbench.json delete mode 100644 vendor/doctrine/instantiator/phpcs.xml.dist delete mode 100644 vendor/doctrine/instantiator/phpstan.neon.dist delete mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php delete mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php delete mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php delete mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php delete mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php delete mode 100644 vendor/myclabs/deep-copy/LICENSE delete mode 100644 vendor/myclabs/deep-copy/README.md delete mode 100644 vendor/myclabs/deep-copy/composer.json delete mode 100644 vendor/myclabs/deep-copy/doc/clone.png delete mode 100644 vendor/myclabs/deep-copy/doc/deep-clone.png delete mode 100644 vendor/myclabs/deep-copy/doc/deep-copy.png delete mode 100644 vendor/myclabs/deep-copy/doc/graph.png delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php delete mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php delete mode 100644 vendor/phar-io/manifest/.gitignore delete mode 100644 vendor/phar-io/manifest/.php_cs delete mode 100644 vendor/phar-io/manifest/.travis.yml delete mode 100644 vendor/phar-io/manifest/LICENSE delete mode 100644 vendor/phar-io/manifest/README.md delete mode 100644 vendor/phar-io/manifest/build.xml delete mode 100644 vendor/phar-io/manifest/composer.json delete mode 100644 vendor/phar-io/manifest/composer.lock delete mode 100644 vendor/phar-io/manifest/examples/example-01.php delete mode 100644 vendor/phar-io/manifest/phive.xml delete mode 100644 vendor/phar-io/manifest/phpunit.xml delete mode 100644 vendor/phar-io/manifest/src/ManifestDocumentMapper.php delete mode 100644 vendor/phar-io/manifest/src/ManifestLoader.php delete mode 100644 vendor/phar-io/manifest/src/ManifestSerializer.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/Exception.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestElementException.php delete mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php delete mode 100644 vendor/phar-io/manifest/src/values/Application.php delete mode 100644 vendor/phar-io/manifest/src/values/ApplicationName.php delete mode 100644 vendor/phar-io/manifest/src/values/Author.php delete mode 100644 vendor/phar-io/manifest/src/values/AuthorCollection.php delete mode 100644 vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php delete mode 100644 vendor/phar-io/manifest/src/values/BundledComponent.php delete mode 100644 vendor/phar-io/manifest/src/values/BundledComponentCollection.php delete mode 100644 vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php delete mode 100644 vendor/phar-io/manifest/src/values/CopyrightInformation.php delete mode 100644 vendor/phar-io/manifest/src/values/Email.php delete mode 100644 vendor/phar-io/manifest/src/values/Extension.php delete mode 100644 vendor/phar-io/manifest/src/values/Library.php delete mode 100644 vendor/phar-io/manifest/src/values/License.php delete mode 100644 vendor/phar-io/manifest/src/values/Manifest.php delete mode 100644 vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php delete mode 100644 vendor/phar-io/manifest/src/values/PhpVersionRequirement.php delete mode 100644 vendor/phar-io/manifest/src/values/Requirement.php delete mode 100644 vendor/phar-io/manifest/src/values/RequirementCollection.php delete mode 100644 vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php delete mode 100644 vendor/phar-io/manifest/src/values/Type.php delete mode 100644 vendor/phar-io/manifest/src/values/Url.php delete mode 100644 vendor/phar-io/manifest/src/xml/AuthorElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/AuthorElementCollection.php delete mode 100644 vendor/phar-io/manifest/src/xml/BundlesElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/ComponentElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/ComponentElementCollection.php delete mode 100644 vendor/phar-io/manifest/src/xml/ContainsElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/CopyrightElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/ElementCollection.php delete mode 100644 vendor/phar-io/manifest/src/xml/ExtElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/ExtElementCollection.php delete mode 100644 vendor/phar-io/manifest/src/xml/ExtensionElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/LicenseElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/ManifestDocument.php delete mode 100644 vendor/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php delete mode 100644 vendor/phar-io/manifest/src/xml/ManifestElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/PhpElement.php delete mode 100644 vendor/phar-io/manifest/src/xml/RequiresElement.php delete mode 100644 vendor/phar-io/manifest/tests/ManifestDocumentMapperTest.php delete mode 100644 vendor/phar-io/manifest/tests/ManifestLoaderTest.php delete mode 100644 vendor/phar-io/manifest/tests/ManifestSerializerTest.php delete mode 100644 vendor/phar-io/manifest/tests/_fixture/custom.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/extension-invalidcompatible.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/extension.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/invalidversion.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/invalidversionconstraint.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/library.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/manifest.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/phpunit-5.6.5.xml delete mode 100644 vendor/phar-io/manifest/tests/_fixture/test.phar delete mode 100644 vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/ApplicationNameTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/ApplicationTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/AuthorCollectionTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/AuthorTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/BundledComponentCollectionTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/BundledComponentTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/CopyrightInformationTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/EmailTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/ExtensionTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/LibraryTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/LicenseTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/ManifestTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/PhpExtensionRequirementTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/PhpVersionRequirementTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/RequirementCollectionTest.php delete mode 100644 vendor/phar-io/manifest/tests/values/UrlTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/AuthorElementCollectionTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/AuthorElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/BundlesElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ComponentElementCollectionTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ComponentElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ContainsElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/CopyrightElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ExtElementCollectionTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ExtElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ExtensionElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/LicenseElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/ManifestDocumentTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/PhpElementTest.php delete mode 100644 vendor/phar-io/manifest/tests/xml/RequiresElementTest.php delete mode 100644 vendor/phar-io/version/.gitignore delete mode 100644 vendor/phar-io/version/.php_cs delete mode 100644 vendor/phar-io/version/.travis.yml delete mode 100644 vendor/phar-io/version/CHANGELOG.md delete mode 100644 vendor/phar-io/version/LICENSE delete mode 100644 vendor/phar-io/version/README.md delete mode 100644 vendor/phar-io/version/build.xml delete mode 100644 vendor/phar-io/version/composer.json delete mode 100644 vendor/phar-io/version/phive.xml delete mode 100644 vendor/phar-io/version/phpunit.xml delete mode 100644 vendor/phar-io/version/src/PreReleaseSuffix.php delete mode 100644 vendor/phar-io/version/src/Version.php delete mode 100644 vendor/phar-io/version/src/VersionConstraintParser.php delete mode 100644 vendor/phar-io/version/src/VersionConstraintValue.php delete mode 100644 vendor/phar-io/version/src/VersionNumber.php delete mode 100644 vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php delete mode 100644 vendor/phar-io/version/src/constraints/AnyVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/constraints/ExactVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php delete mode 100644 vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/constraints/VersionConstraint.php delete mode 100644 vendor/phar-io/version/src/exceptions/Exception.php delete mode 100644 vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php delete mode 100644 vendor/phar-io/version/src/exceptions/InvalidVersionException.php delete mode 100644 vendor/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php delete mode 100644 vendor/phar-io/version/tests/Integration/VersionConstraintParserTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/AbstractVersionConstraintTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/AndVersionConstraintGroupTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/AnyVersionConstraintTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/ExactVersionConstraintTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/GreaterThanOrEqualToVersionConstraintTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/OrVersionConstraintGroupTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/PreReleaseSuffixTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/SpecificMajorAndMinorVersionConstraintTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/SpecificMajorVersionConstraintTest.php delete mode 100644 vendor/phar-io/version/tests/Unit/VersionTest.php delete mode 100644 vendor/phpdocumentor/reflection-common/.scrutinizer.yml delete mode 100644 vendor/phpdocumentor/reflection-common/.travis.yml delete mode 100644 vendor/phpdocumentor/reflection-common/LICENSE delete mode 100644 vendor/phpdocumentor/reflection-common/README.md delete mode 100644 vendor/phpdocumentor/reflection-common/appveyor.yml delete mode 100644 vendor/phpdocumentor/reflection-common/composer.json delete mode 100644 vendor/phpdocumentor/reflection-common/easy-coding-standard.neon delete mode 100644 vendor/phpdocumentor/reflection-common/phive.xml delete mode 100644 vendor/phpdocumentor/reflection-common/phpmd.xml.dist delete mode 100644 vendor/phpdocumentor/reflection-common/phpstan.neon delete mode 100644 vendor/phpdocumentor/reflection-common/src/Element.php delete mode 100644 vendor/phpdocumentor/reflection-common/src/File.php delete mode 100644 vendor/phpdocumentor/reflection-common/src/Fqsen.php delete mode 100644 vendor/phpdocumentor/reflection-common/src/Location.php delete mode 100644 vendor/phpdocumentor/reflection-common/src/Project.php delete mode 100644 vendor/phpdocumentor/reflection-common/src/ProjectFactory.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/.coveralls.yml delete mode 100644 vendor/phpdocumentor/reflection-docblock/LICENSE delete mode 100644 vendor/phpdocumentor/reflection-docblock/README.md delete mode 100644 vendor/phpdocumentor/reflection-docblock/appveyor.yml delete mode 100644 vendor/phpdocumentor/reflection-docblock/composer.json delete mode 100644 vendor/phpdocumentor/reflection-docblock/easy-coding-standard.neon delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php delete mode 100644 vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php delete mode 100644 vendor/phpdocumentor/type-resolver/.github/workflows/push.yml delete mode 100644 vendor/phpdocumentor/type-resolver/LICENSE delete mode 100644 vendor/phpdocumentor/type-resolver/README.md delete mode 100644 vendor/phpdocumentor/type-resolver/appveyor.yml delete mode 100644 vendor/phpdocumentor/type-resolver/composer-require-config.json delete mode 100644 vendor/phpdocumentor/type-resolver/composer.json delete mode 100644 vendor/phpdocumentor/type-resolver/composer.lock delete mode 100644 vendor/phpdocumentor/type-resolver/phive.xml delete mode 100644 vendor/phpdocumentor/type-resolver/phpcs.xml.dist delete mode 100644 vendor/phpdocumentor/type-resolver/phpstan.neon delete mode 100644 vendor/phpdocumentor/type-resolver/psalm.xml delete mode 100644 vendor/phpdocumentor/type-resolver/src/FqsenResolver.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Type.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/TypeResolver.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Array_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Boolean.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Callable_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Collection.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Compound.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Context.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Float_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Integer.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Null_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Nullable.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Object_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Parent_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Resource_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Scalar.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Self_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Static_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/String_.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/This.php delete mode 100644 vendor/phpdocumentor/type-resolver/src/Types/Void_.php delete mode 100644 vendor/phpspec/prophecy/CHANGES.md delete mode 100644 vendor/phpspec/prophecy/LICENSE delete mode 100644 vendor/phpspec/prophecy/README.md delete mode 100644 vendor/phpspec/prophecy/composer.json delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Call/Call.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Prophet.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php delete mode 100644 vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php delete mode 100644 vendor/phpunit/php-code-coverage/.gitattributes delete mode 100644 vendor/phpunit/php-code-coverage/.github/CONTRIBUTING.md delete mode 100644 vendor/phpunit/php-code-coverage/.github/FUNDING.yml delete mode 100644 vendor/phpunit/php-code-coverage/.github/ISSUE_TEMPLATE.md delete mode 100644 vendor/phpunit/php-code-coverage/.gitignore delete mode 100644 vendor/phpunit/php-code-coverage/.php_cs.dist delete mode 100644 vendor/phpunit/php-code-coverage/.travis.yml delete mode 100644 vendor/phpunit/php-code-coverage/ChangeLog.md delete mode 100644 vendor/phpunit/php-code-coverage/LICENSE delete mode 100644 vendor/phpunit/php-code-coverage/README.md delete mode 100644 vendor/phpunit/php-code-coverage/build.xml delete mode 100644 vendor/phpunit/php-code-coverage/composer.json delete mode 100644 vendor/phpunit/php-code-coverage/phive.xml delete mode 100644 vendor/phpunit/php-code-coverage/phpunit.xml delete mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Driver/Driver.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Driver/PCOV.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Driver/PHPDBG.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Exception/Exception.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Exception/RuntimeException.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Filter.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Node/Builder.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Node/Directory.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Node/File.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Node/Iterator.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Clover.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Crap4j.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/custom.css delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/nv.d3.min.css delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/octicons.css delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-code.svg delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-directory.svg delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/d3.min.js delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/file.js delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/nv.d3.min.js delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/popper.min.js delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/PHP.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Text.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/File.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Util.php delete mode 100644 vendor/phpunit/php-code-coverage/src/Version.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/TestCase.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccount-crap4j.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccount-text.txt delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesWhitespaceTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodOneLineAnnotationTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Crash.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassExtendedTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/dashboard.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/index.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/index.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/dashboard.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/BankAccount.php.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/index.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/index.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-crap4j.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-text.txt delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-crap4j.xml delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-text.txt delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_ignore.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_namespace.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_oneline_annotations.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_with_use_statements.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_without_ignore.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/_files/source_without_namespace.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/bootstrap.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/BuilderTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/CloverTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/CodeCoverageTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/Crap4jTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/Exception/UnintentionallyCoveredCodeExceptionTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/FilterTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/HTMLTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/TextTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/UtilTest.php delete mode 100644 vendor/phpunit/php-code-coverage/tests/tests/XmlTest.php delete mode 100644 vendor/phpunit/php-file-iterator/.gitattributes delete mode 100644 vendor/phpunit/php-file-iterator/.github/stale.yml delete mode 100644 vendor/phpunit/php-file-iterator/.gitignore delete mode 100644 vendor/phpunit/php-file-iterator/.php_cs.dist delete mode 100644 vendor/phpunit/php-file-iterator/.travis.yml delete mode 100644 vendor/phpunit/php-file-iterator/ChangeLog.md delete mode 100644 vendor/phpunit/php-file-iterator/LICENSE delete mode 100644 vendor/phpunit/php-file-iterator/README.md delete mode 100644 vendor/phpunit/php-file-iterator/composer.json delete mode 100644 vendor/phpunit/php-file-iterator/phpunit.xml delete mode 100644 vendor/phpunit/php-file-iterator/src/Facade.php delete mode 100644 vendor/phpunit/php-file-iterator/src/Factory.php delete mode 100644 vendor/phpunit/php-file-iterator/src/Iterator.php delete mode 100644 vendor/phpunit/php-file-iterator/tests/FactoryTest.php delete mode 100644 vendor/phpunit/php-text-template/.gitattributes delete mode 100644 vendor/phpunit/php-text-template/.gitignore delete mode 100644 vendor/phpunit/php-text-template/LICENSE delete mode 100644 vendor/phpunit/php-text-template/README.md delete mode 100644 vendor/phpunit/php-text-template/composer.json delete mode 100644 vendor/phpunit/php-text-template/src/Template.php delete mode 100644 vendor/phpunit/php-timer/.gitattributes delete mode 100644 vendor/phpunit/php-timer/.github/FUNDING.yml delete mode 100644 vendor/phpunit/php-timer/.github/stale.yml delete mode 100644 vendor/phpunit/php-timer/.gitignore delete mode 100644 vendor/phpunit/php-timer/.php_cs.dist delete mode 100644 vendor/phpunit/php-timer/.travis.yml delete mode 100644 vendor/phpunit/php-timer/ChangeLog.md delete mode 100644 vendor/phpunit/php-timer/LICENSE delete mode 100644 vendor/phpunit/php-timer/README.md delete mode 100644 vendor/phpunit/php-timer/build.xml delete mode 100644 vendor/phpunit/php-timer/composer.json delete mode 100644 vendor/phpunit/php-timer/phpunit.xml delete mode 100644 vendor/phpunit/php-timer/src/Exception.php delete mode 100644 vendor/phpunit/php-timer/src/RuntimeException.php delete mode 100644 vendor/phpunit/php-timer/src/Timer.php delete mode 100644 vendor/phpunit/php-timer/tests/TimerTest.php delete mode 100644 vendor/phpunit/php-token-stream/.gitattributes delete mode 100644 vendor/phpunit/php-token-stream/.github/FUNDING.yml delete mode 100644 vendor/phpunit/php-token-stream/.gitignore delete mode 100644 vendor/phpunit/php-token-stream/.travis.yml delete mode 100644 vendor/phpunit/php-token-stream/ChangeLog.md delete mode 100644 vendor/phpunit/php-token-stream/LICENSE delete mode 100644 vendor/phpunit/php-token-stream/README.md delete mode 100644 vendor/phpunit/php-token-stream/build.xml delete mode 100644 vendor/phpunit/php-token-stream/composer.json delete mode 100644 vendor/phpunit/php-token-stream/phpunit.xml delete mode 100644 vendor/phpunit/php-token-stream/src/Token.php delete mode 100644 vendor/phpunit/php-token-stream/src/Token/Stream.php delete mode 100644 vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php delete mode 100644 vendor/phpunit/php-token-stream/src/Token/Util.php delete mode 100644 vendor/phpunit/php-token-stream/tests/Token/ClassTest.php delete mode 100644 vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php delete mode 100644 vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php delete mode 100644 vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php delete mode 100644 vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php delete mode 100644 vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classInNamespace.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classInScopedNamespace.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/classUsesNamespacedFunction.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_named_empty.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_that_declares_anonymous_class.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_that_declares_anonymous_class2.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/class_with_multiple_anonymous_classes_and_functions.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/closure.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/issue19.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/issue30.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingBraces.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingNonBraceSyntax.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/php-code-coverage-issue-424.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source2.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source3.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source4.php delete mode 100644 vendor/phpunit/php-token-stream/tests/_fixture/source5.php delete mode 100644 vendor/phpunit/php-token-stream/tests/bootstrap.php delete mode 100644 vendor/phpunit/phpunit/.editorconfig delete mode 100644 vendor/phpunit/phpunit/.gitattributes delete mode 100644 vendor/phpunit/phpunit/.github/CODE_OF_CONDUCT.md delete mode 100644 vendor/phpunit/phpunit/.github/CONTRIBUTING.md delete mode 100644 vendor/phpunit/phpunit/.github/FUNDING.yml delete mode 100644 vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BACKWARD_COMPATIBILITY_BREAK.md delete mode 100644 vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BUG.md delete mode 100644 vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md delete mode 100644 vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md delete mode 100644 vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md delete mode 100644 vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FIX.md delete mode 100644 vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md delete mode 100644 vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md delete mode 100644 vendor/phpunit/phpunit/.github/workflows/ci.yml delete mode 100644 vendor/phpunit/phpunit/.gitignore delete mode 100644 vendor/phpunit/phpunit/.php_cs.dist delete mode 100644 vendor/phpunit/phpunit/.phpstorm.meta.php delete mode 100644 vendor/phpunit/phpunit/.psalm/baseline.xml delete mode 100644 vendor/phpunit/phpunit/.psalm/config.xml delete mode 100644 vendor/phpunit/phpunit/.psalm/static-analysis.xml delete mode 100644 vendor/phpunit/phpunit/.travis.yml delete mode 100644 vendor/phpunit/phpunit/ChangeLog-8.4.md delete mode 100644 vendor/phpunit/phpunit/LICENSE delete mode 100644 vendor/phpunit/phpunit/README.md delete mode 100644 vendor/phpunit/phpunit/build.xml delete mode 100644 vendor/phpunit/phpunit/composer.json delete mode 100644 vendor/phpunit/phpunit/phive.xml delete mode 100755 vendor/phpunit/phpunit/phpunit delete mode 100644 vendor/phpunit/phpunit/phpunit.xml delete mode 100644 vendor/phpunit/phpunit/phpunit.xsd delete mode 100644 vendor/phpunit/phpunit/src/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Assert.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Assert/Functions.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Count.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsFinite.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsNan.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsReadable.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsWritable.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Error.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Notice.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Warning.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/OutputError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SyntheticError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/UnexpectedValueException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/Warning.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/IncompleteTest.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Match.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/deprecation.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_class.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method_void.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_static_method.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method_void.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/trait_class.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_class.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_method.tpl delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockObject.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockTrait.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockType.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Verifiable.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/SelfDescribing.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTest.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/Test.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestBuilder.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestCase.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestFailure.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestListener.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestResult.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestSuite.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php delete mode 100644 vendor/phpunit/phpunit/src/Framework/WarningTestCase.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Factory.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/Hook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/TestHook.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/NullTestResultCache.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/PhptTestCase.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/ResultCacheExtension.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/TestResultCache.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php delete mode 100644 vendor/phpunit/phpunit/src/Runner/Version.php delete mode 100644 vendor/phpunit/phpunit/src/TextUI/Command.php delete mode 100644 vendor/phpunit/phpunit/src/TextUI/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/TextUI/Help.php delete mode 100644 vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/TextUI/TestRunner.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Annotation/Registry.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Blacklist.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Color.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Configuration.php delete mode 100644 vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php delete mode 100644 vendor/phpunit/phpunit/src/Util/ErrorHandler.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Exception.php delete mode 100644 vendor/phpunit/phpunit/src/Util/FileLoader.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Filesystem.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Filter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Getopt.php delete mode 100644 vendor/phpunit/phpunit/src/Util/GlobalState.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Json.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Log/JUnit.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Log/TeamCity.php delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php delete mode 100644 vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Printer.php delete mode 100644 vendor/phpunit/phpunit/src/Util/RegularExpression.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Test.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php delete mode 100644 vendor/phpunit/phpunit/src/Util/TextTestListRenderer.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Type.php delete mode 100644 vendor/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php delete mode 100644 vendor/phpunit/phpunit/src/Util/Xml.php delete mode 100644 vendor/phpunit/phpunit/src/Util/XmlTestListRenderer.php delete mode 100644 vendor/phpunit/phpunit/tests/README.md delete mode 100644 vendor/phpunit/phpunit/tests/_files/3194.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/3530.wsdl delete mode 100644 vendor/phpunit/phpunit/tests/_files/AbstractMockTestClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AbstractTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AbstractTrait.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AbstractVariousIterableDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ActualOutputTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AnInterface.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AnInterfaceWithReturnType.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AnotherInterface.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ArrayAccessible.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AssertionExample.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/AssertionExampleTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Author.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccount.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccountTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccountTest.test.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BankAccountTest2.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Bar.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BeforeAndAfterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BeforeClassAndAfterClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/BeforeClassWithOnlyDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Book.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Calculator.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ChangeCurrentWorkingDirectoryTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassThatImplementsSerializable.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithAllPossibleReturnTypes.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithScalarTypeDeclarations.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithSelfTypeHint.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithStaticMethod.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithToString.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ClassWithVariadicArgumentMethod.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ConcreteTest.my.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ConcreteTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CountConstraint.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageClassExtendedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageClassNothingTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageClassWithoutAnnotationsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageCoversOverridesCoversNothingTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesWhitespaceTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageFunctionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodNothingCoversMethod.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodNothingTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodOneLineAnnotationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesWhitespaceTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageMethodTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNoneTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNotPrivateTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNotProtectedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageNotPublicTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoveragePrivateTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageProtectedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoveragePublicTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoverageTwoDefaultClassAnnotations.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoveredClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CoveredFunction.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/CustomPrinter.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderDebugTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderDependencyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/FirstTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/SecondTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/phpunit.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/tests/another/TestWithDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/FirstTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/SecondTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataproviderExecutionOrderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DataproviderExecutionOrderTest_result_cache.txt delete mode 100644 vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DependencySuccessTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DoNoAssertionTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DoesNotPerformAssertionsButPerformingAssertionsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DoubleTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DummyBarTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DummyException.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DummyFooTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/DuplicateKeyDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/EmptyDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/EmptyTestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExampleTrait.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPostConditionsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPreConditionsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInSetUpTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownAfterClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionInTestDetectedInTeardown.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionNamespaceTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ExceptionWithThrowable.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Failure.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/FailureTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/FalsyConstraint.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/FatalTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/FinalClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Foo.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/FunctionCallback.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Go ogle-Sea.rch.wsdl delete mode 100644 vendor/phpunit/phpunit/tests/_files/GoogleSearch.wsdl delete mode 100644 vendor/phpunit/phpunit/tests/_files/IgnoreCodeCoverageClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/IgnoreCodeCoverageClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/IncompleteTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/InheritedTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/IniTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/InterfaceWithSemiReservedMethodName.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/InterfaceWithStaticMethod.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/IsolationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/JsonData/arrayObject.json delete mode 100644 vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject.json delete mode 100644 vendor/phpunit/phpunit/tests/_files/MethodCallback.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/MethodCallbackByReference.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/MockRunner.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/MockTestInterface.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Mockable.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ModifiedConstructorTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/MultipleDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/MyTestListener.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamedConstraint.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassExtendedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassPublicTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageMethodTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPrivateTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotProtectedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPublicTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePrivateTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoverageProtectedTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePublicTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveredClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NoArgTestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NoTestCaseClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NoTestCases.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NonStatic.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NotExistingCoveredElementTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NotPublicTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NotSelfDescribingTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NotVoidTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NothingTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/NumericGroupAnnotationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/OneTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/OutputTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/OverrideTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ParseTestMethodAnnotationsMock.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/PartialMockTestClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/RequirementsClassBeforeClassHookTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/RequirementsClassDocBlockTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/RequirementsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/RouterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/SampleClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Singleton.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/SingletonClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/SomeClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/StaticMockTestClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/StopOnErrorTestSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/StopOnWarningTestSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/StopsOnWarningTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/StringableClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Struct.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/Success.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TemplateMethodsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestAutoreferenced.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestGeneratorMaker.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestIncomplete.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestIterator.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestIterator2.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestIteratorAggregate.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestIteratorAggregate2.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestProxyFixture.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestRisky.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestSkipped.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestTestError.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWarning.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWithAnnotations.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWithDifferentNames.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWithDifferentOutput.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWithDifferentSizes.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWithDifferentStatuses.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestWithTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TestableCliTestDoxPrinter.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ThrowExceptionTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/ThrowNoExceptionTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TraitWithConstructor.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TraversableMockTestInterface.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/TruthyConstraint.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/VariousDocblockDefinedDataProvider.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/VariousIterableDataProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/WasRun.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/WrapperIteratorAggregate.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/bar.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.columns.default.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.defaulttestsuite.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.one-file-suite.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.suites.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_empty.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_execution_order_options.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_stop_on_defect.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_stop_on_error.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_stop_on_incomplete.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_stop_on_warning.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_testdox.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_testdox_printerClass.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_whitelist.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/expectedFileFormat.txt delete mode 100644 vendor/phpunit/phpunit/tests/_files/foo.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/AnotherClassUsingConfigurableMethods.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/ChildClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/ClassUsingConfigurableMethods.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/ClassWithImplicitProtocol.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/ClassWithoutParentButParentReturnType.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/MockClassGenerated.tpl delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/MockClassWithConfigurableMethods.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/MockTraitGenerated.tpl delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/ParentClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/mock-object/ReinitializeConfigurableMethods.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/namespace/someNamespaceA/NamespacedClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/namespace/someNamespaceB/NamespacedClass.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/phpt-for-coverage.phpt delete mode 100644 vendor/phpunit/phpunit/tests/_files/phpt-unsupported-section.phpt delete mode 100644 vendor/phpunit/phpunit/tests/_files/phpt-xfail.phpt delete mode 100644 vendor/phpunit/phpunit/tests/_files/phpunit-example-extension/phpunit.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/phpunit-example-extension/tests/OneTest.php delete mode 100644 vendor/phpunit/phpunit/tests/_files/phpunit-example-extension/tools/phpunit.d/phpunit-example-extension-3.0.3.phar delete mode 100644 vendor/phpunit/phpunit/tests/_files/structureAttributesAreSameButValuesAreNot.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/structureExpected.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/structureIgnoreTextNodes.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/structureIsSameButDataIsNot.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfAttributes.xml delete mode 100644 vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfNodes.xml delete mode 100644 vendor/phpunit/phpunit/tests/basic/README.md delete mode 100644 vendor/phpunit/phpunit/tests/basic/configuration.basic.xml delete mode 100644 vendor/phpunit/phpunit/tests/basic/unit/SetUpBeforeClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/basic/unit/SetUpTest.php delete mode 100644 vendor/phpunit/phpunit/tests/basic/unit/StatusTest.php delete mode 100644 vendor/phpunit/phpunit/tests/basic/unit/TearDownAfterClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/bootstrap.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/Extension.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/NullPrinter.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/expect_external.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/phpt-env.expected.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/phpt-expect-external-location-hint-example.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/phpt-expect-location-hint-example.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/phpt-skipif-location-hint-example.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/_files/phpt_external.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/abstract-test-class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/assertion.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/_files/MyCommand.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/_files/output-cli-help-color.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/_files/output-cli-usage.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/columns-max.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/columns.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/generate-configuration.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/help-color.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/help.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/help2.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/mycommand.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/options-after-arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/cli/test-file-not-found.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/code-coverage-ignore.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/code-coverage-phpt.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/concrete-test-class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/dataprovider-issue-2833.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/dataprovider-issue-2859.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/dataprovider-issue-2922.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/dataprovider-log-xml-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/dataprovider-log-xml.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/default-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/default.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/defaulttestsuite-using-testsuite.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/defaulttestsuite.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/disable-code-coverage-ignore.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/dump-xdebug-filter.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/empty-testcase.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/exception-stack.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/exclude-group-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/exclude-group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/ClonedDependencyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/DependencyTestSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/MultiDependencyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/MultiDependencyTest_result_cache.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/StackTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/TestWithDifferentDurations.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/TestWithDifferentDurations.phpunit.result.cache.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/_files/order-by-duration.phpunit.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/cache-result.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/defects-first-order-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/dependencies-clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/dependencies-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/depends-as-parameter-with-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/depends-as-parameter.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/depends-multiple-parameter-with-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/depends-multiple-parameters.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/execution-order-options-via-config.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/order-by-default-invalid-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/order-by-duration-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/order-by-duration-via-phpunit-xml.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/repeat.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-defect-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-defect-via-config.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-error-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-error-via-config.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-incomplete-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-incomplete-via-config.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-warning-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/stop-on-warning-via-config.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/test-order-randomized-seed-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/test-order-randomized-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/test-order-reversed-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/test-order-reversed-without-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/execution-order/test-order-size-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/failure-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/failure.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/fatal-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-class-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-classname-and-range-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-classname-and-range.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-number-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-number.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-only-range-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-only-range.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-only-regexp-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-only-regexp.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-only-string-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-only-string.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-range-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-range.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-regexp-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-regexp.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-string-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-dataprovider-by-string.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-method-case-insensitive.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-method-case-sensitive-no-result.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-method-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/filter-no-results.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/forward-compatibility.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/getActualOutputForAssertion.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/group-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/ini-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/list-groups.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/list-suites.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/list-tests-dataprovider.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/list-tests-xml-dataprovider.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/_files/HookTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/_files/TestDoxGroupTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/_files/configuration.custom-printer.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/_files/hooks.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/_files/raw_output_ColorTest.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/_files/raw_output_StatusTest.txt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/custom-printer-debug.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/custom-printer-verbose.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/debug.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/failure-reverse-list.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/hooks.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/log-junit-phpt.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/log-junit.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/log-teamcity-phpt.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/log-teamcity.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/teamcity-inner-exceptions.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/teamcity.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-colors-verbose.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-dataprovider-placeholder.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-exclude-group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-force-flush.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-html.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-text.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox-xml.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/loggers/testdox.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/232.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/3154_namespaced_constant_resolving.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/3530.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/397.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/abstract_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_dont_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_implementing_interface_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_implementing_interface_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_nonexistent_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_partial.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_with_deprecated_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_with_final_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_with_method_named_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_with_method_with_nullable_typehinted_variadic_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_with_method_with_typehinted_variadic_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/class_with_method_with_variadic_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/constant_as_parameter_default_value.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/interface.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/invocation_object_clone_object.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_class_partial.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/namespaced_interface.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/nonexistent_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/nonexistent_class_with_namespace_starting_with_separator.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/nullable_types.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/proxy.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_closure.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_final.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_generator.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_nullable.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_object_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_parent.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_self.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_static_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/return_type_declarations_void.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/scalar_type_declarations.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/wsdl_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/wsdl_class_namespace.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/wsdl_class_partial.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/call_original.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/call_original_with_argument.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/call_original_with_argument_variadic.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/call_original_with_return_type_void.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/clone_method_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/deprecated_with_description.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/deprecated_without_description.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/private_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/protected_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/return_by_reference.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/return_by_reference_with_return_type.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/return_type.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/return_type_parent.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/return_type_self.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/static_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/static_method_with_return_type.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_default.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_default_constant.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_default_null.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_nullable.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_reference.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_array.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_callable.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_scalar.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_self.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_unkown_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_typed_variadic.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_argument_variadic.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/mock-objects/mock-method/with_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/output-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phar-extension-suppressed.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phar-extension.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-args.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-env.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-external.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-parsing.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-stderr.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-stdin.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt-xfail.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt/expect-external-location-hint.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt/expect-location-hint.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/phpt/skipif-location-hint.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1149.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1149/Issue1149Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1216.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1216/Issue1216Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1216/bootstrap1216.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1216/phpunit1216.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1265.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1265/Issue1265Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1265/phpunit1265.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1330.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1330/Issue1330Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1330/phpunit1330.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1335.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1335/Issue1335Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1335/bootstrap1335.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1337.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1337/Issue1337Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1348.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1348/Issue1348Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1351.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1351/ChildProcessClass1351.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1351/Issue1351Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1374.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1374/Issue1374Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1437.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1437/Issue1437Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1468.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1468/Issue1468Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1471.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1471/Issue1471Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1472.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1472/Issue1472Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1570.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/1570/Issue1570Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2085-enforce-time-limit-options-via-config-without-invoker.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2085-without-invoker.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2085.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2085/Issue2085Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2085/configuration_enforce_time_limit_options.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2137-filter.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2137-no_filter.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2137/Issue2137Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2145.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2145/Issue2145Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2158.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2158/Issue2158Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2158/constant.inc delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2366.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2366/Issue2366Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2380.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2380/Issue2380Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2382.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2382/Issue2382Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2435.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2435/Issue2435Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2448-existing-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2448-not-existing-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2448/Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2724-diff-pid-from-master-process.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2724/SeparateClassRunMethodInNewProcessTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2725-separate-class-before-after-pid.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2725/BeforeAfterClassPidTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2731.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2731/Issue2731Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2811.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2811/Issue2811Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2830.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2830/Issue2830Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2972.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2972/issue-2972-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/2972/unconventiallyNamedIssue2972Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3093/Issue3093Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3093/issue-3093-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3156/Issue3156Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/322.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/322/Issue322Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/322/phpunit322.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3379.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3379/Issue3379Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3379/Issue3379TestListener.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3379/phpunit.xml delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3380/issue-3380-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3396/issue-3396-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3739.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3739/Issue3739Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3881.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/3881/Issue3881Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/433.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/433/Issue433Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/445.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/445/Issue445Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/498.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/498/Issue498Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/503.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/503/Issue503Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/581.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/581/Issue581Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/74.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/74/Issue74Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/74/NewException.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/765.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/765/Issue765Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/797.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/797/Issue797Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/797/bootstrap797.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/863.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/873.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/GitHub/873/Issue873Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/1021.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/1021/Issue1021Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/578.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/578/Issue578Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/684.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/684/Issue684Test.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/783.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/783/ChildSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/783/OneTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/783/ParentSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/regression/Trac/783/TwoTest.php delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/report-tests-performing-assertions-when-annotated-with-does-not-perform-assertions.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/report-useless-tests-incomplete.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/report-useless-tests-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/report-useless-tests.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/requires-skip-code-location-hints.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/test-suffix-multiple.phpt delete mode 100644 vendor/phpunit/phpunit/tests/end-to-end/test-suffix-single.phpt delete mode 100644 vendor/phpunit/phpunit/tests/fail/fail.phpt delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/TestUsingMocks.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-empty.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-false.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-instance-of.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-array.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-bool.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-callable.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-float.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-int.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-iterable.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-array.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-bool.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-callable.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-float.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-int.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-iterable.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-numeric.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-object.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-resource.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-scalar.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-not-string.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-numeric.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-object.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-resource.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-scalar.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-is-string.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-not-empty.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-not-false.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-not-instance-of.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-not-null.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-not-true.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-null.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-same.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/assert-true.php delete mode 100644 vendor/phpunit/phpunit/tests/static-analysis/happy-path/fail.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Assert/FunctionsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/AssertTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ArrayHasKeyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ArraySubsetTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/CallbackTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ClassHasAttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ClassHasStaticAttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ConstraintTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/CountTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/DirectoryExistsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ExceptionCodeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ExceptionMessageRegExpTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ExceptionMessageTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ExceptionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/FileExistsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/GreaterThanTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsEmptyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsEqualTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsIdenticalTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsInstanceOfTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsJsonTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsNullTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsReadableTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsTypeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/IsWritableTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/JsonMatchesErrorMessageProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/JsonMatchesTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/LessThanTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/LogicalAndTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/LogicalNotTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/LogicalOrTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/LogicalXorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/ObjectHasAttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/RegularExpressionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/SameSizeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/StringContainsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/StringEndsWithTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/StringMatchesFormatDescriptionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/StringStartsWithTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Constraint/TraversableContainsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/ConstraintTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Exception/ExceptionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/Exception/InvalidArgumentExceptionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/ExceptionWrapperTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/IncompleteTestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/Builder/InvocationMockerTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/ConfigurableMethodTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/ConfigurableMethodsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/GeneratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/InvocationHandlerTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/Matcher/ConsecutiveParametersTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/MatcherTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/MockBuilderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/MockClassTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/MockMethodTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/MockObjectTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/MockTraitTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/MockObject/ProxyObjectTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/SkippedTestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestBuilderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestFailureTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestImplementorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestListenerTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestSuiteIteratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Framework/TestSuiteTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Runner/DefaultTestResultCacheTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Runner/Filter/NameFilterIteratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Runner/PhptTestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Runner/ResultCacheExtensionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Runner/TestSuiteSorterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/Annotation/RegistryTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/ConfigurationGeneratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/ConfigurationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/GetoptTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/GlobalStateTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/JsonTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/NullTestResultCacheTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/PHP/AbstractPhpProcessTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/RegularExpressionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/TestDox/CliTestDoxPrinterColorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/TestDox/CliTestDoxPrinterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/TestDox/ColorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/TestDox/NamePrettifierTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/TestResultCacheTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/TestTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/XDebugFilterScriptGeneratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/unit/Util/XmlTest.php delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/.gitignore delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/.php_cs delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/.travis.yml delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/LICENSE delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/README.md delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/build.xml delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/composer.json delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/phpunit.xml delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/src/Wizard.php delete mode 100644 vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php delete mode 100644 vendor/sebastian/comparator/.github/stale.yml delete mode 100644 vendor/sebastian/comparator/.gitignore delete mode 100644 vendor/sebastian/comparator/.php_cs.dist delete mode 100644 vendor/sebastian/comparator/.travis.yml delete mode 100644 vendor/sebastian/comparator/ChangeLog.md delete mode 100644 vendor/sebastian/comparator/LICENSE delete mode 100644 vendor/sebastian/comparator/README.md delete mode 100644 vendor/sebastian/comparator/build.xml delete mode 100644 vendor/sebastian/comparator/composer.json delete mode 100644 vendor/sebastian/comparator/phpunit.xml delete mode 100644 vendor/sebastian/comparator/src/ArrayComparator.php delete mode 100644 vendor/sebastian/comparator/src/Comparator.php delete mode 100644 vendor/sebastian/comparator/src/ComparisonFailure.php delete mode 100644 vendor/sebastian/comparator/src/DOMNodeComparator.php delete mode 100644 vendor/sebastian/comparator/src/DateTimeComparator.php delete mode 100644 vendor/sebastian/comparator/src/DoubleComparator.php delete mode 100644 vendor/sebastian/comparator/src/ExceptionComparator.php delete mode 100644 vendor/sebastian/comparator/src/Factory.php delete mode 100644 vendor/sebastian/comparator/src/MockObjectComparator.php delete mode 100644 vendor/sebastian/comparator/src/NumericComparator.php delete mode 100644 vendor/sebastian/comparator/src/ObjectComparator.php delete mode 100644 vendor/sebastian/comparator/src/ResourceComparator.php delete mode 100644 vendor/sebastian/comparator/src/ScalarComparator.php delete mode 100644 vendor/sebastian/comparator/src/SplObjectStorageComparator.php delete mode 100644 vendor/sebastian/comparator/src/TypeComparator.php delete mode 100644 vendor/sebastian/comparator/tests/ArrayComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/ComparisonFailureTest.php delete mode 100644 vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/DateTimeComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/DoubleComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/ExceptionComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/FactoryTest.php delete mode 100644 vendor/sebastian/comparator/tests/MockObjectComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/NumericComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/ObjectComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/ResourceComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/ScalarComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/TypeComparatorTest.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/Author.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/Book.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/ClassWithToString.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/SampleClass.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/Struct.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/TestClass.php delete mode 100644 vendor/sebastian/comparator/tests/_fixture/TestClassComparator.php delete mode 100644 vendor/sebastian/diff/.github/stale.yml delete mode 100644 vendor/sebastian/diff/.gitignore delete mode 100644 vendor/sebastian/diff/.php_cs.dist delete mode 100644 vendor/sebastian/diff/.travis.yml delete mode 100644 vendor/sebastian/diff/ChangeLog.md delete mode 100644 vendor/sebastian/diff/LICENSE delete mode 100644 vendor/sebastian/diff/README.md delete mode 100644 vendor/sebastian/diff/build.xml delete mode 100644 vendor/sebastian/diff/composer.json delete mode 100644 vendor/sebastian/diff/phpunit.xml delete mode 100644 vendor/sebastian/diff/src/Chunk.php delete mode 100644 vendor/sebastian/diff/src/Diff.php delete mode 100644 vendor/sebastian/diff/src/Differ.php delete mode 100644 vendor/sebastian/diff/src/Exception/ConfigurationException.php delete mode 100644 vendor/sebastian/diff/src/Exception/Exception.php delete mode 100644 vendor/sebastian/diff/src/Exception/InvalidArgumentException.php delete mode 100644 vendor/sebastian/diff/src/Line.php delete mode 100644 vendor/sebastian/diff/src/LongestCommonSubsequenceCalculator.php delete mode 100644 vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php delete mode 100644 vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php delete mode 100644 vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php delete mode 100644 vendor/sebastian/diff/src/Output/DiffOutputBuilderInterface.php delete mode 100644 vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php delete mode 100644 vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php delete mode 100644 vendor/sebastian/diff/src/Parser.php delete mode 100644 vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php delete mode 100644 vendor/sebastian/diff/tests/ChunkTest.php delete mode 100644 vendor/sebastian/diff/tests/DiffTest.php delete mode 100644 vendor/sebastian/diff/tests/DifferTest.php delete mode 100644 vendor/sebastian/diff/tests/Exception/ConfigurationExceptionTest.php delete mode 100644 vendor/sebastian/diff/tests/Exception/InvalidArgumentExceptionTest.php delete mode 100644 vendor/sebastian/diff/tests/LineTest.php delete mode 100644 vendor/sebastian/diff/tests/LongestCommonSubsequenceTest.php delete mode 100644 vendor/sebastian/diff/tests/MemoryEfficientImplementationTest.php delete mode 100644 vendor/sebastian/diff/tests/Output/AbstractChunkOutputBuilderTest.php delete mode 100644 vendor/sebastian/diff/tests/Output/DiffOnlyOutputBuilderTest.php delete mode 100644 vendor/sebastian/diff/tests/Output/Integration/StrictUnifiedDiffOutputBuilderIntegrationTest.php delete mode 100644 vendor/sebastian/diff/tests/Output/Integration/UnifiedDiffOutputBuilderIntegrationTest.php delete mode 100644 vendor/sebastian/diff/tests/Output/StrictUnifiedDiffOutputBuilderDataProvider.php delete mode 100644 vendor/sebastian/diff/tests/Output/StrictUnifiedDiffOutputBuilderTest.php delete mode 100644 vendor/sebastian/diff/tests/Output/UnifiedDiffOutputBuilderDataProvider.php delete mode 100644 vendor/sebastian/diff/tests/Output/UnifiedDiffOutputBuilderTest.php delete mode 100644 vendor/sebastian/diff/tests/ParserTest.php delete mode 100644 vendor/sebastian/diff/tests/TimeEfficientImplementationTest.php delete mode 100644 vendor/sebastian/diff/tests/Utils/FileUtils.php delete mode 100644 vendor/sebastian/diff/tests/Utils/UnifiedDiffAssertTrait.php delete mode 100644 vendor/sebastian/diff/tests/Utils/UnifiedDiffAssertTraitIntegrationTest.php delete mode 100644 vendor/sebastian/diff/tests/Utils/UnifiedDiffAssertTraitTest.php delete mode 100644 vendor/sebastian/diff/tests/fixtures/.editorconfig delete mode 100644 vendor/sebastian/diff/tests/fixtures/UnifiedDiffAssertTraitIntegrationTest/1_a.txt delete mode 100644 vendor/sebastian/diff/tests/fixtures/UnifiedDiffAssertTraitIntegrationTest/1_b.txt delete mode 100644 vendor/sebastian/diff/tests/fixtures/UnifiedDiffAssertTraitIntegrationTest/2_a.txt delete mode 100644 vendor/sebastian/diff/tests/fixtures/UnifiedDiffAssertTraitIntegrationTest/2_b.txt delete mode 100644 vendor/sebastian/diff/tests/fixtures/out/.editorconfig delete mode 100644 vendor/sebastian/diff/tests/fixtures/out/.gitignore delete mode 100644 vendor/sebastian/diff/tests/fixtures/patch.txt delete mode 100644 vendor/sebastian/diff/tests/fixtures/patch2.txt delete mode 100644 vendor/sebastian/diff/tests/fixtures/serialized_diff.bin delete mode 100644 vendor/sebastian/environment/.github/stale.yml delete mode 100644 vendor/sebastian/environment/.gitignore delete mode 100644 vendor/sebastian/environment/.php_cs.dist delete mode 100644 vendor/sebastian/environment/.travis.yml delete mode 100644 vendor/sebastian/environment/ChangeLog.md delete mode 100644 vendor/sebastian/environment/LICENSE delete mode 100644 vendor/sebastian/environment/README.md delete mode 100644 vendor/sebastian/environment/build.xml delete mode 100644 vendor/sebastian/environment/composer.json delete mode 100644 vendor/sebastian/environment/phpunit.xml delete mode 100644 vendor/sebastian/environment/src/Console.php delete mode 100644 vendor/sebastian/environment/src/OperatingSystem.php delete mode 100644 vendor/sebastian/environment/src/Runtime.php delete mode 100644 vendor/sebastian/environment/tests/ConsoleTest.php delete mode 100644 vendor/sebastian/environment/tests/OperatingSystemTest.php delete mode 100644 vendor/sebastian/environment/tests/RuntimeTest.php delete mode 100644 vendor/sebastian/exporter/.github/FUNDING.yml delete mode 100644 vendor/sebastian/exporter/.gitignore delete mode 100644 vendor/sebastian/exporter/.php_cs.dist delete mode 100644 vendor/sebastian/exporter/.travis.yml delete mode 100644 vendor/sebastian/exporter/ChangeLog.md delete mode 100644 vendor/sebastian/exporter/LICENSE delete mode 100644 vendor/sebastian/exporter/README.md delete mode 100644 vendor/sebastian/exporter/build.xml delete mode 100644 vendor/sebastian/exporter/composer.json delete mode 100644 vendor/sebastian/exporter/phpunit.xml delete mode 100644 vendor/sebastian/exporter/src/Exporter.php delete mode 100644 vendor/sebastian/exporter/tests/ExporterTest.php delete mode 100644 vendor/sebastian/global-state/.github/stale.yml delete mode 100644 vendor/sebastian/global-state/.gitignore delete mode 100644 vendor/sebastian/global-state/.php_cs.dist delete mode 100644 vendor/sebastian/global-state/.travis.yml delete mode 100644 vendor/sebastian/global-state/ChangeLog.md delete mode 100644 vendor/sebastian/global-state/LICENSE delete mode 100644 vendor/sebastian/global-state/README.md delete mode 100644 vendor/sebastian/global-state/build.xml delete mode 100644 vendor/sebastian/global-state/composer.json delete mode 100644 vendor/sebastian/global-state/phpunit.xml delete mode 100644 vendor/sebastian/global-state/src/Blacklist.php delete mode 100644 vendor/sebastian/global-state/src/CodeExporter.php delete mode 100644 vendor/sebastian/global-state/src/Restorer.php delete mode 100644 vendor/sebastian/global-state/src/Snapshot.php delete mode 100644 vendor/sebastian/global-state/src/exceptions/Exception.php delete mode 100644 vendor/sebastian/global-state/src/exceptions/RuntimeException.php delete mode 100644 vendor/sebastian/global-state/tests/BlacklistTest.php delete mode 100644 vendor/sebastian/global-state/tests/CodeExporterTest.php delete mode 100644 vendor/sebastian/global-state/tests/RestorerTest.php delete mode 100644 vendor/sebastian/global-state/tests/SnapshotTest.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/BlacklistedChildClass.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/BlacklistedClass.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/BlacklistedImplementor.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/BlacklistedInterface.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/SnapshotClass.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/SnapshotDomDocument.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/SnapshotFunctions.php delete mode 100644 vendor/sebastian/global-state/tests/_fixture/SnapshotTrait.php delete mode 100644 vendor/sebastian/object-enumerator/.gitignore delete mode 100644 vendor/sebastian/object-enumerator/.php_cs delete mode 100644 vendor/sebastian/object-enumerator/.travis.yml delete mode 100644 vendor/sebastian/object-enumerator/ChangeLog.md delete mode 100644 vendor/sebastian/object-enumerator/LICENSE delete mode 100644 vendor/sebastian/object-enumerator/README.md delete mode 100644 vendor/sebastian/object-enumerator/build.xml delete mode 100644 vendor/sebastian/object-enumerator/composer.json delete mode 100644 vendor/sebastian/object-enumerator/phpunit.xml delete mode 100644 vendor/sebastian/object-enumerator/src/Enumerator.php delete mode 100644 vendor/sebastian/object-enumerator/src/Exception.php delete mode 100644 vendor/sebastian/object-enumerator/src/InvalidArgumentException.php delete mode 100644 vendor/sebastian/object-enumerator/tests/EnumeratorTest.php delete mode 100644 vendor/sebastian/object-enumerator/tests/_fixture/ExceptionThrower.php delete mode 100644 vendor/sebastian/object-reflector/.gitignore delete mode 100644 vendor/sebastian/object-reflector/.php_cs delete mode 100644 vendor/sebastian/object-reflector/.travis.yml delete mode 100644 vendor/sebastian/object-reflector/ChangeLog.md delete mode 100644 vendor/sebastian/object-reflector/LICENSE delete mode 100644 vendor/sebastian/object-reflector/README.md delete mode 100644 vendor/sebastian/object-reflector/build.xml delete mode 100644 vendor/sebastian/object-reflector/composer.json delete mode 100644 vendor/sebastian/object-reflector/phpunit.xml delete mode 100644 vendor/sebastian/object-reflector/src/Exception.php delete mode 100644 vendor/sebastian/object-reflector/src/InvalidArgumentException.php delete mode 100644 vendor/sebastian/object-reflector/src/ObjectReflector.php delete mode 100644 vendor/sebastian/object-reflector/tests/ObjectReflectorTest.php delete mode 100644 vendor/sebastian/object-reflector/tests/_fixture/ChildClass.php delete mode 100644 vendor/sebastian/object-reflector/tests/_fixture/ClassWithIntegerAttributeName.php delete mode 100644 vendor/sebastian/object-reflector/tests/_fixture/ParentClass.php delete mode 100644 vendor/sebastian/recursion-context/.gitignore delete mode 100644 vendor/sebastian/recursion-context/.travis.yml delete mode 100644 vendor/sebastian/recursion-context/LICENSE delete mode 100644 vendor/sebastian/recursion-context/README.md delete mode 100644 vendor/sebastian/recursion-context/build.xml delete mode 100644 vendor/sebastian/recursion-context/composer.json delete mode 100644 vendor/sebastian/recursion-context/phpunit.xml delete mode 100644 vendor/sebastian/recursion-context/src/Context.php delete mode 100644 vendor/sebastian/recursion-context/src/Exception.php delete mode 100644 vendor/sebastian/recursion-context/src/InvalidArgumentException.php delete mode 100644 vendor/sebastian/recursion-context/tests/ContextTest.php delete mode 100644 vendor/sebastian/resource-operations/.github/stale.yml delete mode 100644 vendor/sebastian/resource-operations/.gitignore delete mode 100644 vendor/sebastian/resource-operations/.php_cs.dist delete mode 100644 vendor/sebastian/resource-operations/ChangeLog.md delete mode 100644 vendor/sebastian/resource-operations/LICENSE delete mode 100644 vendor/sebastian/resource-operations/README.md delete mode 100644 vendor/sebastian/resource-operations/build.xml delete mode 100755 vendor/sebastian/resource-operations/build/generate.php delete mode 100644 vendor/sebastian/resource-operations/composer.json delete mode 100644 vendor/sebastian/resource-operations/src/ResourceOperations.php delete mode 100644 vendor/sebastian/resource-operations/tests/ResourceOperationsTest.php delete mode 100644 vendor/sebastian/type/.gitattributes delete mode 100644 vendor/sebastian/type/.github/FUNDING.yml delete mode 100644 vendor/sebastian/type/.gitignore delete mode 100644 vendor/sebastian/type/.idea/inspectionProfiles/Project_Default.xml delete mode 100644 vendor/sebastian/type/.idea/misc.xml delete mode 100644 vendor/sebastian/type/.idea/modules.xml delete mode 100644 vendor/sebastian/type/.idea/php-inspections-ea-ultimate.xml delete mode 100644 vendor/sebastian/type/.idea/php.xml delete mode 100644 vendor/sebastian/type/.idea/type.iml delete mode 100644 vendor/sebastian/type/.idea/vcs.xml delete mode 100644 vendor/sebastian/type/.php_cs.dist delete mode 100644 vendor/sebastian/type/.travis.yml delete mode 100644 vendor/sebastian/type/ChangeLog.md delete mode 100644 vendor/sebastian/type/LICENSE delete mode 100644 vendor/sebastian/type/README.md delete mode 100644 vendor/sebastian/type/build.xml delete mode 100644 vendor/sebastian/type/composer.json delete mode 100644 vendor/sebastian/type/phive.xml delete mode 100644 vendor/sebastian/type/phpunit.xml delete mode 100644 vendor/sebastian/type/psalm.xml delete mode 100644 vendor/sebastian/type/src/CallableType.php delete mode 100644 vendor/sebastian/type/src/GenericObjectType.php delete mode 100644 vendor/sebastian/type/src/IterableType.php delete mode 100644 vendor/sebastian/type/src/NullType.php delete mode 100644 vendor/sebastian/type/src/ObjectType.php delete mode 100644 vendor/sebastian/type/src/SimpleType.php delete mode 100644 vendor/sebastian/type/src/Type.php delete mode 100644 vendor/sebastian/type/src/TypeName.php delete mode 100644 vendor/sebastian/type/src/UnknownType.php delete mode 100644 vendor/sebastian/type/src/VoidType.php delete mode 100644 vendor/sebastian/type/src/exception/Exception.php delete mode 100644 vendor/sebastian/type/src/exception/RuntimeException.php delete mode 100644 vendor/sebastian/type/tests/_fixture/ChildClass.php delete mode 100644 vendor/sebastian/type/tests/_fixture/ClassWithCallbackMethods.php delete mode 100644 vendor/sebastian/type/tests/_fixture/ClassWithInvokeMethod.php delete mode 100644 vendor/sebastian/type/tests/_fixture/Iterator.php delete mode 100644 vendor/sebastian/type/tests/_fixture/ParentClass.php delete mode 100644 vendor/sebastian/type/tests/_fixture/callback_function.php delete mode 100644 vendor/sebastian/type/tests/unit/CallableTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/GenericObjectTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/IterableTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/NullTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/ObjectTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/SimpleTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/TypeNameTest.php delete mode 100644 vendor/sebastian/type/tests/unit/TypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/UnknownTypeTest.php delete mode 100644 vendor/sebastian/type/tests/unit/VoidTypeTest.php delete mode 100644 vendor/sebastian/version/.gitattributes delete mode 100644 vendor/sebastian/version/.gitignore delete mode 100644 vendor/sebastian/version/.php_cs delete mode 100644 vendor/sebastian/version/LICENSE delete mode 100644 vendor/sebastian/version/README.md delete mode 100644 vendor/sebastian/version/composer.json delete mode 100644 vendor/sebastian/version/src/Version.php delete mode 100644 vendor/symfony/polyfill-ctype/Ctype.php delete mode 100644 vendor/symfony/polyfill-ctype/LICENSE delete mode 100644 vendor/symfony/polyfill-ctype/README.md delete mode 100644 vendor/symfony/polyfill-ctype/bootstrap.php delete mode 100644 vendor/symfony/polyfill-ctype/composer.json delete mode 100644 vendor/theseer/tokenizer/.gitignore delete mode 100644 vendor/theseer/tokenizer/.php_cs delete mode 100644 vendor/theseer/tokenizer/.travis.yml delete mode 100644 vendor/theseer/tokenizer/CHANGELOG.md delete mode 100644 vendor/theseer/tokenizer/LICENSE delete mode 100644 vendor/theseer/tokenizer/README.md delete mode 100644 vendor/theseer/tokenizer/build.xml delete mode 100644 vendor/theseer/tokenizer/composer.json delete mode 100644 vendor/theseer/tokenizer/phive.xml delete mode 100644 vendor/theseer/tokenizer/phpunit.xml delete mode 100644 vendor/theseer/tokenizer/src/Exception.php delete mode 100644 vendor/theseer/tokenizer/src/NamespaceUri.php delete mode 100644 vendor/theseer/tokenizer/src/NamespaceUriException.php delete mode 100644 vendor/theseer/tokenizer/src/Token.php delete mode 100644 vendor/theseer/tokenizer/src/TokenCollection.php delete mode 100644 vendor/theseer/tokenizer/src/TokenCollectionException.php delete mode 100644 vendor/theseer/tokenizer/src/Tokenizer.php delete mode 100644 vendor/theseer/tokenizer/src/XMLSerializer.php delete mode 100644 vendor/theseer/tokenizer/tests/NamespaceUriTest.php delete mode 100644 vendor/theseer/tokenizer/tests/TokenCollectionTest.php delete mode 100644 vendor/theseer/tokenizer/tests/TokenTest.php delete mode 100644 vendor/theseer/tokenizer/tests/TokenizerTest.php delete mode 100644 vendor/theseer/tokenizer/tests/XMLSerializerTest.php delete mode 100644 vendor/theseer/tokenizer/tests/_files/customns.xml delete mode 100644 vendor/theseer/tokenizer/tests/_files/empty.xml delete mode 100644 vendor/theseer/tokenizer/tests/_files/test.php delete mode 100644 vendor/theseer/tokenizer/tests/_files/test.php.tokens delete mode 100644 vendor/theseer/tokenizer/tests/_files/test.php.xml delete mode 100644 vendor/webmozart/assert/.editorconfig delete mode 100644 vendor/webmozart/assert/CHANGELOG.md delete mode 100644 vendor/webmozart/assert/LICENSE delete mode 100644 vendor/webmozart/assert/README.md delete mode 100644 vendor/webmozart/assert/ci/composer.json delete mode 100644 vendor/webmozart/assert/composer.json delete mode 100644 vendor/webmozart/assert/psalm.xml delete mode 100644 vendor/webmozart/assert/src/Assert.php diff --git a/gitignore b/.gitignore similarity index 100% rename from gitignore rename to .gitignore diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100755 index 28a804d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100755 index 76c0670..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/php-card-detector.iml b/.idea/php-card-detector.iml deleted file mode 100755 index 4e3b9a0..0000000 --- a/.idea/php-card-detector.iml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml deleted file mode 100644 index b69149e..0000000 --- a/.idea/php-test-framework.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100755 index df23356..0000000 --- a/.idea/php.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100755 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100755 index 66d4f7c..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - $PROJECT_DIR$/composer.json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0f&&(e=a.render.queue[f]);f++)d=e.generate(),typeof e.callback==typeof Function&&e.callback(d);a.render.queue.splice(0,f),a.render.queue.length?setTimeout(c):(a.dispatch.render_end(),a.render.active=!1)};setTimeout(c)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},"undefined"!=typeof module&&"undefined"!=typeof exports&&(module.exports=a),"undefined"!=typeof window&&(window.nv=a),a.dom.write=function(a){return void 0!==window.fastdom?fastdom.write(a):a()},a.dom.read=function(a){return void 0!==window.fastdom?fastdom.read(a):a()},a.interactiveGuideline=function(){"use strict";function b(l){l.each(function(l){function m(){var a=d3.mouse(this),d=a[0],e=a[1],i=!0,j=!1;if(k&&(d=d3.event.offsetX,e=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(i=!1),d3.event.target.className.baseVal.match("nv-legend")&&(j=!0)),i&&(d-=f.left,e-=f.top),0>d||0>e||d>o||e>p||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||j){if(k&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(c.nvPointerEventsClass)))return;return h.elementMouseout({mouseX:d,mouseY:e}),b.renderGuideLine(null),void c.hidden(!0)}c.hidden(!1);var l=g.invert(d);h.elementMousemove({mouseX:d,mouseY:e,pointXValue:l}),"dblclick"===d3.event.type&&h.elementDblclick({mouseX:d,mouseY:e,pointXValue:l}),"click"===d3.event.type&&h.elementClick({mouseX:d,mouseY:e,pointXValue:l})}var n=d3.select(this),o=d||960,p=e||400,q=n.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([l]),r=q.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");r.append("g").attr("class","nv-interactiveGuideLine"),j&&(j.on("touchmove",m).on("mousemove",m,!0).on("mouseout",m,!0).on("dblclick",m).on("click",m),b.guideLine=null,b.renderGuideLine=function(c){i&&(b.guideLine&&b.guideLine.attr("x1")===c||a.dom.write(function(){var b=q.select(".nv-interactiveGuideLine").selectAll("line").data(null!=c?[a.utils.NaNtoZero(c)]:[],String);b.enter().append("line").attr("class","nv-guideline").attr("x1",function(a){return a}).attr("x2",function(a){return a}).attr("y1",p).attr("y2",0),b.exit().remove()}))})})}var c=a.models.tooltip();c.duration(0).hideDelay(0)._isInteractiveLayer(!0).hidden(!1);var d=null,e=null,f={left:0,top:0},g=d3.scale.linear(),h=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick"),i=!0,j=null,k="ActiveXObject"in window;return b.dispatch=h,b.tooltip=c,b.margin=function(a){return arguments.length?(f.top="undefined"!=typeof a.top?a.top:f.top,f.left="undefined"!=typeof a.left?a.left:f.left,b):f},b.width=function(a){return arguments.length?(d=a,b):d},b.height=function(a){return arguments.length?(e=a,b):e},b.xScale=function(a){return arguments.length?(g=a,b):g},b.showGuideLine=function(a){return arguments.length?(i=a,b):i},b.svgContainer=function(a){return arguments.length?(j=a,b):j},b},a.interactiveBisect=function(a,b,c){"use strict";if(!(a instanceof Array))return null;var d;d="function"!=typeof c?function(a){return a.x}:c;var e=function(a,b){return d(a)-b},f=d3.bisector(e).left,g=d3.max([0,f(a,b)-1]),h=d(a[g]);if("undefined"==typeof h&&(h=g),h===b)return g;var i=d3.min([g+1,a.length-1]),j=d(a[i]);return"undefined"==typeof j&&(j=i),Math.abs(j-b)>=Math.abs(h-b)?g:i},a.nearestValueIndex=function(a,b,c){"use strict";var d=1/0,e=null;return a.forEach(function(a,f){var g=Math.abs(b-a);null!=a&&d>=g&&c>g&&(d=g,e=f)}),e},function(){"use strict";a.models.tooltip=function(){function b(){if(k){var a=d3.select(k);"svg"!==a.node().tagName&&(a=a.select("svg"));var b=a.node()?a.attr("viewBox"):null;if(b){b=b.split(" ");var c=parseInt(a.style("width"),10)/b[2];p.left=p.left*c,p.top=p.top*c}}}function c(){if(!n){var a;a=k?k:document.body,n=d3.select(a).append("div").attr("class","nvtooltip "+(j?j:"xy-tooltip")).attr("id",v),n.style("top",0).style("left",0),n.style("opacity",0),n.selectAll("div, table, td, tr").classed(w,!0),n.classed(w,!0),o=n.node()}}function d(){if(r&&B(e)){b();var f=p.left,g=null!==i?i:p.top;return a.dom.write(function(){c();var b=A(e);b&&(o.innerHTML=b),k&&u?a.dom.read(function(){var a=k.getElementsByTagName("svg")[0],b={left:0,top:0};if(a){var c=a.getBoundingClientRect(),d=k.getBoundingClientRect(),e=c.top;if(0>e){var i=k.getBoundingClientRect();e=Math.abs(e)>i.height?0:e}b.top=Math.abs(e-d.top),b.left=Math.abs(c.left-d.left)}f+=k.offsetLeft+b.left-2*k.scrollLeft,g+=k.offsetTop+b.top-2*k.scrollTop,h&&h>0&&(g=Math.floor(g/h)*h),C([f,g])}):C([f,g])}),d}}var e=null,f="w",g=25,h=0,i=null,j=null,k=null,l=!0,m=400,n=null,o=null,p={left:null,top:null},q={left:0,top:0},r=!0,s=100,t=!0,u=!1,v="nvtooltip-"+Math.floor(1e5*Math.random()),w="nv-pointer-events-none",x=function(a){return a},y=function(a){return a},z=function(a){return a},A=function(a){if(null===a)return"";var b=d3.select(document.createElement("table"));if(t){var c=b.selectAll("thead").data([a]).enter().append("thead");c.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(y(a.value))}var d=b.selectAll("tbody").data([a]).enter().append("tbody"),e=d.selectAll("tr").data(function(a){return a.series}).enter().append("tr").classed("highlight",function(a){return a.highlight});e.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(a){return a.color}),e.append("td").classed("key",!0).html(function(a,b){return z(a.key,b)}),e.append("td").classed("value",!0).html(function(a,b){return x(a.value,b)}),e.selectAll("td").each(function(a){if(a.highlight){var b=d3.scale.linear().domain([0,1]).range(["#fff",a.color]),c=.6;d3.select(this).style("border-bottom-color",b(c)).style("border-top-color",b(c))}});var f=b.node().outerHTML;return void 0!==a.footer&&(f+=""),f},B=function(a){if(a&&a.series){if(a.series instanceof Array)return!!a.series.length;if(a.series instanceof Object)return a.series=[a.series],!0}return!1},C=function(b){o&&a.dom.read(function(){var c,d,e=parseInt(o.offsetHeight,10),h=parseInt(o.offsetWidth,10),i=a.utils.windowSize().width,j=a.utils.windowSize().height,k=window.pageYOffset,p=window.pageXOffset;j=window.innerWidth>=document.body.scrollWidth?j:j-16,i=window.innerHeight>=document.body.scrollHeight?i:i-16;var r,t,u=function(a){var b=d;do isNaN(a.offsetTop)||(b+=a.offsetTop),a=a.offsetParent;while(a);return b},v=function(a){var b=c;do isNaN(a.offsetLeft)||(b+=a.offsetLeft),a=a.offsetParent;while(a);return b};switch(f){case"e":c=b[0]-h-g,d=b[1]-e/2,r=v(o),t=u(o),p>r&&(c=b[0]+g>p?b[0]+g:p-r+c),k>t&&(d=k-t+d),t+e>k+j&&(d=k+j-t+d-e);break;case"w":c=b[0]+g,d=b[1]-e/2,r=v(o),t=u(o),r+h>i&&(c=b[0]-h-g),k>t&&(d=k+5),t+e>k+j&&(d=k+j-t+d-e);break;case"n":c=b[0]-h/2-5,d=b[1]+g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),t+e>k+j&&(d=k+j-t+d-e);break;case"s":c=b[0]-h/2,d=b[1]-e-g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),k>t&&(d=k);break;case"none":c=b[0],d=b[1]-g,r=v(o),t=u(o)}c-=q.left,d-=q.top;var w=o.getBoundingClientRect(),k=window.pageYOffset||document.documentElement.scrollTop,p=window.pageXOffset||document.documentElement.scrollLeft,x="translate("+(w.left+p)+"px, "+(w.top+k)+"px)",y="translate("+c+"px, "+d+"px)",z=d3.interpolateString(x,y),A=n.style("opacity")<.1;l?n.transition().delay(m).duration(0).style("opacity",0):n.interrupt().transition().duration(A?0:s).styleTween("transform",function(){return z},"important").style("-webkit-transform",y).style("opacity",1)})};return d.nvPointerEventsClass=w,d.options=a.utils.optionsFunc.bind(d),d._options=Object.create({},{duration:{get:function(){return s},set:function(a){s=a}},gravity:{get:function(){return f},set:function(a){f=a}},distance:{get:function(){return g},set:function(a){g=a}},snapDistance:{get:function(){return h},set:function(a){h=a}},classes:{get:function(){return j},set:function(a){j=a}},chartContainer:{get:function(){return k},set:function(a){k=a}},fixedTop:{get:function(){return i},set:function(a){i=a}},enabled:{get:function(){return r},set:function(a){r=a}},hideDelay:{get:function(){return m},set:function(a){m=a}},contentGenerator:{get:function(){return A},set:function(a){A=a}},valueFormatter:{get:function(){return x},set:function(a){x=a}},headerFormatter:{get:function(){return y},set:function(a){y=a}},keyFormatter:{get:function(){return z},set:function(a){z=a}},headerEnabled:{get:function(){return t},set:function(a){t=a}},_isInteractiveLayer:{get:function(){return u},set:function(a){u=!!a}},position:{get:function(){return p},set:function(a){p.left=void 0!==a.left?a.left:p.left,p.top=void 0!==a.top?a.top:p.top}},offset:{get:function(){return q},set:function(a){q.left=void 0!==a.left?a.left:q.left,q.top=void 0!==a.top?a.top:q.top}},hidden:{get:function(){return l},set:function(a){l!=a&&(l=!!a,d())}},data:{get:function(){return e},set:function(a){a.point&&(a.value=a.point.x,a.series=a.series||{},a.series.value=a.point.y,a.series.color=a.point.color||a.series.color),e=a}},tooltipElem:{get:function(){return o},set:function(){}},id:{get:function(){return v},set:function(){}}}),a.utils.initOptions(d),d}}(),a.utils.windowSize=function(){var a={width:640,height:480};return window.innerWidth&&window.innerHeight?(a.width=window.innerWidth,a.height=window.innerHeight,a):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight,a):document.body&&document.body.offsetWidth?(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight,a):a},a.utils.windowResize=function(b){return window.addEventListener?window.addEventListener("resize",b):a.log("ERROR: Failed to bind to window.resize with: ",b),{callback:b,clear:function(){window.removeEventListener("resize",b)}}},a.utils.getColor=function(b){if(void 0===b)return a.utils.defaultColor();if(Array.isArray(b)){var c=d3.scale.ordinal().range(b);return function(a,b){var d=void 0===b?a:b;return a.color||c(d)}}return b},a.utils.defaultColor=function(){return a.utils.getColor(d3.scale.category20().range())},a.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return"function"==typeof a[f]?a[f]():void 0!==a[f]?a[f]:(d||(d=c.length),d-=1,c[d])}},a.utils.pjax=function(b,c){var d=function(d){d3.html(d,function(d){var e=d3.select(c).node();e.parentNode.replaceChild(d3.select(d).select(c).node(),e),a.utils.pjax(b,c)})};d3.selectAll(b).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},a.utils.calcApproxTextWidth=function(a){if("function"==typeof a.style&&"function"==typeof a.text){var b=parseInt(a.style("font-size").replace("px",""),10),c=a.text().length;return c*b*.5}return 0},a.utils.NaNtoZero=function(a){return"number"!=typeof a||isNaN(a)||null===a||1/0===a||a===-1/0?0:a},d3.selection.prototype.watchTransition=function(a){var b=[this].concat([].slice.call(arguments,1));return a.transition.apply(a,b)},a.utils.renderWatch=function(b,c){if(!(this instanceof a.utils.renderWatch))return new a.utils.renderWatch(b,c);var d=void 0!==c?c:250,e=[],f=this;this.models=function(a){return a=[].slice.call(arguments,0),a.forEach(function(a){a.__rendered=!1,function(a){a.dispatch.on("renderEnd",function(){a.__rendered=!0,f.renderEnd("model")})}(a),e.indexOf(a)<0&&e.push(a)}),this},this.reset=function(a){void 0!==a&&(d=a),e=[]},this.transition=function(a,b,c){if(b=arguments.length>1?[].slice.call(arguments,1):[],c=b.length>1?b.pop():void 0!==d?d:250,a.__rendered=!1,e.indexOf(a)<0&&e.push(a),0===c)return a.__rendered=!0,a.delay=function(){return this},a.duration=function(){return this},a;a.__rendered=0===a.length?!0:a.every(function(a){return!a.length})?!0:!1;var g=0;return a.transition().duration(c).each(function(){++g}).each("end",function(){0===--g&&(a.__rendered=!0,f.renderEnd.apply(this,b))})},this.renderEnd=function(){e.every(function(a){return a.__rendered})&&(e.forEach(function(a){a.__rendered=!1}),b.renderEnd.apply(this,arguments))}},a.utils.deepExtend=function(b){var c=arguments.length>1?[].slice.call(arguments,1):[];c.forEach(function(c){for(var d in c){var e=b[d]instanceof Array,f="object"==typeof b[d],g="object"==typeof c[d];f&&!e&&g?a.utils.deepExtend(b[d],c[d]):b[d]=c[d]}})},a.utils.state=function(){if(!(this instanceof a.utils.state))return new a.utils.state;var b={},c=function(){},d=function(){return{}},e=null,f=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(a){c(a,!0)}),this.getter=function(a){return d=a,this},this.setter=function(a,b){return b||(b=function(){}),c=function(c,d){a(c),d&&b()},this},this.init=function(b){e=e||{},a.utils.deepExtend(e,b)};var g=function(){var a=d();if(JSON.stringify(a)===JSON.stringify(b))return!1;for(var c in a)void 0===b[c]&&(b[c]={}),b[c]=a[c],f=!0;return!0};this.update=function(){e&&(c(e,!1),e=null),g.call(this)&&this.dispatch.change(b)}},a.utils.optionsFunc=function(a){return a&&d3.map(a).forEach(function(a,b){"function"==typeof this[a]&&this[a](b)}.bind(this)),this},a.utils.calcTicksX=function(b,c){var d=1,e=0;for(e;ed?f:d}return a.log("Requested number of ticks: ",b),a.log("Calculated max values to be: ",d),b=b>d?b=d-1:b,b=1>b?1:b,b=Math.floor(b),a.log("Calculating tick count as: ",b),b},a.utils.calcTicksY=function(b,c){return a.utils.calcTicksX(b,c)},a.utils.initOption=function(a,b){a._calls&&a._calls[b]?a[b]=a._calls[b]:(a[b]=function(c){return arguments.length?(a._overrides[b]=!0,a._options[b]=c,a):a._options[b]},a["_"+b]=function(c){return arguments.length?(a._overrides[b]||(a._options[b]=c),a):a._options[b]})},a.utils.initOptions=function(b){b._overrides=b._overrides||{};var c=Object.getOwnPropertyNames(b._options||{}),d=Object.getOwnPropertyNames(b._calls||{});c=c.concat(d);for(var e in c)a.utils.initOption(b,c[e])},a.utils.inheritOptionsD3=function(a,b,c){a._d3options=c.concat(a._d3options||[]),c.unshift(b),c.unshift(a),d3.rebind.apply(this,c)},a.utils.arrayUnique=function(a){return a.sort().filter(function(b,c){return!c||b!=a[c-1]})},a.utils.symbolMap=d3.map(),a.utils.symbol=function(){function b(b,e){var f=c.call(this,b,e),g=d.call(this,b,e);return-1!==d3.svg.symbolTypes.indexOf(f)?d3.svg.symbol().type(f).size(g)():a.utils.symbolMap.get(f)(g)}var c,d=64;return b.type=function(a){return arguments.length?(c=d3.functor(a),b):c},b.size=function(a){return arguments.length?(d=d3.functor(a),b):d},b},a.utils.inheritOptions=function(b,c){var d=Object.getOwnPropertyNames(c._options||{}),e=Object.getOwnPropertyNames(c._calls||{}),f=c._inherited||[],g=c._d3options||[],h=d.concat(e).concat(f).concat(g);h.unshift(c),h.unshift(b),d3.rebind.apply(this,h),b._inherited=a.utils.arrayUnique(d.concat(e).concat(f).concat(d).concat(b._inherited||[])),b._d3options=a.utils.arrayUnique(g.concat(b._d3options||[]))},a.utils.initSVG=function(a){a.classed({"nvd3-svg":!0})},a.utils.sanitizeHeight=function(a,b){return a||parseInt(b.style("height"),10)||400},a.utils.sanitizeWidth=function(a,b){return a||parseInt(b.style("width"),10)||960},a.utils.availableHeight=function(b,c,d){return a.utils.sanitizeHeight(b,c)-d.top-d.bottom},a.utils.availableWidth=function(b,c,d){return a.utils.sanitizeWidth(b,c)-d.left-d.right},a.utils.noData=function(b,c){var d=b.options(),e=d.margin(),f=d.noData(),g=null==f?["No Data Available."]:[f],h=a.utils.availableHeight(d.height(),c,e),i=a.utils.availableWidth(d.width(),c,e),j=e.left+i/2,k=e.top+h/2;c.selectAll("g").remove();var l=c.selectAll(".nv-noData").data(g);l.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),l.attr("x",j).attr("y",k).text(function(a){return a})},a.models.axis=function(){"use strict";function b(g){return s.reset(),g.each(function(b){var g=d3.select(this);a.utils.initSVG(g);var p=g.selectAll("g.nv-wrap.nv-axis").data([b]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),t=(q.append("g"),p.select("g"));null!==n?c.ticks(n):("top"==c.orient()||"bottom"==c.orient())&&c.ticks(Math.abs(d.range()[1]-d.range()[0])/100),t.watchTransition(s,"axis").call(c),r=r||c.scale();var u=c.tickFormat();null==u&&(u=r.tickFormat());var v=t.selectAll("text.nv-axislabel").data([h||null]);v.exit().remove();var w,x,y;switch(c.orient()){case"top":v.enter().append("text").attr("class","nv-axislabel"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr("text-anchor","middle").attr("y",0).attr("x",y/2),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),x.exit().remove(),x.attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-c.tickPadding()).attr("text-anchor","middle").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max top").attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(d.range()[c])+",0)"}));break;case"bottom":w=o+36;var z=30,A=0,B=t.selectAll("g").select("text"),C="";if(j%360){B.each(function(){var a=this.getBoundingClientRect(),b=a.width;A=a.height,b>z&&(z=b)}),C="rotate("+j+" 0,"+(A/2+c.tickPadding())+")";var D=Math.abs(Math.sin(j*Math.PI/180));w=(D?D*z:z)+30,B.attr("transform",C).style("text-anchor",j%360>0?"start":"end")}v.enter().append("text").attr("class","nv-axislabel"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr("text-anchor","middle").attr("y",w).attr("x",y/2),i&&(x=p.selectAll("g.nv-axisMaxMin").data([d.domain()[0],d.domain()[d.domain().length-1]]),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),x.exit().remove(),x.attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",c.tickPadding()).attr("transform",C).style("text-anchor",j?j%360>0?"start":"end":"middle").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max bottom").attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+",0)"})),l&&B.attr("transform",function(a,b){return"translate(0,"+(b%2==0?"0":"12")+")"});break;case"right":v.enter().append("text").attr("class","nv-axislabel"),v.style("text-anchor",k?"middle":"begin").attr("transform",k?"rotate(90)":"").attr("y",k?-Math.max(e.right,f)+12:-10).attr("x",k?d3.max(d.range())/2:c.tickPadding()),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(b){return"translate(0,"+a.utils.NaNtoZero(d(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",c.tickPadding()).style("text-anchor","start").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(d.range()[c])+")"}).select("text").style("opacity",1));break;case"left":v.enter().append("text").attr("class","nv-axislabel"),v.style("text-anchor",k?"middle":"end").attr("transform",k?"rotate(-90)":"").attr("y",k?-Math.max(e.left,f)+25-(o||0):-10).attr("x",k?-d3.max(d.range())/2:-c.tickPadding()),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(b){return"translate(0,"+a.utils.NaNtoZero(r(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-c.tickPadding()).attr("text-anchor","end").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(d.range()[c])+")"}).select("text").style("opacity",1))}if(v.text(function(a){return a}),!i||"left"!==c.orient()&&"right"!==c.orient()||(t.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(d(a)d.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),d.domain()[0]==d.domain()[1]&&0==d.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),i&&("top"===c.orient()||"bottom"===c.orient())){var E=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{E.push(b?d(a)-this.getBoundingClientRect().width-4:d(a)+this.getBoundingClientRect().width+4)}catch(c){E.push(b?d(a)-4:d(a)+4)}}),t.selectAll("g").each(function(a){(d(a)E[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}t.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)&&void 0!==a}).classed("zero",!0),r=d.copy()}),s.renderEnd("axis immediate"),b}var c=d3.svg.axis(),d=d3.scale.linear(),e={top:0,right:0,bottom:0,left:0},f=75,g=60,h=null,i=!0,j=0,k=!0,l=!1,m=!1,n=null,o=0,p=250,q=d3.dispatch("renderEnd");c.scale(d).orient("bottom").tickFormat(function(a){return a});var r,s=a.utils.renderWatch(q,p);return b.axis=c,b.dispatch=q,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return o},set:function(a){o=a}},staggerLabels:{get:function(){return l},set:function(a){l=a}},rotateLabels:{get:function(){return j},set:function(a){j=a}},rotateYLabel:{get:function(){return k},set:function(a){k=a}},showMaxMin:{get:function(){return i},set:function(a){i=a}},axisLabel:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return g},set:function(a){g=a}},ticks:{get:function(){return n},set:function(a){n=a}},width:{get:function(){return f},set:function(a){f=a}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},duration:{get:function(){return p},set:function(a){p=a,s.reset(p)}},scale:{get:function(){return d},set:function(e){d=e,c.scale(d),m="function"==typeof d.rangeBands,a.utils.inheritOptionsD3(b,d,["domain","range","rangeBand","rangeBands"])}}}),a.utils.initOptions(b),a.utils.inheritOptionsD3(b,c,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),a.utils.inheritOptionsD3(b,d,["domain","range","rangeBand","rangeBands"]),b},a.models.boxPlot=function(){"use strict";function b(l){return v.reset(),l.each(function(b){var l=j-i.left-i.right,p=k-i.top-i.bottom;r=d3.select(this),a.utils.initSVG(r),m.domain(c||b.map(function(a,b){return o(a,b)})).rangeBands(e||[0,l],.1);var w=[];if(!d){var x=d3.min(b.map(function(a){var b=[];return b.push(a.values.Q1),a.values.hasOwnProperty("whisker_low")&&null!==a.values.whisker_low&&b.push(a.values.whisker_low),a.values.hasOwnProperty("outliers")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.min(b)})),y=d3.max(b.map(function(a){var b=[];return b.push(a.values.Q3),a.values.hasOwnProperty("whisker_high")&&null!==a.values.whisker_high&&b.push(a.values.whisker_high),a.values.hasOwnProperty("outliers")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.max(b)}));w=[x,y]}n.domain(d||w),n.range(f||[p,0]),g=g||m,h=h||n.copy().range([n(0),n(0)]);{var z=r.selectAll("g.nv-wrap").data([b]);z.enter().append("g").attr("class","nvd3 nv-wrap")}z.attr("transform","translate("+i.left+","+i.top+")");var A=z.selectAll(".nv-boxplot").data(function(a){return a}),B=A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.attr("class","nv-boxplot").attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}).classed("hover",function(a){return a.hover}),A.watchTransition(v,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(a,c){return c*t/b.length}).attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}),A.exit().remove(),B.each(function(a,b){var c=d3.select(this);["low","high"].forEach(function(d){a.values.hasOwnProperty("whisker_"+d)&&null!==a.values["whisker_"+d]&&(c.append("line").style("stroke",a.color?a.color:q(a,b)).attr("class","nv-boxplot-whisker nv-boxplot-"+d),c.append("line").style("stroke",a.color?a.color:q(a,b)).attr("class","nv-boxplot-tick nv-boxplot-"+d))})});var C=A.selectAll(".nv-boxplot-outlier").data(function(a){return a.values.hasOwnProperty("outliers")&&null!==a.values.outliers?a.values.outliers:[]});C.enter().append("circle").style("fill",function(a,b,c){return q(a,c)}).style("stroke",function(a,b,c){return q(a,c)}).on("mouseover",function(a,b,c){d3.select(this).classed("hover",!0),s.elementMouseover({series:{key:a,color:q(a,c)},e:d3.event})}).on("mouseout",function(a,b,c){d3.select(this).classed("hover",!1),s.elementMouseout({series:{key:a,color:q(a,c)},e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})}),C.attr("class","nv-boxplot-outlier"),C.watchTransition(v,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*m.rangeBand()).attr("cy",function(a){return n(a)}).attr("r","3"),C.exit().remove();var D=function(){return null===u?.9*m.rangeBand():Math.min(75,.9*m.rangeBand())},E=function(){return.45*m.rangeBand()-D()/2},F=function(){return.45*m.rangeBand()+D()/2};["low","high"].forEach(function(a){var b="low"===a?"Q1":"Q3";A.select("line.nv-boxplot-whisker.nv-boxplot-"+a).watchTransition(v,"nv-boxplot: boxplots").attr("x1",.45*m.rangeBand()).attr("y1",function(b){return n(b.values["whisker_"+a])}).attr("x2",.45*m.rangeBand()).attr("y2",function(a){return n(a.values[b])}),A.select("line.nv-boxplot-tick.nv-boxplot-"+a).watchTransition(v,"nv-boxplot: boxplots").attr("x1",E).attr("y1",function(b){return n(b.values["whisker_"+a])}).attr("x2",F).attr("y2",function(b){return n(b.values["whisker_"+a])})}),["low","high"].forEach(function(a){B.selectAll(".nv-boxplot-"+a).on("mouseover",function(b,c,d){d3.select(this).classed("hover",!0),s.elementMouseover({series:{key:b.values["whisker_"+a],color:q(b,d)},e:d3.event})}).on("mouseout",function(b,c,d){d3.select(this).classed("hover",!1),s.elementMouseout({series:{key:b.values["whisker_"+a],color:q(b,d)},e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})})}),B.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),s.elementMouseover({key:a.label,value:a.label,series:[{key:"Q3",value:a.values.Q3,color:a.color||q(a,b)},{key:"Q2",value:a.values.Q2,color:a.color||q(a,b)},{key:"Q1",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),s.elementMouseout({key:a.label,value:a.label,series:[{key:"Q3",value:a.values.Q3,color:a.color||q(a,b)},{key:"Q2",value:a.values.Q2,color:a.color||q(a,b)},{key:"Q1",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})}),A.select("rect.nv-boxplot-box").watchTransition(v,"nv-boxplot: boxes").attr("y",function(a){return n(a.values.Q3)}).attr("width",D).attr("x",E).attr("height",function(a){return Math.abs(n(a.values.Q3)-n(a.values.Q1))||1}).style("fill",function(a,b){return a.color||q(a,b)}).style("stroke",function(a,b){return a.color||q(a,b)}),B.append("line").attr("class","nv-boxplot-median"),A.select("line.nv-boxplot-median").watchTransition(v,"nv-boxplot: boxplots line").attr("x1",E).attr("y1",function(a){return n(a.values.Q2)}).attr("x2",F).attr("y2",function(a){return n(a.values.Q2)}),g=m.copy(),h=n.copy()}),v.renderEnd("nv-boxplot immediate"),b}var c,d,e,f,g,h,i={top:0,right:0,bottom:0,left:0},j=960,k=500,l=Math.floor(1e4*Math.random()),m=d3.scale.ordinal(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=a.utils.defaultColor(),r=null,s=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),t=250,u=null,v=a.utils.renderWatch(s,t);return b.dispatch=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},maxBoxWidth:{get:function(){return u},set:function(a){u=a}},x:{get:function(){return o},set:function(a){o=a}},y:{get:function(){return p},set:function(a){p=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return l},set:function(a){l=a}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}},duration:{get:function(){return t},set:function(a){t=a,v.reset(t)}}}),a.utils.initOptions(b),b},a.models.boxPlotChart=function(){"use strict";function b(k){return t.reset(),t.models(e),l&&t.models(f),m&&t.models(g),k.each(function(k){var p=d3.select(this);a.utils.initSVG(p);var t=(i||parseInt(p.style("width"))||960)-h.left-h.right,u=(j||parseInt(p.style("height"))||400)-h.top-h.bottom;if(b.update=function(){r.beforeUpdate(),p.transition().duration(s).call(b)},b.container=this,!(k&&k.length&&k.filter(function(a){return a.values.hasOwnProperty("Q1")&&a.values.hasOwnProperty("Q2")&&a.values.hasOwnProperty("Q3")}).length)){var v=p.selectAll(".nv-noData").data([q]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",h.left+t/2).attr("y",h.top+u/2).text(function(a){return a}),b}p.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var w=p.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([k]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),y=x.append("defs"),z=w.select("g"); -x.append("g").attr("class","nv-x nv-axis"),x.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),x.append("g").attr("class","nv-barsWrap"),z.attr("transform","translate("+h.left+","+h.top+")"),n&&z.select(".nv-y.nv-axis").attr("transform","translate("+t+",0)"),e.width(t).height(u);var A=z.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));if(A.transition().call(e),y.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),z.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(o?2:1)).attr("height",16).attr("x",-c.rangeBand()/(o?1:2)),l){f.scale(c).ticks(a.utils.calcTicksX(t/100,k)).tickSize(-u,0),z.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),z.select(".nv-x.nv-axis").call(f);var B=z.select(".nv-x.nv-axis").selectAll("g");o&&B.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"})}m&&(g.scale(d).ticks(Math.floor(u/36)).tickSize(-t,0),z.select(".nv-y.nv-axis").call(g)),z.select(".nv-zeroLine line").attr("x1",0).attr("x2",t).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("nv-boxplot chart immediate"),b}var c,d,e=a.models.boxPlot(),f=a.models.axis(),g=a.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=a.utils.getColor(),l=!0,m=!0,n=!1,o=!1,p=a.models.tooltip(),q="No Data Available.",r=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(n?"right":"left").tickFormat(d3.format(",.1f")),p.duration(0);var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){p.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.data(a).hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){p.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.boxplot=e,b.xAxis=f,b.yAxis=g,b.tooltip=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},staggerLabels:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return l},set:function(a){l=a}},showYAxis:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return tooltips},set:function(a){tooltips=a}},tooltipContent:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!==a.top?a.top:h.top,h.right=void 0!==a.right?a.right:h.right,h.bottom=void 0!==a.bottom?a.bottom:h.bottom,h.left=void 0!==a.left?a.left:h.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}},rightAlignYAxis:{get:function(){return n},set:function(a){n=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.bullet=function(){"use strict";function b(d){return d.each(function(b,d){var p=m-c.left-c.right,s=n-c.top-c.bottom;o=d3.select(this),a.utils.initSVG(o);{var t=f.call(this,b,d).slice().sort(d3.descending),u=g.call(this,b,d).slice().sort(d3.descending),v=h.call(this,b,d).slice().sort(d3.descending),w=i.call(this,b,d).slice(),x=j.call(this,b,d).slice(),y=k.call(this,b,d).slice(),z=d3.scale.linear().domain(d3.extent(d3.merge([l,t]))).range(e?[p,0]:[0,p]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range())}this.__chart__=z;var A=d3.min(t),B=d3.max(t),C=t[1],D=o.selectAll("g.nv-wrap.nv-bullet").data([b]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),F=E.append("g"),G=D.select("g");F.append("rect").attr("class","nv-range nv-rangeMax"),F.append("rect").attr("class","nv-range nv-rangeAvg"),F.append("rect").attr("class","nv-range nv-rangeMin"),F.append("rect").attr("class","nv-measure"),D.attr("transform","translate("+c.left+","+c.top+")");var H=function(a){return Math.abs(z(a)-z(0))},I=function(a){return z(0>a?a:0)};G.select("rect.nv-rangeMax").attr("height",s).attr("width",H(B>0?B:A)).attr("x",I(B>0?B:A)).datum(B>0?B:A),G.select("rect.nv-rangeAvg").attr("height",s).attr("width",H(C)).attr("x",I(C)).datum(C),G.select("rect.nv-rangeMin").attr("height",s).attr("width",H(B)).attr("x",I(B)).attr("width",H(B>0?A:B)).attr("x",I(B>0?A:B)).datum(B>0?A:B),G.select("rect.nv-measure").style("fill",q).attr("height",s/3).attr("y",s/3).attr("width",0>v?z(0)-z(v[0]):z(v[0])-z(0)).attr("x",I(v)).on("mouseover",function(){r.elementMouseover({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){r.elementMousemove({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){r.elementMouseout({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})});var J=s/6,K=u.map(function(a,b){return{value:a,label:x[b]}});F.selectAll("path.nv-markerTriangle").data(K).enter().append("path").attr("class","nv-markerTriangle").attr("transform",function(a){return"translate("+z(a.value)+","+s/2+")"}).attr("d","M0,"+J+"L"+J+","+-J+" "+-J+","+-J+"Z").on("mouseover",function(a){r.elementMouseover({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill"),pos:[z(a.value),s/2]})}).on("mousemove",function(a){r.elementMousemove({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a){r.elementMouseout({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}),D.selectAll(".nv-range").on("mouseover",function(a,b){var c=w[b]||(b?1==b?"Mean":"Minimum":"Maximum");r.elementMouseover({value:a,label:c,color:d3.select(this).style("fill")})}).on("mousemove",function(){r.elementMousemove({value:v[0],label:y[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){var c=w[b]||(b?1==b?"Mean":"Minimum":"Maximum");r.elementMouseout({value:a,label:c,color:d3.select(this).style("fill")})})}),b}var c={top:0,right:0,bottom:0,left:0},d="left",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers?a.markers:[0]},h=function(a){return a.measures},i=function(a){return a.rangeLabels?a.rangeLabels:[]},j=function(a){return a.markerLabels?a.markerLabels:[]},k=function(a){return a.measureLabels?a.measureLabels:[]},l=[0],m=380,n=30,o=null,p=null,q=a.utils.getColor(["#1f77b4"]),r=d3.dispatch("elementMouseover","elementMouseout","elementMousemove");return b.dispatch=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return f},set:function(a){f=a}},markers:{get:function(){return g},set:function(a){g=a}},measures:{get:function(){return h},set:function(a){h=a}},forceX:{get:function(){return l},set:function(a){l=a}},width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},tickFormat:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},orient:{get:function(){return d},set:function(a){d=a,e="right"==d||"bottom"==d}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.bulletChart=function(){"use strict";function b(d){return d.each(function(e,o){var p=d3.select(this);a.utils.initSVG(p);var q=a.utils.availableWidth(k,p,g),r=l-g.top-g.bottom;if(b.update=function(){b(d)},b.container=this,!e||!h.call(this,e,o))return a.utils.noData(b,p),b;p.selectAll(".nv-noData").remove();var s=h.call(this,e,o).slice().sort(d3.descending),t=i.call(this,e,o).slice().sort(d3.descending),u=j.call(this,e,o).slice().sort(d3.descending),v=p.selectAll("g.nv-wrap.nv-bulletChart").data([e]),w=v.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),x=w.append("g"),y=v.select("g");x.append("g").attr("class","nv-bulletWrap"),x.append("g").attr("class","nv-titles"),v.attr("transform","translate("+g.left+","+g.top+")");var z=d3.scale.linear().domain([0,Math.max(s[0],t[0],u[0])]).range(f?[q,0]:[0,q]),A=this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range());this.__chart__=z;var B=x.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(l-g.top-g.bottom)/2+")");B.append("text").attr("class","nv-title").text(function(a){return a.title}),B.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),c.width(q).height(r);var C=y.select(".nv-bulletWrap");d3.transition(C).call(c);var D=m||z.tickFormat(q/100),E=y.selectAll("g.nv-tick").data(z.ticks(n?n:q/50),function(a){return this.textContent||D(a)}),F=E.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+A(a)+",0)"}).style("opacity",1e-6);F.append("line").attr("y1",r).attr("y2",7*r/6),F.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*r/6).text(D);var G=d3.transition(E).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1);G.select("line").attr("y1",r).attr("y2",7*r/6),G.select("text").attr("y",7*r/6),d3.transition(E.exit()).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),b}var c=a.models.bullet(),d=a.models.tooltip(),e="left",f=!1,g={top:5,right:40,bottom:20,left:120},h=function(a){return a.ranges},i=function(a){return a.markers?a.markers:[0]},j=function(a){return a.measures},k=null,l=55,m=null,n=null,o=null,p=d3.dispatch("tooltipShow","tooltipHide");return d.duration(0).headerEnabled(!1),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.label,value:a.value,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.bullet=c,b.dispatch=p,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return h},set:function(a){h=a}},markers:{get:function(){return i},set:function(a){i=a}},measures:{get:function(){return j},set:function(a){j=a}},width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},tickFormat:{get:function(){return m},set:function(a){m=a}},ticks:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return o},set:function(a){o=a}},tooltips:{get:function(){return d.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),d.enabled(!!b)}},tooltipContent:{get:function(){return d.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),d.contentGenerator(b)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},orient:{get:function(){return e},set:function(a){e=a,f="right"==e||"bottom"==e}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.candlestickBar=function(){"use strict";function b(x){return x.each(function(b){c=d3.select(this);var x=a.utils.availableWidth(i,c,h),y=a.utils.availableHeight(j,c,h);a.utils.initSVG(c);var A=x/b[0].values.length*.45;l.domain(d||d3.extent(b[0].values.map(n).concat(t))),l.range(v?f||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:f||[5+A/2,x-A/2-5]),m.domain(e||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(g||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var B=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([b[0].values]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-ticks"),B.attr("transform","translate("+h.left+","+h.top+")"),c.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:k})}),D.append("clipPath").attr("id","nv-chart-clip-path-"+k).append("rect"),B.select("#nv-chart-clip-path-"+k+" rect").attr("width",x).attr("height",y),F.attr("clip-path",w?"url(#nv-chart-clip-path-"+k+")":"");var G=B.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});G.exit().remove();{var H=G.enter().append("g").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b});H.append("line").attr("class","nv-candlestick-lines").attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),H.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}c.selectAll(".nv-candlestick-lines").transition().attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),c.selectAll(".nv-candlestick-rects").transition().attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}),b}var c,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=null,j=null,k=Math.floor(1e4*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,d){b.clearHighlights(),c.select(".nv-candlestickBar .nv-tick-0-"+a).classed("hover",d)},b.clearHighlights=function(){c.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return k},set:function(a){k=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!=a.top?a.top:h.top,h.right=void 0!=a.right?a.right:h.right,h.bottom=void 0!=a.bottom?a.bottom:h.bottom,h.left=void 0!=a.left?a.left:h.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.cumulativeLineChart=function(){"use strict";function b(l){return H.reset(),H.models(f),r&&H.models(g),s&&H.models(h),l.each(function(l){function A(){d3.select(b.container).style("cursor","ew-resize")}function E(){G.x=d3.event.x,G.i=Math.round(F.invert(G.x)),K()}function H(){d3.select(b.container).style("cursor","auto"),y.index=G.i,C.stateChange(y)}function K(){bb.data([G]);var a=b.duration();b.duration(0),b.update(),b.duration(a)}var L=d3.select(this);a.utils.initSVG(L),L.classed("nv-chart-"+x,!0);var M=this,N=a.utils.availableWidth(o,L,m),O=a.utils.availableHeight(p,L,m);if(b.update=function(){0===D?L.call(b):L.transition().duration(D).call(b)},b.container=this,y.setter(J(l),b.update).getter(I(l)).update(),y.disabled=l.map(function(a){return!!a.disabled}),!z){var P;z={};for(P in y)z[P]=y[P]instanceof Array?y[P].slice(0):y[P]}var Q=d3.behavior.drag().on("dragstart",A).on("drag",E).on("dragend",H);if(!(l&&l.length&&l.filter(function(a){return a.values.length}).length))return a.utils.noData(b,L),b;if(L.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale(),w)f.yDomain(null);else{var R=l.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),S=[d3.min(R,function(a){return a[0]}),d3.max(R,function(a){return a[1]})];f.yDomain(S)}F.domain([0,l[0].values.length-1]).range([0,N]).clamp(!0);var l=c(G.i,l),T=v?"none":"all",U=L.selectAll("g.nv-wrap.nv-cumulativeLine").data([l]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),W=U.select("g");if(V.append("g").attr("class","nv-interactive"),V.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),V.append("g").attr("class","nv-y nv-axis"),V.append("g").attr("class","nv-background"),V.append("g").attr("class","nv-linesWrap").style("pointer-events",T),V.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),V.append("g").attr("class","nv-legendWrap"),V.append("g").attr("class","nv-controlsWrap"),q&&(i.width(N),W.select(".nv-legendWrap").datum(l).call(i),m.top!=i.height()&&(m.top=i.height(),O=a.utils.availableHeight(p,L,m)),W.select(".nv-legendWrap").attr("transform","translate(0,"+-m.top+")")),u){var X=[{key:"Re-scale y-axis",disabled:!w}];j.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),W.select(".nv-controlsWrap").datum(X).attr("transform","translate(0,"+-m.top+")").call(j)}U.attr("transform","translate("+m.left+","+m.top+")"),t&&W.select(".nv-y.nv-axis").attr("transform","translate("+N+",0)");var Y=l.filter(function(a){return a.tempDisabled});U.select(".tempDisabled").remove(),Y.length&&U.append("text").attr("class","tempDisabled").attr("x",N/2).attr("y","-.71em").style("text-anchor","end").text(Y.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),v&&(k.width(N).height(O).margin({left:m.left,top:m.top}).svgContainer(L).xScale(d),U.select(".nv-interactive").call(k)),V.select(".nv-background").append("rect"),W.select(".nv-background rect").attr("width",N).attr("height",O),f.y(function(a){return a.display.y}).width(N).height(O).color(l.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!l[b].disabled&&!l[b].tempDisabled}));var Z=W.select(".nv-linesWrap").datum(l.filter(function(a){return!a.disabled&&!a.tempDisabled}));Z.call(f),l.forEach(function(a,b){a.seriesIndex=b});var $=l.filter(function(a){return!a.disabled&&!!B(a)}),_=W.select(".nv-avgLinesWrap").selectAll("line").data($,function(a){return a.key}),ab=function(a){var b=e(B(a));return 0>b?0:b>O?O:b};_.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a){return f.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",N).attr("y1",ab).attr("y2",ab),_.style("stroke-opacity",function(a){var b=e(B(a));return 0>b||b>O?0:1}).attr("x1",0).attr("x2",N).attr("y1",ab).attr("y2",ab),_.exit().remove();var bb=Z.selectAll(".nv-indexLine").data([G]);bb.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(Q),bb.attr("transform",function(a){return"translate("+F(a.i)+",0)"}).attr("height",O),r&&(g.scale(d)._ticks(a.utils.calcTicksX(N/70,l)).tickSize(-O,0),W.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),W.select(".nv-x.nv-axis").call(g)),s&&(h.scale(e)._ticks(a.utils.calcTicksY(O/36,l)).tickSize(-N,0),W.select(".nv-y.nv-axis").call(h)),W.select(".nv-background rect").on("click",function(){G.x=d3.mouse(this)[0],G.i=Math.round(F.invert(G.x)),y.index=G.i,C.stateChange(y),K()}),f.dispatch.on("elementClick",function(a){G.i=a.pointIndex,G.x=F(G.i),y.index=G.i,C.stateChange(y),K()}),j.dispatch.on("legendClick",function(a){a.disabled=!a.disabled,w=!a.disabled,y.rescaleY=w,C.stateChange(y),b.update()}),i.dispatch.on("stateChange",function(a){for(var c in a)y[c]=a[c];C.stateChange(y),b.update()}),k.dispatch.on("elementMousemove",function(c){f.clearHighlights();var d,e,i,j=[];if(l.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,c.pointXValue,b.x()),f.highlightPoint(h,e,!0);var k=g.values[e];"undefined"!=typeof k&&("undefined"==typeof d&&(d=k),"undefined"==typeof i&&(i=b.xScale()(b.x()(k,e))),j.push({key:g.key,value:b.y()(k,e),color:n(g,g.seriesIndex)}))}),j.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(j.map(function(a){return a.value}),o,q);null!==r&&(j[r].highlight=!0)}var s=g.tickFormat()(b.x()(d,e),e);k.tooltip.position({left:i+m.left,top:c.mouseY+m.top}).chartContainer(M.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:s,series:j})(),k.renderGuideLine(i)}),k.dispatch.on("elementMouseout",function(){f.clearHighlights()}),C.on("changeState",function(a){"undefined"!=typeof a.disabled&&(l.forEach(function(b,c){b.disabled=a.disabled[c]}),y.disabled=a.disabled),"undefined"!=typeof a.index&&(G.i=a.index,G.x=F(G.i),y.index=a.index,bb.data([G])),"undefined"!=typeof a.rescaleY&&(w=a.rescaleY),b.update()})}),H.renderEnd("cumulativeLineChart immediate"),b}function c(a,b){return K||(K=f.y()),b.map(function(b){if(!b.values)return b;var c=b.values[a];if(null==c)return b;var d=K(c,a);return-.95>d&&!E?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(K(a,b)-d)/(1+d)},a}),b)})}var d,e,f=a.models.line(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.models.legend(),k=a.interactiveGuideline(),l=a.models.tooltip(),m={top:30,right:30,bottom:50,left:60},n=a.utils.defaultColor(),o=null,p=null,q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=!0,x=f.id(),y=a.utils.state(),z=null,A=null,B=function(a){return a.average},C=d3.dispatch("stateChange","changeState","renderEnd"),D=250,E=!1;y.index=0,y.rescaleY=w,g.orient("bottom").tickPadding(7),h.orient(t?"right":"left"),l.valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)}),j.updateState(!1);var F=d3.scale.linear(),G={i:0,x:0},H=a.utils.renderWatch(C,D),I=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),index:G.i,rescaleY:w}}},J=function(a){return function(b){void 0!==b.index&&(G.i=b.index),void 0!==b.rescaleY&&(w=b.rescaleY),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};f.dispatch.on("elementMouseover.tooltip",function(a){var c={x:b.x()(a.point),y:b.y()(a.point),color:a.point.color};a.point=c,l.data(a).position(a.pos).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(){l.hidden(!0)});var K=null;return b.dispatch=C,b.lines=f,b.legend=i,b.controls=j,b.xAxis=g,b.yAxis=h,b.interactiveLayer=k,b.state=y,b.tooltip=l,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},rescaleY:{get:function(){return w},set:function(a){w=a}},showControls:{get:function(){return u},set:function(a){u=a}},showLegend:{get:function(){return q},set:function(a){q=a}},average:{get:function(){return B},set:function(a){B=a}},defaultState:{get:function(){return z},set:function(a){z=a}},noData:{get:function(){return A},set:function(a){A=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},noErrorCheck:{get:function(){return E},set:function(a){E=a}},tooltips:{get:function(){return l.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),l.enabled(!!b)}},tooltipContent:{get:function(){return l.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),l.contentGenerator(b)}},margin:{get:function(){return m},set:function(a){m.top=void 0!==a.top?a.top:m.top,m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),i.color(n)}},useInteractiveGuideline:{get:function(){return v},set:function(a){v=a,a===!0&&(b.interactive(!1),b.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,h.orient(a?"right":"left")}},duration:{get:function(){return D},set:function(a){D=a,f.duration(D),g.duration(D),h.duration(D),H.reset(D)}}}),a.utils.inheritOptions(b,f),a.utils.initOptions(b),b},a.models.discreteBar=function(){"use strict";function b(m){return y.reset(),m.each(function(b){var m=k-j.left-j.right,x=l-j.top-j.bottom;c=d3.select(this),a.utils.initSVG(c),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var z=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),y0:a.y0}})});n.domain(d||d3.merge(z).map(function(a){return a.x})).rangeBands(f||[0,m],.1),o.domain(e||d3.extent(d3.merge(z).map(function(a){return a.y}).concat(r))),o.range(t?g||[x-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]:g||[x,0]),h=h||n,i=i||o.copy().range([o(0),o(0)]);{var A=c.selectAll("g.nv-wrap.nv-discretebar").data([b]),B=A.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),C=B.append("g");A.select("g")}C.append("g").attr("class","nv-groups"),A.attr("transform","translate("+j.left+","+j.top+")");var D=A.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});D.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),D.exit().watchTransition(y,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),D.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),D.watchTransition(y,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var E=D.selectAll("g.nv-bar").data(function(a){return a.values});E.exit().remove();var F=E.enter().append("g").attr("transform",function(a,b){return"translate("+(n(p(a,b))+.05*n.rangeBand())+", "+o(0)+")"}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){v.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){v.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});F.append("rect").attr("height",0).attr("width",.9*n.rangeBand()/b.length),t?(F.append("text").attr("text-anchor","middle"),E.select("text").text(function(a,b){return u(q(a,b))}).watchTransition(y,"discreteBar: bars text").attr("x",.9*n.rangeBand()/2).attr("y",function(a,b){return q(a,b)<0?o(q(a,b))-o(0)+12:-4})):E.selectAll("text").remove(),E.attr("class",function(a,b){return q(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||s(a,b)}).style("stroke",function(a,b){return a.color||s(a,b)}).select("rect").attr("class",w).watchTransition(y,"discreteBar: bars rect").attr("width",.9*n.rangeBand()/b.length),E.watchTransition(y,"discreteBar: bars").attr("transform",function(a,b){var c=n(p(a,b))+.05*n.rangeBand(),d=q(a,b)<0?o(0):o(0)-o(q(a,b))<1?o(0)-1:o(q(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(o(q(a,b))-o(e&&e[0]||0))||1)}),h=n.copy(),i=o.copy()}),y.renderEnd("discreteBar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=d3.scale.ordinal(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=[0],s=a.utils.defaultColor(),t=!1,u=d3.format(",.2f"),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),w="discreteBar",x=250,y=a.utils.renderWatch(v,x);return b.dispatch=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},forceY:{get:function(){return r},set:function(a){r=a}},showValues:{get:function(){return t},set:function(a){t=a}},x:{get:function(){return p},set:function(a){p=a}},y:{get:function(){return q},set:function(a){q=a}},xScale:{get:function(){return n},set:function(a){n=a}},yScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},valueFormat:{get:function(){return u},set:function(a){u=a}},id:{get:function(){return m},set:function(a){m=a}},rectClass:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b)}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x)}}}),a.utils.initOptions(b),b},a.models.discreteBarChart=function(){"use strict";function b(h){return t.reset(),t.models(e),m&&t.models(f),n&&t.models(g),h.each(function(h){var l=d3.select(this);a.utils.initSVG(l);var q=a.utils.availableWidth(j,l,i),t=a.utils.availableHeight(k,l,i);if(b.update=function(){r.beforeUpdate(),l.transition().duration(s).call(b)},b.container=this,!(h&&h.length&&h.filter(function(a){return a.values.length}).length))return a.utils.noData(b,l),b;l.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var u=l.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([h]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),w=v.append("defs"),x=u.select("g");v.append("g").attr("class","nv-x nv-axis"),v.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),v.append("g").attr("class","nv-barsWrap"),x.attr("transform","translate("+i.left+","+i.top+")"),o&&x.select(".nv-y.nv-axis").attr("transform","translate("+q+",0)"),e.width(q).height(t);var y=x.select(".nv-barsWrap").datum(h.filter(function(a){return!a.disabled}));if(y.transition().call(e),w.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),x.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(p?2:1)).attr("height",16).attr("x",-c.rangeBand()/(p?1:2)),m){f.scale(c)._ticks(a.utils.calcTicksX(q/100,h)).tickSize(-t,0),x.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),x.select(".nv-x.nv-axis").call(f); -var z=x.select(".nv-x.nv-axis").selectAll("g");p&&z.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"})}n&&(g.scale(d)._ticks(a.utils.calcTicksY(t/36,h)).tickSize(-q,0),x.select(".nv-y.nv-axis").call(g)),x.select(".nv-zeroLine line").attr("x1",0).attr("x2",q).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("discreteBar chart immediate"),b}var c,d,e=a.models.discreteBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.tooltip(),i={top:15,right:10,bottom:50,left:60},j=null,k=null,l=a.utils.getColor(),m=!0,n=!0,o=!1,p=!1,q=null,r=d3.dispatch("beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(o?"right":"left").tickFormat(d3.format(",.1f")),h.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).keyFormatter(function(a,b){return f.tickFormat()(a,b)});var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},h.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){h.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){h.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.discretebar=e,b.xAxis=f,b.yAxis=g,b.tooltip=h,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},staggerLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return m},set:function(a){m=a}},showYAxis:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return q},set:function(a){q=a}},tooltips:{get:function(){return h.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),h.enabled(!!b)}},tooltipContent:{get:function(){return h.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),h.contentGenerator(b)}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),e.color(l)}},rightAlignYAxis:{get:function(){return o},set:function(a){o=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.distribution=function(){"use strict";function b(k){return m.reset(),k.each(function(b){var k=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),l=d3.select(this);a.utils.initSVG(l),c=c||j;var n=l.selectAll("g.nv-distribution").data([b]),o=n.enter().append("g").attr("class","nvd3 nv-distribution"),p=(o.append("g"),n.select("g"));n.attr("transform","translate("+d.left+","+d.top+")");var q=p.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});q.enter().append("g"),q.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var r=q.selectAll("line.nv-dist"+g).data(function(a){return a.values});r.enter().append("line").attr(g+"1",function(a,b){return c(h(a,b))}).attr(g+"2",function(a,b){return c(h(a,b))}),m.transition(q.exit().selectAll("line.nv-dist"+g),"dist exit").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),r.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(k+"1",0).attr(k+"2",f),m.transition(r,"dist").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),c=j.copy()}),m.renderEnd("distribution immediate"),b}var c,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=a.utils.defaultColor(),j=d3.scale.linear(),k=250,l=d3.dispatch("renderEnd"),m=a.utils.renderWatch(l,k);return b.options=a.utils.optionsFunc.bind(b),b.dispatch=l,b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.axis=function(a){return arguments.length?(g=a,b):g},b.size=function(a){return arguments.length?(f=a,b):f},b.getData=function(a){return arguments.length?(h=d3.functor(a),b):h},b.scale=function(a){return arguments.length?(j=a,b):j},b.color=function(c){return arguments.length?(i=a.utils.getColor(c),b):i},b.duration=function(a){return arguments.length?(k=a,m.reset(k),b):k},b},a.models.furiousLegend=function(){"use strict";function b(p){function q(a,b){return"furious"!=o?"#000":m?a.disengaged?g(a,b):"#fff":m?void 0:a.disabled?g(a,b):"#fff"}function r(a,b){return m&&"furious"==o?a.disengaged?"#fff":g(a,b):a.disabled?"#fff":g(a,b)}return p.each(function(b){var p=d-c.left-c.right,s=d3.select(this);a.utils.initSVG(s);var t=s.selectAll("g.nv-legend").data([b]),u=(t.enter().append("g").attr("class","nvd3 nv-legend").append("g"),t.select("g"));t.attr("transform","translate("+c.left+","+c.top+")");var v,w=u.selectAll(".nv-series").data(function(a){return"furious"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),x=w.enter().append("g").attr("class","nv-series");if("classic"==o)x.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),v=w.select("circle");else if("furious"==o){x.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),v=w.select("rect"),x.append("g").attr("class","nv-check-box").property("innerHTML",'').attr("transform","translate(-10,-8)scale(0.5)");var y=w.select(".nv-check-box");y.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",q(a,b))})}x.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var z=w.select("text.nv-legend-text");w.on("mouseover",function(a,b){n.legendMouseover(a,b)}).on("mouseout",function(a,b){n.legendMouseout(a,b)}).on("click",function(a,b){n.legendClick(a,b);var c=w.data();if(k){if("classic"==o)l?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==o)if(m)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!m){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}n.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=o||!m)&&(n.legendDblclick(a,b),k)){var c=w.data();c.forEach(function(a){a.disabled=!0,"furious"==o&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==o&&(a.userDisabled=a.disabled),n.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),w.classed("nv-disabled",function(a){return a.userDisabled}),w.exit().remove(),z.attr("fill",q).text(f);var A;switch(o){case"furious":A=23;break;case"classic":A=20}if(h){var B=[];w.each(function(){var b,c=d3.select(this).select("text");try{if(b=c.node().getComputedTextLength(),0>=b)throw Error()}catch(d){b=a.utils.calcApproxTextWidth(c)}B.push(b+i)});for(var C=0,D=0,E=[];p>D&&Cp&&C>1;){E=[],C--;for(var F=0;F(E[F%C]||0)&&(E[F%C]=B[F]);D=E.reduce(function(a,b){return a+b})}for(var G=[],H=0,I=0;C>H;H++)G[H]=I,I+=E[H];w.attr("transform",function(a,b){return"translate("+G[b%C]+","+(5+Math.floor(b/C)*A)+")"}),j?u.attr("transform","translate("+(d-c.right-D)+","+c.top+")"):u.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(B.length/C)*A}else{var J,K=5,L=5,M=0;w.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+i;return J=L,dM&&(M=L),"translate("+J+","+K+")"}),u.attr("transform","translate("+(d-c.right-M)+","+c.top+")"),e=c.top+c.bottom+K+15}"furious"==o&&v.attr("width",function(a,b){return z[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),v.style("fill",r).style("stroke",function(a,b){return a.color||g(a,b)})}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=a.utils.getColor(),h=!0,i=28,j=!0,k=!0,l=!1,m=!1,n=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),o="classic";return b.dispatch=n,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},align:{get:function(){return h},set:function(a){h=a}},rightAlign:{get:function(){return j},set:function(a){j=a}},padding:{get:function(){return i},set:function(a){i=a}},updateState:{get:function(){return k},set:function(a){k=a}},radioButtonMode:{get:function(){return l},set:function(a){l=a}},expanded:{get:function(){return m},set:function(a){m=a}},vers:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBar=function(){"use strict";function b(x){return x.each(function(b){w.reset(),k=d3.select(this);var x=a.utils.availableWidth(h,k,g),y=a.utils.availableHeight(i,k,g);a.utils.initSVG(k),l.domain(c||d3.extent(b[0].values.map(n).concat(p))),l.range(r?e||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:e||[0,x]),m.domain(d||d3.extent(b[0].values.map(o).concat(q))).range(f||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var z=k.selectAll("g.nv-wrap.nv-historicalBar-"+j).data([b[0].values]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+j),B=A.append("defs"),C=A.append("g"),D=z.select("g");C.append("g").attr("class","nv-bars"),z.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){u.chartClick({data:a,index:b,pos:d3.event,id:j})}),B.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),z.select("#nv-chart-clip-path-"+j+" rect").attr("width",x).attr("height",y),D.attr("clip-path",s?"url(#nv-chart-clip-path-"+j+")":"");var E=z.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a},function(a,b){return n(a,b)});E.exit().remove(),E.enter().append("rect").attr("x",0).attr("y",function(b,c){return a.utils.NaNtoZero(m(Math.max(0,o(b,c))))}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.abs(m(o(b,c))-m(0)))}).attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).on("mouseover",function(a,b){v&&(d3.select(this).classed("hover",!0),u.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mouseout",function(a,b){v&&(d3.select(this).classed("hover",!1),u.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mousemove",function(a,b){v&&u.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){v&&(u.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}).on("dblclick",function(a,b){v&&(u.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),E.attr("fill",function(a,b){return t(a,b)}).attr("class",function(a,b,c){return(o(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).watchTransition(w,"bars").attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).attr("width",x/b[0].values.length*.9),E.watchTransition(w,"bars").attr("y",function(b,c){var d=o(b,c)<0?m(0):m(0)-m(o(b,c))<1?m(0)-1:m(o(b,c));return a.utils.NaNtoZero(d)}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.max(Math.abs(m(o(b,c))-m(0)),1))})}),w.renderEnd("historicalBar immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[],q=[0],r=!1,s=!0,t=a.utils.defaultColor(),u=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),v=!0,w=a.utils.renderWatch(u,0);return b.highlightPoint=function(a,b){k.select(".nv-bars .nv-bar-0-"+a).classed("hover",b)},b.clearHighlights=function(){k.select(".nv-bars .nv-bar.hover").classed("hover",!1)},b.dispatch=u,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},forceX:{get:function(){return p},set:function(a){p=a}},forceY:{get:function(){return q},set:function(a){q=a}},padData:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},clipEdge:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return v},set:function(a){v=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBarChart=function(b){"use strict";function c(b){return b.each(function(k){z.reset(),z.models(f),q&&z.models(g),r&&z.models(h);var w=d3.select(this),A=this;a.utils.initSVG(w);var B=a.utils.availableWidth(n,w,l),C=a.utils.availableHeight(o,w,l);if(c.update=function(){w.transition().duration(y).call(c)},c.container=this,u.disabled=k.map(function(a){return!!a.disabled}),!v){var D;v={};for(D in u)v[D]=u[D]instanceof Array?u[D].slice(0):u[D]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(c,w),c;w.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale();var E=w.selectAll("g.nv-wrap.nv-historicalBarChart").data([k]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),p&&(i.width(B),G.select(".nv-legendWrap").datum(k).call(i),l.top!=i.height()&&(l.top=i.height(),C=a.utils.availableHeight(o,w,l)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")")),E.attr("transform","translate("+l.left+","+l.top+")"),s&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),t&&(j.width(B).height(C).margin({left:l.left,top:l.top}).svgContainer(w).xScale(d),E.select(".nv-interactive").call(j)),f.width(B).height(C).color(k.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!k[b].disabled}));var H=G.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));H.transition().call(f),q&&(g.scale(d)._ticks(a.utils.calcTicksX(B/100,k)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),G.select(".nv-x.nv-axis").transition().call(g)),r&&(h.scale(e)._ticks(a.utils.calcTicksY(C/36,k)).tickSize(-B,0),G.select(".nv-y.nv-axis").transition().call(h)),j.dispatch.on("elementMousemove",function(b){f.clearHighlights();var d,e,i,n=[];k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g){e=a.interactiveBisect(g.values,b.pointXValue,c.x()),f.highlightPoint(e,!0);var h=g.values[e];void 0!==h&&(void 0===d&&(d=h),void 0===i&&(i=c.xScale()(c.x()(h,e))),n.push({key:g.key,value:c.y()(h,e),color:m(g,g.seriesIndex),data:g.values[e]}))});var o=g.tickFormat()(c.x()(d,e));j.tooltip.position({left:i+l.left,top:b.mouseY+l.top}).chartContainer(A.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:o,index:e,series:n})(),j.renderGuideLine(i)}),j.dispatch.on("elementMouseout",function(){x.tooltipHide(),f.clearHighlights()}),i.dispatch.on("legendClick",function(a){a.disabled=!a.disabled,k.filter(function(a){return!a.disabled}).length||k.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),b.transition().call(c)}),i.dispatch.on("legendDblclick",function(a){k.forEach(function(a){a.disabled=!0}),a.disabled=!1,u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),c.update()}),x.on("changeState",function(a){"undefined"!=typeof a.disabled&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),c.update()})}),z.renderEnd("historicalBarChart immediate"),c}var d,e,f=b||a.models.historicalBar(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:90,bottom:50,left:90},m=a.utils.defaultColor(),n=null,o=null,p=!1,q=!0,r=!0,s=!1,t=!1,u={},v=null,w=null,x=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),y=250;g.orient("bottom").tickPadding(7),h.orient(s?"right":"left"),k.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)});var z=a.utils.renderWatch(x,0);return f.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:c.x()(a.data),value:c.y()(a.data),color:a.color},k.data(a).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(){k.hidden(!0)}),f.dispatch.on("elementMousemove.tooltip",function(){k.position({top:d3.event.pageY,left:d3.event.pageX})()}),c.dispatch=x,c.bars=f,c.legend=i,c.xAxis=g,c.yAxis=h,c.interactiveLayer=j,c.tooltip=k,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return q},set:function(a){q=a}},showYAxis:{get:function(){return r},set:function(a){r=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},tooltips:{get:function(){return k.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),k.enabled(!!b)}},tooltipContent:{get:function(){return k.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),k.contentGenerator(b)}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b),i.color(m),f.color(m)}},duration:{get:function(){return y},set:function(a){y=a,z.reset(y),h.duration(y),g.duration(y)}},rightAlignYAxis:{get:function(){return s},set:function(a){s=a,h.orient(a?"right":"left")}},useInteractiveGuideline:{get:function(){return t},set:function(a){t=a,a===!0&&c.interactive(!1)}}}),a.utils.inheritOptions(c,f),a.utils.initOptions(c),c},a.models.ohlcBarChart=function(){var b=a.models.historicalBarChart(a.models.ohlcBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"
open:"+b.yAxis.tickFormat()(c.open)+"
close:"+b.yAxis.tickFormat()(c.close)+"
high"+b.yAxis.tickFormat()(c.high)+"
low:"+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.candlestickBarChart=function(){var b=a.models.historicalBarChart(a.models.candlestickBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"
open:"+b.yAxis.tickFormat()(c.open)+"
close:"+b.yAxis.tickFormat()(c.close)+"
high"+b.yAxis.tickFormat()(c.high)+"
low:"+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.legend=function(){"use strict";function b(p){function q(a,b){return"furious"!=o?"#000":m?a.disengaged?"#000":"#fff":m?void 0:(a.color||(a.color=g(a,b)),a.disabled?a.color:"#fff")}function r(a,b){return m&&"furious"==o&&a.disengaged?"#eee":a.color||g(a,b)}function s(a){return m&&"furious"==o?1:a.disabled?0:1}return p.each(function(b){var g=d-c.left-c.right,p=d3.select(this);a.utils.initSVG(p);var t=p.selectAll("g.nv-legend").data([b]),u=t.enter().append("g").attr("class","nvd3 nv-legend").append("g"),v=t.select("g");t.attr("transform","translate("+c.left+","+c.top+")");var w,x,y=v.selectAll(".nv-series").data(function(a){return"furious"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),z=y.enter().append("g").attr("class","nv-series");switch(o){case"furious":x=23;break;case"classic":x=20}if("classic"==o)z.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),w=y.select("circle");else if("furious"==o){z.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),w=y.select(".nv-legend-symbol"),z.append("g").attr("class","nv-check-box").property("innerHTML",'').attr("transform","translate(-10,-8)scale(0.5)");var A=y.select(".nv-check-box");A.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",q(a,b))})}z.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var B=y.select("text.nv-legend-text");y.on("mouseover",function(a,b){n.legendMouseover(a,b)}).on("mouseout",function(a,b){n.legendMouseout(a,b)}).on("click",function(a,b){n.legendClick(a,b);var c=y.data();if(k){if("classic"==o)l?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==o)if(m)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!m){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}n.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=o||!m)&&(n.legendDblclick(a,b),k)){var c=y.data();c.forEach(function(a){a.disabled=!0,"furious"==o&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==o&&(a.userDisabled=a.disabled),n.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),y.classed("nv-disabled",function(a){return a.userDisabled}),y.exit().remove(),B.attr("fill",q).text(f);var C=0;if(h){var D=[];y.each(function(){var b,c=d3.select(this).select("text");try{if(b=c.node().getComputedTextLength(),0>=b)throw Error()}catch(d){b=a.utils.calcApproxTextWidth(c)}D.push(b+i)});var E=0,F=[];for(C=0;g>C&&Eg&&E>1;){F=[],E--;for(var G=0;G(F[G%E]||0)&&(F[G%E]=D[G]);C=F.reduce(function(a,b){return a+b})}for(var H=[],I=0,J=0;E>I;I++)H[I]=J,J+=F[I];y.attr("transform",function(a,b){return"translate("+H[b%E]+","+(5+Math.floor(b/E)*x)+")"}),j?v.attr("transform","translate("+(d-c.right-C)+","+c.top+")"):v.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(D.length/E)*x}else{var K,L=5,M=5,N=0;y.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+i;return K=M,dN&&(N=M),K+N>C&&(C=K+N),"translate("+K+","+L+")"}),v.attr("transform","translate("+(d-c.right-N)+","+c.top+")"),e=c.top+c.bottom+L+15}if("furious"==o){w.attr("width",function(a,b){return B[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),u.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0);var O=v.select(".nv-legend-bg");O.transition().duration(300).attr("x",-x).attr("width",C+x-12).attr("height",e+10).attr("y",-c.top-10).attr("opacity",m?1:0)}w.style("fill",r).style("fill-opacity",s).style("stroke",r)}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=a.utils.getColor(),h=!0,i=32,j=!0,k=!0,l=!1,m=!1,n=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),o="classic";return b.dispatch=n,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},align:{get:function(){return h},set:function(a){h=a}},rightAlign:{get:function(){return j},set:function(a){j=a}},padding:{get:function(){return i},set:function(a){i=a}},updateState:{get:function(){return k},set:function(a){k=a}},radioButtonMode:{get:function(){return l},set:function(a){l=a}},expanded:{get:function(){return m},set:function(a){m=a}},vers:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.line=function(){"use strict";function b(r){return v.reset(),v.models(e),r.each(function(b){i=d3.select(this);var r=a.utils.availableWidth(g,i,f),s=a.utils.availableHeight(h,i,f);a.utils.initSVG(i),c=e.xScale(),d=e.yScale(),t=t||c,u=u||d;var w=i.selectAll("g.nv-wrap.nv-line").data([b]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),y=x.append("defs"),z=x.append("g"),A=w.select("g");z.append("g").attr("class","nv-groups"),z.append("g").attr("class","nv-scatterWrap"),w.attr("transform","translate("+f.left+","+f.top+")"),e.width(r).height(s);var B=w.select(".nv-scatterWrap");B.call(e),y.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),w.select("#nv-edge-clip-"+e.id()+" rect").attr("width",r).attr("height",s>0?s:0),A.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":""),B.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":"");var C=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});C.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(a){return a.strokeWidth||j}).style("fill-opacity",1e-6),C.exit().remove(),C.attr("class",function(a,b){return(a.classed||"")+" nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return k(a,b)}).style("stroke",function(a,b){return k(a,b)}),C.watchTransition(v,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(a){return a.fillOpacity||.5});var D=C.selectAll("path.nv-area").data(function(a){return o(a)?[a]:[]});D.enter().append("path").attr("class","nv-area").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y0(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))}).y1(function(){return u(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])}),C.exit().selectAll("path.nv-area").remove(),D.watchTransition(v,"line: areaPaths").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y0(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])});var E=C.selectAll("path.nv-line").data(function(a){return[a.values]});E.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))})),E.watchTransition(v,"line: linePaths").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))})),t=c.copy(),u=d.copy()}),v.renderEnd("line immediate"),b}var c,d,e=a.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=null,j=1.5,k=a.utils.defaultColor(),l=function(a){return a.x},m=function(a){return a.y},n=function(a,b){return!isNaN(m(a,b))&&null!==m(a,b)},o=function(a){return a.area},p=!1,q="linear",r=250,s=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");e.pointSize(16).pointDomain([16,256]);var t,u,v=a.utils.renderWatch(s,r);return b.dispatch=s,b.scatter=e,e.dispatch.on("elementClick",function(){s.elementClick.apply(this,arguments)}),e.dispatch.on("elementMouseover",function(){s.elementMouseover.apply(this,arguments)}),e.dispatch.on("elementMouseout",function(){s.elementMouseout.apply(this,arguments)}),b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},defined:{get:function(){return n},set:function(a){n=a}},interpolate:{get:function(){return q},set:function(a){q=a}},clipEdge:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},duration:{get:function(){return r},set:function(a){r=a,v.reset(r),e.duration(r)}},isArea:{get:function(){return o},set:function(a){o=d3.functor(a)}},x:{get:function(){return l},set:function(a){l=a,e.x(a)}},y:{get:function(){return m},set:function(a){m=a,e.y(a)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineChart=function(){"use strict";function b(j){return y.reset(),y.models(e),p&&y.models(f),q&&y.models(g),j.each(function(j){var v=d3.select(this),y=this;a.utils.initSVG(v);var B=a.utils.availableWidth(m,v,k),C=a.utils.availableHeight(n,v,k);if(b.update=function(){0===x?v.call(b):v.transition().duration(x).call(b)},b.container=this,t.setter(A(j),b.update).getter(z(j)).update(),t.disabled=j.map(function(a){return!!a.disabled}),!u){var D;u={};for(D in t)u[D]=t[D]instanceof Array?t[D].slice(0):t[D] -}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,v),b;v.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var E=v.selectAll("g.nv-wrap.nv-lineChart").data([j]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),G=E.select("g");F.append("rect").style("opacity",0),F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-linesWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),G.select("rect").attr("width",B).attr("height",C>0?C:0),o&&(h.width(B),G.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),C=a.utils.availableHeight(n,v,k)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-k.top+")")),E.attr("transform","translate("+k.left+","+k.top+")"),r&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),s&&(i.width(B).height(C).margin({left:k.left,top:k.top}).svgContainer(v).xScale(c),E.select(".nv-interactive").call(i)),e.width(B).height(C).color(j.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!j[b].disabled}));var H=G.select(".nv-linesWrap").datum(j.filter(function(a){return!a.disabled}));H.call(e),p&&(f.scale(c)._ticks(a.utils.calcTicksX(B/100,j)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),G.select(".nv-x.nv-axis").call(f)),q&&(g.scale(d)._ticks(a.utils.calcTicksY(C/36,j)).tickSize(-B,0),G.select(".nv-y.nv-axis").call(g)),h.dispatch.on("stateChange",function(a){for(var c in a)t[c]=a[c];w.stateChange(t),b.update()}),i.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,h,m,n=[];if(j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(f,g){h=a.interactiveBisect(f.values,c.pointXValue,b.x());var i=f.values[h],j=b.y()(i,h);null!=j&&e.highlightPoint(g,h,!0),void 0!==i&&(void 0===d&&(d=i),void 0===m&&(m=b.xScale()(b.x()(i,h))),n.push({key:f.key,value:j,color:l(f,f.seriesIndex)}))}),n.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(n.map(function(a){return a.value}),o,q);null!==r&&(n[r].highlight=!0)}var s=f.tickFormat()(b.x()(d,h));i.tooltip.position({left:c.mouseX+k.left,top:c.mouseY+k.top}).chartContainer(y.parentNode).valueFormatter(function(a){return null==a?"N/A":g.tickFormat()(a)}).data({value:s,index:h,series:n})(),i.renderGuideLine(m)}),i.dispatch.on("elementClick",function(c){var d,f=[];j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(e){var g=a.interactiveBisect(e.values,c.pointXValue,b.x()),h=e.values[g];if("undefined"!=typeof h){"undefined"==typeof d&&(d=b.xScale()(b.x()(h,g)));var i=b.yScale()(b.y()(h,g));f.push({point:h,pointIndex:g,pos:[d,i],seriesIndex:e.seriesIndex,series:e})}}),e.dispatch.elementClick(f)}),i.dispatch.on("elementMouseout",function(){e.clearHighlights()}),w.on("changeState",function(a){"undefined"!=typeof a.disabled&&j.length===a.disabled.length&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),t.disabled=a.disabled),b.update()})}),y.renderEnd("lineChart immediate"),b}var c,d,e=a.models.line(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.interactiveGuideline(),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=a.utils.defaultColor(),m=null,n=null,o=!0,p=!0,q=!0,r=!1,s=!1,t=a.utils.state(),u=null,v=null,w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),x=250;f.orient("bottom").tickPadding(7),g.orient(r?"right":"left"),j.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)});var y=a.utils.renderWatch(w,x),z=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},A=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){j.data(a).position(a.pos).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),b.dispatch=w,b.lines=e,b.legend=h,b.xAxis=f,b.yAxis=g,b.interactiveLayer=i,b.tooltip=j,b.dispatch=w,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return p},set:function(a){p=a}},showYAxis:{get:function(){return q},set:function(a){q=a}},defaultState:{get:function(){return u},set:function(a){u=a}},noData:{get:function(){return v},set:function(a){v=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x),e.duration(x),f.duration(x),g.duration(x)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),h.color(l),e.color(l)}},rightAlignYAxis:{get:function(){return r},set:function(a){r=a,g.orient(r?"right":"left")}},useInteractiveGuideline:{get:function(){return s},set:function(a){s=a,s&&(e.interactive(!1),e.useVoronoi(!1))}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.linePlusBarChart=function(){"use strict";function b(v){return v.each(function(v){function J(a){var b=+("e"==a),c=b?1:-1,d=X/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function S(){u.empty()||u.extent(I),kb.data([u.empty()?e.domain():I]).each(function(a){var b=e(a[0])-e.range()[0],c=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>c?0:c)})}function T(){I=u.empty()?null:u.extent(),c=u.empty()?e.domain():u.extent(),K.brush({extent:c,brush:u}),S(),l.width(V).height(W).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),j.width(V).height(W).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var b=db.select(".nv-focus .nv-barsWrap").datum(Z.length?Z.map(function(a){return{key:a.key,values:a.values.filter(function(a,b){return l.x()(a,b)>=c[0]&&l.x()(a,b)<=c[1]})}}):[{values:[]}]),h=db.select(".nv-focus .nv-linesWrap").datum($[0].disabled?[{values:[]}]:$.map(function(a){return{area:a.area,fillOpacity:a.fillOpacity,key:a.key,values:a.values.filter(function(a,b){return j.x()(a,b)>=c[0]&&j.x()(a,b)<=c[1]})}}));d=Z.length?l.xScale():j.xScale(),n.scale(d)._ticks(a.utils.calcTicksX(V/100,v)).tickSize(-W,0),n.domain([Math.ceil(c[0]),Math.floor(c[1])]),db.select(".nv-x.nv-axis").transition().duration(L).call(n),b.transition().duration(L).call(l),h.transition().duration(L).call(j),db.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f)._ticks(a.utils.calcTicksY(W/36,v)).tickSize(-V,0),q.scale(g)._ticks(a.utils.calcTicksY(W/36,v)).tickSize(Z.length?0:-V,0),db.select(".nv-focus .nv-y1.nv-axis").style("opacity",Z.length?1:0),db.select(".nv-focus .nv-y2.nv-axis").style("opacity",$.length&&!$[0].disabled?1:0).attr("transform","translate("+d.range()[1]+",0)"),db.select(".nv-focus .nv-y1.nv-axis").transition().duration(L).call(p),db.select(".nv-focus .nv-y2.nv-axis").transition().duration(L).call(q)}var U=d3.select(this);a.utils.initSVG(U);var V=a.utils.availableWidth(y,U,w),W=a.utils.availableHeight(z,U,w)-(E?H:0),X=H-x.top-x.bottom;if(b.update=function(){U.transition().duration(L).call(b)},b.container=this,M.setter(R(v),b.update).getter(Q(v)).update(),M.disabled=v.map(function(a){return!!a.disabled}),!N){var Y;N={};for(Y in M)N[Y]=M[Y]instanceof Array?M[Y].slice(0):M[Y]}if(!(v&&v.length&&v.filter(function(a){return a.values.length}).length))return a.utils.noData(b,U),b;U.selectAll(".nv-noData").remove();var Z=v.filter(function(a){return!a.disabled&&a.bar}),$=v.filter(function(a){return!a.bar});d=l.xScale(),e=o.scale(),f=l.yScale(),g=j.yScale(),h=m.yScale(),i=k.yScale();var _=v.filter(function(a){return!a.disabled&&a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),ab=v.filter(function(a){return!a.disabled&&!a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,V]),e.domain(d3.extent(d3.merge(_.concat(ab)),function(a){return a.x})).range([0,V]);var bb=U.selectAll("g.nv-wrap.nv-linePlusBar").data([v]),cb=bb.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),db=bb.select("g");cb.append("g").attr("class","nv-legendWrap");var eb=cb.append("g").attr("class","nv-focus");eb.append("g").attr("class","nv-x nv-axis"),eb.append("g").attr("class","nv-y1 nv-axis"),eb.append("g").attr("class","nv-y2 nv-axis"),eb.append("g").attr("class","nv-barsWrap"),eb.append("g").attr("class","nv-linesWrap");var fb=cb.append("g").attr("class","nv-context");if(fb.append("g").attr("class","nv-x nv-axis"),fb.append("g").attr("class","nv-y1 nv-axis"),fb.append("g").attr("class","nv-y2 nv-axis"),fb.append("g").attr("class","nv-barsWrap"),fb.append("g").attr("class","nv-linesWrap"),fb.append("g").attr("class","nv-brushBackground"),fb.append("g").attr("class","nv-x nv-brush"),D){var gb=t.align()?V/2:V,hb=t.align()?gb:0;t.width(gb),db.select(".nv-legendWrap").datum(v.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?O:P),a})).call(t),w.top!=t.height()&&(w.top=t.height(),W=a.utils.availableHeight(z,U,w)-H),db.select(".nv-legendWrap").attr("transform","translate("+hb+","+-w.top+")")}bb.attr("transform","translate("+w.left+","+w.top+")"),db.select(".nv-context").style("display",E?"initial":"none"),m.width(V).height(X).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),k.width(V).height(X).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var ib=db.select(".nv-context .nv-barsWrap").datum(Z.length?Z:[{values:[]}]),jb=db.select(".nv-context .nv-linesWrap").datum($[0].disabled?[{values:[]}]:$);db.select(".nv-context").attr("transform","translate(0,"+(W+w.bottom+x.top)+")"),ib.transition().call(m),jb.transition().call(k),G&&(o._ticks(a.utils.calcTicksX(V/100,v)).tickSize(-X,0),db.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),db.select(".nv-context .nv-x.nv-axis").transition().call(o)),F&&(r.scale(h)._ticks(X/36).tickSize(-V,0),s.scale(i)._ticks(X/36).tickSize(Z.length?0:-V,0),db.select(".nv-context .nv-y3.nv-axis").style("opacity",Z.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),db.select(".nv-context .nv-y2.nv-axis").style("opacity",$.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),db.select(".nv-context .nv-y1.nv-axis").transition().call(r),db.select(".nv-context .nv-y2.nv-axis").transition().call(s)),u.x(e).on("brush",T),I&&u.extent(I);var kb=db.select(".nv-brushBackground").selectAll("g").data([I||u.extent()]),lb=kb.enter().append("g");lb.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",X),lb.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",X);var mb=db.select(".nv-x.nv-brush").call(u);mb.selectAll("rect").attr("height",X),mb.selectAll(".resize").append("path").attr("d",J),t.dispatch.on("stateChange",function(a){for(var c in a)M[c]=a[c];K.stateChange(M),b.update()}),K.on("changeState",function(a){"undefined"!=typeof a.disabled&&(v.forEach(function(b,c){b.disabled=a.disabled[c]}),M.disabled=a.disabled),b.update()}),T()}),b}var c,d,e,f,g,h,i,j=a.models.line(),k=a.models.line(),l=a.models.historicalBar(),m=a.models.historicalBar(),n=a.models.axis(),o=a.models.axis(),p=a.models.axis(),q=a.models.axis(),r=a.models.axis(),s=a.models.axis(),t=a.models.legend(),u=d3.svg.brush(),v=a.models.tooltip(),w={top:30,right:30,bottom:30,left:60},x={top:0,right:30,bottom:20,left:60},y=null,z=null,A=function(a){return a.x},B=function(a){return a.y},C=a.utils.defaultColor(),D=!0,E=!0,F=!1,G=!0,H=50,I=null,J=null,K=d3.dispatch("brush","stateChange","changeState"),L=0,M=a.utils.state(),N=null,O=" (left axis)",P=" (right axis)";j.clipEdge(!0),k.interactive(!1),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right"),v.headerEnabled(!0).headerFormatter(function(a,b){return n.tickFormat()(a,b)});var Q=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},R=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return j.dispatch.on("elementMouseover.tooltip",function(a){v.duration(100).valueFormatter(function(a,b){return q.tickFormat()(a,b)}).data(a).position(a.pos).hidden(!1)}),j.dispatch.on("elementMouseout.tooltip",function(){v.hidden(!0)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={value:b.y()(a.data),color:a.color},v.duration(0).valueFormatter(function(a,b){return p.tickFormat()(a,b)}).data(a).hidden(!1)}),l.dispatch.on("elementMouseout.tooltip",function(){v.hidden(!0)}),l.dispatch.on("elementMousemove.tooltip",function(){v.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=K,b.legend=t,b.lines=j,b.lines2=k,b.bars=l,b.bars2=m,b.xAxis=n,b.x2Axis=o,b.y1Axis=p,b.y2Axis=q,b.y3Axis=r,b.y4Axis=s,b.tooltip=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return y},set:function(a){y=a}},height:{get:function(){return z},set:function(a){z=a}},showLegend:{get:function(){return D},set:function(a){D=a}},brushExtent:{get:function(){return I},set:function(a){I=a}},noData:{get:function(){return J},set:function(a){J=a}},focusEnable:{get:function(){return E},set:function(a){E=a}},focusHeight:{get:function(){return H},set:function(a){H=a}},focusShowAxisX:{get:function(){return G},set:function(a){G=a}},focusShowAxisY:{get:function(){return F},set:function(a){F=a}},legendLeftAxisHint:{get:function(){return O},set:function(a){O=a}},legendRightAxisHint:{get:function(){return P},set:function(a){P=a}},tooltips:{get:function(){return v.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),v.enabled(!!b)}},tooltipContent:{get:function(){return v.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),v.contentGenerator(b)}},margin:{get:function(){return w},set:function(a){w.top=void 0!==a.top?a.top:w.top,w.right=void 0!==a.right?a.right:w.right,w.bottom=void 0!==a.bottom?a.bottom:w.bottom,w.left=void 0!==a.left?a.left:w.left}},duration:{get:function(){return L},set:function(a){L=a}},color:{get:function(){return C},set:function(b){C=a.utils.getColor(b),t.color(C)}},x:{get:function(){return A},set:function(a){A=a,j.x(a),k.x(a),l.x(a),m.x(a)}},y:{get:function(){return B},set:function(a){B=a,j.y(a),k.y(a),l.y(a),m.y(a)}}}),a.utils.inheritOptions(b,j),a.utils.initOptions(b),b},a.models.lineWithFocusChart=function(){"use strict";function b(o){return o.each(function(o){function z(a){var b=+("e"==a),c=b?1:-1,d=M/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function G(){n.empty()||n.extent(y),U.data([n.empty()?e.domain():y]).each(function(a){var b=e(a[0])-c.range()[0],d=K-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function H(){y=n.empty()?null:n.extent();var a=n.empty()?e.domain():n.extent();if(!(Math.abs(a[0]-a[1])<=1)){A.brush({extent:a,brush:n}),G();var b=Q.select(".nv-focus .nv-linesWrap").datum(o.filter(function(a){return!a.disabled}).map(function(b){return{key:b.key,area:b.area,values:b.values.filter(function(b,c){return g.x()(b,c)>=a[0]&&g.x()(b,c)<=a[1]})}}));b.transition().duration(B).call(g),Q.select(".nv-focus .nv-x.nv-axis").transition().duration(B).call(i),Q.select(".nv-focus .nv-y.nv-axis").transition().duration(B).call(j)}}var I=d3.select(this),J=this;a.utils.initSVG(I);var K=a.utils.availableWidth(t,I,q),L=a.utils.availableHeight(u,I,q)-v,M=v-r.top-r.bottom;if(b.update=function(){I.transition().duration(B).call(b)},b.container=this,C.setter(F(o),b.update).getter(E(o)).update(),C.disabled=o.map(function(a){return!!a.disabled}),!D){var N;D={};for(N in C)D[N]=C[N]instanceof Array?C[N].slice(0):C[N]}if(!(o&&o.length&&o.filter(function(a){return a.values.length}).length))return a.utils.noData(b,I),b;I.selectAll(".nv-noData").remove(),c=g.xScale(),d=g.yScale(),e=h.xScale(),f=h.yScale();var O=I.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([o]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),Q=O.select("g");P.append("g").attr("class","nv-legendWrap");var R=P.append("g").attr("class","nv-focus");R.append("g").attr("class","nv-x nv-axis"),R.append("g").attr("class","nv-y nv-axis"),R.append("g").attr("class","nv-linesWrap"),R.append("g").attr("class","nv-interactive");var S=P.append("g").attr("class","nv-context");S.append("g").attr("class","nv-x nv-axis"),S.append("g").attr("class","nv-y nv-axis"),S.append("g").attr("class","nv-linesWrap"),S.append("g").attr("class","nv-brushBackground"),S.append("g").attr("class","nv-x nv-brush"),x&&(m.width(K),Q.select(".nv-legendWrap").datum(o).call(m),q.top!=m.height()&&(q.top=m.height(),L=a.utils.availableHeight(u,I,q)-v),Q.select(".nv-legendWrap").attr("transform","translate(0,"+-q.top+")")),O.attr("transform","translate("+q.left+","+q.top+")"),w&&(p.width(K).height(L).margin({left:q.left,top:q.top}).svgContainer(I).xScale(c),O.select(".nv-interactive").call(p)),g.width(K).height(L).color(o.map(function(a,b){return a.color||s(a,b)}).filter(function(a,b){return!o[b].disabled})),h.defined(g.defined()).width(K).height(M).color(o.map(function(a,b){return a.color||s(a,b)}).filter(function(a,b){return!o[b].disabled})),Q.select(".nv-context").attr("transform","translate(0,"+(L+q.bottom+r.top)+")");var T=Q.select(".nv-context .nv-linesWrap").datum(o.filter(function(a){return!a.disabled}));d3.transition(T).call(h),i.scale(c)._ticks(a.utils.calcTicksX(K/100,o)).tickSize(-L,0),j.scale(d)._ticks(a.utils.calcTicksY(L/36,o)).tickSize(-K,0),Q.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L+")"),n.x(e).on("brush",function(){H()}),y&&n.extent(y);var U=Q.select(".nv-brushBackground").selectAll("g").data([y||n.extent()]),V=U.enter().append("g");V.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M),V.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var W=Q.select(".nv-x.nv-brush").call(n);W.selectAll("rect").attr("height",M),W.selectAll(".resize").append("path").attr("d",z),H(),k.scale(e)._ticks(a.utils.calcTicksX(K/100,o)).tickSize(-M,0),Q.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),d3.transition(Q.select(".nv-context .nv-x.nv-axis")).call(k),l.scale(f)._ticks(a.utils.calcTicksY(M/36,o)).tickSize(-K,0),d3.transition(Q.select(".nv-context .nv-y.nv-axis")).call(l),Q.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),m.dispatch.on("stateChange",function(a){for(var c in a)C[c]=a[c];A.stateChange(C),b.update()}),p.dispatch.on("elementMousemove",function(c){g.clearHighlights();var d,f,h,k=[];if(o.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(i,j){var l=n.empty()?e.domain():n.extent(),m=i.values.filter(function(a,b){return g.x()(a,b)>=l[0]&&g.x()(a,b)<=l[1]});f=a.interactiveBisect(m,c.pointXValue,g.x());var o=m[f],p=b.y()(o,f);null!=p&&g.highlightPoint(j,f,!0),void 0!==o&&(void 0===d&&(d=o),void 0===h&&(h=b.xScale()(b.x()(o,f))),k.push({key:i.key,value:b.y()(o,f),color:s(i,i.seriesIndex)}))}),k.length>2){var l=b.yScale().invert(c.mouseY),m=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),r=.03*m,t=a.nearestValueIndex(k.map(function(a){return a.value}),l,r);null!==t&&(k[t].highlight=!0)}var u=i.tickFormat()(b.x()(d,f));p.tooltip.position({left:c.mouseX+q.left,top:c.mouseY+q.top}).chartContainer(J.parentNode).valueFormatter(function(a){return null==a?"N/A":j.tickFormat()(a)}).data({value:u,index:f,series:k})(),p.renderGuideLine(h)}),p.dispatch.on("elementMouseout",function(){g.clearHighlights()}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&o.forEach(function(b,c){b.disabled=a.disabled[c]}),b.update()})}),b}var c,d,e,f,g=a.models.line(),h=a.models.line(),i=a.models.axis(),j=a.models.axis(),k=a.models.axis(),l=a.models.axis(),m=a.models.legend(),n=d3.svg.brush(),o=a.models.tooltip(),p=a.interactiveGuideline(),q={top:30,right:30,bottom:30,left:60},r={top:0,right:30,bottom:20,left:60},s=a.utils.defaultColor(),t=null,u=null,v=50,w=!1,x=!0,y=null,z=null,A=d3.dispatch("brush","stateChange","changeState"),B=250,C=a.utils.state(),D=null;g.clipEdge(!0).duration(0),h.interactive(!1),i.orient("bottom").tickPadding(5),j.orient("left"),k.orient("bottom").tickPadding(5),l.orient("left"),o.valueFormatter(function(a,b){return j.tickFormat()(a,b)}).headerFormatter(function(a,b){return i.tickFormat()(a,b)});var E=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},F=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return g.dispatch.on("elementMouseover.tooltip",function(a){o.data(a).position(a.pos).hidden(!1)}),g.dispatch.on("elementMouseout.tooltip",function(){o.hidden(!0)}),b.dispatch=A,b.legend=m,b.lines=g,b.lines2=h,b.xAxis=i,b.yAxis=j,b.x2Axis=k,b.y2Axis=l,b.interactiveLayer=p,b.tooltip=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return t},set:function(a){t=a}},height:{get:function(){return u},set:function(a){u=a}},focusHeight:{get:function(){return v},set:function(a){v=a}},showLegend:{get:function(){return x},set:function(a){x=a}},brushExtent:{get:function(){return y},set:function(a){y=a}},defaultState:{get:function(){return D},set:function(a){D=a}},noData:{get:function(){return z},set:function(a){z=a}},tooltips:{get:function(){return o.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),o.enabled(!!b)}},tooltipContent:{get:function(){return o.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),o.contentGenerator(b)}},margin:{get:function(){return q},set:function(a){q.top=void 0!==a.top?a.top:q.top,q.right=void 0!==a.right?a.right:q.right,q.bottom=void 0!==a.bottom?a.bottom:q.bottom,q.left=void 0!==a.left?a.left:q.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b),m.color(s)}},interpolate:{get:function(){return g.interpolate()},set:function(a){g.interpolate(a),h.interpolate(a)}},xTickFormat:{get:function(){return i.tickFormat()},set:function(a){i.tickFormat(a),k.tickFormat(a)}},yTickFormat:{get:function(){return j.tickFormat()},set:function(a){j.tickFormat(a),l.tickFormat(a)}},duration:{get:function(){return B},set:function(a){B=a,j.duration(B),l.duration(B),i.duration(B),k.duration(B)}},x:{get:function(){return g.x()},set:function(a){g.x(a),h.x(a)}},y:{get:function(){return g.y()},set:function(a){g.y(a),h.y(a)}},useInteractiveGuideline:{get:function(){return w},set:function(a){w=a,w&&(g.interactive(!1),g.useVoronoi(!1))}}}),a.utils.inheritOptions(b,g),a.utils.initOptions(b),b},a.models.multiBar=function(){"use strict";function b(E){return C.reset(),E.each(function(b){var E=k-j.left-j.right,F=l-j.top-j.bottom;p=d3.select(this),a.utils.initSVG(p);var G=0;if(x&&b.length&&(x=[{values:b[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),u){var H=d3.layout.stack().offset(v).values(function(a){return a.values}).y(r)(!b.length&&x?x:b);H.forEach(function(a,c){a.nonStackable?(b[c].nonStackableSeries=G++,H[c]=b[c]):c>0&&H[c-1].nonStackable&&H[c].values.map(function(a,b){a.y0-=H[c-1].values[b].y,a.y1=a.y0+a.y})}),b=H}b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),u&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a,f){if(!b[f].nonStackable){var g=a.values[c];g.size=Math.abs(g.y),g.y<0?(g.y1=e,e-=g.size):(g.y1=g.size+d,d+=g.size)}})});var I=d&&e?[]:b.map(function(a,b){return a.values.map(function(a,c){return{x:q(a,c),y:r(a,c),y0:a.y0,y1:a.y1,idx:b}})});m.domain(d||d3.merge(I).map(function(a){return a.x})).rangeBands(f||[0,E],A),n.domain(e||d3.extent(d3.merge(I).map(function(a){var c=a.y;return u&&!b[a.idx].nonStackable&&(c=a.y>0?a.y1:a.y1+a.y),c}).concat(s))).range(g||[F,0]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),n.domain()[0]===n.domain()[1]&&n.domain(n.domain()[0]?[n.domain()[0]+.01*n.domain()[0],n.domain()[1]-.01*n.domain()[1]]:[-1,1]),h=h||m,i=i||n;var J=p.selectAll("g.nv-wrap.nv-multibar").data([b]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),L=K.append("defs"),M=K.append("g"),N=J.select("g");M.append("g").attr("class","nv-groups"),J.attr("transform","translate("+j.left+","+j.top+")"),L.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect"),J.select("#nv-edge-clip-"+o+" rect").attr("width",E).attr("height",F),N.attr("clip-path",t?"url(#nv-edge-clip-"+o+")":"");var O=J.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});O.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var P=C.transition(O.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,z)).attr("y",function(a){var c=i(0)||0;return u&&b[a.series]&&!b[a.series].nonStackable&&(c=i(a.y0)),c}).attr("height",0).remove();P.delay&&P.delay(function(a,b){var c=b*(z/(D+1))-b;return c}),O.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return w(a,b)}).style("stroke",function(a,b){return w(a,b)}),O.style("stroke-opacity",1).style("fill-opacity",.75);var Q=O.selectAll("rect.nv-bar").data(function(a){return x&&!b.length?x.values:a.values});Q.exit().remove();Q.enter().append("rect").attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(a,c,d){return u&&!b[d].nonStackable?0:d*m.rangeBand()/b.length}).attr("y",function(a,c,d){return i(u&&!b[d].nonStackable?a.y0:0)||0}).attr("height",0).attr("width",function(a,c,d){return m.rangeBand()/(u&&!b[d].nonStackable?1:b.length)}).attr("transform",function(a,b){return"translate("+m(q(a,b))+",0)"});Q.style("fill",function(a,b,c){return w(a,c,b)}).style("stroke",function(a,b,c){return w(a,c,b)}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),B.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),B.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){B.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){B.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){B.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),Q.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+m(q(a,b))+",0)"}),y&&(c||(c=b.map(function(){return!0})),Q.style("fill",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}));var R=Q.watchTransition(C,"multibar",Math.min(250,z)).delay(function(a,c){return c*z/b[0].values.length});u?R.attr("y",function(a,c,d){var e=0;return e=b[d].nonStackable?r(a,c)<0?n(0):n(0)-n(r(a,c))<-1?n(0)-1:n(r(a,c))||0:n(a.y1)}).attr("height",function(a,c,d){return b[d].nonStackable?Math.max(Math.abs(n(r(a,c))-n(0)),1)||0:Math.max(Math.abs(n(a.y+a.y0)-n(a.y0)),1)}).attr("x",function(a,c,d){var e=0;return b[d].nonStackable&&(e=a.series*m.rangeBand()/b.length,b.length!==G&&(e=b[d].nonStackableSeries*m.rangeBand()/(2*G))),e}).attr("width",function(a,c,d){if(b[d].nonStackable){var e=m.rangeBand()/G;return b.length!==G&&(e=m.rangeBand()/(2*G)),e}return m.rangeBand()}):R.attr("x",function(a){return a.series*m.rangeBand()/b.length}).attr("width",m.rangeBand()/b.length).attr("y",function(a,b){return r(a,b)<0?n(0):n(0)-n(r(a,b))<1?n(0)-1:n(r(a,b))||0}).attr("height",function(a,b){return Math.max(Math.abs(n(r(a,b))-n(0)),1)||0}),h=m.copy(),i=n.copy(),b[0]&&b[0].values&&(D=b[0].values.length)}),C.renderEnd("multibar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=d3.scale.ordinal(),n=d3.scale.linear(),o=Math.floor(1e4*Math.random()),p=null,q=function(a){return a.x},r=function(a){return a.y},s=[0],t=!0,u=!1,v="zero",w=a.utils.defaultColor(),x=!1,y=null,z=500,A=.1,B=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),C=a.utils.renderWatch(B,z),D=0;return b.dispatch=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return s},set:function(a){s=a}},stacked:{get:function(){return u},set:function(a){u=a}},stackOffset:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return t},set:function(a){t=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return o},set:function(a){o=a}},hideable:{get:function(){return x},set:function(a){x=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return z},set:function(a){z=a,C.reset(z)}},color:{get:function(){return w},set:function(b){w=a.utils.getColor(b)}},barColor:{get:function(){return y},set:function(b){y=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarChart=function(){"use strict";function b(j){return D.reset(),D.models(e),r&&D.models(f),s&&D.models(g),j.each(function(j){var z=d3.select(this);a.utils.initSVG(z);var D=a.utils.availableWidth(l,z,k),H=a.utils.availableHeight(m,z,k);if(b.update=function(){0===C?z.call(b):z.transition().duration(C).call(b)},b.container=this,x.setter(G(j),b.update).getter(F(j)).update(),x.disabled=j.map(function(a){return!!a.disabled}),!y){var I;y={};for(I in x)y[I]=x[I]instanceof Array?x[I].slice(0):x[I]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,z),b;z.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale(); -var J=z.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([j]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),L=J.select("g");if(K.append("g").attr("class","nv-x nv-axis"),K.append("g").attr("class","nv-y nv-axis"),K.append("g").attr("class","nv-barsWrap"),K.append("g").attr("class","nv-legendWrap"),K.append("g").attr("class","nv-controlsWrap"),q&&(h.width(D-B()),L.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),H=a.utils.availableHeight(m,z,k)),L.select(".nv-legendWrap").attr("transform","translate("+B()+","+-k.top+")")),o){var M=[{key:p.grouped||"Grouped",disabled:e.stacked()},{key:p.stacked||"Stacked",disabled:!e.stacked()}];i.width(B()).color(["#444","#444","#444"]),L.select(".nv-controlsWrap").datum(M).attr("transform","translate(0,"+-k.top+")").call(i)}J.attr("transform","translate("+k.left+","+k.top+")"),t&&L.select(".nv-y.nv-axis").attr("transform","translate("+D+",0)"),e.disabled(j.map(function(a){return a.disabled})).width(D).height(H).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var N=L.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(N.call(e),r){f.scale(c)._ticks(a.utils.calcTicksX(D/100,j)).tickSize(-H,0),L.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),L.select(".nv-x.nv-axis").call(f);var O=L.select(".nv-x.nv-axis > g").selectAll("g");if(O.selectAll("line, text").style("opacity",1),v){var P=function(a,b){return"translate("+a+","+b+")"},Q=5,R=17;O.selectAll("text").attr("transform",function(a,b,c){return P(0,c%2==0?Q:R)});var S=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;L.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return P(0,0===b||S%2!==0?R:Q)})}u&&O.filter(function(a,b){return b%Math.ceil(j[0].values.length/(D/100))!==0}).selectAll("text, line").style("opacity",0),w&&O.selectAll(".tick text").attr("transform","rotate("+w+" 0,0)").style("text-anchor",w>0?"start":"end"),L.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}s&&(g.scale(d)._ticks(a.utils.calcTicksY(H/36,j)).tickSize(-D,0),L.select(".nv-y.nv-axis").call(g)),h.dispatch.on("stateChange",function(a){for(var c in a)x[c]=a[c];A.stateChange(x),b.update()}),i.dispatch.on("legendClick",function(a){if(a.disabled){switch(M=M.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":case p.grouped:e.stacked(!1);break;case"Stacked":case p.stacked:e.stacked(!0)}x.stacked=e.stacked(),A.stateChange(x),b.update()}}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),x.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),x.stacked=a.stacked,E=a.stacked),b.update()})}),D.renderEnd("multibarchart immediate"),b}var c,d,e=a.models.multiBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=0,x=a.utils.state(),y=null,z=null,A=d3.dispatch("stateChange","changeState","renderEnd"),B=function(){return o?180:0},C=250;x.stacked=!1,e.stacked(!1),f.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(a){return a}),g.orient(t?"right":"left").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var D=a.utils.renderWatch(A),E=!1,F=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:E}}},G=function(a){return function(b){void 0!==b.stacked&&(E=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){j.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=A,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=x,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return y},set:function(a){y=a}},noData:{get:function(){return z},set:function(a){z=a}},reduceXTicks:{get:function(){return u},set:function(a){u=a}},rotateLabels:{get:function(){return w},set:function(a){w=a}},staggerLabels:{get:function(){return v},set:function(a){v=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return C},set:function(a){C=a,e.duration(C),f.duration(C),g.duration(C),D.reset(C)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?"right":"left")}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiBarHorizontal=function(){"use strict";function b(m){return E.reset(),m.each(function(b){var m=k-j.left-j.right,C=l-j.top-j.bottom;n=d3.select(this),a.utils.initSVG(n),w&&(b=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(r)(b)),b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),w&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var F=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:q(a,b),y:r(a,b),y0:a.y0,y1:a.y1}})});o.domain(d||d3.merge(F).map(function(a){return a.x})).rangeBands(f||[0,C],A),p.domain(e||d3.extent(d3.merge(F).map(function(a){return w?a.y>0?a.y1+a.y:a.y1:a.y}).concat(t))),p.range(x&&!w?g||[p.domain()[0]<0?z:0,m-(p.domain()[1]>0?z:0)]:g||[0,m]),h=h||o,i=i||d3.scale.linear().domain(p.domain()).range([p(0),p(0)]);{var G=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([b]),H=G.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),I=(H.append("defs"),H.append("g"));G.select("g")}I.append("g").attr("class","nv-groups"),G.attr("transform","translate("+j.left+","+j.top+")");var J=G.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});J.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),J.exit().watchTransition(E,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),J.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return u(a,b)}).style("stroke",function(a,b){return u(a,b)}),J.watchTransition(E,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",.75);var K=J.selectAll("g.nv-bar").data(function(a){return a.values});K.exit().remove();var L=K.enter().append("g").attr("transform",function(a,c,d){return"translate("+i(w?a.y0:0)+","+(w?0:d*o.rangeBand()/b.length+o(q(a,c)))+")"});L.append("rect").attr("width",0).attr("height",o.rangeBand()/(w?1:b.length)),K.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),D.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),D.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){D.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){D.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){D.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){D.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),s(b[0],0)&&(L.append("polyline"),K.select("polyline").attr("fill","none").attr("points",function(a,c){var d=s(a,c),e=.8*o.rangeBand()/(2*(w?1:b.length));d=d.length?d:[-Math.abs(d),Math.abs(d)],d=d.map(function(a){return p(a)-p(0)});var f=[[d[0],-e],[d[0],e],[d[0],0],[d[1],0],[d[1],-e],[d[1],e]];return f.map(function(a){return a.join(",")}).join(" ")}).attr("transform",function(a,c){var d=o.rangeBand()/(2*(w?1:b.length));return"translate("+(r(a,c)<0?0:p(r(a,c))-p(0))+", "+d+")"})),L.append("text"),x&&!w?(K.select("text").attr("text-anchor",function(a,b){return r(a,b)<0?"end":"start"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){var c=B(r(a,b)),d=s(a,b);return void 0===d?c:d.length?c+"+"+B(Math.abs(d[1]))+"-"+B(Math.abs(d[0])):c+"±"+B(Math.abs(d))}),K.watchTransition(E,"multibarhorizontal: bars").select("text").attr("x",function(a,b){return r(a,b)<0?-4:p(r(a,b))-p(0)+4})):K.selectAll("text").text(""),y&&!w?(L.append("text").classed("nv-bar-label",!0),K.select("text.nv-bar-label").attr("text-anchor",function(a,b){return r(a,b)<0?"start":"end"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){return q(a,b)}),K.watchTransition(E,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(a,b){return r(a,b)<0?p(0)-p(r(a,b))+4:-4})):K.selectAll("text.nv-bar-label").text(""),K.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}),v&&(c||(c=b.map(function(){return!0})),K.style("fill",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()})),w?K.watchTransition(E,"multibarhorizontal: bars").attr("transform",function(a,b){return"translate("+p(a.y1)+","+o(q(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(p(r(a,b)+a.y0)-p(a.y0))}).attr("height",o.rangeBand()):K.watchTransition(E,"multibarhorizontal: bars").attr("transform",function(a,c){return"translate("+p(r(a,c)<0?r(a,c):0)+","+(a.series*o.rangeBand()/b.length+o(q(a,c)))+")"}).select("rect").attr("height",o.rangeBand()/b.length).attr("width",function(a,b){return Math.max(Math.abs(p(r(a,b))-p(0)),1)}),h=o.copy(),i=p.copy()}),E.renderEnd("multibarHorizontal immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=null,o=d3.scale.ordinal(),p=d3.scale.linear(),q=function(a){return a.x},r=function(a){return a.y},s=function(a){return a.yErr},t=[0],u=a.utils.defaultColor(),v=null,w=!1,x=!1,y=!1,z=60,A=.1,B=d3.format(",.2f"),C=250,D=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),E=a.utils.renderWatch(D,C);return b.dispatch=D,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},yErr:{get:function(){return s},set:function(a){s=a}},xScale:{get:function(){return o},set:function(a){o=a}},yScale:{get:function(){return p},set:function(a){p=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return t},set:function(a){t=a}},stacked:{get:function(){return w},set:function(a){w=a}},showValues:{get:function(){return x},set:function(a){x=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return m},set:function(a){m=a}},valueFormat:{get:function(){return B},set:function(a){B=a}},valuePadding:{get:function(){return z},set:function(a){z=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return C},set:function(a){C=a,E.reset(C)}},color:{get:function(){return u},set:function(b){u=a.utils.getColor(b)}},barColor:{get:function(){return v},set:function(b){v=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarHorizontalChart=function(){"use strict";function b(j){return C.reset(),C.models(e),r&&C.models(f),s&&C.models(g),j.each(function(j){var w=d3.select(this);a.utils.initSVG(w);var C=a.utils.availableWidth(l,w,k),D=a.utils.availableHeight(m,w,k);if(b.update=function(){w.transition().duration(z).call(b)},b.container=this,t=e.stacked(),u.setter(B(j),b.update).getter(A(j)).update(),u.disabled=j.map(function(a){return!!a.disabled}),!v){var E;v={};for(E in u)v[E]=u[E]instanceof Array?u[E].slice(0):u[E]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,w),b;w.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var F=w.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([j]),G=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),H=F.select("g");if(G.append("g").attr("class","nv-x nv-axis"),G.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),G.append("g").attr("class","nv-barsWrap"),G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap"),q&&(h.width(C-y()),H.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),D=a.utils.availableHeight(m,w,k)),H.select(".nv-legendWrap").attr("transform","translate("+y()+","+-k.top+")")),o){var I=[{key:p.grouped||"Grouped",disabled:e.stacked()},{key:p.stacked||"Stacked",disabled:!e.stacked()}];i.width(y()).color(["#444","#444","#444"]),H.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-k.top+")").call(i)}F.attr("transform","translate("+k.left+","+k.top+")"),e.disabled(j.map(function(a){return a.disabled})).width(C).height(D).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var J=H.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(J.transition().call(e),r){f.scale(c)._ticks(a.utils.calcTicksY(D/24,j)).tickSize(-C,0),H.select(".nv-x.nv-axis").call(f);var K=H.select(".nv-x.nv-axis").selectAll("g");K.selectAll("line, text")}s&&(g.scale(d)._ticks(a.utils.calcTicksX(C/100,j)).tickSize(-D,0),H.select(".nv-y.nv-axis").attr("transform","translate(0,"+D+")"),H.select(".nv-y.nv-axis").call(g)),H.select(".nv-zeroLine line").attr("x1",d(0)).attr("x2",d(0)).attr("y1",0).attr("y2",-D),h.dispatch.on("stateChange",function(a){for(var c in a)u[c]=a[c];x.stateChange(u),b.update()}),i.dispatch.on("legendClick",function(a){if(a.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),t=e.stacked(),b.update()}}),x.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),u.stacked=a.stacked,t=a.stacked),b.update()})}),C.renderEnd("multibar horizontal chart immediate"),b}var c,d,e=a.models.multiBarHorizontal(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend().height(30),i=a.models.legend().height(30),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=a.utils.state(),v=null,w=null,x=d3.dispatch("stateChange","changeState","renderEnd"),y=function(){return o?180:0},z=250;u.stacked=!1,e.stacked(t),f.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var A=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:t}}},B=function(a){return function(b){void 0!==b.stacked&&(t=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},C=a.utils.renderWatch(x,z);return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){j.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=x,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=u,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return z},set:function(a){z=a,C.reset(z),e.duration(z),f.duration(z),g.duration(z)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiChart=function(){"use strict";function b(j){return j.each(function(j){function k(a){var b=2===j[a.seriesIndex].yAxis?z:y;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color},B.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function l(a){var b=2===j[a.seriesIndex].yAxis?z:y;a.point.x=v.x()(a.point),a.point.y=v.y()(a.point),B.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function n(a){var b=2===j[a.data.series].yAxis?z:y;a.value=t.x()(a.data),a.series={value:t.y()(a.data),color:a.color},B.duration(0).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}var C=d3.select(this);a.utils.initSVG(C),b.update=function(){C.transition().call(b)},b.container=this;var D=a.utils.availableWidth(g,C,e),E=a.utils.availableHeight(h,C,e),F=j.filter(function(a){return"line"==a.type&&1==a.yAxis}),G=j.filter(function(a){return"line"==a.type&&2==a.yAxis}),H=j.filter(function(a){return"bar"==a.type&&1==a.yAxis}),I=j.filter(function(a){return"bar"==a.type&&2==a.yAxis}),J=j.filter(function(a){return"area"==a.type&&1==a.yAxis}),K=j.filter(function(a){return"area"==a.type&&2==a.yAxis});if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,C),b;C.selectAll(".nv-noData").remove();var L=j.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})}),M=j.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})});o.domain(d3.extent(d3.merge(L.concat(M)),function(a){return a.x})).range([0,D]);var N=C.selectAll("g.wrap.multiChart").data([j]),O=N.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y1 nv-axis"),O.append("g").attr("class","nv-y2 nv-axis"),O.append("g").attr("class","lines1Wrap"),O.append("g").attr("class","lines2Wrap"),O.append("g").attr("class","bars1Wrap"),O.append("g").attr("class","bars2Wrap"),O.append("g").attr("class","stack1Wrap"),O.append("g").attr("class","stack2Wrap"),O.append("g").attr("class","legendWrap");var P=N.select("g"),Q=j.map(function(a,b){return j[b].color||f(a,b)});if(i){var R=A.align()?D/2:D,S=A.align()?R:0;A.width(R),A.color(Q),P.select(".legendWrap").datum(j.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":" (right axis)"),a})).call(A),e.top!=A.height()&&(e.top=A.height(),E=a.utils.availableHeight(h,C,e)),P.select(".legendWrap").attr("transform","translate("+S+","+-e.top+")")}r.width(D).height(E).interpolate(m).color(Q.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"line"==j[b].type})),s.width(D).height(E).interpolate(m).color(Q.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"line"==j[b].type})),t.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"bar"==j[b].type})),u.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"bar"==j[b].type})),v.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"area"==j[b].type})),w.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"area"==j[b].type})),P.attr("transform","translate("+e.left+","+e.top+")");var T=P.select(".lines1Wrap").datum(F.filter(function(a){return!a.disabled})),U=P.select(".bars1Wrap").datum(H.filter(function(a){return!a.disabled})),V=P.select(".stack1Wrap").datum(J.filter(function(a){return!a.disabled})),W=P.select(".lines2Wrap").datum(G.filter(function(a){return!a.disabled})),X=P.select(".bars2Wrap").datum(I.filter(function(a){return!a.disabled})),Y=P.select(".stack2Wrap").datum(K.filter(function(a){return!a.disabled})),Z=J.length?J.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],$=K.length?K.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];p.domain(c||d3.extent(d3.merge(L).concat(Z),function(a){return a.y})).range([0,E]),q.domain(d||d3.extent(d3.merge(M).concat($),function(a){return a.y})).range([0,E]),r.yDomain(p.domain()),t.yDomain(p.domain()),v.yDomain(p.domain()),s.yDomain(q.domain()),u.yDomain(q.domain()),w.yDomain(q.domain()),J.length&&d3.transition(V).call(v),K.length&&d3.transition(Y).call(w),H.length&&d3.transition(U).call(t),I.length&&d3.transition(X).call(u),F.length&&d3.transition(T).call(r),G.length&&d3.transition(W).call(s),x._ticks(a.utils.calcTicksX(D/100,j)).tickSize(-E,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+E+")"),d3.transition(P.select(".nv-x.nv-axis")).call(x),y._ticks(a.utils.calcTicksY(E/36,j)).tickSize(-D,0),d3.transition(P.select(".nv-y1.nv-axis")).call(y),z._ticks(a.utils.calcTicksY(E/36,j)).tickSize(-D,0),d3.transition(P.select(".nv-y2.nv-axis")).call(z),P.select(".nv-y1.nv-axis").classed("nv-disabled",L.length?!1:!0).attr("transform","translate("+o.range()[0]+",0)"),P.select(".nv-y2.nv-axis").classed("nv-disabled",M.length?!1:!0).attr("transform","translate("+o.range()[1]+",0)"),A.dispatch.on("stateChange",function(){b.update()}),r.dispatch.on("elementMouseover.tooltip",k),s.dispatch.on("elementMouseover.tooltip",k),r.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),s.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),v.dispatch.on("elementMouseover.tooltip",l),w.dispatch.on("elementMouseover.tooltip",l),v.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),w.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),t.dispatch.on("elementMouseover.tooltip",n),u.dispatch.on("elementMouseover.tooltip",n),t.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),u.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),t.dispatch.on("elementMousemove.tooltip",function(){B.position({top:d3.event.pageY,left:d3.event.pageX})()}),u.dispatch.on("elementMousemove.tooltip",function(){B.position({top:d3.event.pageY,left:d3.event.pageX})()})}),b}var c,d,e={top:30,right:20,bottom:50,left:60},f=a.utils.defaultColor(),g=null,h=null,i=!0,j=null,k=function(a){return a.x},l=function(a){return a.y},m="monotone",n=!0,o=d3.scale.linear(),p=d3.scale.linear(),q=d3.scale.linear(),r=a.models.line().yScale(p),s=a.models.line().yScale(q),t=a.models.multiBar().stacked(!1).yScale(p),u=a.models.multiBar().stacked(!1).yScale(q),v=a.models.stackedArea().yScale(p),w=a.models.stackedArea().yScale(q),x=a.models.axis().scale(o).orient("bottom").tickPadding(5),y=a.models.axis().scale(p).orient("left"),z=a.models.axis().scale(q).orient("right"),A=a.models.legend().height(30),B=a.models.tooltip(),C=d3.dispatch();return b.dispatch=C,b.lines1=r,b.lines2=s,b.bars1=t,b.bars2=u,b.stack1=v,b.stack2=w,b.xAxis=x,b.yAxis1=y,b.yAxis2=z,b.tooltip=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},showLegend:{get:function(){return i},set:function(a){i=a}},yDomain1:{get:function(){return c},set:function(a){c=a}},yDomain2:{get:function(){return d},set:function(a){d=a}},noData:{get:function(){return j},set:function(a){j=a}},interpolate:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return B.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),B.enabled(!!b)}},tooltipContent:{get:function(){return B.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),B.contentGenerator(b)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return f},set:function(b){f=a.utils.getColor(b)}},x:{get:function(){return k},set:function(a){k=a,r.x(a),s.x(a),t.x(a),u.x(a),v.x(a),w.x(a)}},y:{get:function(){return l},set:function(a){l=a,r.y(a),s.y(a),v.y(a),w.y(a),t.y(a),u.y(a)}},useVoronoi:{get:function(){return n},set:function(a){n=a,r.useVoronoi(a),s.useVoronoi(a),v.useVoronoi(a),w.useVoronoi(a)}}}),a.utils.initOptions(b),b},a.models.ohlcBar=function(){"use strict";function b(y){return y.each(function(b){k=d3.select(this);var y=a.utils.availableWidth(h,k,g),A=a.utils.availableHeight(i,k,g);a.utils.initSVG(k);var B=y/b[0].values.length*.9;l.domain(c||d3.extent(b[0].values.map(n).concat(t))),l.range(v?e||[.5*y/b[0].values.length,y*(b[0].values.length-.5)/b[0].values.length]:e||[5+B/2,y-B/2-5]),m.domain(d||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(f||[A,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var C=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([b[0].values]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),E=D.append("defs"),F=D.append("g"),G=C.select("g");F.append("g").attr("class","nv-ticks"),C.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:j})}),E.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),C.select("#nv-chart-clip-path-"+j+" rect").attr("width",y).attr("height",A),G.attr("clip-path",w?"url(#nv-chart-clip-path-"+j+")":"");var H=C.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});H.exit().remove(),H.enter().append("path").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(a,b){return"m0,0l0,"+(m(p(a,b))-m(r(a,b)))+"l"+-B/2+",0l"+B/2+",0l0,"+(m(s(a,b))-m(p(a,b)))+"l0,"+(m(q(a,b))-m(s(a,b)))+"l"+B/2+",0l"+-B/2+",0z"}).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("fill",function(){return x[0]}).attr("stroke",function(){return x[0]}).attr("x",0).attr("y",function(a,b){return m(Math.max(0,o(a,b)))}).attr("height",function(a,b){return Math.abs(m(o(a,b))-m(0))}),H.attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(H).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("d",function(a,c){var d=y/b[0].values.length*.9;return"m0,0l0,"+(m(p(a,c))-m(r(a,c)))+"l"+-d/2+",0l"+d/2+",0l0,"+(m(s(a,c))-m(p(a,c)))+"l0,"+(m(q(a,c))-m(s(a,c)))+"l"+d/2+",0l"+-d/2+",0z"})}),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,c){b.clearHighlights(),k.select(".nv-ohlcBar .nv-tick-0-"+a).classed("hover",c)},b.clearHighlights=function(){k.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!=a.top?a.top:g.top,g.right=void 0!=a.right?a.right:g.right,g.bottom=void 0!=a.bottom?a.bottom:g.bottom,g.left=void 0!=a.left?a.left:g.left -}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinates=function(){"use strict";function b(p){return p.each(function(b){function p(a){return F(h.map(function(b){if(isNaN(a[b])||isNaN(parseFloat(a[b]))){var c=g[b].domain(),d=g[b].range(),e=c[0]-(c[1]-c[0])/9;if(J.indexOf(b)<0){var h=d3.scale.linear().domain([e,c[1]]).range([x-12,d[1]]);g[b].brush.y(h),J.push(b)}return[f(b),g[b](e)]}return J.length>0?(D.style("display","inline"),E.style("display","inline")):(D.style("display","none"),E.style("display","none")),[f(b),g[b](a[b])]}))}function q(){var a=h.filter(function(a){return!g[a].brush.empty()}),b=a.map(function(a){return g[a].brush.extent()});k=[],a.forEach(function(a,c){k[c]={dimension:a,extent:b[c]}}),l=[],M.style("display",function(c){var d=a.every(function(a,d){return isNaN(c[a])&&b[d][0]==g[a].brush.y().domain()[0]?!0:b[d][0]<=c[a]&&c[a]<=b[d][1]});return d&&l.push(c),d?null:"none"}),o.brush({filters:k,active:l})}function r(a){m[a]=this.parentNode.__origin__=f(a),L.attr("visibility","hidden")}function s(a){m[a]=Math.min(w,Math.max(0,this.parentNode.__origin__+=d3.event.x)),M.attr("d",p),h.sort(function(a,b){return u(a)-u(b)}),f.domain(h),N.attr("transform",function(a){return"translate("+u(a)+")"})}function t(a){delete this.parentNode.__origin__,delete m[a],d3.select(this.parentNode).attr("transform","translate("+f(a)+")"),M.attr("d",p),L.attr("d",p).attr("visibility",null)}function u(a){var b=m[a];return null==b?f(a):b}var v=d3.select(this),w=a.utils.availableWidth(d,v,c),x=a.utils.availableHeight(e,v,c);a.utils.initSVG(v),l=b,f.rangePoints([0,w],1).domain(h);var y={};h.forEach(function(a){var c=d3.extent(b,function(b){return+b[a]});return y[a]=!1,void 0===c[0]&&(y[a]=!0,c[0]=0,c[1]=0),c[0]===c[1]&&(c[0]=c[0]-1,c[1]=c[1]+1),g[a]=d3.scale.linear().domain(c).range([.9*(x-12),0]),g[a].brush=d3.svg.brush().y(g[a]).on("brush",q),"name"!=a});var z=v.selectAll("g.nv-wrap.nv-parallelCoordinates").data([b]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates"),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-parallelCoordinates background"),B.append("g").attr("class","nv-parallelCoordinates foreground"),B.append("g").attr("class","nv-parallelCoordinates missingValuesline"),z.attr("transform","translate("+c.left+","+c.top+")");var D,E,F=d3.svg.line().interpolate("cardinal").tension(n),G=d3.svg.axis().orient("left"),H=d3.behavior.drag().on("dragstart",r).on("drag",s).on("dragend",t),I=f.range()[1]-f.range()[0],J=[],K=[0+I/2,x-12,w-I/2,x-12];D=z.select(".missingValuesline").selectAll("line").data([K]),D.enter().append("line"),D.exit().remove(),D.attr("x1",function(a){return a[0]}).attr("y1",function(a){return a[1]}).attr("x2",function(a){return a[2]}).attr("y2",function(a){return a[3]}),E=z.select(".missingValuesline").selectAll("text").data(["undefined values"]),E.append("text").data(["undefined values"]),E.enter().append("text"),E.exit().remove(),E.attr("y",x).attr("x",w-92-I/2).text(function(a){return a});var L=z.select(".background").selectAll("path").data(b);L.enter().append("path"),L.exit().remove(),L.attr("d",p);var M=z.select(".foreground").selectAll("path").data(b);M.enter().append("path"),M.exit().remove(),M.attr("d",p).attr("stroke",j),M.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),o.elementMouseover({label:a.name,data:a.data,index:b,pos:[d3.mouse(this.parentNode)[0],d3.mouse(this.parentNode)[1]]})}),M.on("mouseout",function(a,b){d3.select(this).classed("hover",!1),o.elementMouseout({label:a.name,data:a.data,index:b})});var N=C.selectAll(".dimension").data(h),O=N.enter().append("g").attr("class","nv-parallelCoordinates dimension");O.append("g").attr("class","nv-parallelCoordinates nv-axis"),O.append("g").attr("class","nv-parallelCoordinates-brush"),O.append("text").attr("class","nv-parallelCoordinates nv-label"),N.attr("transform",function(a){return"translate("+f(a)+",0)"}),N.exit().remove(),N.select(".nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").text(String).on("mouseover",function(a){o.elementMouseover({dim:a,pos:[d3.mouse(this.parentNode.parentNode)[0],d3.mouse(this.parentNode.parentNode)[1]]})}).on("mouseout",function(a){o.elementMouseout({dim:a})}).call(H),N.select(".nv-axis").each(function(a,b){d3.select(this).call(G.scale(g[a]).tickFormat(d3.format(i[b])))}),N.select(".nv-parallelCoordinates-brush").each(function(a){d3.select(this).call(g[a].brush)}).selectAll("rect").attr("x",-8).attr("width",16)}),b}var c={top:30,right:0,bottom:10,left:0},d=null,e=null,f=d3.scale.ordinal(),g={},h=[],i=[],j=a.utils.defaultColor(),k=[],l=[],m=[],n=1,o=d3.dispatch("brush","elementMouseover","elementMouseout");return b.dispatch=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},dimensionNames:{get:function(){return h},set:function(a){h=a}},dimensionFormats:{get:function(){return i},set:function(a){i=a}},lineTension:{get:function(){return n},set:function(a){n=a}},dimensions:{get:function(){return h},set:function(b){a.deprecated("dimensions","use dimensionNames instead"),h=b}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.pie=function(){"use strict";function b(E){return D.reset(),E.each(function(b){function E(a,b){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,p||(a.innerRadius=0);var c=d3.interpolate(this._current,a);return this._current=c(0),function(a){return B[b](c(a))}}var F=d-c.left-c.right,G=e-c.top-c.bottom,H=Math.min(F,G)/2,I=[],J=[];if(i=d3.select(this),0===z.length)for(var K=H-H/5,L=y*H,M=0;Mc)return"";if("function"==typeof n)d=n(a,b,{key:f(a.data),value:g(a.data),percent:k(c)});else switch(n){case"key":d=f(a.data);break;case"value":d=k(g(a.data));break;case"percent":d=d3.format("%")(c)}return d})}}),D.renderEnd("pie immediate"),b}var c={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.x},g=function(a){return a.y},h=Math.floor(1e4*Math.random()),i=null,j=a.utils.defaultColor(),k=d3.format(",.2f"),l=!0,m=!1,n="key",o=.02,p=!1,q=!1,r=!0,s=0,t=!1,u=!1,v=!1,w=!1,x=0,y=.5,z=[],A=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),B=[],C=[],D=a.utils.renderWatch(A);return b.dispatch=A,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{arcsRadius:{get:function(){return z},set:function(a){z=a}},width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},showLabels:{get:function(){return l},set:function(a){l=a}},title:{get:function(){return q},set:function(a){q=a}},titleOffset:{get:function(){return s},set:function(a){s=a}},labelThreshold:{get:function(){return o},set:function(a){o=a}},valueFormat:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return h},set:function(a){h=a}},endAngle:{get:function(){return w},set:function(a){w=a}},startAngle:{get:function(){return u},set:function(a){u=a}},padAngle:{get:function(){return v},set:function(a){v=a}},cornerRadius:{get:function(){return x},set:function(a){x=a}},donutRatio:{get:function(){return y},set:function(a){y=a}},labelsOutside:{get:function(){return m},set:function(a){m=a}},labelSunbeamLayout:{get:function(){return t},set:function(a){t=a}},donut:{get:function(){return p},set:function(a){p=a}},growOnHover:{get:function(){return r},set:function(a){r=a}},pieLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return k},set:function(b){k=b,a.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return c},set:function(a){c.top="undefined"!=typeof a.top?a.top:c.top,c.right="undefined"!=typeof a.right?a.right:c.right,c.bottom="undefined"!=typeof a.bottom?a.bottom:c.bottom,c.left="undefined"!=typeof a.left?a.left:c.left}},y:{get:function(){return g},set:function(a){g=d3.functor(a)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},labelType:{get:function(){return n},set:function(a){n=a||"key"}}}),a.utils.initOptions(b),b},a.models.pieChart=function(){"use strict";function b(e){return q.reset(),q.models(c),e.each(function(e){var k=d3.select(this);a.utils.initSVG(k);var n=a.utils.availableWidth(g,k,f),o=a.utils.availableHeight(h,k,f);if(b.update=function(){k.transition().call(b)},b.container=this,l.setter(s(e),b.update).getter(r(e)).update(),l.disabled=e.map(function(a){return!!a.disabled}),!m){var q;m={};for(q in l)m[q]=l[q]instanceof Array?l[q].slice(0):l[q]}if(!e||!e.length)return a.utils.noData(b,k),b;k.selectAll(".nv-noData").remove();var t=k.selectAll("g.nv-wrap.nv-pieChart").data([e]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),v=t.select("g");if(u.append("g").attr("class","nv-pieWrap"),u.append("g").attr("class","nv-legendWrap"),i)if("top"===j)d.width(n).key(c.x()),t.select(".nv-legendWrap").datum(e).call(d),f.top!=d.height()&&(f.top=d.height(),o=a.utils.availableHeight(h,k,f)),t.select(".nv-legendWrap").attr("transform","translate(0,"+-f.top+")");else if("right"===j){var w=a.models.legend().width();w>n/2&&(w=n/2),d.height(o).key(c.x()),d.width(w),n-=d.width(),t.select(".nv-legendWrap").datum(e).call(d).attr("transform","translate("+n+",0)")}t.attr("transform","translate("+f.left+","+f.top+")"),c.width(n).height(o);var x=v.select(".nv-pieWrap").datum([e]);d3.transition(x).call(c),d.dispatch.on("stateChange",function(a){for(var c in a)l[c]=a[c];p.stateChange(l),b.update()}),p.on("changeState",function(a){"undefined"!=typeof a.disabled&&(e.forEach(function(b,c){b.disabled=a.disabled[c]}),l.disabled=a.disabled),b.update()})}),q.renderEnd("pieChart immediate"),b}var c=a.models.pie(),d=a.models.legend(),e=a.models.tooltip(),f={top:30,right:20,bottom:20,left:20},g=null,h=null,i=!0,j="top",k=a.utils.defaultColor(),l=a.utils.state(),m=null,n=null,o=250,p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd");e.headerEnabled(!1).duration(0).valueFormatter(function(a,b){return c.valueFormat()(a,b)});var q=a.utils.renderWatch(p),r=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},s=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},e.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){e.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){e.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.legend=d,b.dispatch=p,b.pie=c,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return i},set:function(a){i=a}},legendPosition:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return e.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),e.enabled(!!b)}},tooltipContent:{get:function(){return e.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),e.contentGenerator(b)}},color:{get:function(){return k},set:function(a){k=a,d.color(k),c.color(k)}},duration:{get:function(){return o},set:function(a){o=a,q.reset(o)}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.scatter=function(){"use strict";function b(N){return P.reset(),N.each(function(b){function N(){if(O=!1,!w)return!1;if(M===!0){var a=d3.merge(b.map(function(a,b){return a.values.map(function(a,c){var d=p(a,c),e=q(a,c);return[m(d)+1e-4*Math.random(),n(e)+1e-4*Math.random(),b,c,a]}).filter(function(a,b){return x(a[4],b)})}));if(0==a.length)return!1;a.length<3&&(a.push([m.range()[0]-20,n.range()[0]-20,null,null]),a.push([m.range()[1]+20,n.range()[1]+20,null,null]),a.push([m.range()[0]-20,n.range()[0]+20,null,null]),a.push([m.range()[1]+20,n.range()[1]-20,null,null]));var c=d3.geom.polygon([[-10,-10],[-10,i+10],[h+10,i+10],[h+10,-10]]),d=d3.geom.voronoi(a).map(function(b,d){return{data:c.clip(b),series:a[d][2],point:a[d][3]}});U.select(".nv-point-paths").selectAll("path").remove();var e=U.select(".nv-point-paths").selectAll("path").data(d),f=e.enter().append("svg:path").attr("d",function(a){return a&&a.data&&0!==a.data.length?"M"+a.data.join(",")+"Z":"M 0 0"}).attr("id",function(a,b){return"nv-path-"+b}).attr("clip-path",function(a,b){return"url(#nv-clip-"+b+")"});C&&f.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),B&&(U.select(".nv-point-clips").selectAll("clipPath").remove(),U.select(".nv-point-clips").selectAll("clipPath").data(a).enter().append("svg:clipPath").attr("id",function(a,b){return"nv-clip-"+b}).append("svg:circle").attr("cx",function(a){return a[0]}).attr("cy",function(a){return a[1]}).attr("r",D));var k=function(a,c){if(O)return 0;var d=b[a.series];if(void 0!==d){var e=d.values[a.point];e.color=j(d,a.series),e.x=p(e),e.y=q(e);var f=l.node().getBoundingClientRect(),h=window.pageYOffset||document.documentElement.scrollTop,i=window.pageXOffset||document.documentElement.scrollLeft,k={left:m(p(e,a.point))+f.left+i+g.left+10,top:n(q(e,a.point))+f.top+h+g.top+10};c({point:e,series:d,pos:k,seriesIndex:a.series,pointIndex:a.point})}};e.on("click",function(a){k(a,L.elementClick)}).on("dblclick",function(a){k(a,L.elementDblClick)}).on("mouseover",function(a){k(a,L.elementMouseover)}).on("mouseout",function(a){k(a,L.elementMouseout)})}else U.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementClick({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c})}).on("dblclick",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementDblClick({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c})}).on("mouseover",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementMouseover({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c,color:j(a,c)})}).on("mouseout",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementMouseout({point:e,series:d,seriesIndex:a.series,pointIndex:c,color:j(a,c)})})}l=d3.select(this);var R=a.utils.availableWidth(h,l,g),S=a.utils.availableHeight(i,l,g);a.utils.initSVG(l),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var T=E&&F&&I?[]:d3.merge(b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),size:r(a,b)}})}));m.domain(E||d3.extent(T.map(function(a){return a.x}).concat(t))),m.range(y&&b[0]?G||[(R*z+R)/(2*b[0].values.length),R-R*(1+z)/(2*b[0].values.length)]:G||[0,R]),n.domain(F||d3.extent(T.map(function(a){return a.y}).concat(u))).range(H||[S,0]),o.domain(I||d3.extent(T.map(function(a){return a.size}).concat(v))).range(J||Q),K=m.domain()[0]===m.domain()[1]||n.domain()[0]===n.domain()[1],m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),n.domain()[0]===n.domain()[1]&&n.domain(n.domain()[0]?[n.domain()[0]-.01*n.domain()[0],n.domain()[1]+.01*n.domain()[1]]:[-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),isNaN(n.domain()[0])&&n.domain([-1,1]),c=c||m,d=d||n,e=e||o;var U=l.selectAll("g.nv-wrap.nv-scatter").data([b]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+k),W=V.append("defs"),X=V.append("g"),Y=U.select("g");U.classed("nv-single-point",K),X.append("g").attr("class","nv-groups"),X.append("g").attr("class","nv-point-paths"),V.append("g").attr("class","nv-point-clips"),U.attr("transform","translate("+g.left+","+g.top+")"),W.append("clipPath").attr("id","nv-edge-clip-"+k).append("rect"),U.select("#nv-edge-clip-"+k+" rect").attr("width",R).attr("height",S>0?S:0),Y.attr("clip-path",A?"url(#nv-edge-clip-"+k+")":""),O=!0;var Z=U.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});Z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),Z.exit().remove(),Z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),Z.watchTransition(P,"scatter: groups").style("fill",function(a,b){return j(a,b)}).style("stroke",function(a,b){return j(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5);var $=Z.selectAll("path.nv-point").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return x(a[0],b)})});$.enter().append("path").style("fill",function(a){return a.color}).style("stroke",function(a){return a.color}).attr("transform",function(a){return"translate("+c(p(a[0],a[1]))+","+d(q(a[0],a[1]))+")"}).attr("d",a.utils.symbol().type(function(a){return s(a[0])}).size(function(a){return o(r(a[0],a[1]))})),$.exit().remove(),Z.exit().selectAll("path.nv-point").watchTransition(P,"scatter exit").attr("transform",function(a){return"translate("+m(p(a[0],a[1]))+","+n(q(a[0],a[1]))+")"}).remove(),$.each(function(a){d3.select(this).classed("nv-point",!0).classed("nv-point-"+a[1],!0).classed("nv-noninteractive",!w).classed("hover",!1)}),$.watchTransition(P,"scatter points").attr("transform",function(a){return"translate("+m(p(a[0],a[1]))+","+n(q(a[0],a[1]))+")"}).attr("d",a.utils.symbol().type(function(a){return s(a[0])}).size(function(a){return o(r(a[0],a[1]))})),clearTimeout(f),f=setTimeout(N,300),c=m.copy(),d=n.copy(),e=o.copy()}),P.renderEnd("scatter immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=a.utils.defaultColor(),k=Math.floor(1e5*Math.random()),l=null,m=d3.scale.linear(),n=d3.scale.linear(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=function(a){return a.size||1},s=function(a){return a.shape||"circle"},t=[],u=[],v=[],w=!0,x=function(a){return!a.notActive},y=!1,z=.1,A=!1,B=!0,C=!1,D=function(){return 25},E=null,F=null,G=null,H=null,I=null,J=null,K=!1,L=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),M=!0,N=250,O=!1,P=a.utils.renderWatch(L,N),Q=[16,256];return b.dispatch=L,b.options=a.utils.optionsFunc.bind(b),b._calls=new function(){this.clearHighlights=function(){return a.dom.write(function(){l.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(b,c,d){a.dom.write(function(){l.select(" .nv-series-"+b+" .nv-point-"+c).classed("hover",d)})}},L.on("elementMouseover.point",function(a){w&&b._calls.highlightPoint(a.seriesIndex,a.pointIndex,!0)}),L.on("elementMouseout.point",function(a){w&&b._calls.highlightPoint(a.seriesIndex,a.pointIndex,!1)}),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},pointScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return E},set:function(a){E=a}},yDomain:{get:function(){return F},set:function(a){F=a}},pointDomain:{get:function(){return I},set:function(a){I=a}},xRange:{get:function(){return G},set:function(a){G=a}},yRange:{get:function(){return H},set:function(a){H=a}},pointRange:{get:function(){return J},set:function(a){J=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},forcePoint:{get:function(){return v},set:function(a){v=a}},interactive:{get:function(){return w},set:function(a){w=a}},pointActive:{get:function(){return x},set:function(a){x=a}},padDataOuter:{get:function(){return z},set:function(a){z=a}},padData:{get:function(){return y},set:function(a){y=a}},clipEdge:{get:function(){return A},set:function(a){A=a}},clipVoronoi:{get:function(){return B},set:function(a){B=a}},clipRadius:{get:function(){return D},set:function(a){D=a}},showVoronoi:{get:function(){return C},set:function(a){C=a}},id:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return p},set:function(a){p=d3.functor(a)}},y:{get:function(){return q},set:function(a){q=d3.functor(a)}},pointSize:{get:function(){return r},set:function(a){r=d3.functor(a)}},pointShape:{get:function(){return s},set:function(a){s=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},duration:{get:function(){return N},set:function(a){N=a,P.reset(N)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},useVoronoi:{get:function(){return M},set:function(a){M=a,M===!1&&(B=!1)}}}),a.utils.initOptions(b),b},a.models.scatterChart=function(){"use strict";function b(z){return D.reset(),D.models(c),t&&D.models(d),u&&D.models(e),q&&D.models(g),r&&D.models(h),z.each(function(z){m=d3.select(this),a.utils.initSVG(m);var G=a.utils.availableWidth(k,m,j),H=a.utils.availableHeight(l,m,j);if(b.update=function(){0===A?m.call(b):m.transition().duration(A).call(b)},b.container=this,w.setter(F(z),b.update).getter(E(z)).update(),w.disabled=z.map(function(a){return!!a.disabled}),!x){var I;x={};for(I in w)x[I]=w[I]instanceof Array?w[I].slice(0):w[I]}if(!(z&&z.length&&z.filter(function(a){return a.values.length}).length))return a.utils.noData(b,m),D.renderEnd("scatter immediate"),b;m.selectAll(".nv-noData").remove(),o=c.xScale(),p=c.yScale();var J=m.selectAll("g.nv-wrap.nv-scatterChart").data([z]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+c.id()),L=K.append("g"),M=J.select("g");if(L.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),L.append("g").attr("class","nv-x nv-axis"),L.append("g").attr("class","nv-y nv-axis"),L.append("g").attr("class","nv-scatterWrap"),L.append("g").attr("class","nv-regressionLinesWrap"),L.append("g").attr("class","nv-distWrap"),L.append("g").attr("class","nv-legendWrap"),v&&M.select(".nv-y.nv-axis").attr("transform","translate("+G+",0)"),s){var N=G;f.width(N),J.select(".nv-legendWrap").datum(z).call(f),j.top!=f.height()&&(j.top=f.height(),H=a.utils.availableHeight(l,m,j)),J.select(".nv-legendWrap").attr("transform","translate(0,"+-j.top+")")}J.attr("transform","translate("+j.left+","+j.top+")"),c.width(G).height(H).color(z.map(function(a,b){return a.color=a.color||n(a,b),a.color}).filter(function(a,b){return!z[b].disabled})),J.select(".nv-scatterWrap").datum(z.filter(function(a){return!a.disabled})).call(c),J.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+c.id()+")");var O=J.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});O.enter().append("g").attr("class","nv-regLines");var P=O.selectAll(".nv-regLine").data(function(a){return[a]});P.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),P.filter(function(a){return a.intercept&&a.slope}).watchTransition(D,"scatterPlusLineChart: regline").attr("x1",o.range()[0]).attr("x2",o.range()[1]).attr("y1",function(a){return p(o.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a){return p(o.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return n(a,c)}).style("stroke-opacity",function(a){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),t&&(d.scale(o)._ticks(a.utils.calcTicksX(G/100,z)).tickSize(-H,0),M.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(d)),u&&(e.scale(p)._ticks(a.utils.calcTicksY(H/36,z)).tickSize(-G,0),M.select(".nv-y.nv-axis").call(e)),q&&(g.getData(c.x()).scale(o).width(G).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),M.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(z.filter(function(a){return!a.disabled})).call(g)),r&&(h.getData(c.y()).scale(p).width(H).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),M.select(".nv-distributionY").attr("transform","translate("+(v?G:-h.size())+",0)").datum(z.filter(function(a){return!a.disabled})).call(h)),f.dispatch.on("stateChange",function(a){for(var c in a)w[c]=a[c];y.stateChange(w),b.update()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&(z.forEach(function(b,c){b.disabled=a.disabled[c]}),w.disabled=a.disabled),b.update()}),c.dispatch.on("elementMouseout.tooltip",function(a){i.hidden(!0),m.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),m.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",h.size())}),c.dispatch.on("elementMouseover.tooltip",function(a){m.select(".nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos.top-H-j.top),m.select(".nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos.left+g.size()-j.left),i.position(a.pos).data(a).hidden(!1)}),B=o.copy(),C=p.copy()}),D.renderEnd("scatter with line immediate"),b}var c=a.models.scatter(),d=a.models.axis(),e=a.models.axis(),f=a.models.legend(),g=a.models.distribution(),h=a.models.distribution(),i=a.models.tooltip(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=null,n=a.utils.defaultColor(),o=c.xScale(),p=c.yScale(),q=!1,r=!1,s=!0,t=!0,u=!0,v=!1,w=a.utils.state(),x=null,y=d3.dispatch("stateChange","changeState","renderEnd"),z=null,A=250;c.xScale(o).yScale(p),d.orient("bottom").tickPadding(10),e.orient(v?"right":"left").tickPadding(10),g.axis("x"),h.axis("y"),i.headerFormatter(function(a,b){return d.tickFormat()(a,b)}).valueFormatter(function(a,b){return e.tickFormat()(a,b)});var B,C,D=a.utils.renderWatch(y,A),E=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},F=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=y,b.scatter=c,b.legend=f,b.xAxis=d,b.yAxis=e,b.distX=g,b.distY=h,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},container:{get:function(){return m},set:function(a){m=a}},showDistX:{get:function(){return q},set:function(a){q=a}},showDistY:{get:function(){return r},set:function(a){r=a}},showLegend:{get:function(){return s},set:function(a){s=a}},showXAxis:{get:function(){return t},set:function(a){t=a}},showYAxis:{get:function(){return u},set:function(a){u=a}},defaultState:{get:function(){return x},set:function(a){x=a}},noData:{get:function(){return z},set:function(a){z=a}},duration:{get:function(){return A},set:function(a){A=a}},tooltips:{get:function(){return i.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),i.enabled(!!b) -}},tooltipContent:{get:function(){return i.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),i.contentGenerator(b)}},tooltipXContent:{get:function(){return i.contentGenerator()},set:function(){a.deprecated("tooltipContent","This option is removed, put values into main tooltip.")}},tooltipYContent:{get:function(){return i.contentGenerator()},set:function(){a.deprecated("tooltipContent","This option is removed, put values into main tooltip.")}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},rightAlignYAxis:{get:function(){return v},set:function(a){v=a,e.orient(a?"right":"left")}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),f.color(n),g.color(n),h.color(n)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.sparkline=function(){"use strict";function b(k){return k.each(function(b){var k=h-g.left-g.right,q=i-g.top-g.bottom;j=d3.select(this),a.utils.initSVG(j),l.domain(c||d3.extent(b,n)).range(e||[0,k]),m.domain(d||d3.extent(b,o)).range(f||[q,0]);{var r=j.selectAll("g.nv-wrap.nv-sparkline").data([b]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");s.append("g"),r.select("g")}r.attr("transform","translate("+g.left+","+g.top+")");var t=r.selectAll("path").data(function(a){return[a]});t.enter().append("path"),t.exit().remove(),t.style("stroke",function(a,b){return a.color||p(a,b)}).attr("d",d3.svg.line().x(function(a,b){return l(n(a,b))}).y(function(a,b){return m(o(a,b))}));var u=r.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return o(a,b)}),d=b(c.lastIndexOf(m.domain()[1])),e=b(c.indexOf(m.domain()[0])),f=b(c.length-1);return[e,d,f].filter(function(a){return null!=a})});u.enter().append("circle"),u.exit().remove(),u.attr("cx",function(a){return l(n(a,a.pointIndex))}).attr("cy",function(a){return m(o(a,a.pointIndex))}).attr("r",2).attr("class",function(a){return n(a,a.pointIndex)==l.domain()[1]?"nv-point nv-currentValue":o(a,a.pointIndex)==m.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),b}var c,d,e,f,g={top:2,right:0,bottom:2,left:0},h=400,i=32,j=null,k=!0,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=a.utils.getColor(["#000"]);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},animate:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return n},set:function(a){n=d3.functor(a)}},y:{get:function(){return o},set:function(a){o=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.sparklinePlus=function(){"use strict";function b(p){return p.each(function(p){function q(){if(!j){var a=z.selectAll(".nv-hoverValue").data(i),b=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+c(e.x()(p[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(b.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),b.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),z.select(".nv-hoverValue .nv-xValue").text(k(e.x()(p[i[0]],i[0]))),b.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),z.select(".nv-hoverValue .nv-yValue").text(l(e.y()(p[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;fc;++c){for(b=0,d=0;bb;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=0}for(c=0;f>c;++c)g[c]=0;return g}}),u.renderEnd("stackedArea immediate"),b}var c,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=a.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=null,k=function(a){return a.x},l=function(a){return a.y},m="stack",n="zero",o="default",p="linear",q=!1,r=a.models.scatter(),s=250,t=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");r.pointSize(2.2).pointDomain([2.2,2.2]);var u=a.utils.renderWatch(t,s);return b.dispatch=t,b.scatter=r,r.dispatch.on("elementClick",function(){t.elementClick.apply(this,arguments)}),r.dispatch.on("elementMouseover",function(){t.elementMouseover.apply(this,arguments)}),r.dispatch.on("elementMouseout",function(){t.elementMouseout.apply(this,arguments)}),b.interpolate=function(a){return arguments.length?(p=a,b):p},b.duration=function(a){return arguments.length?(s=a,u.reset(s),r.duration(s),b):s},b.dispatch=t,b.scatter=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return f},set:function(a){f=a}},height:{get:function(){return g},set:function(a){g=a}},clipEdge:{get:function(){return q},set:function(a){q=a}},offset:{get:function(){return n},set:function(a){n=a}},order:{get:function(){return o},set:function(a){o=a}},interpolate:{get:function(){return p},set:function(a){p=a}},x:{get:function(){return k},set:function(a){k=d3.functor(a)}},y:{get:function(){return l},set:function(a){l=d3.functor(a)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},style:{get:function(){return m},set:function(a){switch(m=a){case"stack":b.offset("zero"),b.order("default");break;case"stream":b.offset("wiggle"),b.order("inside-out");break;case"stream-center":b.offset("silhouette"),b.order("inside-out");break;case"expand":b.offset("expand"),b.order("default");break;case"stack_percent":b.offset(b.d3_stackedOffset_stackPercent),b.order("default")}}},duration:{get:function(){return s},set:function(a){s=a,u.reset(s),r.duration(s)}}}),a.utils.inheritOptions(b,r),a.utils.initOptions(b),b},a.models.stackedAreaChart=function(){"use strict";function b(k){return F.reset(),F.models(e),r&&F.models(f),s&&F.models(g),k.each(function(k){var x=d3.select(this),F=this;a.utils.initSVG(x);var K=a.utils.availableWidth(m,x,l),L=a.utils.availableHeight(n,x,l);if(b.update=function(){x.transition().duration(C).call(b)},b.container=this,v.setter(I(k),b.update).getter(H(k)).update(),v.disabled=k.map(function(a){return!!a.disabled}),!w){var M;w={};for(M in v)w[M]=v[M]instanceof Array?v[M].slice(0):v[M]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(b,x),b;x.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var N=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([k]),O=N.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),P=N.select("g");if(O.append("rect").style("opacity",0),O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y nv-axis"),O.append("g").attr("class","nv-stackedWrap"),O.append("g").attr("class","nv-legendWrap"),O.append("g").attr("class","nv-controlsWrap"),O.append("g").attr("class","nv-interactive"),P.select("rect").attr("width",K).attr("height",L),q){var Q=p?K-z:K;h.width(Q),P.select(".nv-legendWrap").datum(k).call(h),l.top!=h.height()&&(l.top=h.height(),L=a.utils.availableHeight(n,x,l)),P.select(".nv-legendWrap").attr("transform","translate("+(K-Q)+","+-l.top+")")}if(p){var R=[{key:B.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=e.style(),style:"stack"},{key:B.stream||"Stream",metaKey:"Stream",disabled:"stream"!=e.style(),style:"stream"},{key:B.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=e.style(),style:"expand"},{key:B.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=e.style(),style:"stack_percent"}];z=A.length/3*260,R=R.filter(function(a){return-1!==A.indexOf(a.metaKey)}),i.width(z).color(["#444","#444","#444"]),P.select(".nv-controlsWrap").datum(R).call(i),l.top!=Math.max(i.height(),h.height())&&(l.top=Math.max(i.height(),h.height()),L=a.utils.availableHeight(n,x,l)),P.select(".nv-controlsWrap").attr("transform","translate(0,"+-l.top+")")}N.attr("transform","translate("+l.left+","+l.top+")"),t&&P.select(".nv-y.nv-axis").attr("transform","translate("+K+",0)"),u&&(j.width(K).height(L).margin({left:l.left,top:l.top}).svgContainer(x).xScale(c),N.select(".nv-interactive").call(j)),e.width(K).height(L);var S=P.select(".nv-stackedWrap").datum(k);if(S.transition().call(e),r&&(f.scale(c)._ticks(a.utils.calcTicksX(K/100,k)).tickSize(-L,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+L+")"),P.select(".nv-x.nv-axis").transition().duration(0).call(f)),s){var T;if(T="wiggle"===e.offset()?0:a.utils.calcTicksY(L/36,k),g.scale(d)._ticks(T).tickSize(-K,0),"expand"===e.style()||"stack_percent"===e.style()){var U=g.tickFormat();D&&U===J||(D=U),g.tickFormat(J)}else D&&(g.tickFormat(D),D=null);P.select(".nv-y.nv-axis").transition().duration(0).call(g)}e.dispatch.on("areaClick.toggle",function(a){k.forEach(1===k.filter(function(a){return!a.disabled}).length?function(a){a.disabled=!1}:function(b,c){b.disabled=c!=a.seriesIndex}),v.disabled=k.map(function(a){return!!a.disabled}),y.stateChange(v),b.update()}),h.dispatch.on("stateChange",function(a){for(var c in a)v[c]=a[c];y.stateChange(v),b.update()}),i.dispatch.on("legendClick",function(a){a.disabled&&(R=R.map(function(a){return a.disabled=!0,a}),a.disabled=!1,e.style(a.style),v.style=e.style(),y.stateChange(v),b.update())}),j.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,g,h,i=[];if(k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(f,j){g=a.interactiveBisect(f.values,c.pointXValue,b.x());var k=f.values[g],l=b.y()(k,g);if(null!=l&&e.highlightPoint(j,g,!0),"undefined"!=typeof k){"undefined"==typeof d&&(d=k),"undefined"==typeof h&&(h=b.xScale()(b.x()(k,g)));var m="expand"==e.style()?k.display.y:b.y()(k,g);i.push({key:f.key,value:m,color:o(f,f.seriesIndex),stackedValue:k.display})}}),i.reverse(),i.length>2){var m=b.yScale().invert(c.mouseY),n=null;i.forEach(function(a,b){m=Math.abs(m);var c=Math.abs(a.stackedValue.y0),d=Math.abs(a.stackedValue.y);return m>=c&&d+c>=m?void(n=b):void 0}),null!=n&&(i[n].highlight=!0)}var p=f.tickFormat()(b.x()(d,g)),q=j.tooltip.valueFormatter();"expand"===e.style()||"stack_percent"===e.style()?(E||(E=q),q=d3.format(".1%")):E&&(q=E,E=null),j.tooltip.position({left:h+l.left,top:c.mouseY+l.top}).chartContainer(F.parentNode).valueFormatter(q).data({value:p,series:i})(),j.renderGuideLine(h)}),j.dispatch.on("elementMouseout",function(){e.clearHighlights()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&k.length===a.disabled.length&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),v.disabled=a.disabled),"undefined"!=typeof a.style&&(e.style(a.style),G=a.style),b.update()})}),F.renderEnd("stacked Area chart immediate"),b}var c,d,e=a.models.stackedArea(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:25,bottom:50,left:60},m=null,n=null,o=a.utils.defaultColor(),p=!0,q=!0,r=!0,s=!0,t=!1,u=!1,v=a.utils.state(),w=null,x=null,y=d3.dispatch("stateChange","changeState","renderEnd"),z=250,A=["Stacked","Stream","Expanded"],B={},C=250;v.style=e.style(),f.orient("bottom").tickPadding(7),g.orient(t?"right":"left"),k.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)}),j.tooltip.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)});var D=null,E=null;i.updateState(!1);var F=a.utils.renderWatch(y),G=e.style(),H=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),style:e.style()}}},I=function(a){return function(b){void 0!==b.style&&(G=b.style),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},J=d3.format("%");return e.dispatch.on("elementMouseover.tooltip",function(a){a.point.x=e.x()(a.point),a.point.y=e.y()(a.point),k.data(a).position(a.pos).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){k.hidden(!0)}),b.dispatch=y,b.stacked=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.interactiveLayer=j,b.tooltip=k,b.dispatch=y,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return w},set:function(a){w=a}},noData:{get:function(){return x},set:function(a){x=a}},showControls:{get:function(){return p},set:function(a){p=a}},controlLabels:{get:function(){return B},set:function(a){B=a}},controlOptions:{get:function(){return A},set:function(a){A=a}},tooltips:{get:function(){return k.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),k.enabled(!!b)}},tooltipContent:{get:function(){return k.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),k.contentGenerator(b)}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return C},set:function(a){C=a,F.reset(C),e.duration(C),f.duration(C),g.duration(C)}},color:{get:function(){return o},set:function(b){o=a.utils.getColor(b),h.color(o),e.color(o)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?"right":"left")}},useInteractiveGuideline:{get:function(){return u},set:function(a){u=!!a,b.interactive(!a),b.useVoronoi(!a),e.scatter.interactive(!a)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.sunburst=function(){"use strict";function b(u){return t.reset(),u.each(function(b){function t(a){a.x0=a.x,a.dx0=a.dx}function u(a){var b=d3.interpolate(p.domain(),[a.x,a.x+a.dx]),c=d3.interpolate(q.domain(),[a.y,1]),d=d3.interpolate(q.range(),[a.y?20:0,y]);return function(a,e){return e?function(){return s(a)}:function(e){return p.domain(b(e)),q.domain(c(e)).range(d(e)),s(a)}}}l=d3.select(this);var v,w=a.utils.availableWidth(g,l,f),x=a.utils.availableHeight(h,l,f),y=Math.min(w,x)/2;a.utils.initSVG(l);var z=l.selectAll(".nv-wrap.nv-sunburst").data(b),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+k),B=A.selectAll("nv-sunburst");z.attr("transform","translate("+w/2+","+x/2+")"),l.on("click",function(a,b){o.chartClick({data:a,index:b,pos:d3.event,id:k})}),q.range([0,y]),c=c||b,e=b[0],r.value(j[i]||j.count),v=B.data(r.nodes).enter().append("path").attr("d",s).style("fill",function(a){return m((a.children?a:a.parent).name)}).style("stroke","#FFF").on("click",function(a){d!==c&&c!==a&&(d=c),c=a,v.transition().duration(n).attrTween("d",u(a))}).each(t).on("dblclick",function(a){d.parent==a&&v.transition().duration(n).attrTween("d",u(e))}).each(t).on("mouseover",function(a){d3.select(this).classed("hover",!0).style("opacity",.8),o.elementMouseover({data:a,color:d3.select(this).style("fill")})}).on("mouseout",function(a){d3.select(this).classed("hover",!1).style("opacity",1),o.elementMouseout({data:a})}).on("mousemove",function(a){o.elementMousemove({data:a})})}),t.renderEnd("sunburst immediate"),b}var c,d,e,f={top:0,right:0,bottom:0,left:0},g=null,h=null,i="count",j={count:function(){return 1},size:function(a){return a.size}},k=Math.floor(1e4*Math.random()),l=null,m=a.utils.defaultColor(),n=500,o=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),p=d3.scale.linear().range([0,2*Math.PI]),q=d3.scale.sqrt(),r=d3.layout.partition().sort(null).value(function(){return 1}),s=d3.svg.arc().startAngle(function(a){return Math.max(0,Math.min(2*Math.PI,p(a.x)))}).endAngle(function(a){return Math.max(0,Math.min(2*Math.PI,p(a.x+a.dx)))}).innerRadius(function(a){return Math.max(0,q(a.y))}).outerRadius(function(a){return Math.max(0,q(a.y+a.dy))}),t=a.utils.renderWatch(o);return b.dispatch=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},mode:{get:function(){return i},set:function(a){i=a}},id:{get:function(){return k},set:function(a){k=a}},duration:{get:function(){return n},set:function(a){n=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!=a.top?a.top:f.top,f.right=void 0!=a.right?a.right:f.right,f.bottom=void 0!=a.bottom?a.bottom:f.bottom,f.left=void 0!=a.left?a.left:f.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.sunburstChart=function(){"use strict";function b(d){return m.reset(),m.models(c),d.each(function(d){var h=d3.select(this);a.utils.initSVG(h);var i=a.utils.availableWidth(f,h,e),j=a.utils.availableHeight(g,h,e);if(b.update=function(){0===k?h.call(b):h.transition().duration(k).call(b)},b.container=this,!d||!d.length)return a.utils.noData(b,h),b;h.selectAll(".nv-noData").remove();var l=h.selectAll("g.nv-wrap.nv-sunburstChart").data(d),m=l.enter().append("g").attr("class","nvd3 nv-wrap nv-sunburstChart").append("g"),n=l.select("g");m.append("g").attr("class","nv-sunburstWrap"),l.attr("transform","translate("+e.left+","+e.top+")"),c.width(i).height(j);var o=n.select(".nv-sunburstWrap").datum(d);d3.transition(o).call(c)}),m.renderEnd("sunburstChart immediate"),b}var c=a.models.sunburst(),d=a.models.tooltip(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=a.utils.defaultColor(),i=(Math.round(1e5*Math.random()),null),j=null,k=250,l=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),m=a.utils.renderWatch(l);return d.headerEnabled(!1).duration(0).valueFormatter(function(a){return a}),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.data.name,value:a.data.size,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=l,b.sunburst=c,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return i},set:function(a){i=a}},color:{get:function(){return h},set:function(a){h=a,c.color(h)}},duration:{get:function(){return k},set:function(a){k=a,m.reset(k),c.duration(k)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.version="1.8.1"}(); \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/popper.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/popper.min.js deleted file mode 100644 index 36c2aeb..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/popper.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* - Copyright (C) Federico Zivolo 2019 - Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). - */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function r(e){return 11===e?pe:10===e?se:pe||se}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1=o.clientWidth&&n>=o.clientHeight}),l=0a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),le({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=fe({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-us[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=ee(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},le(n,m,$(v)),le(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ge.FLIP:p=[n,i];break;case ge.CLOCKWISE:p=G(n);break;case ge.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)f(l.top)||'bottom'===n&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u),E=!!t.flipVariationsByContent&&(w&&'start'===r&&c||w&&'end'===r&&h||!w&&'start'===r&&u||!w&&'end'===r&&g),v=y||E;(m||b||v)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),v&&(r=z(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=fe({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport',flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.rightwindow.devicePixelRatio||!me),c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=B('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==g?-1:1;m[c]=d*w,m[g]=s*y,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=fe({},E,e.attributes),e.styles=fe({},m,e.styles),e.arrowStyles=fe({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),V(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ue}); -//# sourceMappingURL=popper.min.js.map diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist deleted file mode 100644 index d8890ed..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist +++ /dev/null @@ -1,11 +0,0 @@ - - {{name}} - {{methods_bar}} -
{{methods_tested_percent}}
-
{{methods_number}}
- {{crap}} - {{lines_bar}} -
{{lines_executed_percent}}
-
{{lines_number}}
- - diff --git a/vendor/phpunit/php-code-coverage/src/Report/PHP.php b/vendor/phpunit/php-code-coverage/src/Report/PHP.php deleted file mode 100644 index 73e2f4d..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/PHP.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\RuntimeException; - -/** - * Uses var_export() to write a SebastianBergmann\CodeCoverage\CodeCoverage object to a file. - */ -final class PHP -{ - /** - * @throws \SebastianBergmann\CodeCoverage\RuntimeException - */ - public function process(CodeCoverage $coverage, ?string $target = null): string - { - $filter = $coverage->filter(); - - $buffer = \sprintf( - 'setData(%s); -$coverage->setTests(%s); - -$filter = $coverage->filter(); -$filter->setWhitelistedFiles(%s); - -return $coverage;', - \var_export($coverage->getData(true), true), - \var_export($coverage->getTests(), true), - \var_export($filter->getWhitelistedFiles(), true) - ); - - if ($target !== null) { - if (!$this->createDirectory(\dirname($target))) { - throw new \RuntimeException(\sprintf('Directory "%s" was not created', \dirname($target))); - } - - if (@\file_put_contents($target, $buffer) === false) { - throw new RuntimeException( - \sprintf( - 'Could not write to "%s', - $target - ) - ); - } - } - - return $buffer; - } - - private function createDirectory(string $directory): bool - { - return !(!\is_dir($directory) && !@\mkdir($directory, 0777, true) && !\is_dir($directory)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Text.php b/vendor/phpunit/php-code-coverage/src/Report/Text.php deleted file mode 100644 index 9593a22..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Text.php +++ /dev/null @@ -1,283 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Util; - -/** - * Generates human readable output from a code coverage object. - * - * The output gets put into a text file our written to the CLI. - */ -final class Text -{ - /** - * @var string - */ - private const COLOR_GREEN = "\x1b[30;42m"; - - /** - * @var string - */ - private const COLOR_YELLOW = "\x1b[30;43m"; - - /** - * @var string - */ - private const COLOR_RED = "\x1b[37;41m"; - - /** - * @var string - */ - private const COLOR_HEADER = "\x1b[1;37;40m"; - - /** - * @var string - */ - private const COLOR_RESET = "\x1b[0m"; - - /** - * @var string - */ - private const COLOR_EOL = "\x1b[2K"; - - /** - * @var int - */ - private $lowUpperBound; - - /** - * @var int - */ - private $highLowerBound; - - /** - * @var bool - */ - private $showUncoveredFiles; - - /** - * @var bool - */ - private $showOnlySummary; - - public function __construct(int $lowUpperBound = 50, int $highLowerBound = 90, bool $showUncoveredFiles = false, bool $showOnlySummary = false) - { - $this->lowUpperBound = $lowUpperBound; - $this->highLowerBound = $highLowerBound; - $this->showUncoveredFiles = $showUncoveredFiles; - $this->showOnlySummary = $showOnlySummary; - } - - public function process(CodeCoverage $coverage, bool $showColors = false): string - { - $output = \PHP_EOL . \PHP_EOL; - $report = $coverage->getReport(); - - $colors = [ - 'header' => '', - 'classes' => '', - 'methods' => '', - 'lines' => '', - 'reset' => '', - 'eol' => '', - ]; - - if ($showColors) { - $colors['classes'] = $this->getCoverageColor( - $report->getNumTestedClassesAndTraits(), - $report->getNumClassesAndTraits() - ); - - $colors['methods'] = $this->getCoverageColor( - $report->getNumTestedMethods(), - $report->getNumMethods() - ); - - $colors['lines'] = $this->getCoverageColor( - $report->getNumExecutedLines(), - $report->getNumExecutableLines() - ); - - $colors['reset'] = self::COLOR_RESET; - $colors['header'] = self::COLOR_HEADER; - $colors['eol'] = self::COLOR_EOL; - } - - $classes = \sprintf( - ' Classes: %6s (%d/%d)', - Util::percent( - $report->getNumTestedClassesAndTraits(), - $report->getNumClassesAndTraits(), - true - ), - $report->getNumTestedClassesAndTraits(), - $report->getNumClassesAndTraits() - ); - - $methods = \sprintf( - ' Methods: %6s (%d/%d)', - Util::percent( - $report->getNumTestedMethods(), - $report->getNumMethods(), - true - ), - $report->getNumTestedMethods(), - $report->getNumMethods() - ); - - $lines = \sprintf( - ' Lines: %6s (%d/%d)', - Util::percent( - $report->getNumExecutedLines(), - $report->getNumExecutableLines(), - true - ), - $report->getNumExecutedLines(), - $report->getNumExecutableLines() - ); - - $padding = \max(\array_map('strlen', [$classes, $methods, $lines])); - - if ($this->showOnlySummary) { - $title = 'Code Coverage Report Summary:'; - $padding = \max($padding, \strlen($title)); - - $output .= $this->format($colors['header'], $padding, $title); - } else { - $date = \date(' Y-m-d H:i:s', $_SERVER['REQUEST_TIME']); - $title = 'Code Coverage Report:'; - - $output .= $this->format($colors['header'], $padding, $title); - $output .= $this->format($colors['header'], $padding, $date); - $output .= $this->format($colors['header'], $padding, ''); - $output .= $this->format($colors['header'], $padding, ' Summary:'); - } - - $output .= $this->format($colors['classes'], $padding, $classes); - $output .= $this->format($colors['methods'], $padding, $methods); - $output .= $this->format($colors['lines'], $padding, $lines); - - if ($this->showOnlySummary) { - return $output . \PHP_EOL; - } - - $classCoverage = []; - - foreach ($report as $item) { - if (!$item instanceof File) { - continue; - } - - $classes = $item->getClassesAndTraits(); - - foreach ($classes as $className => $class) { - $classStatements = 0; - $coveredClassStatements = 0; - $coveredMethods = 0; - $classMethods = 0; - - foreach ($class['methods'] as $method) { - if ($method['executableLines'] == 0) { - continue; - } - - $classMethods++; - $classStatements += $method['executableLines']; - $coveredClassStatements += $method['executedLines']; - - if ($method['coverage'] == 100) { - $coveredMethods++; - } - } - - $namespace = ''; - - if (!empty($class['package']['namespace'])) { - $namespace = '\\' . $class['package']['namespace'] . '::'; - } elseif (!empty($class['package']['fullPackage'])) { - $namespace = '@' . $class['package']['fullPackage'] . '::'; - } - - $classCoverage[$namespace . $className] = [ - 'namespace' => $namespace, - 'className ' => $className, - 'methodsCovered' => $coveredMethods, - 'methodCount' => $classMethods, - 'statementsCovered' => $coveredClassStatements, - 'statementCount' => $classStatements, - ]; - } - } - - \ksort($classCoverage); - - $methodColor = ''; - $linesColor = ''; - $resetColor = ''; - - foreach ($classCoverage as $fullQualifiedPath => $classInfo) { - if ($this->showUncoveredFiles || $classInfo['statementsCovered'] != 0) { - if ($showColors) { - $methodColor = $this->getCoverageColor($classInfo['methodsCovered'], $classInfo['methodCount']); - $linesColor = $this->getCoverageColor($classInfo['statementsCovered'], $classInfo['statementCount']); - $resetColor = $colors['reset']; - } - - $output .= \PHP_EOL . $fullQualifiedPath . \PHP_EOL - . ' ' . $methodColor . 'Methods: ' . $this->printCoverageCounts($classInfo['methodsCovered'], $classInfo['methodCount'], 2) . $resetColor . ' ' - . ' ' . $linesColor . 'Lines: ' . $this->printCoverageCounts($classInfo['statementsCovered'], $classInfo['statementCount'], 3) . $resetColor; - } - } - - return $output . \PHP_EOL; - } - - private function getCoverageColor(int $numberOfCoveredElements, int $totalNumberOfElements): string - { - $coverage = Util::percent( - $numberOfCoveredElements, - $totalNumberOfElements - ); - - if ($coverage >= $this->highLowerBound) { - return self::COLOR_GREEN; - } - - if ($coverage > $this->lowUpperBound) { - return self::COLOR_YELLOW; - } - - return self::COLOR_RED; - } - - private function printCoverageCounts(int $numberOfCoveredElements, int $totalNumberOfElements, int $precision): string - { - $format = '%' . $precision . 's'; - - return Util::percent( - $numberOfCoveredElements, - $totalNumberOfElements, - true, - true - ) . - ' (' . \sprintf($format, $numberOfCoveredElements) . '/' . - \sprintf($format, $totalNumberOfElements) . ')'; - } - - private function format($color, $padding, $string): string - { - $reset = $color ? self::COLOR_RESET : ''; - - return $color . \str_pad($string, $padding) . $reset . \PHP_EOL; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php deleted file mode 100644 index c12a5d2..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use SebastianBergmann\Environment\Runtime; - -final class BuildInformation -{ - /** - * @var \DOMElement - */ - private $contextNode; - - public function __construct(\DOMElement $contextNode) - { - $this->contextNode = $contextNode; - } - - public function setRuntimeInformation(Runtime $runtime): void - { - $runtimeNode = $this->getNodeByName('runtime'); - - $runtimeNode->setAttribute('name', $runtime->getName()); - $runtimeNode->setAttribute('version', $runtime->getVersion()); - $runtimeNode->setAttribute('url', $runtime->getVendorUrl()); - - $driverNode = $this->getNodeByName('driver'); - - if ($runtime->hasPHPDBGCodeCoverage()) { - $driverNode->setAttribute('name', 'phpdbg'); - $driverNode->setAttribute('version', \constant('PHPDBG_VERSION')); - } - - if ($runtime->hasXdebug()) { - $driverNode->setAttribute('name', 'xdebug'); - $driverNode->setAttribute('version', \phpversion('xdebug')); - } - - if ($runtime->hasPCOV()) { - $driverNode->setAttribute('name', 'pcov'); - $driverNode->setAttribute('version', \phpversion('pcov')); - } - } - - public function setBuildTime(\DateTime $date): void - { - $this->contextNode->setAttribute('time', $date->format('D M j G:i:s T Y')); - } - - public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void - { - $this->contextNode->setAttribute('phpunit', $phpUnitVersion); - $this->contextNode->setAttribute('coverage', $coverageVersion); - } - - private function getNodeByName(string $name): \DOMElement - { - $node = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - $name - )->item(0); - - if (!$node) { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - $name - ) - ); - } - - return $node; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php deleted file mode 100644 index 996a619..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use SebastianBergmann\CodeCoverage\RuntimeException; - -final class Coverage -{ - /** - * @var \XMLWriter - */ - private $writer; - - /** - * @var \DOMElement - */ - private $contextNode; - - /** - * @var bool - */ - private $finalized = false; - - public function __construct(\DOMElement $context, string $line) - { - $this->contextNode = $context; - - $this->writer = new \XMLWriter(); - $this->writer->openMemory(); - $this->writer->startElementNS(null, $context->nodeName, 'https://schema.phpunit.de/coverage/1.0'); - $this->writer->writeAttribute('nr', $line); - } - - /** - * @throws RuntimeException - */ - public function addTest(string $test): void - { - if ($this->finalized) { - throw new RuntimeException('Coverage Report already finalized'); - } - - $this->writer->startElement('covered'); - $this->writer->writeAttribute('by', $test); - $this->writer->endElement(); - } - - public function finalize(): void - { - $this->writer->endElement(); - - $fragment = $this->contextNode->ownerDocument->createDocumentFragment(); - $fragment->appendXML($this->writer->outputMemory()); - - $this->contextNode->parentNode->replaceChild( - $fragment, - $this->contextNode - ); - - $this->finalized = true; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php deleted file mode 100644 index b182321..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -final class Directory extends Node -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php deleted file mode 100644 index c908a15..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php +++ /dev/null @@ -1,287 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\AbstractNode; -use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Node\File as FileNode; -use SebastianBergmann\CodeCoverage\RuntimeException; -use SebastianBergmann\CodeCoverage\Version; -use SebastianBergmann\Environment\Runtime; - -final class Facade -{ - /** - * @var string - */ - private $target; - - /** - * @var Project - */ - private $project; - - /** - * @var string - */ - private $phpUnitVersion; - - public function __construct(string $version) - { - $this->phpUnitVersion = $version; - } - - /** - * @throws RuntimeException - */ - public function process(CodeCoverage $coverage, string $target): void - { - if (\substr($target, -1, 1) !== \DIRECTORY_SEPARATOR) { - $target .= \DIRECTORY_SEPARATOR; - } - - $this->target = $target; - $this->initTargetDirectory($target); - - $report = $coverage->getReport(); - - $this->project = new Project( - $coverage->getReport()->getName() - ); - - $this->setBuildInformation(); - $this->processTests($coverage->getTests()); - $this->processDirectory($report, $this->project); - - $this->saveDocument($this->project->asDom(), 'index'); - } - - private function setBuildInformation(): void - { - $buildNode = $this->project->getBuildInformation(); - $buildNode->setRuntimeInformation(new Runtime()); - $buildNode->setBuildTime(\DateTime::createFromFormat('U', (string) $_SERVER['REQUEST_TIME'])); - $buildNode->setGeneratorVersions($this->phpUnitVersion, Version::id()); - } - - /** - * @throws RuntimeException - */ - private function initTargetDirectory(string $directory): void - { - if (\file_exists($directory)) { - if (!\is_dir($directory)) { - throw new RuntimeException( - "'$directory' exists but is not a directory." - ); - } - - if (!\is_writable($directory)) { - throw new RuntimeException( - "'$directory' exists but is not writable." - ); - } - } elseif (!$this->createDirectory($directory)) { - throw new RuntimeException( - "'$directory' could not be created." - ); - } - } - - private function processDirectory(DirectoryNode $directory, Node $context): void - { - $directoryName = $directory->getName(); - - if ($this->project->getProjectSourceDirectory() === $directoryName) { - $directoryName = '/'; - } - - $directoryObject = $context->addDirectory($directoryName); - - $this->setTotals($directory, $directoryObject->getTotals()); - - foreach ($directory->getDirectories() as $node) { - $this->processDirectory($node, $directoryObject); - } - - foreach ($directory->getFiles() as $node) { - $this->processFile($node, $directoryObject); - } - } - - /** - * @throws RuntimeException - */ - private function processFile(FileNode $file, Directory $context): void - { - $fileObject = $context->addFile( - $file->getName(), - $file->getId() . '.xml' - ); - - $this->setTotals($file, $fileObject->getTotals()); - - $path = \substr( - $file->getPath(), - \strlen($this->project->getProjectSourceDirectory()) - ); - - $fileReport = new Report($path); - - $this->setTotals($file, $fileReport->getTotals()); - - foreach ($file->getClassesAndTraits() as $unit) { - $this->processUnit($unit, $fileReport); - } - - foreach ($file->getFunctions() as $function) { - $this->processFunction($function, $fileReport); - } - - foreach ($file->getCoverageData() as $line => $tests) { - if (!\is_array($tests) || \count($tests) === 0) { - continue; - } - - $coverage = $fileReport->getLineCoverage((string) $line); - - foreach ($tests as $test) { - $coverage->addTest($test); - } - - $coverage->finalize(); - } - - $fileReport->getSource()->setSourceCode( - \file_get_contents($file->getPath()) - ); - - $this->saveDocument($fileReport->asDom(), $file->getId()); - } - - private function processUnit(array $unit, Report $report): void - { - if (isset($unit['className'])) { - $unitObject = $report->getClassObject($unit['className']); - } else { - $unitObject = $report->getTraitObject($unit['traitName']); - } - - $unitObject->setLines( - $unit['startLine'], - $unit['executableLines'], - $unit['executedLines'] - ); - - $unitObject->setCrap((float) $unit['crap']); - - $unitObject->setPackage( - $unit['package']['fullPackage'], - $unit['package']['package'], - $unit['package']['subpackage'], - $unit['package']['category'] - ); - - $unitObject->setNamespace($unit['package']['namespace']); - - foreach ($unit['methods'] as $method) { - $methodObject = $unitObject->addMethod($method['methodName']); - $methodObject->setSignature($method['signature']); - $methodObject->setLines((string) $method['startLine'], (string) $method['endLine']); - $methodObject->setCrap($method['crap']); - $methodObject->setTotals( - (string) $method['executableLines'], - (string) $method['executedLines'], - (string) $method['coverage'] - ); - } - } - - private function processFunction(array $function, Report $report): void - { - $functionObject = $report->getFunctionObject($function['functionName']); - - $functionObject->setSignature($function['signature']); - $functionObject->setLines((string) $function['startLine']); - $functionObject->setCrap($function['crap']); - $functionObject->setTotals((string) $function['executableLines'], (string) $function['executedLines'], (string) $function['coverage']); - } - - private function processTests(array $tests): void - { - $testsObject = $this->project->getTests(); - - foreach ($tests as $test => $result) { - if ($test === 'UNCOVERED_FILES_FROM_WHITELIST') { - continue; - } - - $testsObject->addTest($test, $result); - } - } - - private function setTotals(AbstractNode $node, Totals $totals): void - { - $loc = $node->getLinesOfCode(); - - $totals->setNumLines( - $loc['loc'], - $loc['cloc'], - $loc['ncloc'], - $node->getNumExecutableLines(), - $node->getNumExecutedLines() - ); - - $totals->setNumClasses( - $node->getNumClasses(), - $node->getNumTestedClasses() - ); - - $totals->setNumTraits( - $node->getNumTraits(), - $node->getNumTestedTraits() - ); - - $totals->setNumMethods( - $node->getNumMethods(), - $node->getNumTestedMethods() - ); - - $totals->setNumFunctions( - $node->getNumFunctions(), - $node->getNumTestedFunctions() - ); - } - - private function getTargetDirectory(): string - { - return $this->target; - } - - /** - * @throws RuntimeException - */ - private function saveDocument(\DOMDocument $document, string $name): void - { - $filename = \sprintf('%s/%s.xml', $this->getTargetDirectory(), $name); - - $document->formatOutput = true; - $document->preserveWhiteSpace = false; - $this->initTargetDirectory(\dirname($filename)); - - $document->save($filename); - } - - private function createDirectory(string $directory): bool - { - return !(!\is_dir($directory) && !@\mkdir($directory, 0777, true) && !\is_dir($directory)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php deleted file mode 100644 index 02af644..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -class File -{ - /** - * @var \DOMDocument - */ - private $dom; - - /** - * @var \DOMElement - */ - private $contextNode; - - public function __construct(\DOMElement $context) - { - $this->dom = $context->ownerDocument; - $this->contextNode = $context; - } - - public function getTotals(): Totals - { - $totalsContainer = $this->contextNode->firstChild; - - if (!$totalsContainer) { - $totalsContainer = $this->contextNode->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'totals' - ) - ); - } - - return new Totals($totalsContainer); - } - - public function getLineCoverage(string $line): Coverage - { - $coverage = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'coverage' - )->item(0); - - if (!$coverage) { - $coverage = $this->contextNode->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'coverage' - ) - ); - } - - $lineNode = $coverage->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'line' - ) - ); - - return new Coverage($lineNode, $line); - } - - protected function getContextNode(): \DOMElement - { - return $this->contextNode; - } - - protected function getDomDocument(): \DOMDocument - { - return $this->dom; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php deleted file mode 100644 index b6a7f16..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -final class Method -{ - /** - * @var \DOMElement - */ - private $contextNode; - - public function __construct(\DOMElement $context, string $name) - { - $this->contextNode = $context; - - $this->setName($name); - } - - public function setSignature(string $signature): void - { - $this->contextNode->setAttribute('signature', $signature); - } - - public function setLines(string $start, ?string $end = null): void - { - $this->contextNode->setAttribute('start', $start); - - if ($end !== null) { - $this->contextNode->setAttribute('end', $end); - } - } - - public function setTotals(string $executable, string $executed, string $coverage): void - { - $this->contextNode->setAttribute('executable', $executable); - $this->contextNode->setAttribute('executed', $executed); - $this->contextNode->setAttribute('coverage', $coverage); - } - - public function setCrap(string $crap): void - { - $this->contextNode->setAttribute('crap', $crap); - } - - private function setName(string $name): void - { - $this->contextNode->setAttribute('name', $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php deleted file mode 100644 index d3ba223..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -abstract class Node -{ - /** - * @var \DOMDocument - */ - private $dom; - - /** - * @var \DOMElement - */ - private $contextNode; - - public function __construct(\DOMElement $context) - { - $this->setContextNode($context); - } - - public function getDom(): \DOMDocument - { - return $this->dom; - } - - public function getTotals(): Totals - { - $totalsContainer = $this->getContextNode()->firstChild; - - if (!$totalsContainer) { - $totalsContainer = $this->getContextNode()->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'totals' - ) - ); - } - - return new Totals($totalsContainer); - } - - public function addDirectory(string $name): Directory - { - $dirNode = $this->getDom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'directory' - ); - - $dirNode->setAttribute('name', $name); - $this->getContextNode()->appendChild($dirNode); - - return new Directory($dirNode); - } - - public function addFile(string $name, string $href): File - { - $fileNode = $this->getDom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'file' - ); - - $fileNode->setAttribute('name', $name); - $fileNode->setAttribute('href', $href); - $this->getContextNode()->appendChild($fileNode); - - return new File($fileNode); - } - - protected function setContextNode(\DOMElement $context): void - { - $this->dom = $context->ownerDocument; - $this->contextNode = $context; - } - - protected function getContextNode(): \DOMElement - { - return $this->contextNode; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php deleted file mode 100644 index 5f32852..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -final class Project extends Node -{ - public function __construct(string $directory) - { - $this->init(); - $this->setProjectSourceDirectory($directory); - } - - public function getProjectSourceDirectory(): string - { - return $this->getContextNode()->getAttribute('source'); - } - - public function getBuildInformation(): BuildInformation - { - $buildNode = $this->getDom()->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'build' - )->item(0); - - if (!$buildNode) { - $buildNode = $this->getDom()->documentElement->appendChild( - $this->getDom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'build' - ) - ); - } - - return new BuildInformation($buildNode); - } - - public function getTests(): Tests - { - $testsNode = $this->getContextNode()->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'tests' - )->item(0); - - if (!$testsNode) { - $testsNode = $this->getContextNode()->appendChild( - $this->getDom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'tests' - ) - ); - } - - return new Tests($testsNode); - } - - public function asDom(): \DOMDocument - { - return $this->getDom(); - } - - private function init(): void - { - $dom = new \DOMDocument; - $dom->loadXML(''); - - $this->setContextNode( - $dom->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'project' - )->item(0) - ); - } - - private function setProjectSourceDirectory(string $name): void - { - $this->getContextNode()->setAttribute('source', $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php deleted file mode 100644 index 6ec94c1..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -final class Report extends File -{ - public function __construct(string $name) - { - $dom = new \DOMDocument(); - $dom->loadXML(''); - - $contextNode = $dom->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'file' - )->item(0); - - parent::__construct($contextNode); - - $this->setName($name); - } - - public function asDom(): \DOMDocument - { - return $this->getDomDocument(); - } - - public function getFunctionObject($name): Method - { - $node = $this->getContextNode()->appendChild( - $this->getDomDocument()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'function' - ) - ); - - return new Method($node, $name); - } - - public function getClassObject($name): Unit - { - return $this->getUnitObject('class', $name); - } - - public function getTraitObject($name): Unit - { - return $this->getUnitObject('trait', $name); - } - - public function getSource(): Source - { - $source = $this->getContextNode()->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'source' - )->item(0); - - if (!$source) { - $source = $this->getContextNode()->appendChild( - $this->getDomDocument()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'source' - ) - ); - } - - return new Source($source); - } - - private function setName($name): void - { - $this->getContextNode()->setAttribute('name', \basename($name)); - $this->getContextNode()->setAttribute('path', \dirname($name)); - } - - private function getUnitObject($tagName, $name): Unit - { - $node = $this->getContextNode()->appendChild( - $this->getDomDocument()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - $tagName - ) - ); - - return new Unit($node, $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php deleted file mode 100644 index 67bf9cb..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use TheSeer\Tokenizer\NamespaceUri; -use TheSeer\Tokenizer\Tokenizer; -use TheSeer\Tokenizer\XMLSerializer; - -final class Source -{ - /** @var \DOMElement */ - private $context; - - public function __construct(\DOMElement $context) - { - $this->context = $context; - } - - public function setSourceCode(string $source): void - { - $context = $this->context; - - $tokens = (new Tokenizer())->parse($source); - $srcDom = (new XMLSerializer(new NamespaceUri($context->namespaceURI)))->toDom($tokens); - - $context->parentNode->replaceChild( - $context->ownerDocument->importNode($srcDom->documentElement, true), - $context - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php deleted file mode 100644 index c1bcd25..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.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. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -final class Tests -{ - private $contextNode; - - private $codeMap = [ - -1 => 'UNKNOWN', // PHPUnit_Runner_BaseTestRunner::STATUS_UNKNOWN - 0 => 'PASSED', // PHPUnit_Runner_BaseTestRunner::STATUS_PASSED - 1 => 'SKIPPED', // PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED - 2 => 'INCOMPLETE', // PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE - 3 => 'FAILURE', // PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE - 4 => 'ERROR', // PHPUnit_Runner_BaseTestRunner::STATUS_ERROR - 5 => 'RISKY', // PHPUnit_Runner_BaseTestRunner::STATUS_RISKY - 6 => 'WARNING', // PHPUnit_Runner_BaseTestRunner::STATUS_WARNING - ]; - - public function __construct(\DOMElement $context) - { - $this->contextNode = $context; - } - - public function addTest(string $test, array $result): void - { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'test' - ) - ); - - $node->setAttribute('name', $test); - $node->setAttribute('size', $result['size']); - $node->setAttribute('result', (string) $result['status']); - $node->setAttribute('status', $this->codeMap[(int) $result['status']]); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php deleted file mode 100644 index 019f348..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use SebastianBergmann\CodeCoverage\Util; - -final class Totals -{ - /** - * @var \DOMNode - */ - private $container; - - /** - * @var \DOMElement - */ - private $linesNode; - - /** - * @var \DOMElement - */ - private $methodsNode; - - /** - * @var \DOMElement - */ - private $functionsNode; - - /** - * @var \DOMElement - */ - private $classesNode; - - /** - * @var \DOMElement - */ - private $traitsNode; - - public function __construct(\DOMElement $container) - { - $this->container = $container; - $dom = $container->ownerDocument; - - $this->linesNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'lines' - ); - - $this->methodsNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'methods' - ); - - $this->functionsNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'functions' - ); - - $this->classesNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'classes' - ); - - $this->traitsNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'traits' - ); - - $container->appendChild($this->linesNode); - $container->appendChild($this->methodsNode); - $container->appendChild($this->functionsNode); - $container->appendChild($this->classesNode); - $container->appendChild($this->traitsNode); - } - - public function getContainer(): \DOMNode - { - return $this->container; - } - - public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void - { - $this->linesNode->setAttribute('total', (string) $loc); - $this->linesNode->setAttribute('comments', (string) $cloc); - $this->linesNode->setAttribute('code', (string) $ncloc); - $this->linesNode->setAttribute('executable', (string) $executable); - $this->linesNode->setAttribute('executed', (string) $executed); - $this->linesNode->setAttribute( - 'percent', - $executable === 0 ? '0' : \sprintf('%01.2F', Util::percent($executed, $executable)) - ); - } - - public function setNumClasses(int $count, int $tested): void - { - $this->classesNode->setAttribute('count', (string) $count); - $this->classesNode->setAttribute('tested', (string) $tested); - $this->classesNode->setAttribute( - 'percent', - $count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count)) - ); - } - - public function setNumTraits(int $count, int $tested): void - { - $this->traitsNode->setAttribute('count', (string) $count); - $this->traitsNode->setAttribute('tested', (string) $tested); - $this->traitsNode->setAttribute( - 'percent', - $count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count)) - ); - } - - public function setNumMethods(int $count, int $tested): void - { - $this->methodsNode->setAttribute('count', (string) $count); - $this->methodsNode->setAttribute('tested', (string) $tested); - $this->methodsNode->setAttribute( - 'percent', - $count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count)) - ); - } - - public function setNumFunctions(int $count, int $tested): void - { - $this->functionsNode->setAttribute('count', (string) $count); - $this->functionsNode->setAttribute('tested', (string) $tested); - $this->functionsNode->setAttribute( - 'percent', - $count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count)) - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php deleted file mode 100644 index c235dfb..0000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -final class Unit -{ - /** - * @var \DOMElement - */ - private $contextNode; - - public function __construct(\DOMElement $context, string $name) - { - $this->contextNode = $context; - - $this->setName($name); - } - - public function setLines(int $start, int $executable, int $executed): void - { - $this->contextNode->setAttribute('start', (string) $start); - $this->contextNode->setAttribute('executable', (string) $executable); - $this->contextNode->setAttribute('executed', (string) $executed); - } - - public function setCrap(float $crap): void - { - $this->contextNode->setAttribute('crap', (string) $crap); - } - - public function setPackage(string $full, string $package, string $sub, string $category): void - { - $node = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'package' - )->item(0); - - if (!$node) { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'package' - ) - ); - } - - $node->setAttribute('full', $full); - $node->setAttribute('name', $package); - $node->setAttribute('sub', $sub); - $node->setAttribute('category', $category); - } - - public function setNamespace(string $namespace): void - { - $node = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'namespace' - )->item(0); - - if (!$node) { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'namespace' - ) - ); - } - - $node->setAttribute('name', $namespace); - } - - public function addMethod(string $name): Method - { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'method' - ) - ); - - return new Method($node, $name); - } - - private function setName(string $name): void - { - $this->contextNode->setAttribute('name', $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Util.php b/vendor/phpunit/php-code-coverage/src/Util.php deleted file mode 100644 index ee8894c..0000000 --- a/vendor/phpunit/php-code-coverage/src/Util.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -/** - * Utility methods. - */ -final class Util -{ - /** - * @return float|int|string - */ - public static function percent(float $a, float $b, bool $asString = false, bool $fixedWidth = false) - { - if ($asString && $b == 0) { - return ''; - } - - $percent = 100; - - if ($b > 0) { - $percent = ($a / $b) * 100; - } - - if ($asString) { - $format = $fixedWidth ? '%6.2F%%' : '%01.2F%%'; - - return \sprintf($format, $percent); - } - - return $percent; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Version.php b/vendor/phpunit/php-code-coverage/src/Version.php deleted file mode 100644 index 1ebd883..0000000 --- a/vendor/phpunit/php-code-coverage/src/Version.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use SebastianBergmann\Version as VersionId; - -final class Version -{ - /** - * @var string - */ - private static $version; - - public static function id(): string - { - if (self::$version === null) { - $version = new VersionId('7.0.8', \dirname(__DIR__)); - self::$version = $version->getVersion(); - } - - return self::$version; - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/TestCase.php b/vendor/phpunit/php-code-coverage/tests/TestCase.php deleted file mode 100644 index 6a9824e..0000000 --- a/vendor/phpunit/php-code-coverage/tests/TestCase.php +++ /dev/null @@ -1,395 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace SebastianBergmann\CodeCoverage; - -use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Report\Xml\Coverage; - -abstract class TestCase extends \PHPUnit\Framework\TestCase -{ - protected static $TEST_TMP_PATH; - - public static function setUpBeforeClass(): void - { - self::$TEST_TMP_PATH = TEST_FILES_PATH . 'tmp'; - } - - protected function getXdebugDataForBankAccount() - { - return [ - [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 8 => 1, - 9 => -2, - 13 => -1, - 14 => -1, - 15 => -1, - 16 => -1, - 18 => -1, - 22 => -1, - 24 => -1, - 25 => -2, - 29 => -1, - 31 => -1, - 32 => -2 - ] - ], - [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 8 => 1, - 13 => 1, - 16 => 1, - 29 => 1, - ] - ], - [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 8 => 1, - 13 => 1, - 16 => 1, - 22 => 1, - ] - ], - [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 8 => 1, - 13 => 1, - 14 => 1, - 15 => 1, - 18 => 1, - 22 => 1, - 24 => 1, - 29 => 1, - 31 => 1, - ] - ] - ]; - } - - protected function getCoverageForBankAccount(): CodeCoverage - { - $data = $this->getXdebugDataForBankAccount(); - - $stub = $this->createMock(Driver::class); - - $stub->expects($this->any()) - ->method('stop') - ->will($this->onConsecutiveCalls( - $data[0], - $data[1], - $data[2], - $data[3] - )); - - $filter = new Filter; - $filter->addFileToWhitelist(TEST_FILES_PATH . 'BankAccount.php'); - - $coverage = new CodeCoverage($stub, $filter); - - $coverage->start( - new \BankAccountTest('testBalanceIsInitiallyZero'), - true - ); - - $coverage->stop( - true, - [TEST_FILES_PATH . 'BankAccount.php' => range(6, 9)] - ); - - $coverage->start( - new \BankAccountTest('testBalanceCannotBecomeNegative') - ); - - $coverage->stop( - true, - [TEST_FILES_PATH . 'BankAccount.php' => range(27, 32)] - ); - - $coverage->start( - new \BankAccountTest('testBalanceCannotBecomeNegative2') - ); - - $coverage->stop( - true, - [TEST_FILES_PATH . 'BankAccount.php' => range(20, 25)] - ); - - $coverage->start( - new \BankAccountTest('testDepositWithdrawMoney') - ); - - $coverage->stop( - true, - [ - TEST_FILES_PATH . 'BankAccount.php' => array_merge( - range(6, 9), - range(20, 25), - range(27, 32) - ) - ] - ); - - return $coverage; - } - - protected function getCoverageForBankAccountForFirstTwoTests(): CodeCoverage - { - $data = $this->getXdebugDataForBankAccount(); - - $stub = $this->createMock(Driver::class); - - $stub->expects($this->any()) - ->method('stop') - ->will($this->onConsecutiveCalls( - $data[0], - $data[1] - )); - - $filter = new Filter; - $filter->addFileToWhitelist(TEST_FILES_PATH . 'BankAccount.php'); - - $coverage = new CodeCoverage($stub, $filter); - - $coverage->start( - new \BankAccountTest('testBalanceIsInitiallyZero'), - true - ); - - $coverage->stop( - true, - [TEST_FILES_PATH . 'BankAccount.php' => range(6, 9)] - ); - - $coverage->start( - new \BankAccountTest('testBalanceCannotBecomeNegative') - ); - - $coverage->stop( - true, - [TEST_FILES_PATH . 'BankAccount.php' => range(27, 32)] - ); - - return $coverage; - } - - protected function getCoverageForBankAccountForLastTwoTests() - { - $data = $this->getXdebugDataForBankAccount(); - - $stub = $this->createMock(Driver::class); - - $stub->expects($this->any()) - ->method('stop') - ->will($this->onConsecutiveCalls( - $data[2], - $data[3] - )); - - $filter = new Filter; - $filter->addFileToWhitelist(TEST_FILES_PATH . 'BankAccount.php'); - - $coverage = new CodeCoverage($stub, $filter); - - $coverage->start( - new \BankAccountTest('testBalanceCannotBecomeNegative2') - ); - - $coverage->stop( - true, - [TEST_FILES_PATH . 'BankAccount.php' => range(20, 25)] - ); - - $coverage->start( - new \BankAccountTest('testDepositWithdrawMoney') - ); - - $coverage->stop( - true, - [ - TEST_FILES_PATH . 'BankAccount.php' => array_merge( - range(6, 9), - range(20, 25), - range(27, 32) - ) - ] - ); - - return $coverage; - } - - protected function getExpectedDataArrayForBankAccount(): array - { - return [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 8 => [ - 0 => 'BankAccountTest::testBalanceIsInitiallyZero', - 1 => 'BankAccountTest::testDepositWithdrawMoney' - ], - 9 => null, - 13 => [], - 14 => [], - 15 => [], - 16 => [], - 18 => [], - 22 => [ - 0 => 'BankAccountTest::testBalanceCannotBecomeNegative2', - 1 => 'BankAccountTest::testDepositWithdrawMoney' - ], - 24 => [ - 0 => 'BankAccountTest::testDepositWithdrawMoney', - ], - 25 => null, - 29 => [ - 0 => 'BankAccountTest::testBalanceCannotBecomeNegative', - 1 => 'BankAccountTest::testDepositWithdrawMoney' - ], - 31 => [ - 0 => 'BankAccountTest::testDepositWithdrawMoney' - ], - 32 => null - ] - ]; - } - - protected function getExpectedDataArrayForBankAccountInReverseOrder(): array - { - return [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 8 => [ - 0 => 'BankAccountTest::testDepositWithdrawMoney', - 1 => 'BankAccountTest::testBalanceIsInitiallyZero' - ], - 9 => null, - 13 => [], - 14 => [], - 15 => [], - 16 => [], - 18 => [], - 22 => [ - 0 => 'BankAccountTest::testBalanceCannotBecomeNegative2', - 1 => 'BankAccountTest::testDepositWithdrawMoney' - ], - 24 => [ - 0 => 'BankAccountTest::testDepositWithdrawMoney', - ], - 25 => null, - 29 => [ - 0 => 'BankAccountTest::testDepositWithdrawMoney', - 1 => 'BankAccountTest::testBalanceCannotBecomeNegative' - ], - 31 => [ - 0 => 'BankAccountTest::testDepositWithdrawMoney' - ], - 32 => null - ] - ]; - } - - protected function getCoverageForFileWithIgnoredLines(): CodeCoverage - { - $filter = new Filter; - $filter->addFileToWhitelist(TEST_FILES_PATH . 'source_with_ignore.php'); - - $coverage = new CodeCoverage( - $this->setUpXdebugStubForFileWithIgnoredLines(), - $filter - ); - - $coverage->start('FileWithIgnoredLines', true); - $coverage->stop(); - - return $coverage; - } - - protected function setUpXdebugStubForFileWithIgnoredLines(): Driver - { - $stub = $this->createMock(Driver::class); - - $stub->expects($this->any()) - ->method('stop') - ->will($this->returnValue( - [ - TEST_FILES_PATH . 'source_with_ignore.php' => [ - 2 => 1, - 4 => -1, - 6 => -1, - 7 => 1 - ] - ] - )); - - return $stub; - } - - protected function getCoverageForClassWithAnonymousFunction(): CodeCoverage - { - $filter = new Filter; - $filter->addFileToWhitelist(TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php'); - - $coverage = new CodeCoverage( - $this->setUpXdebugStubForClassWithAnonymousFunction(), - $filter - ); - - $coverage->start('ClassWithAnonymousFunction', true); - $coverage->stop(); - - return $coverage; - } - - protected function setUpXdebugStubForClassWithAnonymousFunction(): Driver - { - $stub = $this->createMock(Driver::class); - - $stub->expects($this->any()) - ->method('stop') - ->will($this->returnValue( - [ - TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php' => [ - 7 => 1, - 9 => 1, - 10 => -1, - 11 => 1, - 12 => 1, - 13 => 1, - 14 => 1, - 17 => 1, - 18 => 1 - ] - ] - )); - - return $stub; - } - - protected function getCoverageForCrashParsing(): CodeCoverage - { - $filter = new Filter; - $filter->addFileToWhitelist(TEST_FILES_PATH . 'Crash.php'); - - // This is a file with invalid syntax, so it isn't executed. - return new CodeCoverage( - $this->setUpXdebugStubForCrashParsing(), - $filter - ); - } - - protected function setUpXdebugStubForCrashParsing(): Driver - { - $stub = $this->createMock(Driver::class); - - $stub->expects($this->any()) - ->method('stop') - ->will($this->returnValue([])); - return $stub; - } - -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml deleted file mode 100644 index 5966113..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-crap4j.xml b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-crap4j.xml deleted file mode 100644 index f2f56ea..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-crap4j.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - BankAccount - %s - - Method Crap Stats - 4 - 0 - 0 - 9 - 0 - - - - global - BankAccount - getBalance - getBalance() - getBalance() - 1 - 1 - 100 - 0 - - - global - BankAccount - setBalance - setBalance($balance) - setBalance($balance) - 6 - 2 - 0 - 0 - - - global - BankAccount - depositMoney - depositMoney($balance) - depositMoney($balance) - 1 - 1 - 100 - 0 - - - global - BankAccount - withdrawMoney - withdrawMoney($balance) - withdrawMoney($balance) - 1 - 1 - 100 - 0 - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-text.txt b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-text.txt deleted file mode 100644 index 892d834..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-text.txt +++ /dev/null @@ -1,12 +0,0 @@ - - -Code Coverage Report: - %s - - Summary: - Classes: 0.00% (0/1) - Methods: 75.00% (3/4) - Lines: 50.00% (5/10) - -BankAccount - Methods: 75.00% ( 3/ 4) Lines: 50.00% ( 5/ 10) diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php deleted file mode 100644 index 4238c15..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php +++ /dev/null @@ -1,33 +0,0 @@ -balance; - } - - protected function setBalance($balance) - { - if ($balance >= 0) { - $this->balance = $balance; - } else { - throw new RuntimeException; - } - } - - public function depositMoney($balance) - { - $this->setBalance($this->getBalance() + $balance); - - return $this->getBalance(); - } - - public function withdrawMoney($balance) - { - $this->setBalance($this->getBalance() - $balance); - - return $this->getBalance(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php b/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php deleted file mode 100644 index 803c892..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php +++ /dev/null @@ -1,66 +0,0 @@ -ba = new BankAccount; - } - - /** - * @covers BankAccount::getBalance - */ - public function testBalanceIsInitiallyZero() - { - $this->assertEquals(0, $this->ba->getBalance()); - } - - /** - * @covers BankAccount::withdrawMoney - */ - public function testBalanceCannotBecomeNegative() - { - try { - $this->ba->withdrawMoney(1); - } catch (RuntimeException $e) { - $this->assertEquals(0, $this->ba->getBalance()); - - return; - } - - $this->fail(); - } - - /** - * @covers BankAccount::depositMoney - */ - public function testBalanceCannotBecomeNegative2() - { - try { - $this->ba->depositMoney(-1); - } catch (RuntimeException $e) { - $this->assertEquals(0, $this->ba->getBalance()); - - return; - } - - $this->fail(); - } - - /** - * @covers BankAccount::getBalance - * @covers BankAccount::depositMoney - * @covers BankAccount::withdrawMoney - */ - public function testDepositWithdrawMoney() - { - $this->assertEquals(0, $this->ba->getBalance()); - $this->ba->depositMoney(1); - $this->assertEquals(1, $this->ba->getBalance()); - $this->ba->withdrawMoney(1); - $this->assertEquals(0, $this->ba->getBalance()); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php deleted file mode 100644 index e6d496e..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php deleted file mode 100644 index baa04d8..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php +++ /dev/null @@ -1,14 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php deleted file mode 100644 index 560e381..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php +++ /dev/null @@ -1,13 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php deleted file mode 100644 index b624ed9..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php +++ /dev/null @@ -1,14 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php deleted file mode 100644 index 20d2e75..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php deleted file mode 100644 index fb7a882..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php +++ /dev/null @@ -1,14 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php deleted file mode 100644 index d8d9cae..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php +++ /dev/null @@ -1,11 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php deleted file mode 100644 index e98efd8..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php deleted file mode 100644 index 7c9c488..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php deleted file mode 100644 index 202724a..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php deleted file mode 100644 index 4e1c0d0..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php +++ /dev/null @@ -1,15 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php deleted file mode 100644 index 849c348..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php deleted file mode 100644 index 6ae3544..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php deleted file mode 100644 index d977090..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php b/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php deleted file mode 100644 index 06949cb..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } - -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php deleted file mode 100644 index f382ce9..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php +++ /dev/null @@ -1,36 +0,0 @@ -privateMethod(); - } - - public function publicMethod() - { - $this->protectedMethod(); - } -} - -class CoveredClass extends CoveredParentClass -{ - private function privateMethod() - { - } - - protected function protectedMethod() - { - parent::protectedMethod(); - $this->privateMethod(); - } - - public function publicMethod() - { - parent::publicMethod(); - $this->protectedMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php b/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php deleted file mode 100644 index 9989eb0..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php +++ /dev/null @@ -1,4 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php deleted file mode 100644 index 2b91f1f..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php +++ /dev/null @@ -1,14 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php deleted file mode 100644 index d3bc1a9..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php +++ /dev/null @@ -1,17 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php deleted file mode 100644 index 67752dd..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php +++ /dev/null @@ -1,22 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php deleted file mode 100644 index f83ae5f..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php +++ /dev/null @@ -1,14 +0,0 @@ -publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php deleted file mode 100644 index b4983c7..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php deleted file mode 100644 index ceb7b35..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php deleted file mode 100644 index 60aff7a..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php deleted file mode 100644 index d5eb77e..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php deleted file mode 100644 index 6a6eaca..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php deleted file mode 100644 index f32803e..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - public function testSomething() - { - $o = new Foo\CoveredClass; - $o->publicMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php b/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php deleted file mode 100644 index 5bd0ddf..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php +++ /dev/null @@ -1,38 +0,0 @@ -privateMethod(); - } - - public function publicMethod() - { - $this->protectedMethod(); - } -} - -class CoveredClass extends CoveredParentClass -{ - private function privateMethod() - { - } - - protected function protectedMethod() - { - parent::protectedMethod(); - $this->privateMethod(); - } - - public function publicMethod() - { - parent::publicMethod(); - $this->protectedMethod(); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php b/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php deleted file mode 100644 index 0836a8c..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ - public function testThree() - { - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html deleted file mode 100644 index ed20c5d..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - Code Coverage for %s%eBankAccount.php - - - - - - - -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
- 75.00% covered (warning) -
-
-
75.00%
3 / 4
CRAP
-
- 50.00% covered (danger) -
-
-
50.00%
5 / 10
BankAccount
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
- 75.00% covered (warning) -
-
-
75.00%
3 / 4
8.12
-
- 50.00% covered (danger) -
-
-
50.00%
5 / 10
 getBalance
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
1
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
 setBalance
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
6.00
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 5
 depositMoney
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
1
-
- 100.00% covered (success) -
-
-
100.00%
2 / 2
 withdrawMoney
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
1
-
- 100.00% covered (success) -
-
-
100.00%
2 / 2
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<?php
class BankAccount
{
    protected $balance = 0;
    public function getBalance()
    {
        return $this->balance;
    }
    protected function setBalance($balance)
    {
        if ($balance >= 0) {
            $this->balance = $balance;
        } else {
            throw new RuntimeException;
        }
    }
    public function depositMoney($balance)
    {
        $this->setBalance($this->getBalance() + $balance);
        return $this->getBalance();
    }
    public function withdrawMoney($balance)
    {
        $this->setBalance($this->getBalance() - $balance);
        return $this->getBalance();
    }
}
- -
- - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/dashboard.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/dashboard.html deleted file mode 100644 index e47929f..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/dashboard.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - Dashboard for %s - - - - - - - -
-
-
-
- -
-
-
-
-
-
-
-

Classes

-
-
-
-
-

Coverage Distribution

-
- -
-
-
-

Complexity

-
- -
-
-
-
-
-

Insufficient Coverage

-
- - - - - - - - - - - -
ClassCoverage
BankAccount50%
-
-
-
-

Project Risks

-
- - - - - - - - - - - -
ClassCRAP
BankAccount8
-
-
-
-
-
-

Methods

-
-
-
-
-

Coverage Distribution

-
- -
-
-
-

Complexity

-
- -
-
-
-
-
-

Insufficient Coverage

-
- - - - - - - - - - - -
MethodCoverage
setBalance0%
-
-
-
-

Project Risks

-
- - - - - - - - - - - -
MethodCRAP
setBalance6
-
-
-
- -
- - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/index.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/index.html deleted file mode 100644 index e0c9ed9..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForBankAccount/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Code Coverage for %s - - - - - - - -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
-
- 50.00% covered (danger) -
-
-
50.00%
5 / 10
-
- 75.00% covered (warning) -
-
-
75.00%
3 / 4
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
BankAccount.php
-
- 50.00% covered (danger) -
-
-
50.00%
5 / 10
-
- 75.00% covered (warning) -
-
-
75.00%
3 / 4
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
-
-
-

Legend

-

- Low: 0% to 50% - Medium: 50% to 90% - High: 90% to 100% -

-

- Generated by php-code-coverage %s using %s at %s. -

-
-
- - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html deleted file mode 100644 index 8b27809..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/dashboard.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - Dashboard for %s - - - - - - - -
-
-
-
- -
-
-
-
-
-
-
-

Classes

-
-
-
-
-

Coverage Distribution

-
- -
-
-
-

Complexity

-
- -
-
-
-
-
-

Insufficient Coverage

-
- - - - - - - - - - - -
ClassCoverage
CoveredClassWithAnonymousFunctionInStaticMethod87%
-
-
-
-

Project Risks

-
- - - - - - - - - - -
ClassCRAP
-
-
-
-
-
-

Methods

-
-
-
-
-

Coverage Distribution

-
- -
-
-
-

Complexity

-
- -
-
-
-
-
-

Insufficient Coverage

-
- - - - - - - - - - - -
MethodCoverage
runAnonymous87%
-
-
-
-

Project Risks

-
- - - - - - - - - - -
MethodCRAP
-
-
-
- -
- - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/index.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/index.html deleted file mode 100644 index 68318d0..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Code Coverage for %s - - - - - - - -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
-
- 87.50% covered (warning) -
-
-
87.50%
7 / 8
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
source_with_class_and_anonymous_function.php
-
- 87.50% covered (warning) -
-
-
87.50%
7 / 8
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
-
-
-

Legend

-

- Low: 0% to 50% - Medium: 50% to 90% - High: 90% to 100% -

-

- Generated by php-code-coverage %s using %s at %s. -

-
-
- - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html deleted file mode 100644 index c261c6e..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - Code Coverage for %s%esource_with_class_and_anonymous_function.php - - - - - - - -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
CRAP
-
- 87.50% covered (warning) -
-
-
87.50%
7 / 8
CoveredClassWithAnonymousFunctionInStaticMethod
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
1.00
-
- 87.50% covered (warning) -
-
-
87.50%
7 / 8
 runAnonymous
-
- 0.00% covered (danger) -
-
-
0.00%
0 / 1
1.00
-
- 87.50% covered (warning) -
-
-
87.50%
7 / 8
-
- - - - - - - - - - - - - - - - - - - - - - - -
<?php
class CoveredClassWithAnonymousFunctionInStaticMethod
{
    public static function runAnonymous()
    {
        $filter = ['abc124', 'abc123', '123'];
        array_walk(
            $filter,
            function (&$val, $key) {
                $val = preg_replace('|[^0-9]|', '', $val);
            }
        );
        // Should be covered
        $extravar = true;
    }
}
- -
- - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/dashboard.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/dashboard.html deleted file mode 100644 index 4cf93ad..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/dashboard.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - Dashboard for %s - - - - - - - -
-
-
-
- -
-
-
-
-
-
-
-

Classes

-
-
-
-
-

Coverage Distribution

-
- -
-
-
-

Complexity

-
- -
-
-
-
-
-

Insufficient Coverage

-
- - - - - - - - - - -
ClassCoverage
-
-
-
-

Project Risks

-
- - - - - - - - - - -
ClassCRAP
-
-
-
-
-
-

Methods

-
-
-
-
-

Coverage Distribution

-
- -
-
-
-

Complexity

-
- -
-
-
-
-
-

Insufficient Coverage

-
- - - - - - - - - - -
MethodCoverage
-
-
-
-

Project Risks

-
- - - - - - - - - - -
MethodCRAP
-
-
-
- -
- - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html deleted file mode 100644 index 7d4cfff..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/index.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - Code Coverage for %s - - - - - - - -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
-
- 50.00% covered (danger) -
-
-
50.00%
1 / 2
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
n/a
0 / 0
source_with_ignore.php
-
- 50.00% covered (danger) -
-
-
50.00%
1 / 2
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
n/a
0 / 0
-
-
-
-

Legend

-

- Low: 0% to 50% - Medium: 50% to 90% - High: 90% to 100% -

-

- Generated by php-code-coverage %s using %s at %s. -

-
-
- - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html b/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html deleted file mode 100644 index f845f7c..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - Code Coverage for %s/source_with_ignore.php - - - - - - - -
-
-
-
- -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
n/a
0 / 0
-
- 100.00% covered (success) -
-
-
100.00%
1 / 1
CRAP
-
- 50.00% covered (danger) -
-
-
50.00%
1 / 2
baz
n/a
0 / 0
1
n/a
0 / 0
Foo
n/a
0 / 0
n/a
0 / 0
1
n/a
0 / 0
 bar
n/a
0 / 0
1
n/a
0 / 0
Bar
n/a
0 / 0
n/a
0 / 0
1
n/a
0 / 0
 foo
n/a
0 / 0
1
n/a
0 / 0
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<?php
if ($neverHappens) {
    // @codeCoverageIgnoreStart
    print '*';
    // @codeCoverageIgnoreEnd
}
/**
 * @codeCoverageIgnore
 */
class Foo
{
    public function bar()
    {
    }
}
class Bar
{
    /**
     * @codeCoverageIgnore
     */
    public function foo()
    {
    }
}
function baz()
{
    print '*'; // @codeCoverageIgnore
}
interface Bor
{
    public function foo();
}
- -
- - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/BankAccount.php.xml b/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/BankAccount.php.xml deleted file mode 100644 index 359f6a3..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/BankAccount.php.xml +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <?php - - - class - - BankAccount - - - { - - - - protected - - $balance - - = - - 0 - ; - - - - - public - - function - - getBalance - ( - ) - - - - { - - - - return - - $this - -> - balance - ; - - - - } - - - - - protected - - function - - setBalance - ( - $balance - ) - - - - { - - - - if - - ( - $balance - - >= - - 0 - ) - - { - - - - $this - -> - balance - - = - - $balance - ; - - - - } - - else - - { - - - - throw - - new - - RuntimeException - ; - - - - } - - - - } - - - - - public - - function - - depositMoney - ( - $balance - ) - - - - { - - - - $this - -> - setBalance - ( - $this - -> - getBalance - ( - ) - - + - - $balance - ) - ; - - - - - return - - $this - -> - getBalance - ( - ) - ; - - - - } - - - - - public - - function - - withdrawMoney - ( - $balance - ) - - - - { - - - - $this - -> - setBalance - ( - $this - -> - getBalance - ( - ) - - - - - $balance - ) - ; - - - - - return - - $this - -> - getBalance - ( - ) - ; - - - - } - - - } - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/index.xml b/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/index.xml deleted file mode 100644 index df433b0..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForBankAccount/index.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/index.xml b/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/index.xml deleted file mode 100644 index c8d90ba..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/index.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml b/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml deleted file mode 100644 index a413174..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <?php - - - - class - - CoveredClassWithAnonymousFunctionInStaticMethod - - - { - - - - public - - static - - function - - runAnonymous - ( - ) - - - - { - - - - $filter - - = - - [ - 'abc124' - , - - 'abc123' - , - - '123' - ] - ; - - - - - array_walk - ( - - - - $filter - , - - - - function - - ( - & - $val - , - - $key - ) - - { - - - - $val - - = - - preg_replace - ( - '|[^0-9]|' - , - - '' - , - - $val - ) - ; - - - - } - - - - ) - ; - - - - - // Should be covered - - - - $extravar - - = - - true - ; - - - - } - - - } - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml b/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml deleted file mode 100644 index d44f970..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/index.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml b/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml deleted file mode 100644 index 5ff1d6b..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/Report/XML/CoverageForFileWithIgnoredLines/source_with_ignore.php.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <?php - - - if - - ( - $neverHappens - ) - - { - - - - // @codeCoverageIgnoreStart - - - - print - - '*' - ; - - - - // @codeCoverageIgnoreEnd - - - } - - - - /** - - - * @codeCoverageIgnore - - - */ - - - class - - Foo - - - { - - - - public - - function - - bar - ( - ) - - - - { - - - - } - - - } - - - - class - - Bar - - - { - - - - /** - - - * @codeCoverageIgnore - - - */ - - - - public - - function - - foo - ( - ) - - - - { - - - - } - - - } - - - - function - - baz - ( - ) - - - { - - - - print - - '*' - ; - - // @codeCoverageIgnore - - - } - - - - interface - - Bor - - - { - - - - public - - function - - foo - ( - ) - ; - - - - } - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml deleted file mode 100644 index 008db55..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-crap4j.xml b/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-crap4j.xml deleted file mode 100644 index 5bd2535..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-crap4j.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - CoverageForClassWithAnonymousFunction - %s - - Method Crap Stats - 1 - 0 - 0 - 1 - 0 - - - - global - CoveredClassWithAnonymousFunctionInStaticMethod - runAnonymous - runAnonymous() - runAnonymous() - 1 - 1 - 87.5 - 0 - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-text.txt b/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-text.txt deleted file mode 100644 index e4204cc..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-text.txt +++ /dev/null @@ -1,12 +0,0 @@ - - -Code Coverage Report: - %s - - Summary: - Classes: 0.00% (0/1) - Methods: 0.00% (0/1) - Lines: 87.50% (7/8) - -CoveredClassWithAnonymousFunctionInStaticMethod - Methods: 0.00% ( 0/ 1) Lines: 87.50% ( 7/ 8) diff --git a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml deleted file mode 100644 index efd3801..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-crap4j.xml b/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-crap4j.xml deleted file mode 100644 index 2607b59..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-crap4j.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - CoverageForFileWithIgnoredLines - %s - - Method Crap Stats - 2 - 0 - 0 - 2 - 0 - - - - global - Foo - bar - bar() - bar() - 1 - 1 - 100 - 0 - - - global - Bar - foo - foo() - foo() - 1 - 1 - 100 - 0 - - - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-text.txt b/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-text.txt deleted file mode 100644 index 6e8e149..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-text.txt +++ /dev/null @@ -1,10 +0,0 @@ - - -Code Coverage Report:%w - %s -%w - Summary:%w - Classes: (0/0) - Methods: (0/0) - Lines: 50.00% (1/2) - diff --git a/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php b/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php deleted file mode 100644 index 72aa938..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php +++ /dev/null @@ -1,19 +0,0 @@ - 1, 'b' => 2, 'c' => 3, 'd' => 4], - static function ($v, $k) - { - return $k === 'b' || $v === 4; - }, - ARRAY_FILTER_USE_BOTH - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/_files/source_without_ignore.php b/vendor/phpunit/php-code-coverage/tests/_files/source_without_ignore.php deleted file mode 100644 index be4e836..0000000 --- a/vendor/phpunit/php-code-coverage/tests/_files/source_without_ignore.php +++ /dev/null @@ -1,4 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\Node\Builder; -use SebastianBergmann\CodeCoverage\TestCase; - -class BuilderTest extends TestCase -{ - protected $factory; - - protected function setUp(): void - { - $this->factory = new Builder; - } - - public function testSomething(): void - { - $root = $this->getCoverageForBankAccount()->getReport(); - - $expectedPath = \rtrim(TEST_FILES_PATH, \DIRECTORY_SEPARATOR); - $this->assertEquals($expectedPath, $root->getName()); - $this->assertEquals($expectedPath, $root->getPath()); - $this->assertEquals(10, $root->getNumExecutableLines()); - $this->assertEquals(5, $root->getNumExecutedLines()); - $this->assertEquals(1, $root->getNumClasses()); - $this->assertEquals(0, $root->getNumTestedClasses()); - $this->assertEquals(4, $root->getNumMethods()); - $this->assertEquals(3, $root->getNumTestedMethods()); - $this->assertEquals('0.00%', $root->getTestedClassesPercent()); - $this->assertEquals('75.00%', $root->getTestedMethodsPercent()); - $this->assertEquals('50.00%', $root->getLineExecutedPercent()); - $this->assertEquals(0, $root->getNumFunctions()); - $this->assertEquals(0, $root->getNumTestedFunctions()); - $this->assertNull($root->getParent()); - $this->assertEquals([], $root->getDirectories()); - #$this->assertEquals(array(), $root->getFiles()); - #$this->assertEquals(array(), $root->getChildNodes()); - - $this->assertEquals( - [ - 'BankAccount' => [ - 'methods' => [ - 'getBalance' => [ - 'signature' => 'getBalance()', - 'startLine' => 6, - 'endLine' => 9, - 'executableLines' => 1, - 'executedLines' => 1, - 'ccn' => 1, - 'coverage' => 100, - 'crap' => '1', - 'link' => 'BankAccount.php.html#6', - 'methodName' => 'getBalance', - 'visibility' => 'public', - ], - 'setBalance' => [ - 'signature' => 'setBalance($balance)', - 'startLine' => 11, - 'endLine' => 18, - 'executableLines' => 5, - 'executedLines' => 0, - 'ccn' => 2, - 'coverage' => 0, - 'crap' => 6, - 'link' => 'BankAccount.php.html#11', - 'methodName' => 'setBalance', - 'visibility' => 'protected', - ], - 'depositMoney' => [ - 'signature' => 'depositMoney($balance)', - 'startLine' => 20, - 'endLine' => 25, - 'executableLines' => 2, - 'executedLines' => 2, - 'ccn' => 1, - 'coverage' => 100, - 'crap' => '1', - 'link' => 'BankAccount.php.html#20', - 'methodName' => 'depositMoney', - 'visibility' => 'public', - ], - 'withdrawMoney' => [ - 'signature' => 'withdrawMoney($balance)', - 'startLine' => 27, - 'endLine' => 32, - 'executableLines' => 2, - 'executedLines' => 2, - 'ccn' => 1, - 'coverage' => 100, - 'crap' => '1', - 'link' => 'BankAccount.php.html#27', - 'methodName' => 'withdrawMoney', - 'visibility' => 'public', - ], - ], - 'startLine' => 2, - 'executableLines' => 10, - 'executedLines' => 5, - 'ccn' => 5, - 'coverage' => 50, - 'crap' => '8.12', - 'package' => [ - 'namespace' => '', - 'fullPackage' => '', - 'category' => '', - 'package' => '', - 'subpackage' => '', - ], - 'link' => 'BankAccount.php.html#2', - 'className' => 'BankAccount', - ], - ], - $root->getClasses() - ); - - $this->assertEquals([], $root->getFunctions()); - } - - public function testNotCrashParsing(): void - { - $coverage = $this->getCoverageForCrashParsing(); - $root = $coverage->getReport(); - - $expectedPath = \rtrim(TEST_FILES_PATH, \DIRECTORY_SEPARATOR); - $this->assertEquals($expectedPath, $root->getName()); - $this->assertEquals($expectedPath, $root->getPath()); - $this->assertEquals(2, $root->getNumExecutableLines()); - $this->assertEquals(0, $root->getNumExecutedLines()); - $data = $coverage->getData(); - $expectedFile = $expectedPath . \DIRECTORY_SEPARATOR . 'Crash.php'; - $this->assertSame([$expectedFile => [1 => [], 2 => []]], $data); - } - - public function testBuildDirectoryStructure(): void - { - $s = \DIRECTORY_SEPARATOR; - - $method = new \ReflectionMethod( - Builder::class, - 'buildDirectoryStructure' - ); - - $method->setAccessible(true); - - $this->assertEquals( - [ - 'src' => [ - 'Money.php/f' => [], - 'MoneyBag.php/f' => [], - 'Foo' => [ - 'Bar' => [ - 'Baz' => [ - 'Foo.php/f' => [], - ], - ], - ], - ], - ], - $method->invoke( - $this->factory, - [ - "src{$s}Money.php" => [], - "src{$s}MoneyBag.php" => [], - "src{$s}Foo{$s}Bar{$s}Baz{$s}Foo.php" => [], - ] - ) - ); - } - - /** - * @dataProvider reducePathsProvider - */ - public function testReducePaths($reducedPaths, $commonPath, $paths): void - { - $method = new \ReflectionMethod( - Builder::class, - 'reducePaths' - ); - - $method->setAccessible(true); - - $_commonPath = $method->invokeArgs($this->factory, [&$paths]); - - $this->assertEquals($reducedPaths, $paths); - $this->assertEquals($commonPath, $_commonPath); - } - - public function reducePathsProvider() - { - $s = \DIRECTORY_SEPARATOR; - - yield [ - [], - '.', - [], - ]; - - $prefixes = ["C:$s", "$s"]; - - foreach ($prefixes as $p) { - yield [ - [ - 'Money.php' => [], - ], - "{$p}home{$s}sb{$s}Money{$s}", - [ - "{$p}home{$s}sb{$s}Money{$s}Money.php" => [], - ], - ]; - - yield [ - [ - 'Money.php' => [], - 'MoneyBag.php' => [], - ], - "{$p}home{$s}sb{$s}Money", - [ - "{$p}home{$s}sb{$s}Money{$s}Money.php" => [], - "{$p}home{$s}sb{$s}Money{$s}MoneyBag.php" => [], - ], - ]; - - yield [ - [ - 'Money.php' => [], - 'MoneyBag.php' => [], - "Cash.phar{$s}Cash.php" => [], - ], - "{$p}home{$s}sb{$s}Money", - [ - "{$p}home{$s}sb{$s}Money{$s}Money.php" => [], - "{$p}home{$s}sb{$s}Money{$s}MoneyBag.php" => [], - "phar://{$p}home{$s}sb{$s}Money{$s}Cash.phar{$s}Cash.php" => [], - ], - ]; - } - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/CloverTest.php b/vendor/phpunit/php-code-coverage/tests/tests/CloverTest.php deleted file mode 100644 index 7fdbf7d..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/CloverTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\TestCase; - -/** - * @covers SebastianBergmann\CodeCoverage\Report\Clover - */ -class CloverTest extends TestCase -{ - public function testCloverForBankAccountTest(): void - { - $clover = new Clover; - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'BankAccount-clover.xml', - $clover->process($this->getCoverageForBankAccount(), null, 'BankAccount') - ); - } - - public function testCloverForFileWithIgnoredLines(): void - { - $clover = new Clover; - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'ignored-lines-clover.xml', - $clover->process($this->getCoverageForFileWithIgnoredLines()) - ); - } - - public function testCloverForClassWithAnonymousFunction(): void - { - $clover = new Clover; - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'class-with-anonymous-function-clover.xml', - $clover->process($this->getCoverageForClassWithAnonymousFunction()) - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/CodeCoverageTest.php b/vendor/phpunit/php-code-coverage/tests/tests/CodeCoverageTest.php deleted file mode 100644 index ce2471a..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/CodeCoverageTest.php +++ /dev/null @@ -1,359 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\Environment\Runtime; - -/** - * @covers SebastianBergmann\CodeCoverage\CodeCoverage - */ -class CodeCoverageTest extends TestCase -{ - /** - * @var CodeCoverage - */ - private $coverage; - - protected function setUp(): void - { - $runtime = new Runtime; - - if (!$runtime->canCollectCodeCoverage()) { - $this->markTestSkipped('No code coverage driver available'); - } - - $this->coverage = new CodeCoverage; - } - - public function testCannotStopWithInvalidSecondArgument(): void - { - $this->expectException(Exception::class); - - $this->coverage->stop(true, null); - } - - public function testCannotAppendWithInvalidArgument(): void - { - $this->expectException(Exception::class); - - $this->coverage->append([], null); - } - - public function testCollect(): void - { - $coverage = $this->getCoverageForBankAccount(); - - $this->assertEquals( - $this->getExpectedDataArrayForBankAccount(), - $coverage->getData() - ); - - $this->assertEquals( - [ - 'BankAccountTest::testBalanceIsInitiallyZero' => ['size' => 'unknown', 'status' => -1], - 'BankAccountTest::testBalanceCannotBecomeNegative' => ['size' => 'unknown', 'status' => -1], - 'BankAccountTest::testBalanceCannotBecomeNegative2' => ['size' => 'unknown', 'status' => -1], - 'BankAccountTest::testDepositWithdrawMoney' => ['size' => 'unknown', 'status' => -1], - ], - $coverage->getTests() - ); - } - - public function testMerge(): void - { - $coverage = $this->getCoverageForBankAccountForFirstTwoTests(); - $coverage->merge($this->getCoverageForBankAccountForLastTwoTests()); - - $this->assertEquals( - $this->getExpectedDataArrayForBankAccount(), - $coverage->getData() - ); - } - - public function testMergeReverseOrder(): void - { - $coverage = $this->getCoverageForBankAccountForLastTwoTests(); - $coverage->merge($this->getCoverageForBankAccountForFirstTwoTests()); - - $this->assertEquals( - $this->getExpectedDataArrayForBankAccountInReverseOrder(), - $coverage->getData() - ); - } - - public function testMerge2(): void - { - $coverage = new CodeCoverage( - $this->createMock(Driver::class), - new Filter - ); - - $coverage->merge($this->getCoverageForBankAccount()); - - $this->assertEquals( - $this->getExpectedDataArrayForBankAccount(), - $coverage->getData() - ); - } - - public function testGetLinesToBeIgnored(): void - { - $this->assertEquals( - [ - 1, - 3, - 4, - 5, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 30, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - ], - $this->getLinesToBeIgnored()->invoke( - $this->coverage, - TEST_FILES_PATH . 'source_with_ignore.php' - ) - ); - } - - public function testGetLinesToBeIgnored2(): void - { - $this->assertEquals( - [1, 5], - $this->getLinesToBeIgnored()->invoke( - $this->coverage, - TEST_FILES_PATH . 'source_without_ignore.php' - ) - ); - } - - public function testGetLinesToBeIgnored3(): void - { - $this->assertEquals( - [ - 1, - 2, - 3, - 4, - 5, - 8, - 11, - 15, - 16, - 19, - 20, - ], - $this->getLinesToBeIgnored()->invoke( - $this->coverage, - TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php' - ) - ); - } - - public function testGetLinesToBeIgnoredOneLineAnnotations(): void - { - $this->assertEquals( - [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 14, - 15, - 16, - 18, - 20, - 21, - 23, - 24, - 25, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 37, - ], - $this->getLinesToBeIgnored()->invoke( - $this->coverage, - TEST_FILES_PATH . 'source_with_oneline_annotations.php' - ) - ); - } - - public function testGetLinesToBeIgnoredWhenIgnoreIsDisabled(): void - { - $this->coverage->setDisableIgnoredLines(true); - - $this->assertEquals( - [ - 7, - 11, - 12, - 13, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 26, - 27, - 32, - 33, - 34, - 35, - 36, - 37, - ], - $this->getLinesToBeIgnored()->invoke( - $this->coverage, - TEST_FILES_PATH . 'source_with_ignore.php' - ) - ); - } - - public function testUseStatementsAreIgnored(): void - { - $this->assertEquals( - [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 13, - 16, - 23, - 24, - ], - $this->getLinesToBeIgnored()->invoke( - $this->coverage, - TEST_FILES_PATH . 'source_with_use_statements.php' - ) - ); - } - - public function testAppendThrowsExceptionIfCoveredCodeWasNotExecuted(): void - { - $this->coverage->filter()->addDirectoryToWhitelist(TEST_FILES_PATH); - $this->coverage->setCheckForUnexecutedCoveredCode(true); - - $data = [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 29 => -1, - 31 => -1, - ], - ]; - - $linesToBeCovered = [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 22, - 24, - ], - ]; - - $linesToBeUsed = []; - - $this->expectException(CoveredCodeNotExecutedException::class); - - $this->coverage->append($data, 'File1.php', true, $linesToBeCovered, $linesToBeUsed); - } - - public function testAppendThrowsExceptionIfUsedCodeWasNotExecuted(): void - { - $this->coverage->filter()->addDirectoryToWhitelist(TEST_FILES_PATH); - $this->coverage->setCheckForUnexecutedCoveredCode(true); - - $data = [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 29 => -1, - 31 => -1, - ], - ]; - - $linesToBeCovered = [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 29, - 31, - ], - ]; - - $linesToBeUsed = [ - TEST_FILES_PATH . 'BankAccount.php' => [ - 22, - 24, - ], - ]; - - $this->expectException(CoveredCodeNotExecutedException::class); - - $this->coverage->append($data, 'File1.php', true, $linesToBeCovered, $linesToBeUsed); - } - - /** - * @return \ReflectionMethod - */ - private function getLinesToBeIgnored() - { - $getLinesToBeIgnored = new \ReflectionMethod( - 'SebastianBergmann\CodeCoverage\CodeCoverage', - 'getLinesToBeIgnored' - ); - - $getLinesToBeIgnored->setAccessible(true); - - return $getLinesToBeIgnored; - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/Crap4jTest.php b/vendor/phpunit/php-code-coverage/tests/tests/Crap4jTest.php deleted file mode 100644 index 033fe4c..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/Crap4jTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\TestCase; - -/** - * @covers SebastianBergmann\CodeCoverage\Report\Crap4j - */ -class Crap4jTest extends TestCase -{ - public function testForBankAccountTest(): void - { - $crap4j = new Crap4j; - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'BankAccount-crap4j.xml', - $crap4j->process($this->getCoverageForBankAccount(), null, 'BankAccount') - ); - } - - public function testForFileWithIgnoredLines(): void - { - $crap4j = new Crap4j; - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'ignored-lines-crap4j.xml', - $crap4j->process($this->getCoverageForFileWithIgnoredLines(), null, 'CoverageForFileWithIgnoredLines') - ); - } - - public function testForClassWithAnonymousFunction(): void - { - $crap4j = new Crap4j; - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'class-with-anonymous-function-crap4j.xml', - $crap4j->process($this->getCoverageForClassWithAnonymousFunction(), null, 'CoverageForClassWithAnonymousFunction') - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/Exception/UnintentionallyCoveredCodeExceptionTest.php b/vendor/phpunit/php-code-coverage/tests/tests/Exception/UnintentionallyCoveredCodeExceptionTest.php deleted file mode 100644 index dffc227..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/Exception/UnintentionallyCoveredCodeExceptionTest.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\tests\Exception; - -use PHPUnit\Framework\TestCase; -use SebastianBergmann\CodeCoverage\RuntimeException; -use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; - -final class UnintentionallyCoveredCodeExceptionTest extends TestCase -{ - public function testCanConstructWithEmptyArray(): void - { - $unintentionallyCoveredUnits = []; - - $exception = new UnintentionallyCoveredCodeException($unintentionallyCoveredUnits); - - $this->assertInstanceOf(RuntimeException::class, $exception); - $this->assertSame($unintentionallyCoveredUnits, $exception->getUnintentionallyCoveredUnits()); - $this->assertSame('', $exception->getMessage()); - } - - public function testCanConstructWithNonEmptyArray(): void - { - $unintentionallyCoveredUnits = [ - 'foo', - 'bar', - 'baz', - ]; - - $exception = new UnintentionallyCoveredCodeException($unintentionallyCoveredUnits); - - $this->assertInstanceOf(RuntimeException::class, $exception); - $this->assertSame($unintentionallyCoveredUnits, $exception->getUnintentionallyCoveredUnits()); - - $expected = <<assertSame($expected, $exception->getMessage()); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/FilterTest.php b/vendor/phpunit/php-code-coverage/tests/tests/FilterTest.php deleted file mode 100644 index 373b349..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/FilterTest.php +++ /dev/null @@ -1,213 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use PHPUnit\Framework\TestCase; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; - -class FilterTest extends TestCase -{ - /** - * @var Filter - */ - private $filter; - - /** - * @var array - */ - private $files = []; - - protected function setUp(): void - { - $this->filter = \unserialize('O:37:"SebastianBergmann\CodeCoverage\Filter":0:{}'); - - $this->files = [ - TEST_FILES_PATH . 'BankAccount.php', - TEST_FILES_PATH . 'BankAccountTest.php', - TEST_FILES_PATH . 'CoverageClassExtendedTest.php', - TEST_FILES_PATH . 'CoverageClassTest.php', - TEST_FILES_PATH . 'CoverageFunctionParenthesesTest.php', - TEST_FILES_PATH . 'CoverageFunctionParenthesesWhitespaceTest.php', - TEST_FILES_PATH . 'CoverageFunctionTest.php', - TEST_FILES_PATH . 'CoverageMethodOneLineAnnotationTest.php', - TEST_FILES_PATH . 'CoverageMethodParenthesesTest.php', - TEST_FILES_PATH . 'CoverageMethodParenthesesWhitespaceTest.php', - TEST_FILES_PATH . 'CoverageMethodTest.php', - TEST_FILES_PATH . 'CoverageNoneTest.php', - TEST_FILES_PATH . 'CoverageNotPrivateTest.php', - TEST_FILES_PATH . 'CoverageNotProtectedTest.php', - TEST_FILES_PATH . 'CoverageNotPublicTest.php', - TEST_FILES_PATH . 'CoverageNothingTest.php', - TEST_FILES_PATH . 'CoveragePrivateTest.php', - TEST_FILES_PATH . 'CoverageProtectedTest.php', - TEST_FILES_PATH . 'CoveragePublicTest.php', - TEST_FILES_PATH . 'CoverageTwoDefaultClassAnnotations.php', - TEST_FILES_PATH . 'CoveredClass.php', - TEST_FILES_PATH . 'CoveredFunction.php', - TEST_FILES_PATH . 'Crash.php', - TEST_FILES_PATH . 'NamespaceCoverageClassExtendedTest.php', - TEST_FILES_PATH . 'NamespaceCoverageClassTest.php', - TEST_FILES_PATH . 'NamespaceCoverageCoversClassPublicTest.php', - TEST_FILES_PATH . 'NamespaceCoverageCoversClassTest.php', - TEST_FILES_PATH . 'NamespaceCoverageMethodTest.php', - TEST_FILES_PATH . 'NamespaceCoverageNotPrivateTest.php', - TEST_FILES_PATH . 'NamespaceCoverageNotProtectedTest.php', - TEST_FILES_PATH . 'NamespaceCoverageNotPublicTest.php', - TEST_FILES_PATH . 'NamespaceCoveragePrivateTest.php', - TEST_FILES_PATH . 'NamespaceCoverageProtectedTest.php', - TEST_FILES_PATH . 'NamespaceCoveragePublicTest.php', - TEST_FILES_PATH . 'NamespaceCoveredClass.php', - TEST_FILES_PATH . 'NotExistingCoveredElementTest.php', - TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php', - TEST_FILES_PATH . 'source_with_ignore.php', - TEST_FILES_PATH . 'source_with_namespace.php', - TEST_FILES_PATH . 'source_with_oneline_annotations.php', - TEST_FILES_PATH . 'source_with_use_statements.php', - TEST_FILES_PATH . 'source_without_ignore.php', - TEST_FILES_PATH . 'source_without_namespace.php', - ]; - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::addFileToWhitelist - * @covers SebastianBergmann\CodeCoverage\Filter::getWhitelist - */ - public function testAddingAFileToTheWhitelistWorks(): void - { - $this->filter->addFileToWhitelist($this->files[0]); - - $this->assertEquals( - [$this->files[0]], - $this->filter->getWhitelist() - ); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::removeFileFromWhitelist - * @covers SebastianBergmann\CodeCoverage\Filter::getWhitelist - */ - public function testRemovingAFileFromTheWhitelistWorks(): void - { - $this->filter->addFileToWhitelist($this->files[0]); - $this->filter->removeFileFromWhitelist($this->files[0]); - - $this->assertEquals([], $this->filter->getWhitelist()); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::addDirectoryToWhitelist - * @covers SebastianBergmann\CodeCoverage\Filter::getWhitelist - * @depends testAddingAFileToTheWhitelistWorks - */ - public function testAddingADirectoryToTheWhitelistWorks(): void - { - $this->filter->addDirectoryToWhitelist(TEST_FILES_PATH); - - $whitelist = $this->filter->getWhitelist(); - \sort($whitelist); - - $this->assertEquals($this->files, $whitelist); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::addFilesToWhitelist - * @covers SebastianBergmann\CodeCoverage\Filter::getWhitelist - */ - public function testAddingFilesToTheWhitelistWorks(): void - { - $facade = new FileIteratorFacade; - - $files = $facade->getFilesAsArray( - TEST_FILES_PATH, - $suffixes = '.php' - ); - - $this->filter->addFilesToWhitelist($files); - - $whitelist = $this->filter->getWhitelist(); - \sort($whitelist); - - $this->assertEquals($this->files, $whitelist); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::removeDirectoryFromWhitelist - * @covers SebastianBergmann\CodeCoverage\Filter::getWhitelist - * @depends testAddingADirectoryToTheWhitelistWorks - */ - public function testRemovingADirectoryFromTheWhitelistWorks(): void - { - $this->filter->addDirectoryToWhitelist(TEST_FILES_PATH); - $this->filter->removeDirectoryFromWhitelist(TEST_FILES_PATH); - - $this->assertEquals([], $this->filter->getWhitelist()); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::isFile - */ - public function testIsFile(): void - { - $this->assertFalse($this->filter->isFile('vfs://root/a/path')); - $this->assertFalse($this->filter->isFile('xdebug://debug-eval')); - $this->assertFalse($this->filter->isFile('eval()\'d code')); - $this->assertFalse($this->filter->isFile('runtime-created function')); - $this->assertFalse($this->filter->isFile('assert code')); - $this->assertFalse($this->filter->isFile('regexp code')); - $this->assertTrue($this->filter->isFile(__FILE__)); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::isFiltered - */ - public function testWhitelistedFileIsNotFiltered(): void - { - $this->filter->addFileToWhitelist($this->files[0]); - $this->assertFalse($this->filter->isFiltered($this->files[0])); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::isFiltered - */ - public function testNotWhitelistedFileIsFiltered(): void - { - $this->filter->addFileToWhitelist($this->files[0]); - $this->assertTrue($this->filter->isFiltered($this->files[1])); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::isFiltered - * @covers SebastianBergmann\CodeCoverage\Filter::isFile - */ - public function testNonFilesAreFiltered(): void - { - $this->assertTrue($this->filter->isFiltered('vfs://root/a/path')); - $this->assertTrue($this->filter->isFiltered('xdebug://debug-eval')); - $this->assertTrue($this->filter->isFiltered('eval()\'d code')); - $this->assertTrue($this->filter->isFiltered('runtime-created function')); - $this->assertTrue($this->filter->isFiltered('assert code')); - $this->assertTrue($this->filter->isFiltered('regexp code')); - } - - /** - * @covers SebastianBergmann\CodeCoverage\Filter::addFileToWhitelist - * @covers SebastianBergmann\CodeCoverage\Filter::getWhitelist - * - * @ticket https://github.com/sebastianbergmann/php-code-coverage/issues/664 - */ - public function testTryingToAddFileThatDoesNotExistDoesNotChangeFilter(): void - { - $filter = new Filter; - - $filter->addFileToWhitelist('does_not_exist'); - - $this->assertEmpty($filter->getWhitelistedFiles()); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/HTMLTest.php b/vendor/phpunit/php-code-coverage/tests/tests/HTMLTest.php deleted file mode 100644 index 0ddd85d..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/HTMLTest.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use SebastianBergmann\CodeCoverage\TestCase; - -class HTMLTest extends TestCase -{ - private static $TEST_REPORT_PATH_SOURCE; - - public static function setUpBeforeClass(): void - { - parent::setUpBeforeClass(); - - self::$TEST_REPORT_PATH_SOURCE = TEST_FILES_PATH . 'Report' . \DIRECTORY_SEPARATOR . 'HTML'; - } - - protected function tearDown(): void - { - parent::tearDown(); - - $tmpFilesIterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator(self::$TEST_TMP_PATH, \RecursiveDirectoryIterator::SKIP_DOTS), - \RecursiveIteratorIterator::CHILD_FIRST - ); - - foreach ($tmpFilesIterator as $path => $fileInfo) { - /* @var \SplFileInfo $fileInfo */ - $pathname = $fileInfo->getPathname(); - $fileInfo->isDir() ? \rmdir($pathname) : \unlink($pathname); - } - } - - public function testForBankAccountTest(): void - { - $expectedFilesPath = self::$TEST_REPORT_PATH_SOURCE . \DIRECTORY_SEPARATOR . 'CoverageForBankAccount'; - - $report = new Facade; - $report->process($this->getCoverageForBankAccount(), self::$TEST_TMP_PATH); - - $this->assertFilesEquals($expectedFilesPath, self::$TEST_TMP_PATH); - } - - public function testForFileWithIgnoredLines(): void - { - $expectedFilesPath = self::$TEST_REPORT_PATH_SOURCE . \DIRECTORY_SEPARATOR . 'CoverageForFileWithIgnoredLines'; - - $report = new Facade; - $report->process($this->getCoverageForFileWithIgnoredLines(), self::$TEST_TMP_PATH); - - $this->assertFilesEquals($expectedFilesPath, self::$TEST_TMP_PATH); - } - - public function testForClassWithAnonymousFunction(): void - { - $expectedFilesPath = - self::$TEST_REPORT_PATH_SOURCE . \DIRECTORY_SEPARATOR . 'CoverageForClassWithAnonymousFunction'; - - $report = new Facade; - $report->process($this->getCoverageForClassWithAnonymousFunction(), self::$TEST_TMP_PATH); - - $this->assertFilesEquals($expectedFilesPath, self::$TEST_TMP_PATH); - } - - /** - * @param string $expectedFilesPath - * @param string $actualFilesPath - */ - private function assertFilesEquals($expectedFilesPath, $actualFilesPath): void - { - $expectedFilesIterator = new \FilesystemIterator($expectedFilesPath); - $actualFilesIterator = new \RegexIterator(new \FilesystemIterator($actualFilesPath), '/.html/'); - - $this->assertEquals( - \iterator_count($expectedFilesIterator), - \iterator_count($actualFilesIterator), - 'Generated files and expected files not match' - ); - - foreach ($expectedFilesIterator as $path => $fileInfo) { - /* @var \SplFileInfo $fileInfo */ - $filename = $fileInfo->getFilename(); - - $actualFile = $actualFilesPath . \DIRECTORY_SEPARATOR . $filename; - - $this->assertFileExists($actualFile); - - $this->assertStringMatchesFormatFile( - $fileInfo->getPathname(), - \str_replace(\PHP_EOL, "\n", \file_get_contents($actualFile)), - "${filename} not match" - ); - } - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/TextTest.php b/vendor/phpunit/php-code-coverage/tests/tests/TextTest.php deleted file mode 100644 index 501226f..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/TextTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\TestCase; - -/** - * @covers SebastianBergmann\CodeCoverage\Report\Text - */ -class TextTest extends TestCase -{ - public function testTextForBankAccountTest(): void - { - $text = new Text(50, 90, false, false); - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'BankAccount-text.txt', - \str_replace(\PHP_EOL, "\n", $text->process($this->getCoverageForBankAccount())) - ); - } - - public function testTextForFileWithIgnoredLines(): void - { - $text = new Text(50, 90, false, false); - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'ignored-lines-text.txt', - \str_replace(\PHP_EOL, "\n", $text->process($this->getCoverageForFileWithIgnoredLines())) - ); - } - - public function testTextForClassWithAnonymousFunction(): void - { - $text = new Text(50, 90, false, false); - - $this->assertStringMatchesFormatFile( - TEST_FILES_PATH . 'class-with-anonymous-function-text.txt', - \str_replace(\PHP_EOL, "\n", $text->process($this->getCoverageForClassWithAnonymousFunction())) - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/UtilTest.php b/vendor/phpunit/php-code-coverage/tests/tests/UtilTest.php deleted file mode 100644 index 2ebfb61..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/UtilTest.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use PHPUnit\Framework\TestCase; - -/** - * @covers SebastianBergmann\CodeCoverage\Util - */ -class UtilTest extends TestCase -{ - public function testPercent(): void - { - $this->assertEquals(100, Util::percent(100, 0)); - $this->assertEquals(100, Util::percent(100, 100)); - $this->assertEquals( - '100.00%', - Util::percent(100, 100, true) - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/tests/XmlTest.php b/vendor/phpunit/php-code-coverage/tests/tests/XmlTest.php deleted file mode 100644 index 13045a7..0000000 --- a/vendor/phpunit/php-code-coverage/tests/tests/XmlTest.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use SebastianBergmann\CodeCoverage\TestCase; - -class XmlTest extends TestCase -{ - private static $TEST_REPORT_PATH_SOURCE; - - public static function setUpBeforeClass(): void - { - parent::setUpBeforeClass(); - - self::$TEST_REPORT_PATH_SOURCE = TEST_FILES_PATH . 'Report' . \DIRECTORY_SEPARATOR . 'XML'; - } - - protected function tearDown(): void - { - parent::tearDown(); - - $tmpFilesIterator = new \FilesystemIterator(self::$TEST_TMP_PATH); - - foreach ($tmpFilesIterator as $path => $fileInfo) { - /* @var \SplFileInfo $fileInfo */ - \unlink($fileInfo->getPathname()); - } - } - - public function testForBankAccountTest(): void - { - $expectedFilesPath = self::$TEST_REPORT_PATH_SOURCE . \DIRECTORY_SEPARATOR . 'CoverageForBankAccount'; - - $xml = new Facade('1.0.0'); - $xml->process($this->getCoverageForBankAccount(), self::$TEST_TMP_PATH); - - $this->assertFilesEquals($expectedFilesPath, self::$TEST_TMP_PATH); - } - - public function testForFileWithIgnoredLines(): void - { - $expectedFilesPath = self::$TEST_REPORT_PATH_SOURCE . \DIRECTORY_SEPARATOR . 'CoverageForFileWithIgnoredLines'; - - $xml = new Facade('1.0.0'); - $xml->process($this->getCoverageForFileWithIgnoredLines(), self::$TEST_TMP_PATH); - - $this->assertFilesEquals($expectedFilesPath, self::$TEST_TMP_PATH); - } - - public function testForClassWithAnonymousFunction(): void - { - $expectedFilesPath = self::$TEST_REPORT_PATH_SOURCE . \DIRECTORY_SEPARATOR . 'CoverageForClassWithAnonymousFunction'; - - $xml = new Facade('1.0.0'); - $xml->process($this->getCoverageForClassWithAnonymousFunction(), self::$TEST_TMP_PATH); - - $this->assertFilesEquals($expectedFilesPath, self::$TEST_TMP_PATH); - } - - /** - * @param string $expectedFilesPath - * @param string $actualFilesPath - */ - private function assertFilesEquals($expectedFilesPath, $actualFilesPath): void - { - $expectedFilesIterator = new \FilesystemIterator($expectedFilesPath); - $actualFilesIterator = new \FilesystemIterator($actualFilesPath); - - $this->assertEquals( - \iterator_count($expectedFilesIterator), - \iterator_count($actualFilesIterator), - 'Generated files and expected files not match' - ); - - foreach ($expectedFilesIterator as $path => $fileInfo) { - /* @var \SplFileInfo $fileInfo */ - $filename = $fileInfo->getFilename(); - - $actualFile = $actualFilesPath . \DIRECTORY_SEPARATOR . $filename; - - $this->assertFileExists($actualFile); - - $this->assertStringMatchesFormatFile( - $fileInfo->getPathname(), - \file_get_contents($actualFile), - "${filename} not match" - ); - } - } -} diff --git a/vendor/phpunit/php-file-iterator/.gitattributes b/vendor/phpunit/php-file-iterator/.gitattributes deleted file mode 100644 index 461090b..0000000 --- a/vendor/phpunit/php-file-iterator/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.php diff=php diff --git a/vendor/phpunit/php-file-iterator/.github/stale.yml b/vendor/phpunit/php-file-iterator/.github/stale.yml deleted file mode 100644 index 4eadca3..0000000 --- a/vendor/phpunit/php-file-iterator/.github/stale.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 60 - -# Number of days of inactivity before a stale Issue or Pull Request is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - enhancement - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions. - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: issues - diff --git a/vendor/phpunit/php-file-iterator/.gitignore b/vendor/phpunit/php-file-iterator/.gitignore deleted file mode 100644 index 5ad7a64..0000000 --- a/vendor/phpunit/php-file-iterator/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/.idea -/vendor/ -/.php_cs -/.php_cs.cache -/composer.lock diff --git a/vendor/phpunit/php-file-iterator/.php_cs.dist b/vendor/phpunit/php-file-iterator/.php_cs.dist deleted file mode 100644 index efc649f..0000000 --- a/vendor/phpunit/php-file-iterator/.php_cs.dist +++ /dev/null @@ -1,168 +0,0 @@ - - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. -EOF; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules( - [ - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ - 'operators' => [ - '=' => 'align', - '=>' => 'align', - ], - ], - 'blank_line_after_namespace' => true, - 'blank_line_before_statement' => [ - 'statements' => [ - 'break', - 'continue', - 'declare', - 'do', - 'for', - 'foreach', - 'if', - 'include', - 'include_once', - 'require', - 'require_once', - 'return', - 'switch', - 'throw', - 'try', - 'while', - 'yield', - ], - ], - 'braces' => true, - 'cast_spaces' => true, - 'class_attributes_separation' => ['elements' => ['method']], - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'declare_equal_normalize' => ['space' => 'none'], - 'dir_constant' => true, - 'elseif' => true, - 'encoding' => true, - 'full_opening_tag' => true, - 'function_declaration' => true, - 'header_comment' => ['header' => $header, 'separate' => 'none'], - 'indentation_type' => true, - 'line_ending' => true, - 'list_syntax' => ['syntax' => 'short'], - 'lowercase_cast' => true, - 'lowercase_constants' => true, - 'lowercase_keywords' => true, - 'magic_constant_casing' => true, - 'method_argument_space' => ['ensure_fully_multiline' => true], - 'modernize_types_casting' => true, - 'native_function_casing' => true, - 'native_function_invocation' => true, - 'no_alias_functions' => true, - 'no_blank_lines_after_class_opening' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_closing_tag' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_homoglyph_names' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'print'], - 'no_null_property_initialization' => true, - 'no_short_bool_cast' => true, - 'no_short_echo_tag' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_superfluous_elseif' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_trailing_whitespace' => true, - 'no_trailing_whitespace_in_comment' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unneeded_curly_braces' => true, - 'no_unneeded_final_method' => true, - 'no_unreachable_default_argument_value' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'non_printable_character' => true, - 'normalize_index_brace' => true, - 'object_operator_without_whitespace' => true, - 'ordered_class_elements' => [ - 'order' => [ - 'use_trait', - 'constant_public', - 'constant_protected', - 'constant_private', - 'property_public_static', - 'property_protected_static', - 'property_private_static', - 'property_public', - 'property_protected', - 'property_private', - 'method_public_static', - 'construct', - 'destruct', - 'magic', - 'phpunit', - 'method_public', - 'method_protected', - 'method_private', - 'method_protected_static', - 'method_private_static', - ], - ], - 'ordered_imports' => true, - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_align' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_types_order' => true, - 'phpdoc_var_without_name' => true, - 'pow_to_exponentiation' => true, - 'protected_to_private' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'self_accessor' => true, - 'short_scalar_cast' => true, - 'simplified_null_return' => true, - 'single_blank_line_at_eof' => true, - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'single_quote' => true, - 'standardize_not_equals' => true, - 'ternary_to_null_coalescing' => true, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, - 'visibility_required' => true, - 'void_return' => true, - 'whitespace_after_comma_in_array' => true, - ] - ) - ->setFinder( - PhpCsFixer\Finder::create() - ->files() - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests') - ->notName('*.phpt') - ); diff --git a/vendor/phpunit/php-file-iterator/.travis.yml b/vendor/phpunit/php-file-iterator/.travis.yml deleted file mode 100644 index 16b399c..0000000 --- a/vendor/phpunit/php-file-iterator/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: php - -sudo: false - -php: - - 7.1 - - 7.2 - - master - -env: - matrix: - - DEPENDENCIES="high" - - DEPENDENCIES="low" - global: - - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest" - -before_install: - - composer self-update - - composer clear-cache - -install: - - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS; fi - - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - bash <(curl -s https://codecov.io/bash) - -notifications: - email: false diff --git a/vendor/phpunit/php-file-iterator/ChangeLog.md b/vendor/phpunit/php-file-iterator/ChangeLog.md deleted file mode 100644 index f4a0801..0000000 --- a/vendor/phpunit/php-file-iterator/ChangeLog.md +++ /dev/null @@ -1,70 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). - -## [2.0.2] - 2018-09-13 - -### Fixed - -* Fixed [#48](https://github.com/sebastianbergmann/php-file-iterator/issues/48): Excluding an array that contains false ends up excluding the current working directory - -## [2.0.1] - 2018-06-11 - -### Fixed - -* Fixed [#46](https://github.com/sebastianbergmann/php-file-iterator/issues/46): Regression with hidden parent directory - -## [2.0.0] - 2018-05-28 - -### Fixed - -* Fixed [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30): Exclude is not considered if it is a parent of the base path - -### Changed - -* This component now uses namespaces - -### Removed - -* This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0 - -## [1.4.5] - 2017-11-27 - -### Fixed - -* Fixed [#37](https://github.com/sebastianbergmann/php-file-iterator/issues/37): Regression caused by fix for [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30) - -## [1.4.4] - 2017-11-27 - -### Fixed - -* Fixed [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30): Exclude is not considered if it is a parent of the base path - -## [1.4.3] - 2017-11-25 - -### Fixed - -* Fixed [#34](https://github.com/sebastianbergmann/php-file-iterator/issues/34): Factory should use canonical directory names - -## [1.4.2] - 2016-11-26 - -No changes - -## [1.4.1] - 2015-07-26 - -No changes - -## 1.4.0 - 2015-04-02 - -### Added - -* [Added support for wildcards (glob) in exclude](https://github.com/sebastianbergmann/php-file-iterator/pull/23) - -[2.0.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4...master -[1.4.5]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.4...1.4.5 -[1.4.4]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.3...1.4.4 -[1.4.3]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.2...1.4.3 -[1.4.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.1...1.4.2 -[1.4.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.0...1.4.1 diff --git a/vendor/phpunit/php-file-iterator/LICENSE b/vendor/phpunit/php-file-iterator/LICENSE deleted file mode 100644 index 87c3b51..0000000 --- a/vendor/phpunit/php-file-iterator/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -php-file-iterator - -Copyright (c) 2009-2018, Sebastian Bergmann . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-file-iterator/README.md b/vendor/phpunit/php-file-iterator/README.md deleted file mode 100644 index 3cbfdaa..0000000 --- a/vendor/phpunit/php-file-iterator/README.md +++ /dev/null @@ -1,14 +0,0 @@ -[![Build Status](https://travis-ci.org/sebastianbergmann/php-file-iterator.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-file-iterator) - -# php-file-iterator - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phpunit/php-file-iterator - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phpunit/php-file-iterator - diff --git a/vendor/phpunit/php-file-iterator/composer.json b/vendor/phpunit/php-file-iterator/composer.json deleted file mode 100644 index 002e511..0000000 --- a/vendor/phpunit/php-file-iterator/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "phpunit/php-file-iterator", - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "type": "library", - "keywords": [ - "iterator", - "filesystem" - ], - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - } -} diff --git a/vendor/phpunit/php-file-iterator/phpunit.xml b/vendor/phpunit/php-file-iterator/phpunit.xml deleted file mode 100644 index 3e12be4..0000000 --- a/vendor/phpunit/php-file-iterator/phpunit.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tests - - - - - - src - - - diff --git a/vendor/phpunit/php-file-iterator/src/Facade.php b/vendor/phpunit/php-file-iterator/src/Facade.php deleted file mode 100644 index 2456e16..0000000 --- a/vendor/phpunit/php-file-iterator/src/Facade.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace SebastianBergmann\FileIterator; - -class Facade -{ - /** - * @param array|string $paths - * @param array|string $suffixes - * @param array|string $prefixes - * @param array $exclude - * @param bool $commonPath - * - * @return array - */ - public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = [], bool $commonPath = false): array - { - if (\is_string($paths)) { - $paths = [$paths]; - } - - $factory = new Factory; - - $iterator = $factory->getFileIterator($paths, $suffixes, $prefixes, $exclude); - - $files = []; - - foreach ($iterator as $file) { - $file = $file->getRealPath(); - - if ($file) { - $files[] = $file; - } - } - - foreach ($paths as $path) { - if (\is_file($path)) { - $files[] = \realpath($path); - } - } - - $files = \array_unique($files); - \sort($files); - - if ($commonPath) { - return [ - 'commonPath' => $this->getCommonPath($files), - 'files' => $files - ]; - } - - return $files; - } - - protected function getCommonPath(array $files): string - { - $count = \count($files); - - if ($count === 0) { - return ''; - } - - if ($count === 1) { - return \dirname($files[0]) . DIRECTORY_SEPARATOR; - } - - $_files = []; - - foreach ($files as $file) { - $_files[] = $_fileParts = \explode(DIRECTORY_SEPARATOR, $file); - - if (empty($_fileParts[0])) { - $_fileParts[0] = DIRECTORY_SEPARATOR; - } - } - - $common = ''; - $done = false; - $j = 0; - $count--; - - while (!$done) { - for ($i = 0; $i < $count; $i++) { - if ($_files[$i][$j] != $_files[$i + 1][$j]) { - $done = true; - - break; - } - } - - if (!$done) { - $common .= $_files[0][$j]; - - if ($j > 0) { - $common .= DIRECTORY_SEPARATOR; - } - } - - $j++; - } - - return DIRECTORY_SEPARATOR . $common; - } -} diff --git a/vendor/phpunit/php-file-iterator/src/Factory.php b/vendor/phpunit/php-file-iterator/src/Factory.php deleted file mode 100644 index 02e2f38..0000000 --- a/vendor/phpunit/php-file-iterator/src/Factory.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace SebastianBergmann\FileIterator; - -class Factory -{ - /** - * @param array|string $paths - * @param array|string $suffixes - * @param array|string $prefixes - * @param array $exclude - * - * @return \AppendIterator - */ - public function getFileIterator($paths, $suffixes = '', $prefixes = '', array $exclude = []): \AppendIterator - { - if (\is_string($paths)) { - $paths = [$paths]; - } - - $paths = $this->getPathsAfterResolvingWildcards($paths); - $exclude = $this->getPathsAfterResolvingWildcards($exclude); - - if (\is_string($prefixes)) { - if ($prefixes !== '') { - $prefixes = [$prefixes]; - } else { - $prefixes = []; - } - } - - if (\is_string($suffixes)) { - if ($suffixes !== '') { - $suffixes = [$suffixes]; - } else { - $suffixes = []; - } - } - - $iterator = new \AppendIterator; - - foreach ($paths as $path) { - if (\is_dir($path)) { - $iterator->append( - new Iterator( - $path, - new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS | \RecursiveDirectoryIterator::SKIP_DOTS) - ), - $suffixes, - $prefixes, - $exclude - ) - ); - } - } - - return $iterator; - } - - protected function getPathsAfterResolvingWildcards(array $paths): array - { - $_paths = []; - - foreach ($paths as $path) { - if ($locals = \glob($path, GLOB_ONLYDIR)) { - $_paths = \array_merge($_paths, \array_map('\realpath', $locals)); - } else { - $_paths[] = \realpath($path); - } - } - - return \array_filter($_paths); - } -} diff --git a/vendor/phpunit/php-file-iterator/src/Iterator.php b/vendor/phpunit/php-file-iterator/src/Iterator.php deleted file mode 100644 index 84882d4..0000000 --- a/vendor/phpunit/php-file-iterator/src/Iterator.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace SebastianBergmann\FileIterator; - -class Iterator extends \FilterIterator -{ - const PREFIX = 0; - const SUFFIX = 1; - - /** - * @var string - */ - private $basePath; - - /** - * @var array - */ - private $suffixes = []; - - /** - * @var array - */ - private $prefixes = []; - - /** - * @var array - */ - private $exclude = []; - - /** - * @param string $basePath - * @param \Iterator $iterator - * @param array $suffixes - * @param array $prefixes - * @param array $exclude - */ - public function __construct(string $basePath, \Iterator $iterator, array $suffixes = [], array $prefixes = [], array $exclude = []) - { - $this->basePath = \realpath($basePath); - $this->prefixes = $prefixes; - $this->suffixes = $suffixes; - $this->exclude = \array_filter(\array_map('realpath', $exclude)); - - parent::__construct($iterator); - } - - public function accept() - { - $current = $this->getInnerIterator()->current(); - $filename = $current->getFilename(); - $realPath = $current->getRealPath(); - - return $this->acceptPath($realPath) && - $this->acceptPrefix($filename) && - $this->acceptSuffix($filename); - } - - private function acceptPath(string $path): bool - { - // Filter files in hidden directories by checking path that is relative to the base path. - if (\preg_match('=/\.[^/]*/=', \str_replace($this->basePath, '', $path))) { - return false; - } - - foreach ($this->exclude as $exclude) { - if (\strpos($path, $exclude) === 0) { - return false; - } - } - - return true; - } - - private function acceptPrefix(string $filename): bool - { - return $this->acceptSubString($filename, $this->prefixes, self::PREFIX); - } - - private function acceptSuffix(string $filename): bool - { - return $this->acceptSubString($filename, $this->suffixes, self::SUFFIX); - } - - private function acceptSubString(string $filename, array $subStrings, int $type): bool - { - if (empty($subStrings)) { - return true; - } - - $matched = false; - - foreach ($subStrings as $string) { - if (($type === self::PREFIX && \strpos($filename, $string) === 0) || - ($type === self::SUFFIX && - \substr($filename, -1 * \strlen($string)) === $string)) { - $matched = true; - - break; - } - } - - return $matched; - } -} diff --git a/vendor/phpunit/php-file-iterator/tests/FactoryTest.php b/vendor/phpunit/php-file-iterator/tests/FactoryTest.php deleted file mode 100644 index ba4bdbf..0000000 --- a/vendor/phpunit/php-file-iterator/tests/FactoryTest.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. - */ -namespace SebastianBergmann\FileIterator; - -use PHPUnit\Framework\TestCase; - -/** - * @covers \SebastianBergmann\FileIterator\Factory - */ -class FactoryTest extends TestCase -{ - /** - * @var string - */ - private $root; - - /** - * @var Factory - */ - private $factory; - - protected function setUp(): void - { - $this->root = __DIR__; - $this->factory = new Factory; - } - - public function testFindFilesInTestDirectory(): void - { - $iterator = $this->factory->getFileIterator($this->root, 'Test.php'); - $files = \iterator_to_array($iterator); - - $this->assertGreaterThanOrEqual(1, \count($files)); - } - - public function testFindFilesWithExcludedNonExistingSubdirectory(): void - { - $iterator = $this->factory->getFileIterator($this->root, 'Test.php', '', [$this->root . '/nonExistingDir']); - $files = \iterator_to_array($iterator); - - $this->assertGreaterThanOrEqual(1, \count($files)); - } -} diff --git a/vendor/phpunit/php-text-template/.gitattributes b/vendor/phpunit/php-text-template/.gitattributes deleted file mode 100644 index 461090b..0000000 --- a/vendor/phpunit/php-text-template/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.php diff=php diff --git a/vendor/phpunit/php-text-template/.gitignore b/vendor/phpunit/php-text-template/.gitignore deleted file mode 100644 index c599212..0000000 --- a/vendor/phpunit/php-text-template/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/composer.lock -/composer.phar -/.idea -/vendor - diff --git a/vendor/phpunit/php-text-template/LICENSE b/vendor/phpunit/php-text-template/LICENSE deleted file mode 100644 index 9f9a32d..0000000 --- a/vendor/phpunit/php-text-template/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Text_Template - -Copyright (c) 2009-2015, Sebastian Bergmann . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-text-template/README.md b/vendor/phpunit/php-text-template/README.md deleted file mode 100644 index ec8f593..0000000 --- a/vendor/phpunit/php-text-template/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Text_Template - -## Installation - -## Installation - -To add this package as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-text-template` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Text_Template: - - { - "require": { - "phpunit/php-text-template": "~1.2" - } - } - diff --git a/vendor/phpunit/php-text-template/composer.json b/vendor/phpunit/php-text-template/composer.json deleted file mode 100644 index a5779c8..0000000 --- a/vendor/phpunit/php-text-template/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "phpunit/php-text-template", - "description": "Simple template engine.", - "type": "library", - "keywords": [ - "template" - ], - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues" - }, - "require": { - "php": ">=5.3.3" - }, - "autoload": { - "classmap": [ - "src/" - ] - } -} - diff --git a/vendor/phpunit/php-text-template/src/Template.php b/vendor/phpunit/php-text-template/src/Template.php deleted file mode 100644 index 9eb39ad..0000000 --- a/vendor/phpunit/php-text-template/src/Template.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * A simple template engine. - * - * @since Class available since Release 1.0.0 - */ -class Text_Template -{ - /** - * @var string - */ - protected $template = ''; - - /** - * @var string - */ - protected $openDelimiter = '{'; - - /** - * @var string - */ - protected $closeDelimiter = '}'; - - /** - * @var array - */ - protected $values = array(); - - /** - * Constructor. - * - * @param string $file - * @throws InvalidArgumentException - */ - public function __construct($file = '', $openDelimiter = '{', $closeDelimiter = '}') - { - $this->setFile($file); - $this->openDelimiter = $openDelimiter; - $this->closeDelimiter = $closeDelimiter; - } - - /** - * Sets the template file. - * - * @param string $file - * @throws InvalidArgumentException - */ - public function setFile($file) - { - $distFile = $file . '.dist'; - - if (file_exists($file)) { - $this->template = file_get_contents($file); - } - - else if (file_exists($distFile)) { - $this->template = file_get_contents($distFile); - } - - else { - throw new InvalidArgumentException( - 'Template file could not be loaded.' - ); - } - } - - /** - * Sets one or more template variables. - * - * @param array $values - * @param bool $merge - */ - public function setVar(array $values, $merge = TRUE) - { - if (!$merge || empty($this->values)) { - $this->values = $values; - } else { - $this->values = array_merge($this->values, $values); - } - } - - /** - * Renders the template and returns the result. - * - * @return string - */ - public function render() - { - $keys = array(); - - foreach ($this->values as $key => $value) { - $keys[] = $this->openDelimiter . $key . $this->closeDelimiter; - } - - return str_replace($keys, $this->values, $this->template); - } - - /** - * Renders the template and writes the result to a file. - * - * @param string $target - */ - public function renderTo($target) - { - $fp = @fopen($target, 'wt'); - - if ($fp) { - fwrite($fp, $this->render()); - fclose($fp); - } else { - $error = error_get_last(); - - throw new RuntimeException( - sprintf( - 'Could not write to %s: %s', - $target, - substr( - $error['message'], - strpos($error['message'], ':') + 2 - ) - ) - ); - } - } -} - diff --git a/vendor/phpunit/php-timer/.gitattributes b/vendor/phpunit/php-timer/.gitattributes deleted file mode 100644 index 461090b..0000000 --- a/vendor/phpunit/php-timer/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.php diff=php diff --git a/vendor/phpunit/php-timer/.github/FUNDING.yml b/vendor/phpunit/php-timer/.github/FUNDING.yml deleted file mode 100644 index b19ea81..0000000 --- a/vendor/phpunit/php-timer/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -patreon: s_bergmann diff --git a/vendor/phpunit/php-timer/.github/stale.yml b/vendor/phpunit/php-timer/.github/stale.yml deleted file mode 100644 index 4eadca3..0000000 --- a/vendor/phpunit/php-timer/.github/stale.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 60 - -# Number of days of inactivity before a stale Issue or Pull Request is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - enhancement - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions. - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: issues - diff --git a/vendor/phpunit/php-timer/.gitignore b/vendor/phpunit/php-timer/.gitignore deleted file mode 100644 index 953d2a2..0000000 --- a/vendor/phpunit/php-timer/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/.idea -/.php_cs.cache -/vendor -/composer.lock - diff --git a/vendor/phpunit/php-timer/.php_cs.dist b/vendor/phpunit/php-timer/.php_cs.dist deleted file mode 100644 index c442264..0000000 --- a/vendor/phpunit/php-timer/.php_cs.dist +++ /dev/null @@ -1,197 +0,0 @@ - - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. -EOF; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules( - [ - 'align_multiline_comment' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ - 'operators' => [ - '=' => 'align', - '=>' => 'align', - ], - ], - 'blank_line_after_namespace' => true, - 'blank_line_before_statement' => [ - 'statements' => [ - 'break', - 'continue', - 'declare', - 'do', - 'for', - 'foreach', - 'if', - 'include', - 'include_once', - 'require', - 'require_once', - 'return', - 'switch', - 'throw', - 'try', - 'while', - 'yield', - ], - ], - 'braces' => true, - 'cast_spaces' => true, - 'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], - 'combine_consecutive_issets' => true, - 'combine_consecutive_unsets' => true, - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'declare_equal_normalize' => ['space' => 'none'], - 'declare_strict_types' => true, - 'dir_constant' => true, - 'elseif' => true, - 'encoding' => true, - 'full_opening_tag' => true, - 'function_declaration' => true, - 'header_comment' => ['header' => $header, 'separate' => 'none'], - 'indentation_type' => true, - 'is_null' => true, - 'line_ending' => true, - 'list_syntax' => ['syntax' => 'short'], - 'logical_operators' => true, - 'lowercase_cast' => true, - 'lowercase_constants' => true, - 'lowercase_keywords' => true, - 'lowercase_static_reference' => true, - 'magic_constant_casing' => true, - 'method_argument_space' => ['ensure_fully_multiline' => true], - 'modernize_types_casting' => true, - 'multiline_comment_opening_closing' => true, - 'multiline_whitespace_before_semicolons' => true, - 'native_constant_invocation' => true, - 'native_function_casing' => true, - 'native_function_invocation' => true, - 'new_with_braces' => false, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_class_opening' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_blank_lines_before_namespace' => true, - 'no_closing_tag' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_homoglyph_names' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'print'], - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_null_property_initialization' => true, - 'no_php4_constructor' => true, - 'no_short_bool_cast' => true, - 'no_short_echo_tag' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_trailing_whitespace' => true, - 'no_trailing_whitespace_in_comment' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unneeded_curly_braces' => true, - 'no_unneeded_final_method' => true, - 'no_unreachable_default_argument_value' => true, - 'no_unset_on_property' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'non_printable_character' => true, - 'normalize_index_brace' => true, - 'object_operator_without_whitespace' => true, - 'ordered_class_elements' => [ - 'order' => [ - 'use_trait', - 'constant_public', - 'constant_protected', - 'constant_private', - 'property_public_static', - 'property_protected_static', - 'property_private_static', - 'property_public', - 'property_protected', - 'property_private', - 'method_public_static', - 'construct', - 'destruct', - 'magic', - 'phpunit', - 'method_public', - 'method_protected', - 'method_private', - 'method_protected_static', - 'method_private_static', - ], - ], - 'ordered_imports' => true, - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_align' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_types' => ['groups' => ['simple', 'meta']], - 'phpdoc_types_order' => true, - 'phpdoc_var_without_name' => true, - 'pow_to_exponentiation' => true, - 'protected_to_private' => true, - 'return_assignment' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'self_accessor' => true, - 'semicolon_after_instruction' => true, - 'set_type_to_cast' => true, - 'short_scalar_cast' => true, - 'simplified_null_return' => true, - 'single_blank_line_at_eof' => true, - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'single_quote' => true, - 'standardize_not_equals' => true, - 'ternary_to_null_coalescing' => true, - 'trailing_comma_in_multiline_array' => true, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, - 'visibility_required' => [ - 'elements' => [ - 'const', - 'method', - 'property', - ], - ], - 'void_return' => true, - 'whitespace_after_comma_in_array' => true, - ] - ) - ->setFinder( - PhpCsFixer\Finder::create() - ->files() - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests') - ); diff --git a/vendor/phpunit/php-timer/.travis.yml b/vendor/phpunit/php-timer/.travis.yml deleted file mode 100644 index a217292..0000000 --- a/vendor/phpunit/php-timer/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: php - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4snapshot - -before_install: - - composer self-update - - composer clear-cache - -install: - - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - bash <(curl -s https://codecov.io/bash) - -notifications: - email: false diff --git a/vendor/phpunit/php-timer/ChangeLog.md b/vendor/phpunit/php-timer/ChangeLog.md deleted file mode 100644 index 6ebc9fe..0000000 --- a/vendor/phpunit/php-timer/ChangeLog.md +++ /dev/null @@ -1,36 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [2.1.2] - 2019-06-07 - -### Fixed - -* Fixed [#21](https://github.com/sebastianbergmann/php-timer/pull/3352): Formatting of memory consumption does not work on 32bit systems - -## [2.1.1] - 2019-02-20 - -### Changed - -* Improved formatting of memory consumption for `resourceUsage()` - -## [2.1.0] - 2019-02-20 - -### Changed - -* Improved formatting of memory consumption for `resourceUsage()` - -## [2.0.0] - 2018-02-01 - -### Changed - -* This component now uses namespaces - -### Removed - -* This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0 - -[2.1.2]: https://github.com/sebastianbergmann/diff/compare/2.1.1...2.1.2 -[2.1.1]: https://github.com/sebastianbergmann/diff/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/sebastianbergmann/diff/compare/2.0.0...2.1.0 -[2.0.0]: https://github.com/sebastianbergmann/diff/compare/1.0.9...2.0.0 diff --git a/vendor/phpunit/php-timer/LICENSE b/vendor/phpunit/php-timer/LICENSE deleted file mode 100644 index a4eb944..0000000 --- a/vendor/phpunit/php-timer/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -phpunit/php-timer - -Copyright (c) 2010-2019, Sebastian Bergmann . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-timer/README.md b/vendor/phpunit/php-timer/README.md deleted file mode 100644 index 61725c2..0000000 --- a/vendor/phpunit/php-timer/README.md +++ /dev/null @@ -1,49 +0,0 @@ -[![Build Status](https://travis-ci.org/sebastianbergmann/php-timer.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-timer) - -# phpunit/php-timer - -Utility class for timing things, factored out of PHPUnit into a stand-alone component. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phpunit/php-timer - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phpunit/php-timer - -## Usage - -### Basic Timing - -```php -use SebastianBergmann\Timer\Timer; - -Timer::start(); - -// ... - -$time = Timer::stop(); -var_dump($time); - -print Timer::secondsToTimeString($time); -``` - -The code above yields the output below: - - double(1.0967254638672E-5) - 0 ms - -### Resource Consumption Since PHP Startup - -```php -use SebastianBergmann\Timer\Timer; - -print Timer::resourceUsage(); -``` - -The code above yields the output below: - - Time: 0 ms, Memory: 0.50MB diff --git a/vendor/phpunit/php-timer/build.xml b/vendor/phpunit/php-timer/build.xml deleted file mode 100644 index b8d3256..0000000 --- a/vendor/phpunit/php-timer/build.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-timer/composer.json b/vendor/phpunit/php-timer/composer.json deleted file mode 100644 index d400ad7..0000000 --- a/vendor/phpunit/php-timer/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "phpunit/php-timer", - "description": "Utility class for timing", - "type": "library", - "keywords": [ - "timer" - ], - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues" - }, - "prefer-stable": true, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "config": { - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - } -} - diff --git a/vendor/phpunit/php-timer/phpunit.xml b/vendor/phpunit/php-timer/phpunit.xml deleted file mode 100644 index 28a95de..0000000 --- a/vendor/phpunit/php-timer/phpunit.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - tests - - - - - src - - - diff --git a/vendor/phpunit/php-timer/src/Exception.php b/vendor/phpunit/php-timer/src/Exception.php deleted file mode 100644 index 7f9a26b..0000000 --- a/vendor/phpunit/php-timer/src/Exception.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -interface Exception -{ -} diff --git a/vendor/phpunit/php-timer/src/RuntimeException.php b/vendor/phpunit/php-timer/src/RuntimeException.php deleted file mode 100644 index aff06fa..0000000 --- a/vendor/phpunit/php-timer/src/RuntimeException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-timer/src/Timer.php b/vendor/phpunit/php-timer/src/Timer.php deleted file mode 100644 index 378ff72..0000000 --- a/vendor/phpunit/php-timer/src/Timer.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -final class Timer -{ - /** - * @var int[] - */ - private static $sizes = [ - 'GB' => 1073741824, - 'MB' => 1048576, - 'KB' => 1024, - ]; - - /** - * @var int[] - */ - private static $times = [ - 'hour' => 3600000, - 'minute' => 60000, - 'second' => 1000, - ]; - - /** - * @var float[] - */ - private static $startTimes = []; - - public static function start(): void - { - self::$startTimes[] = \microtime(true); - } - - public static function stop(): float - { - return \microtime(true) - \array_pop(self::$startTimes); - } - - public static function bytesToString(float $bytes): string - { - foreach (self::$sizes as $unit => $value) { - if ($bytes >= $value) { - return \sprintf('%.2f %s', $bytes >= 1024 ? $bytes / $value : $bytes, $unit); - } - } - - return $bytes . ' byte' . ((int) $bytes !== 1 ? 's' : ''); - } - - public static function secondsToTimeString(float $time): string - { - $ms = \round($time * 1000); - - foreach (self::$times as $unit => $value) { - if ($ms >= $value) { - $time = \floor($ms / $value * 100.0) / 100.0; - - return $time . ' ' . ($time == 1 ? $unit : $unit . 's'); - } - } - - return $ms . ' ms'; - } - - /** - * @throws RuntimeException - */ - public static function timeSinceStartOfRequest(): string - { - if (isset($_SERVER['REQUEST_TIME_FLOAT'])) { - $startOfRequest = $_SERVER['REQUEST_TIME_FLOAT']; - } elseif (isset($_SERVER['REQUEST_TIME'])) { - $startOfRequest = $_SERVER['REQUEST_TIME']; - } else { - throw new RuntimeException('Cannot determine time at which the request started'); - } - - return self::secondsToTimeString(\microtime(true) - $startOfRequest); - } - - /** - * @throws RuntimeException - */ - public static function resourceUsage(): string - { - return \sprintf( - 'Time: %s, Memory: %s', - self::timeSinceStartOfRequest(), - self::bytesToString(\memory_get_peak_usage(true)) - ); - } -} diff --git a/vendor/phpunit/php-timer/tests/TimerTest.php b/vendor/phpunit/php-timer/tests/TimerTest.php deleted file mode 100644 index 93cc474..0000000 --- a/vendor/phpunit/php-timer/tests/TimerTest.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use PHPUnit\Framework\TestCase; - -/** - * @covers \SebastianBergmann\Timer\Timer - */ -final class TimerTest extends TestCase -{ - public function testCanBeStartedAndStopped(): void - { - $this->assertIsFloat(Timer::stop()); - } - - public function testCanFormatTimeSinceStartOfRequest(): void - { - $this->assertStringMatchesFormat('%f %s', Timer::timeSinceStartOfRequest()); - } - - /** - * @backupGlobals enabled - */ - public function testCanFormatSinceStartOfRequestWhenRequestTimeIsNotAvailableAsFloat(): void - { - if (isset($_SERVER['REQUEST_TIME_FLOAT'])) { - unset($_SERVER['REQUEST_TIME_FLOAT']); - } - - $this->assertStringMatchesFormat('%f %s', Timer::timeSinceStartOfRequest()); - } - - /** - * @backupGlobals enabled - */ - public function testCannotFormatTimeSinceStartOfRequestWhenRequestTimeIsNotAvailable(): void - { - if (isset($_SERVER['REQUEST_TIME_FLOAT'])) { - unset($_SERVER['REQUEST_TIME_FLOAT']); - } - - if (isset($_SERVER['REQUEST_TIME'])) { - unset($_SERVER['REQUEST_TIME']); - } - - $this->expectException(RuntimeException::class); - - Timer::timeSinceStartOfRequest(); - } - - public function testCanFormatResourceUsage(): void - { - $this->assertStringMatchesFormat('Time: %s, Memory: %f %s', Timer::resourceUsage()); - } - - /** - * @dataProvider secondsProvider - */ - public function testCanFormatSecondsAsString(string $string, float $seconds): void - { - $this->assertEquals($string, Timer::secondsToTimeString($seconds)); - } - - public function secondsProvider(): array - { - return [ - ['0 ms', 0], - ['1 ms', .001], - ['10 ms', .01], - ['100 ms', .1], - ['999 ms', .999], - ['1 second', .9999], - ['1 second', 1], - ['2 seconds', 2], - ['59.9 seconds', 59.9], - ['59.99 seconds', 59.99], - ['59.99 seconds', 59.999], - ['1 minute', 59.9999], - ['59 seconds', 59.001], - ['59.01 seconds', 59.01], - ['1 minute', 60], - ['1.01 minutes', 61], - ['2 minutes', 120], - ['2.01 minutes', 121], - ['59.99 minutes', 3599.9], - ['59.99 minutes', 3599.99], - ['59.99 minutes', 3599.999], - ['1 hour', 3599.9999], - ['59.98 minutes', 3599.001], - ['59.98 minutes', 3599.01], - ['1 hour', 3600], - ['1 hour', 3601], - ['1 hour', 3601.9], - ['1 hour', 3601.99], - ['1 hour', 3601.999], - ['1 hour', 3601.9999], - ['1.01 hours', 3659.9999], - ['1.01 hours', 3659.001], - ['1.01 hours', 3659.01], - ['2 hours', 7199.9999], - ]; - } - - /** - * @dataProvider bytesProvider - */ - public function testCanFormatBytesAsString(string $string, float $bytes): void - { - $this->assertEquals($string, Timer::bytesToString($bytes)); - } - - public function bytesProvider(): array - { - return [ - ['0 bytes', 0], - ['1 byte', 1], - ['1023 bytes', 1023], - ['1.00 KB', 1024], - ['1.50 KB', 1.5 * 1024], - ['2.00 MB', 2 * 1048576], - ['2.50 MB', 2.5 * 1048576], - ['3.00 GB', 3 * 1073741824], - ['3.50 GB', 3.5 * 1073741824], - ]; - } -} diff --git a/vendor/phpunit/php-token-stream/.gitattributes b/vendor/phpunit/php-token-stream/.gitattributes deleted file mode 100644 index 461090b..0000000 --- a/vendor/phpunit/php-token-stream/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.php diff=php diff --git a/vendor/phpunit/php-token-stream/.github/FUNDING.yml b/vendor/phpunit/php-token-stream/.github/FUNDING.yml deleted file mode 100644 index b19ea81..0000000 --- a/vendor/phpunit/php-token-stream/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -patreon: s_bergmann diff --git a/vendor/phpunit/php-token-stream/.gitignore b/vendor/phpunit/php-token-stream/.gitignore deleted file mode 100644 index 77aae3d..0000000 --- a/vendor/phpunit/php-token-stream/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.idea -/composer.lock -/vendor diff --git a/vendor/phpunit/php-token-stream/.travis.yml b/vendor/phpunit/php-token-stream/.travis.yml deleted file mode 100644 index 4e8056d..0000000 --- a/vendor/phpunit/php-token-stream/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4snapshot - -sudo: false - -before_install: - - composer self-update - - composer clear-cache - -install: - - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - bash <(curl -s https://codecov.io/bash) - -notifications: - email: false - diff --git a/vendor/phpunit/php-token-stream/ChangeLog.md b/vendor/phpunit/php-token-stream/ChangeLog.md deleted file mode 100644 index 884fd1f..0000000 --- a/vendor/phpunit/php-token-stream/ChangeLog.md +++ /dev/null @@ -1,57 +0,0 @@ -# Change Log - -All notable changes to `sebastianbergmann/php-token-stream` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [3.1.1] - 2019-09-17 - -### Fixed - -* Fixed [#84](https://github.com/sebastianbergmann/php-token-stream/issues/84): Methods named `class` are not handled correctly - -## [3.1.0] - 2019-07-25 - -### Added - -* Added support for `FN` and `COALESCE_EQUAL` tokens introduced in PHP 7.4 - -## [3.0.2] - 2019-07-08 - -### Changed - -* Implemented [#82](https://github.com/sebastianbergmann/php-token-stream/issues/82): Make sure this component works when its classes are prefixed using php-scoper - -## [3.0.1] - 2018-10-30 - -### Fixed - -* Fixed [#78](https://github.com/sebastianbergmann/php-token-stream/pull/78): `getEndTokenId()` does not handle string-dollar (`"${var}"`) interpolation - -## [3.0.0] - 2018-02-01 - -### Removed - -* Implemented [#71](https://github.com/sebastianbergmann/php-token-stream/issues/71): Remove code specific to Hack language constructs -* Implemented [#72](https://github.com/sebastianbergmann/php-token-stream/issues/72): Drop support for PHP 7.0 - -## [2.0.2] - 2017-11-27 - -### Fixed - -* Fixed [#69](https://github.com/sebastianbergmann/php-token-stream/issues/69): `PHP_Token_USE_FUNCTION` does not serialize correctly - -## [2.0.1] - 2017-08-20 - -### Fixed - -* Fixed [#68](https://github.com/sebastianbergmann/php-token-stream/issues/68): Method with name `empty` wrongly recognized as anonymous function - -## [2.0.0] - 2017-08-03 - -[3.1.1]: https://github.com/sebastianbergmann/php-token-stream/compare/3.1.0...3.1.1 -[3.1.0]: https://github.com/sebastianbergmann/php-token-stream/compare/3.0.2...3.1.0 -[3.0.2]: https://github.com/sebastianbergmann/php-token-stream/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/php-token-stream/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/php-token-stream/compare/2.0...3.0.0 -[2.0.2]: https://github.com/sebastianbergmann/php-token-stream/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/php-token-stream/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/php-token-stream/compare/1.4.11...2.0.0 diff --git a/vendor/phpunit/php-token-stream/LICENSE b/vendor/phpunit/php-token-stream/LICENSE deleted file mode 100644 index 2cad5be..0000000 --- a/vendor/phpunit/php-token-stream/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -php-token-stream - -Copyright (c) 2009-2019, Sebastian Bergmann . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-token-stream/README.md b/vendor/phpunit/php-token-stream/README.md deleted file mode 100644 index 149b7e2..0000000 --- a/vendor/phpunit/php-token-stream/README.md +++ /dev/null @@ -1,14 +0,0 @@ -[![Build Status](https://travis-ci.org/sebastianbergmann/php-token-stream.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-token-stream) - -# php-token-stream - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phpunit/php-token-stream - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phpunit/php-token-stream - diff --git a/vendor/phpunit/php-token-stream/build.xml b/vendor/phpunit/php-token-stream/build.xml deleted file mode 100644 index 0da8056..0000000 --- a/vendor/phpunit/php-token-stream/build.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/php-token-stream/composer.json b/vendor/phpunit/php-token-stream/composer.json deleted file mode 100644 index f50e937..0000000 --- a/vendor/phpunit/php-token-stream/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "phpunit/php-token-stream", - "description": "Wrapper around PHP's tokenizer extension.", - "type": "library", - "keywords": ["tokenizer"], - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues" - }, - "prefer-stable": true, - "require": { - "php": "^7.1", - "ext-tokenizer": "*" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "config": { - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - } -} diff --git a/vendor/phpunit/php-token-stream/phpunit.xml b/vendor/phpunit/php-token-stream/phpunit.xml deleted file mode 100644 index 8f159fb..0000000 --- a/vendor/phpunit/php-token-stream/phpunit.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tests - - - - - - src - - - diff --git a/vendor/phpunit/php-token-stream/src/Token.php b/vendor/phpunit/php-token-stream/src/Token.php deleted file mode 100644 index 65fdb06..0000000 --- a/vendor/phpunit/php-token-stream/src/Token.php +++ /dev/null @@ -1,1361 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * A PHP token. - */ -abstract class PHP_Token -{ - /** - * @var string - */ - protected $text; - - /** - * @var int - */ - protected $line; - - /** - * @var PHP_Token_Stream - */ - protected $tokenStream; - - /** - * @var int - */ - protected $id; - - /** - * @param string $text - * @param int $line - * @param PHP_Token_Stream $tokenStream - * @param int $id - */ - public function __construct($text, $line, PHP_Token_Stream $tokenStream, $id) - { - $this->text = $text; - $this->line = $line; - $this->tokenStream = $tokenStream; - $this->id = $id; - } - - /** - * @return string - */ - public function __toString() - { - return $this->text; - } - - /** - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } -} - -abstract class PHP_TokenWithScope extends PHP_Token -{ - /** - * @var int - */ - protected $endTokenId; - - /** - * Get the docblock for this token - * - * This method will fetch the docblock belonging to the current token. The - * docblock must be placed on the line directly above the token to be - * recognized. - * - * @return string|null Returns the docblock as a string if found - */ - public function getDocblock() - { - $tokens = $this->tokenStream->tokens(); - $currentLineNumber = $tokens[$this->id]->getLine(); - $prevLineNumber = $currentLineNumber - 1; - - for ($i = $this->id - 1; $i; $i--) { - if (!isset($tokens[$i])) { - return; - } - - if ($tokens[$i] instanceof PHP_Token_FUNCTION || - $tokens[$i] instanceof PHP_Token_CLASS || - $tokens[$i] instanceof PHP_Token_TRAIT) { - // Some other trait, class or function, no docblock can be - // used for the current token - break; - } - - $line = $tokens[$i]->getLine(); - - if ($line == $currentLineNumber || - ($line == $prevLineNumber && - $tokens[$i] instanceof PHP_Token_WHITESPACE)) { - continue; - } - - if ($line < $currentLineNumber && - !$tokens[$i] instanceof PHP_Token_DOC_COMMENT) { - break; - } - - return (string) $tokens[$i]; - } - } - - /** - * @return int - */ - public function getEndTokenId() - { - $block = 0; - $i = $this->id; - $tokens = $this->tokenStream->tokens(); - - while ($this->endTokenId === null && isset($tokens[$i])) { - if ($tokens[$i] instanceof PHP_Token_OPEN_CURLY || - $tokens[$i] instanceof PHP_Token_DOLLAR_OPEN_CURLY_BRACES || - $tokens[$i] instanceof PHP_Token_CURLY_OPEN) { - $block++; - } elseif ($tokens[$i] instanceof PHP_Token_CLOSE_CURLY) { - $block--; - - if ($block === 0) { - $this->endTokenId = $i; - } - } elseif (($this instanceof PHP_Token_FUNCTION || - $this instanceof PHP_Token_NAMESPACE) && - $tokens[$i] instanceof PHP_Token_SEMICOLON) { - if ($block === 0) { - $this->endTokenId = $i; - } - } - - $i++; - } - - if ($this->endTokenId === null) { - $this->endTokenId = $this->id; - } - - return $this->endTokenId; - } - - /** - * @return int - */ - public function getEndLine() - { - return $this->tokenStream[$this->getEndTokenId()]->getLine(); - } -} - -abstract class PHP_TokenWithScopeAndVisibility extends PHP_TokenWithScope -{ - /** - * @return string - */ - public function getVisibility() - { - $tokens = $this->tokenStream->tokens(); - - for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) { - if (isset($tokens[$i]) && - ($tokens[$i] instanceof PHP_Token_PRIVATE || - $tokens[$i] instanceof PHP_Token_PROTECTED || - $tokens[$i] instanceof PHP_Token_PUBLIC)) { - return strtolower( - str_replace('PHP_Token_', '', PHP_Token_Util::getClass($tokens[$i])) - ); - } - if (isset($tokens[$i]) && - !($tokens[$i] instanceof PHP_Token_STATIC || - $tokens[$i] instanceof PHP_Token_FINAL || - $tokens[$i] instanceof PHP_Token_ABSTRACT)) { - // no keywords; stop visibility search - break; - } - } - } - - /** - * @return string - */ - public function getKeywords() - { - $keywords = []; - $tokens = $this->tokenStream->tokens(); - - for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) { - if (isset($tokens[$i]) && - ($tokens[$i] instanceof PHP_Token_PRIVATE || - $tokens[$i] instanceof PHP_Token_PROTECTED || - $tokens[$i] instanceof PHP_Token_PUBLIC)) { - continue; - } - - if (isset($tokens[$i]) && - ($tokens[$i] instanceof PHP_Token_STATIC || - $tokens[$i] instanceof PHP_Token_FINAL || - $tokens[$i] instanceof PHP_Token_ABSTRACT)) { - $keywords[] = strtolower( - str_replace('PHP_Token_', '', PHP_Token_Util::getClass($tokens[$i])) - ); - } - } - - return implode(',', $keywords); - } -} - -abstract class PHP_Token_Includes extends PHP_Token -{ - /** - * @var string - */ - protected $name; - - /** - * @var string - */ - protected $type; - - /** - * @return string - */ - public function getName() - { - if ($this->name === null) { - $this->process(); - } - - return $this->name; - } - - /** - * @return string - */ - public function getType() - { - if ($this->type === null) { - $this->process(); - } - - return $this->type; - } - - private function process() - { - $tokens = $this->tokenStream->tokens(); - - if ($tokens[$this->id + 2] instanceof PHP_Token_CONSTANT_ENCAPSED_STRING) { - $this->name = trim($tokens[$this->id + 2], "'\""); - $this->type = strtolower( - str_replace('PHP_Token_', '', PHP_Token_Util::getClass($tokens[$this->id])) - ); - } - } -} - -class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility -{ - /** - * @var array - */ - protected $arguments; - - /** - * @var int - */ - protected $ccn; - - /** - * @var string - */ - protected $name; - - /** - * @var string - */ - protected $signature; - - /** - * @var bool - */ - private $anonymous = false; - - /** - * @return array - */ - public function getArguments() - { - if ($this->arguments !== null) { - return $this->arguments; - } - - $this->arguments = []; - $tokens = $this->tokenStream->tokens(); - $typeDeclaration = null; - - // Search for first token inside brackets - $i = $this->id + 2; - - while (!$tokens[$i - 1] instanceof PHP_Token_OPEN_BRACKET) { - $i++; - } - - while (!$tokens[$i] instanceof PHP_Token_CLOSE_BRACKET) { - if ($tokens[$i] instanceof PHP_Token_STRING) { - $typeDeclaration = (string) $tokens[$i]; - } elseif ($tokens[$i] instanceof PHP_Token_VARIABLE) { - $this->arguments[(string) $tokens[$i]] = $typeDeclaration; - $typeDeclaration = null; - } - - $i++; - } - - return $this->arguments; - } - - /** - * @return string - */ - public function getName() - { - if ($this->name !== null) { - return $this->name; - } - - $tokens = $this->tokenStream->tokens(); - - $i = $this->id + 1; - - if ($tokens[$i] instanceof PHP_Token_WHITESPACE) { - $i++; - } - - if ($tokens[$i] instanceof PHP_Token_AMPERSAND) { - $i++; - } - - if ($tokens[$i + 1] instanceof PHP_Token_OPEN_BRACKET) { - $this->name = (string) $tokens[$i]; - } elseif ($tokens[$i + 1] instanceof PHP_Token_WHITESPACE && $tokens[$i + 2] instanceof PHP_Token_OPEN_BRACKET) { - $this->name = (string) $tokens[$i]; - } else { - $this->anonymous = true; - - $this->name = sprintf( - 'anonymousFunction:%s#%s', - $this->getLine(), - $this->getId() - ); - } - - if (!$this->isAnonymous()) { - for ($i = $this->id; $i; --$i) { - if ($tokens[$i] instanceof PHP_Token_NAMESPACE) { - $this->name = $tokens[$i]->getName() . '\\' . $this->name; - - break; - } - - if ($tokens[$i] instanceof PHP_Token_INTERFACE) { - break; - } - } - } - - return $this->name; - } - - /** - * @return int - */ - public function getCCN() - { - if ($this->ccn !== null) { - return $this->ccn; - } - - $this->ccn = 1; - $end = $this->getEndTokenId(); - $tokens = $this->tokenStream->tokens(); - - for ($i = $this->id; $i <= $end; $i++) { - switch (PHP_Token_Util::getClass($tokens[$i])) { - case 'PHP_Token_IF': - case 'PHP_Token_ELSEIF': - case 'PHP_Token_FOR': - case 'PHP_Token_FOREACH': - case 'PHP_Token_WHILE': - case 'PHP_Token_CASE': - case 'PHP_Token_CATCH': - case 'PHP_Token_BOOLEAN_AND': - case 'PHP_Token_LOGICAL_AND': - case 'PHP_Token_BOOLEAN_OR': - case 'PHP_Token_LOGICAL_OR': - case 'PHP_Token_QUESTION_MARK': - $this->ccn++; - break; - } - } - - return $this->ccn; - } - - /** - * @return string - */ - public function getSignature() - { - if ($this->signature !== null) { - return $this->signature; - } - - if ($this->isAnonymous()) { - $this->signature = 'anonymousFunction'; - $i = $this->id + 1; - } else { - $this->signature = ''; - $i = $this->id + 2; - } - - $tokens = $this->tokenStream->tokens(); - - while (isset($tokens[$i]) && - !$tokens[$i] instanceof PHP_Token_OPEN_CURLY && - !$tokens[$i] instanceof PHP_Token_SEMICOLON) { - $this->signature .= $tokens[$i++]; - } - - $this->signature = trim($this->signature); - - return $this->signature; - } - - /** - * @return bool - */ - public function isAnonymous() - { - return $this->anonymous; - } -} - -class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility -{ - /** - * @var array - */ - protected $interfaces; - - /** - * @return string - */ - public function getName() - { - return (string) $this->tokenStream[$this->id + 2]; - } - - /** - * @return bool - */ - public function hasParent() - { - return $this->tokenStream[$this->id + 4] instanceof PHP_Token_EXTENDS; - } - - /** - * @return array - */ - public function getPackage() - { - $className = $this->getName(); - $docComment = $this->getDocblock(); - - $result = [ - 'namespace' => '', - 'fullPackage' => '', - 'category' => '', - 'package' => '', - 'subpackage' => '' - ]; - - for ($i = $this->id; $i; --$i) { - if ($this->tokenStream[$i] instanceof PHP_Token_NAMESPACE) { - $result['namespace'] = $this->tokenStream[$i]->getName(); - break; - } - } - - if (preg_match('/@category[\s]+([\.\w]+)/', $docComment, $matches)) { - $result['category'] = $matches[1]; - } - - if (preg_match('/@package[\s]+([\.\w]+)/', $docComment, $matches)) { - $result['package'] = $matches[1]; - $result['fullPackage'] = $matches[1]; - } - - if (preg_match('/@subpackage[\s]+([\.\w]+)/', $docComment, $matches)) { - $result['subpackage'] = $matches[1]; - $result['fullPackage'] .= '.' . $matches[1]; - } - - if (empty($result['fullPackage'])) { - $result['fullPackage'] = $this->arrayToName( - explode('_', str_replace('\\', '_', $className)), - '.' - ); - } - - return $result; - } - - /** - * @param array $parts - * @param string $join - * - * @return string - */ - protected function arrayToName(array $parts, $join = '\\') - { - $result = ''; - - if (count($parts) > 1) { - array_pop($parts); - - $result = implode($join, $parts); - } - - return $result; - } - - /** - * @return bool|string - */ - public function getParent() - { - if (!$this->hasParent()) { - return false; - } - - $i = $this->id + 6; - $tokens = $this->tokenStream->tokens(); - $className = (string) $tokens[$i]; - - while (isset($tokens[$i + 1]) && - !$tokens[$i + 1] instanceof PHP_Token_WHITESPACE) { - $className .= (string) $tokens[++$i]; - } - - return $className; - } - - /** - * @return bool - */ - public function hasInterfaces() - { - return (isset($this->tokenStream[$this->id + 4]) && - $this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) || - (isset($this->tokenStream[$this->id + 8]) && - $this->tokenStream[$this->id + 8] instanceof PHP_Token_IMPLEMENTS); - } - - /** - * @return array|bool - */ - public function getInterfaces() - { - if ($this->interfaces !== null) { - return $this->interfaces; - } - - if (!$this->hasInterfaces()) { - return ($this->interfaces = false); - } - - if ($this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) { - $i = $this->id + 3; - } else { - $i = $this->id + 7; - } - - $tokens = $this->tokenStream->tokens(); - - while (!$tokens[$i + 1] instanceof PHP_Token_OPEN_CURLY) { - $i++; - - if ($tokens[$i] instanceof PHP_Token_STRING) { - $this->interfaces[] = (string) $tokens[$i]; - } - } - - return $this->interfaces; - } -} - -class PHP_Token_ABSTRACT extends PHP_Token -{ -} - -class PHP_Token_AMPERSAND extends PHP_Token -{ -} - -class PHP_Token_AND_EQUAL extends PHP_Token -{ -} - -class PHP_Token_ARRAY extends PHP_Token -{ -} - -class PHP_Token_ARRAY_CAST extends PHP_Token -{ -} - -class PHP_Token_AS extends PHP_Token -{ -} - -class PHP_Token_AT extends PHP_Token -{ -} - -class PHP_Token_BACKTICK extends PHP_Token -{ -} - -class PHP_Token_BAD_CHARACTER extends PHP_Token -{ -} - -class PHP_Token_BOOLEAN_AND extends PHP_Token -{ -} - -class PHP_Token_BOOLEAN_OR extends PHP_Token -{ -} - -class PHP_Token_BOOL_CAST extends PHP_Token -{ -} - -class PHP_Token_BREAK extends PHP_Token -{ -} - -class PHP_Token_CARET extends PHP_Token -{ -} - -class PHP_Token_CASE extends PHP_Token -{ -} - -class PHP_Token_CATCH extends PHP_Token -{ -} - -class PHP_Token_CHARACTER extends PHP_Token -{ -} - -class PHP_Token_CLASS extends PHP_Token_INTERFACE -{ - /** - * @var bool - */ - private $anonymous = false; - - /** - * @var string - */ - private $name; - - /** - * @return string - */ - public function getName() - { - if ($this->name !== null) { - return $this->name; - } - - $next = $this->tokenStream[$this->id + 1]; - - if ($next instanceof PHP_Token_WHITESPACE) { - $next = $this->tokenStream[$this->id + 2]; - } - - if ($next instanceof PHP_Token_STRING) { - $this->name =(string) $next; - - return $this->name; - } - - if ($next instanceof PHP_Token_OPEN_CURLY || - $next instanceof PHP_Token_EXTENDS || - $next instanceof PHP_Token_IMPLEMENTS) { - - $this->name = sprintf( - 'AnonymousClass:%s#%s', - $this->getLine(), - $this->getId() - ); - - $this->anonymous = true; - - return $this->name; - } - } - - public function isAnonymous() - { - return $this->anonymous; - } -} - -class PHP_Token_CLASS_C extends PHP_Token -{ -} - -class PHP_Token_CLASS_NAME_CONSTANT extends PHP_Token -{ -} - -class PHP_Token_CLONE extends PHP_Token -{ -} - -class PHP_Token_CLOSE_BRACKET extends PHP_Token -{ -} - -class PHP_Token_CLOSE_CURLY extends PHP_Token -{ -} - -class PHP_Token_CLOSE_SQUARE extends PHP_Token -{ -} - -class PHP_Token_CLOSE_TAG extends PHP_Token -{ -} - -class PHP_Token_COLON extends PHP_Token -{ -} - -class PHP_Token_COMMA extends PHP_Token -{ -} - -class PHP_Token_COMMENT extends PHP_Token -{ -} - -class PHP_Token_CONCAT_EQUAL extends PHP_Token -{ -} - -class PHP_Token_CONST extends PHP_Token -{ -} - -class PHP_Token_CONSTANT_ENCAPSED_STRING extends PHP_Token -{ -} - -class PHP_Token_CONTINUE extends PHP_Token -{ -} - -class PHP_Token_CURLY_OPEN extends PHP_Token -{ -} - -class PHP_Token_DEC extends PHP_Token -{ -} - -class PHP_Token_DECLARE extends PHP_Token -{ -} - -class PHP_Token_DEFAULT extends PHP_Token -{ -} - -class PHP_Token_DIV extends PHP_Token -{ -} - -class PHP_Token_DIV_EQUAL extends PHP_Token -{ -} - -class PHP_Token_DNUMBER extends PHP_Token -{ -} - -class PHP_Token_DO extends PHP_Token -{ -} - -class PHP_Token_DOC_COMMENT extends PHP_Token -{ -} - -class PHP_Token_DOLLAR extends PHP_Token -{ -} - -class PHP_Token_DOLLAR_OPEN_CURLY_BRACES extends PHP_Token -{ -} - -class PHP_Token_DOT extends PHP_Token -{ -} - -class PHP_Token_DOUBLE_ARROW extends PHP_Token -{ -} - -class PHP_Token_DOUBLE_CAST extends PHP_Token -{ -} - -class PHP_Token_DOUBLE_COLON extends PHP_Token -{ -} - -class PHP_Token_DOUBLE_QUOTES extends PHP_Token -{ -} - -class PHP_Token_ECHO extends PHP_Token -{ -} - -class PHP_Token_ELSE extends PHP_Token -{ -} - -class PHP_Token_ELSEIF extends PHP_Token -{ -} - -class PHP_Token_EMPTY extends PHP_Token -{ -} - -class PHP_Token_ENCAPSED_AND_WHITESPACE extends PHP_Token -{ -} - -class PHP_Token_ENDDECLARE extends PHP_Token -{ -} - -class PHP_Token_ENDFOR extends PHP_Token -{ -} - -class PHP_Token_ENDFOREACH extends PHP_Token -{ -} - -class PHP_Token_ENDIF extends PHP_Token -{ -} - -class PHP_Token_ENDSWITCH extends PHP_Token -{ -} - -class PHP_Token_ENDWHILE extends PHP_Token -{ -} - -class PHP_Token_END_HEREDOC extends PHP_Token -{ -} - -class PHP_Token_EQUAL extends PHP_Token -{ -} - -class PHP_Token_EVAL extends PHP_Token -{ -} - -class PHP_Token_EXCLAMATION_MARK extends PHP_Token -{ -} - -class PHP_Token_EXIT extends PHP_Token -{ -} - -class PHP_Token_EXTENDS extends PHP_Token -{ -} - -class PHP_Token_FILE extends PHP_Token -{ -} - -class PHP_Token_FINAL extends PHP_Token -{ -} - -class PHP_Token_FOR extends PHP_Token -{ -} - -class PHP_Token_FOREACH extends PHP_Token -{ -} - -class PHP_Token_FUNC_C extends PHP_Token -{ -} - -class PHP_Token_GLOBAL extends PHP_Token -{ -} - -class PHP_Token_GT extends PHP_Token -{ -} - -class PHP_Token_IF extends PHP_Token -{ -} - -class PHP_Token_IMPLEMENTS extends PHP_Token -{ -} - -class PHP_Token_INC extends PHP_Token -{ -} - -class PHP_Token_INCLUDE extends PHP_Token_Includes -{ -} - -class PHP_Token_INCLUDE_ONCE extends PHP_Token_Includes -{ -} - -class PHP_Token_INLINE_HTML extends PHP_Token -{ -} - -class PHP_Token_INSTANCEOF extends PHP_Token -{ -} - -class PHP_Token_INT_CAST extends PHP_Token -{ -} - -class PHP_Token_ISSET extends PHP_Token -{ -} - -class PHP_Token_IS_EQUAL extends PHP_Token -{ -} - -class PHP_Token_IS_GREATER_OR_EQUAL extends PHP_Token -{ -} - -class PHP_Token_IS_IDENTICAL extends PHP_Token -{ -} - -class PHP_Token_IS_NOT_EQUAL extends PHP_Token -{ -} - -class PHP_Token_IS_NOT_IDENTICAL extends PHP_Token -{ -} - -class PHP_Token_IS_SMALLER_OR_EQUAL extends PHP_Token -{ -} - -class PHP_Token_LINE extends PHP_Token -{ -} - -class PHP_Token_LIST extends PHP_Token -{ -} - -class PHP_Token_LNUMBER extends PHP_Token -{ -} - -class PHP_Token_LOGICAL_AND extends PHP_Token -{ -} - -class PHP_Token_LOGICAL_OR extends PHP_Token -{ -} - -class PHP_Token_LOGICAL_XOR extends PHP_Token -{ -} - -class PHP_Token_LT extends PHP_Token -{ -} - -class PHP_Token_METHOD_C extends PHP_Token -{ -} - -class PHP_Token_MINUS extends PHP_Token -{ -} - -class PHP_Token_MINUS_EQUAL extends PHP_Token -{ -} - -class PHP_Token_MOD_EQUAL extends PHP_Token -{ -} - -class PHP_Token_MULT extends PHP_Token -{ -} - -class PHP_Token_MUL_EQUAL extends PHP_Token -{ -} - -class PHP_Token_NEW extends PHP_Token -{ -} - -class PHP_Token_NUM_STRING extends PHP_Token -{ -} - -class PHP_Token_OBJECT_CAST extends PHP_Token -{ -} - -class PHP_Token_OBJECT_OPERATOR extends PHP_Token -{ -} - -class PHP_Token_OPEN_BRACKET extends PHP_Token -{ -} - -class PHP_Token_OPEN_CURLY extends PHP_Token -{ -} - -class PHP_Token_OPEN_SQUARE extends PHP_Token -{ -} - -class PHP_Token_OPEN_TAG extends PHP_Token -{ -} - -class PHP_Token_OPEN_TAG_WITH_ECHO extends PHP_Token -{ -} - -class PHP_Token_OR_EQUAL extends PHP_Token -{ -} - -class PHP_Token_PAAMAYIM_NEKUDOTAYIM extends PHP_Token -{ -} - -class PHP_Token_PERCENT extends PHP_Token -{ -} - -class PHP_Token_PIPE extends PHP_Token -{ -} - -class PHP_Token_PLUS extends PHP_Token -{ -} - -class PHP_Token_PLUS_EQUAL extends PHP_Token -{ -} - -class PHP_Token_PRINT extends PHP_Token -{ -} - -class PHP_Token_PRIVATE extends PHP_Token -{ -} - -class PHP_Token_PROTECTED extends PHP_Token -{ -} - -class PHP_Token_PUBLIC extends PHP_Token -{ -} - -class PHP_Token_QUESTION_MARK extends PHP_Token -{ -} - -class PHP_Token_REQUIRE extends PHP_Token_Includes -{ -} - -class PHP_Token_REQUIRE_ONCE extends PHP_Token_Includes -{ -} - -class PHP_Token_RETURN extends PHP_Token -{ -} - -class PHP_Token_SEMICOLON extends PHP_Token -{ -} - -class PHP_Token_SL extends PHP_Token -{ -} - -class PHP_Token_SL_EQUAL extends PHP_Token -{ -} - -class PHP_Token_SR extends PHP_Token -{ -} - -class PHP_Token_SR_EQUAL extends PHP_Token -{ -} - -class PHP_Token_START_HEREDOC extends PHP_Token -{ -} - -class PHP_Token_STATIC extends PHP_Token -{ -} - -class PHP_Token_STRING extends PHP_Token -{ -} - -class PHP_Token_STRING_CAST extends PHP_Token -{ -} - -class PHP_Token_STRING_VARNAME extends PHP_Token -{ -} - -class PHP_Token_SWITCH extends PHP_Token -{ -} - -class PHP_Token_THROW extends PHP_Token -{ -} - -class PHP_Token_TILDE extends PHP_Token -{ -} - -class PHP_Token_TRY extends PHP_Token -{ -} - -class PHP_Token_UNSET extends PHP_Token -{ -} - -class PHP_Token_UNSET_CAST extends PHP_Token -{ -} - -class PHP_Token_USE extends PHP_Token -{ -} - -class PHP_Token_USE_FUNCTION extends PHP_Token -{ -} - -class PHP_Token_VAR extends PHP_Token -{ -} - -class PHP_Token_VARIABLE extends PHP_Token -{ -} - -class PHP_Token_WHILE extends PHP_Token -{ -} - -class PHP_Token_WHITESPACE extends PHP_Token -{ -} - -class PHP_Token_XOR_EQUAL extends PHP_Token -{ -} - -// Tokens introduced in PHP 5.1 -class PHP_Token_HALT_COMPILER extends PHP_Token -{ -} - -// Tokens introduced in PHP 5.3 -class PHP_Token_DIR extends PHP_Token -{ -} - -class PHP_Token_GOTO extends PHP_Token -{ -} - -class PHP_Token_NAMESPACE extends PHP_TokenWithScope -{ - /** - * @return string - */ - public function getName() - { - $tokens = $this->tokenStream->tokens(); - $namespace = (string) $tokens[$this->id + 2]; - - for ($i = $this->id + 3;; $i += 2) { - if (isset($tokens[$i]) && - $tokens[$i] instanceof PHP_Token_NS_SEPARATOR) { - $namespace .= '\\' . $tokens[$i + 1]; - } else { - break; - } - } - - return $namespace; - } -} - -class PHP_Token_NS_C extends PHP_Token -{ -} - -class PHP_Token_NS_SEPARATOR extends PHP_Token -{ -} - -// Tokens introduced in PHP 5.4 -class PHP_Token_CALLABLE extends PHP_Token -{ -} - -class PHP_Token_INSTEADOF extends PHP_Token -{ -} - -class PHP_Token_TRAIT extends PHP_Token_INTERFACE -{ -} - -class PHP_Token_TRAIT_C extends PHP_Token -{ -} - -// Tokens introduced in PHP 5.5 -class PHP_Token_FINALLY extends PHP_Token -{ -} - -class PHP_Token_YIELD extends PHP_Token -{ -} - -// Tokens introduced in PHP 5.6 -class PHP_Token_ELLIPSIS extends PHP_Token -{ -} - -class PHP_Token_POW extends PHP_Token -{ -} - -class PHP_Token_POW_EQUAL extends PHP_Token -{ -} - -// Tokens introduced in PHP 7.0 -class PHP_Token_COALESCE extends PHP_Token -{ -} - -class PHP_Token_SPACESHIP extends PHP_Token -{ -} - -class PHP_Token_YIELD_FROM extends PHP_Token -{ -} - -// Tokens introduced in PHP 7.4 -class PHP_Token_COALESCE_EQUAL extends PHP_Token -{ -} - -class PHP_Token_FN extends PHP_Token -{ -} diff --git a/vendor/phpunit/php-token-stream/src/Token/Stream.php b/vendor/phpunit/php-token-stream/src/Token/Stream.php deleted file mode 100644 index 40549b9..0000000 --- a/vendor/phpunit/php-token-stream/src/Token/Stream.php +++ /dev/null @@ -1,609 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * A stream of PHP tokens. - */ -class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator -{ - /** - * @var array - */ - protected static $customTokens = [ - '(' => 'PHP_Token_OPEN_BRACKET', - ')' => 'PHP_Token_CLOSE_BRACKET', - '[' => 'PHP_Token_OPEN_SQUARE', - ']' => 'PHP_Token_CLOSE_SQUARE', - '{' => 'PHP_Token_OPEN_CURLY', - '}' => 'PHP_Token_CLOSE_CURLY', - ';' => 'PHP_Token_SEMICOLON', - '.' => 'PHP_Token_DOT', - ',' => 'PHP_Token_COMMA', - '=' => 'PHP_Token_EQUAL', - '<' => 'PHP_Token_LT', - '>' => 'PHP_Token_GT', - '+' => 'PHP_Token_PLUS', - '-' => 'PHP_Token_MINUS', - '*' => 'PHP_Token_MULT', - '/' => 'PHP_Token_DIV', - '?' => 'PHP_Token_QUESTION_MARK', - '!' => 'PHP_Token_EXCLAMATION_MARK', - ':' => 'PHP_Token_COLON', - '"' => 'PHP_Token_DOUBLE_QUOTES', - '@' => 'PHP_Token_AT', - '&' => 'PHP_Token_AMPERSAND', - '%' => 'PHP_Token_PERCENT', - '|' => 'PHP_Token_PIPE', - '$' => 'PHP_Token_DOLLAR', - '^' => 'PHP_Token_CARET', - '~' => 'PHP_Token_TILDE', - '`' => 'PHP_Token_BACKTICK' - ]; - - /** - * @var string - */ - protected $filename; - - /** - * @var array - */ - protected $tokens = []; - - /** - * @var int - */ - protected $position = 0; - - /** - * @var array - */ - protected $linesOfCode = ['loc' => 0, 'cloc' => 0, 'ncloc' => 0]; - - /** - * @var array - */ - protected $classes; - - /** - * @var array - */ - protected $functions; - - /** - * @var array - */ - protected $includes; - - /** - * @var array - */ - protected $interfaces; - - /** - * @var array - */ - protected $traits; - - /** - * @var array - */ - protected $lineToFunctionMap = []; - - /** - * Constructor. - * - * @param string $sourceCode - */ - public function __construct($sourceCode) - { - if (is_file($sourceCode)) { - $this->filename = $sourceCode; - $sourceCode = file_get_contents($sourceCode); - } - - $this->scan($sourceCode); - } - - /** - * Destructor. - */ - public function __destruct() - { - $this->tokens = []; - } - - /** - * @return string - */ - public function __toString() - { - $buffer = ''; - - foreach ($this as $token) { - $buffer .= $token; - } - - return $buffer; - } - - /** - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * Scans the source for sequences of characters and converts them into a - * stream of tokens. - * - * @param string $sourceCode - */ - protected function scan($sourceCode) - { - $id = 0; - $line = 1; - $tokens = token_get_all($sourceCode); - $numTokens = count($tokens); - - $lastNonWhitespaceTokenWasDoubleColon = false; - - for ($i = 0; $i < $numTokens; ++$i) { - $token = $tokens[$i]; - $skip = 0; - - if (is_array($token)) { - $name = substr(token_name($token[0]), 2); - $text = $token[1]; - - if ($lastNonWhitespaceTokenWasDoubleColon && $name == 'CLASS') { - $name = 'CLASS_NAME_CONSTANT'; - } elseif ($name == 'USE' && isset($tokens[$i + 2][0]) && $tokens[$i + 2][0] == T_FUNCTION) { - $name = 'USE_FUNCTION'; - $text .= $tokens[$i + 1][1] . $tokens[$i + 2][1]; - $skip = 2; - } - - $tokenClass = 'PHP_Token_' . $name; - } else { - $text = $token; - $tokenClass = self::$customTokens[$token]; - } - - $this->tokens[] = new $tokenClass($text, $line, $this, $id++); - $lines = substr_count($text, "\n"); - $line += $lines; - - if ($tokenClass == 'PHP_Token_HALT_COMPILER') { - break; - } elseif ($tokenClass == 'PHP_Token_COMMENT' || - $tokenClass == 'PHP_Token_DOC_COMMENT') { - $this->linesOfCode['cloc'] += $lines + 1; - } - - if ($name == 'DOUBLE_COLON') { - $lastNonWhitespaceTokenWasDoubleColon = true; - } elseif ($name != 'WHITESPACE') { - $lastNonWhitespaceTokenWasDoubleColon = false; - } - - $i += $skip; - } - - $this->linesOfCode['loc'] = substr_count($sourceCode, "\n"); - $this->linesOfCode['ncloc'] = $this->linesOfCode['loc'] - - $this->linesOfCode['cloc']; - } - - /** - * @return int - */ - public function count() - { - return count($this->tokens); - } - - /** - * @return PHP_Token[] - */ - public function tokens() - { - return $this->tokens; - } - - /** - * @return array - */ - public function getClasses() - { - if ($this->classes !== null) { - return $this->classes; - } - - $this->parse(); - - return $this->classes; - } - - /** - * @return array - */ - public function getFunctions() - { - if ($this->functions !== null) { - return $this->functions; - } - - $this->parse(); - - return $this->functions; - } - - /** - * @return array - */ - public function getInterfaces() - { - if ($this->interfaces !== null) { - return $this->interfaces; - } - - $this->parse(); - - return $this->interfaces; - } - - /** - * @return array - */ - public function getTraits() - { - if ($this->traits !== null) { - return $this->traits; - } - - $this->parse(); - - return $this->traits; - } - - /** - * Gets the names of all files that have been included - * using include(), include_once(), require() or require_once(). - * - * Parameter $categorize set to TRUE causing this function to return a - * multi-dimensional array with categories in the keys of the first dimension - * and constants and their values in the second dimension. - * - * Parameter $category allow to filter following specific inclusion type - * - * @param bool $categorize OPTIONAL - * @param string $category OPTIONAL Either 'require_once', 'require', - * 'include_once', 'include'. - * - * @return array - */ - public function getIncludes($categorize = false, $category = null) - { - if ($this->includes === null) { - $this->includes = [ - 'require_once' => [], - 'require' => [], - 'include_once' => [], - 'include' => [] - ]; - - foreach ($this->tokens as $token) { - switch (PHP_Token_Util::getClass($token)) { - case 'PHP_Token_REQUIRE_ONCE': - case 'PHP_Token_REQUIRE': - case 'PHP_Token_INCLUDE_ONCE': - case 'PHP_Token_INCLUDE': - $this->includes[$token->getType()][] = $token->getName(); - break; - } - } - } - - if (isset($this->includes[$category])) { - $includes = $this->includes[$category]; - } elseif ($categorize === false) { - $includes = array_merge( - $this->includes['require_once'], - $this->includes['require'], - $this->includes['include_once'], - $this->includes['include'] - ); - } else { - $includes = $this->includes; - } - - return $includes; - } - - /** - * Returns the name of the function or method a line belongs to. - * - * @return string or null if the line is not in a function or method - */ - public function getFunctionForLine($line) - { - $this->parse(); - - if (isset($this->lineToFunctionMap[$line])) { - return $this->lineToFunctionMap[$line]; - } - } - - protected function parse() - { - $this->interfaces = []; - $this->classes = []; - $this->traits = []; - $this->functions = []; - $class = []; - $classEndLine = []; - $trait = false; - $traitEndLine = false; - $interface = false; - $interfaceEndLine = false; - - foreach ($this->tokens as $token) { - switch (PHP_Token_Util::getClass($token)) { - case 'PHP_Token_HALT_COMPILER': - return; - - case 'PHP_Token_INTERFACE': - $interface = $token->getName(); - $interfaceEndLine = $token->getEndLine(); - - $this->interfaces[$interface] = [ - 'methods' => [], - 'parent' => $token->getParent(), - 'keywords' => $token->getKeywords(), - 'docblock' => $token->getDocblock(), - 'startLine' => $token->getLine(), - 'endLine' => $interfaceEndLine, - 'package' => $token->getPackage(), - 'file' => $this->filename - ]; - break; - - case 'PHP_Token_CLASS': - case 'PHP_Token_TRAIT': - $tmp = [ - 'methods' => [], - 'parent' => $token->getParent(), - 'interfaces'=> $token->getInterfaces(), - 'keywords' => $token->getKeywords(), - 'docblock' => $token->getDocblock(), - 'startLine' => $token->getLine(), - 'endLine' => $token->getEndLine(), - 'package' => $token->getPackage(), - 'file' => $this->filename - ]; - - if ($token->getName() !== null) { - if ($token instanceof PHP_Token_CLASS) { - $class[] = $token->getName(); - $classEndLine[] = $token->getEndLine(); - - $this->classes[$class[count($class) - 1]] = $tmp; - } else { - $trait = $token->getName(); - $traitEndLine = $token->getEndLine(); - $this->traits[$trait] = $tmp; - } - } - break; - - case 'PHP_Token_FUNCTION': - $name = $token->getName(); - $tmp = [ - 'docblock' => $token->getDocblock(), - 'keywords' => $token->getKeywords(), - 'visibility'=> $token->getVisibility(), - 'signature' => $token->getSignature(), - 'startLine' => $token->getLine(), - 'endLine' => $token->getEndLine(), - 'ccn' => $token->getCCN(), - 'file' => $this->filename - ]; - - if (empty($class) && - $trait === false && - $interface === false) { - $this->functions[$name] = $tmp; - - $this->addFunctionToMap( - $name, - $tmp['startLine'], - $tmp['endLine'] - ); - } elseif (!empty($class)) { - $this->classes[$class[count($class) - 1]]['methods'][$name] = $tmp; - - $this->addFunctionToMap( - $class[count($class) - 1] . '::' . $name, - $tmp['startLine'], - $tmp['endLine'] - ); - } elseif ($trait !== false) { - $this->traits[$trait]['methods'][$name] = $tmp; - - $this->addFunctionToMap( - $trait . '::' . $name, - $tmp['startLine'], - $tmp['endLine'] - ); - } else { - $this->interfaces[$interface]['methods'][$name] = $tmp; - } - break; - - case 'PHP_Token_CLOSE_CURLY': - if (!empty($classEndLine) && - $classEndLine[count($classEndLine) - 1] == $token->getLine()) { - array_pop($classEndLine); - array_pop($class); - } elseif ($traitEndLine !== false && - $traitEndLine == $token->getLine()) { - $trait = false; - $traitEndLine = false; - } elseif ($interfaceEndLine !== false && - $interfaceEndLine == $token->getLine()) { - $interface = false; - $interfaceEndLine = false; - } - break; - } - } - } - - /** - * @return array - */ - public function getLinesOfCode() - { - return $this->linesOfCode; - } - - /** - */ - public function rewind() - { - $this->position = 0; - } - - /** - * @return bool - */ - public function valid() - { - return isset($this->tokens[$this->position]); - } - - /** - * @return int - */ - public function key() - { - return $this->position; - } - - /** - * @return PHP_Token - */ - public function current() - { - return $this->tokens[$this->position]; - } - - /** - */ - public function next() - { - $this->position++; - } - - /** - * @param int $offset - * - * @return bool - */ - public function offsetExists($offset) - { - return isset($this->tokens[$offset]); - } - - /** - * @param int $offset - * - * @return mixed - * - * @throws OutOfBoundsException - */ - public function offsetGet($offset) - { - if (!$this->offsetExists($offset)) { - throw new OutOfBoundsException( - sprintf( - 'No token at position "%s"', - $offset - ) - ); - } - - return $this->tokens[$offset]; - } - - /** - * @param int $offset - * @param mixed $value - */ - public function offsetSet($offset, $value) - { - $this->tokens[$offset] = $value; - } - - /** - * @param int $offset - * - * @throws OutOfBoundsException - */ - public function offsetUnset($offset) - { - if (!$this->offsetExists($offset)) { - throw new OutOfBoundsException( - sprintf( - 'No token at position "%s"', - $offset - ) - ); - } - - unset($this->tokens[$offset]); - } - - /** - * Seek to an absolute position. - * - * @param int $position - * - * @throws OutOfBoundsException - */ - public function seek($position) - { - $this->position = $position; - - if (!$this->valid()) { - throw new OutOfBoundsException( - sprintf( - 'No token at position "%s"', - $this->position - ) - ); - } - } - - /** - * @param string $name - * @param int $startLine - * @param int $endLine - */ - private function addFunctionToMap($name, $startLine, $endLine) - { - for ($line = $startLine; $line <= $endLine; $line++) { - $this->lineToFunctionMap[$line] = $name; - } - } -} diff --git a/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php b/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php deleted file mode 100644 index 9d69393..0000000 --- a/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.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. - */ - -/** - * A caching factory for token stream objects. - */ -class PHP_Token_Stream_CachingFactory -{ - /** - * @var array - */ - protected static $cache = []; - - /** - * @param string $filename - * - * @return PHP_Token_Stream - */ - public static function get($filename) - { - if (!isset(self::$cache[$filename])) { - self::$cache[$filename] = new PHP_Token_Stream($filename); - } - - return self::$cache[$filename]; - } - - /** - * @param string $filename - */ - public static function clear($filename = null) - { - if (is_string($filename)) { - unset(self::$cache[$filename]); - } else { - self::$cache = []; - } - } -} diff --git a/vendor/phpunit/php-token-stream/src/Token/Util.php b/vendor/phpunit/php-token-stream/src/Token/Util.php deleted file mode 100644 index 4d82f1a..0000000 --- a/vendor/phpunit/php-token-stream/src/Token/Util.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -final class PHP_Token_Util -{ - public static function getClass($object): string - { - $parts = explode('\\', get_class($object)); - - return array_pop($parts); - } -} \ No newline at end of file diff --git a/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php b/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php deleted file mode 100644 index 05eca32..0000000 --- a/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\TestCase; - -class PHP_Token_ClassTest extends TestCase -{ - /** - * @var PHP_Token_CLASS - */ - private $class; - - /** - * @var PHP_Token_FUNCTION - */ - private $function; - - protected function setUp() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'source2.php') as $token) { - if ($token instanceof PHP_Token_CLASS) { - $this->class = $token; - } - - if ($token instanceof PHP_Token_FUNCTION) { - $this->function = $token; - break; - } - } - } - - public function testGetClassKeywords() - { - $this->assertEquals('abstract', $this->class->getKeywords()); - } - - public function testGetFunctionKeywords() - { - $this->assertEquals('abstract,static', $this->function->getKeywords()); - } - - public function testGetFunctionVisibility() - { - $this->assertEquals('public', $this->function->getVisibility()); - } - - public function testIssue19() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'issue19.php') as $token) { - if ($token instanceof PHP_Token_CLASS) { - $this->assertFalse($token->hasInterfaces()); - } - } - } - - public function testIssue30() - { - $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'issue30.php'); - $this->assertCount(1, $ts->getClasses()); - } - - public function testAnonymousClassesAreHandledCorrectly() - { - $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_that_declares_anonymous_class.php'); - - $classes = $ts->getClasses(); - - $this->assertEquals( - [ - 'class_with_method_that_declares_anonymous_class', - 'AnonymousClass:9#31', - 'AnonymousClass:10#55', - 'AnonymousClass:11#75', - 'AnonymousClass:12#91', - 'AnonymousClass:13#107' - ], - array_keys($classes) - ); - } - - /** - * @ticket https://github.com/sebastianbergmann/php-token-stream/issues/52 - */ - public function testAnonymousClassesAreHandledCorrectly2() - { - $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_that_declares_anonymous_class2.php'); - - $classes = $ts->getClasses(); - - $this->assertEquals(['Test', 'AnonymousClass:4#23'], array_keys($classes)); - $this->assertEquals(['methodOne', 'methodTwo'], array_keys($classes['Test']['methods'])); - - $this->assertEmpty($ts->getFunctions()); - } - - public function testImportedFunctionsAreHandledCorrectly() - { - $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'classUsesNamespacedFunction.php'); - - $this->assertEmpty($ts->getFunctions()); - $this->assertCount(1, $ts->getClasses()); - } - - /** - * @ticket https://github.com/sebastianbergmann/php-code-coverage/issues/543 - */ - public function testClassWithMultipleAnonymousClassesAndFunctionsIsHandledCorrectly() - { - $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_multiple_anonymous_classes_and_functions.php'); - - $classes = $ts->getClasses(); - - $this->assertArrayHasKey('class_with_multiple_anonymous_classes_and_functions', $classes); - $this->assertArrayHasKey('AnonymousClass:6#23', $classes); - $this->assertArrayHasKey('AnonymousClass:12#53', $classes); - $this->assertArrayHasKey('m', $classes['class_with_multiple_anonymous_classes_and_functions']['methods']); - $this->assertArrayHasKey('anonymousFunction:18#81', $classes['class_with_multiple_anonymous_classes_and_functions']['methods']); - $this->assertArrayHasKey('anonymousFunction:22#108', $classes['class_with_multiple_anonymous_classes_and_functions']['methods']); - } - - /** - * @ticket https://github.com/sebastianbergmann/php-token-stream/issues/68 - */ - public function testClassWithMethodNamedEmptyIsHandledCorrectly() - { - $classes = (new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_named_empty.php'))->getClasses(); - - $this->assertArrayHasKey('class_with_method_named_empty', $classes); - $this->assertArrayHasKey('empty', $classes['class_with_method_named_empty']['methods']); - } - - /** - * @ticket https://github.com/sebastianbergmann/php-code-coverage/issues/424 - */ - public function testAnonymousFunctionDoesNotAffectStartAndEndLineOfMethod() - { - $classes = (new PHP_Token_Stream(TEST_FILES_PATH . 'php-code-coverage-issue-424.php'))->getClasses(); - - $this->assertSame(5, $classes['Example']['methods']['even']['startLine']); - $this->assertSame(12, $classes['Example']['methods']['even']['endLine']); - - $this->assertSame(7, $classes['Example']['methods']['anonymousFunction:7#28']['startLine']); - $this->assertSame(9, $classes['Example']['methods']['anonymousFunction:7#28']['endLine']); - } -} diff --git a/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php b/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php deleted file mode 100644 index 4e893d8..0000000 --- a/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\TestCase; - -class PHP_Token_ClosureTest extends TestCase -{ - /** - * @var PHP_Token_FUNCTION[] - */ - private $functions; - - protected function setUp() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'closure.php') as $token) { - if ($token instanceof PHP_Token_FUNCTION) { - $this->functions[] = $token; - } - } - } - - public function testGetArguments() - { - $this->assertEquals(['$foo' => null, '$bar' => null], $this->functions[0]->getArguments()); - $this->assertEquals(['$foo' => 'Foo', '$bar' => null], $this->functions[1]->getArguments()); - $this->assertEquals(['$foo' => null, '$bar' => null, '$baz' => null], $this->functions[2]->getArguments()); - $this->assertEquals(['$foo' => 'Foo', '$bar' => null, '$baz' => null], $this->functions[3]->getArguments()); - $this->assertEquals([], $this->functions[4]->getArguments()); - $this->assertEquals([], $this->functions[5]->getArguments()); - } - - public function testGetName() - { - $this->assertEquals('anonymousFunction:2#5', $this->functions[0]->getName()); - $this->assertEquals('anonymousFunction:3#27', $this->functions[1]->getName()); - $this->assertEquals('anonymousFunction:4#51', $this->functions[2]->getName()); - $this->assertEquals('anonymousFunction:5#71', $this->functions[3]->getName()); - $this->assertEquals('anonymousFunction:6#93', $this->functions[4]->getName()); - $this->assertEquals('anonymousFunction:7#106', $this->functions[5]->getName()); - } - - public function testGetLine() - { - $this->assertEquals(2, $this->functions[0]->getLine()); - $this->assertEquals(3, $this->functions[1]->getLine()); - $this->assertEquals(4, $this->functions[2]->getLine()); - $this->assertEquals(5, $this->functions[3]->getLine()); - } - - public function testGetEndLine() - { - $this->assertEquals(2, $this->functions[0]->getLine()); - $this->assertEquals(3, $this->functions[1]->getLine()); - $this->assertEquals(4, $this->functions[2]->getLine()); - $this->assertEquals(5, $this->functions[3]->getLine()); - } -} diff --git a/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php b/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php deleted file mode 100644 index c88454b..0000000 --- a/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\TestCase; - -class PHP_Token_FunctionTest extends TestCase -{ - /** - * @var PHP_Token_FUNCTION[] - */ - private $functions; - - protected function setUp() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'source.php') as $token) { - if ($token instanceof PHP_Token_FUNCTION) { - $this->functions[] = $token; - } - } - } - - public function testGetArguments() - { - $this->assertEquals([], $this->functions[0]->getArguments()); - - $this->assertEquals( - ['$baz' => 'Baz'], $this->functions[1]->getArguments() - ); - - $this->assertEquals( - ['$foobar' => 'Foobar'], $this->functions[2]->getArguments() - ); - - $this->assertEquals( - ['$barfoo' => 'Barfoo'], $this->functions[3]->getArguments() - ); - - $this->assertEquals([], $this->functions[4]->getArguments()); - - $this->assertEquals(['$x' => null, '$y' => null], $this->functions[5]->getArguments()); - } - - public function testGetName() - { - $this->assertEquals('foo', $this->functions[0]->getName()); - $this->assertEquals('bar', $this->functions[1]->getName()); - $this->assertEquals('foobar', $this->functions[2]->getName()); - $this->assertEquals('barfoo', $this->functions[3]->getName()); - $this->assertEquals('baz', $this->functions[4]->getName()); - } - - public function testGetLine() - { - $this->assertEquals(5, $this->functions[0]->getLine()); - $this->assertEquals(10, $this->functions[1]->getLine()); - $this->assertEquals(17, $this->functions[2]->getLine()); - $this->assertEquals(21, $this->functions[3]->getLine()); - $this->assertEquals(29, $this->functions[4]->getLine()); - $this->assertEquals(37, $this->functions[6]->getLine()); - } - - public function testGetEndLine() - { - $this->assertEquals(5, $this->functions[0]->getEndLine()); - $this->assertEquals(12, $this->functions[1]->getEndLine()); - $this->assertEquals(19, $this->functions[2]->getEndLine()); - $this->assertEquals(23, $this->functions[3]->getEndLine()); - $this->assertEquals(31, $this->functions[4]->getEndLine()); - $this->assertEquals(41, $this->functions[6]->getEndLine()); - } - - public function testGetDocblock() - { - $this->assertNull($this->functions[0]->getDocblock()); - - $this->assertEquals( - "/**\n * @param Baz \$baz\n */", - $this->functions[1]->getDocblock() - ); - - $this->assertEquals( - "/**\n * @param Foobar \$foobar\n */", - $this->functions[2]->getDocblock() - ); - - $this->assertNull($this->functions[3]->getDocblock()); - $this->assertNull($this->functions[4]->getDocblock()); - } - - public function testSignature() - { - $tokens = new PHP_Token_Stream(TEST_FILES_PATH . 'source5.php'); - $functions = $tokens->getFunctions(); - $classes = $tokens->getClasses(); - $interfaces = $tokens->getInterfaces(); - - $this->assertEquals( - 'foo($a, array $b, array $c = array())', - $functions['foo']['signature'] - ); - - $this->assertEquals( - 'm($a, array $b, array $c = array())', - $classes['c']['methods']['m']['signature'] - ); - - $this->assertEquals( - 'm($a, array $b, array $c = array())', - $classes['a']['methods']['m']['signature'] - ); - - $this->assertEquals( - 'm($a, array $b, array $c = array())', - $interfaces['i']['methods']['m']['signature'] - ); - } -} diff --git a/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php b/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php deleted file mode 100644 index 7f83a73..0000000 --- a/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\TestCase; - -class PHP_Token_IncludeTest extends TestCase -{ - /** - * @var PHP_Token_Stream - */ - private $ts; - - protected function setUp() - { - $this->ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source3.php'); - } - - public function testGetIncludes() - { - $this->assertSame( - ['test4.php', 'test3.php', 'test2.php', 'test1.php'], - $this->ts->getIncludes() - ); - } - - public function testGetIncludesCategorized() - { - $this->assertSame( - [ - 'require_once' => ['test4.php'], - 'require' => ['test3.php'], - 'include_once' => ['test2.php'], - 'include' => ['test1.php'] - ], - $this->ts->getIncludes(true) - ); - } - - public function testGetIncludesCategory() - { - $this->assertSame( - ['test4.php'], - $this->ts->getIncludes(true, 'require_once') - ); - } -} diff --git a/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php b/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php deleted file mode 100644 index c61ec38..0000000 --- a/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\TestCase; - -class PHP_Token_InterfaceTest extends TestCase -{ - /** - * @var PHP_Token_CLASS - */ - private $class; - - /** - * @var PHP_Token_INTERFACE[] - */ - private $interfaces; - - protected function setUp() - { - $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source4.php'); - $i = 0; - - foreach ($ts as $token) { - if ($token instanceof PHP_Token_CLASS) { - $this->class = $token; - } elseif ($token instanceof PHP_Token_INTERFACE) { - $this->interfaces[$i] = $token; - $i++; - } - } - } - - public function testGetName() - { - $this->assertEquals( - 'iTemplate', $this->interfaces[0]->getName() - ); - } - - public function testGetParentNotExists() - { - $this->assertFalse( - $this->interfaces[0]->getParent() - ); - } - - public function testHasParentNotExists() - { - $this->assertFalse( - $this->interfaces[0]->hasParent() - ); - } - - public function testGetParentExists() - { - $this->assertEquals( - 'a', $this->interfaces[2]->getParent() - ); - } - - public function testHasParentExists() - { - $this->assertTrue( - $this->interfaces[2]->hasParent() - ); - } - - public function testGetInterfacesExists() - { - $this->assertEquals( - ['b'], - $this->class->getInterfaces() - ); - } - - public function testHasInterfacesExists() - { - $this->assertTrue( - $this->class->hasInterfaces() - ); - } - - public function testGetPackageNamespace() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php') as $token) { - if ($token instanceof PHP_Token_INTERFACE) { - $package = $token->getPackage(); - $this->assertSame('Foo\\Bar', $package['namespace']); - } - } - } - - public function provideFilesWithClassesWithinMultipleNamespaces() - { - return [ - [TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingBraces.php'], - [TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingNonBraceSyntax.php'], - ]; - } - - /** - * @dataProvider provideFilesWithClassesWithinMultipleNamespaces - */ - public function testGetPackageNamespaceForFileWithMultipleNamespaces($filepath) - { - $tokenStream = new PHP_Token_Stream($filepath); - $firstClassFound = false; - - foreach ($tokenStream as $token) { - if ($firstClassFound === false && $token instanceof PHP_Token_INTERFACE) { - $package = $token->getPackage(); - $this->assertSame('TestClassInBar', $token->getName()); - $this->assertSame('Foo\\Bar', $package['namespace']); - $firstClassFound = true; - continue; - } - // Secound class - if ($token instanceof PHP_Token_INTERFACE) { - $package = $token->getPackage(); - $this->assertSame('TestClassInBaz', $token->getName()); - $this->assertSame('Foo\\Baz', $package['namespace']); - - return; - } - } - $this->fail('Searching for 2 classes failed'); - } - - public function testGetPackageNamespaceIsEmptyForInterfacesThatAreNotWithinNamespaces() - { - foreach ($this->interfaces as $token) { - $package = $token->getPackage(); - $this->assertSame('', $package['namespace']); - } - } - - public function testGetPackageNamespaceWhenExtentingFromNamespaceClass() - { - $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classExtendsNamespacedClass.php'); - $firstClassFound = false; - - foreach ($tokenStream as $token) { - if ($firstClassFound === false && $token instanceof PHP_Token_INTERFACE) { - $package = $token->getPackage(); - $this->assertSame('Baz', $token->getName()); - $this->assertSame('Foo\\Bar', $package['namespace']); - $firstClassFound = true; - continue; - } - - if ($token instanceof PHP_Token_INTERFACE) { - $package = $token->getPackage(); - $this->assertSame('Extender', $token->getName()); - $this->assertSame('Other\\Space', $package['namespace']); - - return; - } - } - - $this->fail('Searching for 2 classes failed'); - } -} diff --git a/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php b/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php deleted file mode 100644 index 97a9224..0000000 --- a/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\TestCase; - -class PHP_Token_NamespaceTest extends TestCase -{ - public function testGetName() - { - $tokenStream = new PHP_Token_Stream( - TEST_FILES_PATH . 'classInNamespace.php' - ); - - foreach ($tokenStream as $token) { - if ($token instanceof PHP_Token_NAMESPACE) { - $this->assertSame('Foo\\Bar', $token->getName()); - } - } - } - - public function testGetStartLineWithUnscopedNamespace() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php') as $token) { - if ($token instanceof PHP_Token_NAMESPACE) { - $this->assertSame(2, $token->getLine()); - } - } - } - - public function testGetEndLineWithUnscopedNamespace() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php') as $token) { - if ($token instanceof PHP_Token_NAMESPACE) { - $this->assertSame(2, $token->getEndLine()); - } - } - } - public function testGetStartLineWithScopedNamespace() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'classInScopedNamespace.php') as $token) { - if ($token instanceof PHP_Token_NAMESPACE) { - $this->assertSame(2, $token->getLine()); - } - } - } - - public function testGetEndLineWithScopedNamespace() - { - foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'classInScopedNamespace.php') as $token) { - if ($token instanceof PHP_Token_NAMESPACE) { - $this->assertSame(8, $token->getEndLine()); - } - } - } -} diff --git a/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php b/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php deleted file mode 100644 index 560eec9..0000000 --- a/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php +++ /dev/null @@ -1,10 +0,0 @@ -method_in_anonymous_class(); - } - - public function methodTwo() { - return false; - } -} diff --git a/vendor/phpunit/php-token-stream/tests/_fixture/class_with_multiple_anonymous_classes_and_functions.php b/vendor/phpunit/php-token-stream/tests/_fixture/class_with_multiple_anonymous_classes_and_functions.php deleted file mode 100644 index 3267ba5..0000000 --- a/vendor/phpunit/php-token-stream/tests/_fixture/class_with_multiple_anonymous_classes_and_functions.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -require __DIR__ . '/../vendor/autoload.php'; - -define( - 'TEST_FILES_PATH', - __DIR__ . DIRECTORY_SEPARATOR . '_fixture' . DIRECTORY_SEPARATOR -); diff --git a/vendor/phpunit/phpunit/.editorconfig b/vendor/phpunit/phpunit/.editorconfig deleted file mode 100644 index 536f29a..0000000 --- a/vendor/phpunit/phpunit/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -root = true - -[*] -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -charset = utf-8 - -[*.yml] -indent_size = 2 - -[tests/_files/*_result_cache.txt] -insert_final_newline = false diff --git a/vendor/phpunit/phpunit/.gitattributes b/vendor/phpunit/phpunit/.gitattributes deleted file mode 100644 index 25423fc..0000000 --- a/vendor/phpunit/phpunit/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -/.docker export-ignore -/build export-ignore -/tools export-ignore - -*.php diff=php - diff --git a/vendor/phpunit/phpunit/.github/CODE_OF_CONDUCT.md b/vendor/phpunit/phpunit/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index ee242a8..0000000 --- a/vendor/phpunit/phpunit/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,28 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, such as physical or electronic - addresses, without explicit permission -* Other unethical or unprofessional conduct - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at sebastian@phpunit.de. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident. - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [https://contributor-covenant.org/version/1/3/0/][version] - -[homepage]: https://contributor-covenant.org -[version]: https://contributor-covenant.org/version/1/3/0/ diff --git a/vendor/phpunit/phpunit/.github/CONTRIBUTING.md b/vendor/phpunit/phpunit/.github/CONTRIBUTING.md deleted file mode 100644 index 6f593df..0000000 --- a/vendor/phpunit/phpunit/.github/CONTRIBUTING.md +++ /dev/null @@ -1,68 +0,0 @@ -# Contributing to PHPUnit - -## Contributor Code of Conduct - -Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. - -## Workflow - -* Fork the project. -* Make your bug fix or feature addition. -* Add tests for it. This is important so we don't break it in a future version unintentionally. -* Send a pull request. Bonus points for topic branches. - -Please make sure that you have [set up your user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name ` look really stupid in the commit history of a project. - -Pull requests for bug fixes must be made for the oldest branch that is [supported](https://phpunit.de/supported-versions.html). Pull requests for new features must be based on the `master` branch. - -We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes. - -Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us if you feel that we forgot to respond. - -## Coding Guidelines - -This project comes with a configuration file and an executable for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your source code for compliance with this project's coding guidelines: - -```bash -$ ./tools/php-cs-fixer fix -``` - -## Using PHPUnit from a Git checkout - -The following commands can be used to perform the initial checkout of PHPUnit: - -```bash -$ git clone git://github.com/sebastianbergmann/phpunit.git - -$ cd phpunit -``` - -Retrieve PHPUnit's dependencies using [Composer](https://getcomposer.org/): - -```bash -$ ./tools/composer install -``` - -The `phpunit` script can be used to invoke the PHPUnit test runner: - -```bash -$ ./phpunit --version -``` - -## Running PHPUnit's own test suite - -After following the steps shown above, PHPUnit's own test suite is run like this: - -```bash -$ ./phpunit -``` - -## Reporting issues - -Please use the most specific issue tracker to search for existing tickets and to open new tickets: - -* [General problems](https://github.com/sebastianbergmann/phpunit/issues) -* [Code Coverage](https://github.com/sebastianbergmann/php-code-coverage/issues) -* [Documentation](https://github.com/sebastianbergmann/phpunit-documentation-english/issues) -* [Website](https://github.com/sebastianbergmann/phpunit-website/issues) - diff --git a/vendor/phpunit/phpunit/.github/FUNDING.yml b/vendor/phpunit/phpunit/.github/FUNDING.yml deleted file mode 100644 index a7e65cb..0000000 --- a/vendor/phpunit/phpunit/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -patreon: s_bergmann -custom: https://phpunit.de/donate.html diff --git a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BACKWARD_COMPATIBILITY_BREAK.md b/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BACKWARD_COMPATIBILITY_BREAK.md deleted file mode 100644 index 15fa2cc..0000000 --- a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BACKWARD_COMPATIBILITY_BREAK.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: 💥 Backward Compatibility Break -about: Have you encountered an issue during upgrade? -labels: backward-compatibility-break, bug ---- - - - -| Q | A -| --------------------| --------------- -| PHPUnit version | x.y.z -| PHP version | x.y.z -| Installation Method | Composer / PHAR - -#### Summary - - - -#### Previous Behavior - - - -#### Current Behavior - - - -#### How to reproduce - - diff --git a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BUG.md b/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BUG.md deleted file mode 100644 index 7edcf9e..0000000 --- a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/BUG.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: 🐞 Bug Report -about: Something is broken? -labels: bug ---- - - - -| Q | A -| --------------------| --------------- -| PHPUnit version | x.y.z -| PHP version | x.y.z -| Installation Method | Composer / PHAR - -#### Summary - - - -#### Current behavior - - - -#### How to reproduce - - - -#### Expected behavior - - diff --git a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md deleted file mode 100644 index 52f6954..0000000 --- a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: 🎉 Feature Request -about: You have a neat idea that should be implemented? -labels: enhancement ---- - - diff --git a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md b/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md deleted file mode 100644 index d8fff4e..0000000 --- a/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: ❓ Support Question -about: Have a problem that you cannot figure out? -labels: support ---- - - - -| Q | A -| --------------------| --------------- -| PHPUnit version | x.y.z -| PHP version | x.y.z -| Installation Method | Composer / PHAR - - diff --git a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md b/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md deleted file mode 100644 index 33306a1..0000000 --- a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: 🐞 Failing Test -about: You found a bug and have a failing test? -labels: bug ---- - - diff --git a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FIX.md b/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FIX.md deleted file mode 100644 index d510eeb..0000000 --- a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/FIX.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: 🐞 Bug Fix -about: You have a fix for a bug? -labels: bug ---- - - diff --git a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md b/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md deleted file mode 100644 index aceb65e..0000000 --- a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: ⚙ Improvement -about: You have some improvement to make PHPUnit better? -labels: enhancement ---- - - diff --git a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md b/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md deleted file mode 100644 index f2e765d..0000000 --- a/vendor/phpunit/phpunit/.github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: 🎉 New Feature -about: You have implemented some neat idea that you want to make part of PHPUnit? -labels: enhancement ---- - - diff --git a/vendor/phpunit/phpunit/.github/workflows/ci.yml b/vendor/phpunit/phpunit/.github/workflows/ci.yml deleted file mode 100644 index 28da220..0000000 --- a/vendor/phpunit/phpunit/.github/workflows/ci.yml +++ /dev/null @@ -1,44 +0,0 @@ -# https://help.github.com/en/categories/automating-your-workflow-with-github-actions - -on: - - push - - pull_request - -name: CI - -jobs: - coding-guidelines: - name: Coding Guidelines - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Run friendsofphp/php-cs-fixer - run: php7.3 ./tools/php-cs-fixer fix --diff-format=udiff --dry-run --show-progress=dots --using-cache=no --verbose - - type-checker: - name: Type Checker - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Update dependencies with composer - run: php7.3 ./tools/composer update --no-interaction --no-ansi --no-progress --no-suggest - - - name: Run vimeo/psalm on public API - run: php7.3 ./tools/psalm --config=.psalm/static-analysis.xml --no-progress --show-info=false - - - name: Run vimeo/psalm on internal code - run: php7.3 ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats - - backward-compatibility: - name: Backward Compatibility - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Run roave/backward-compatibility-check - run: php7.3 ./tools/roave-backward-compatibility-check --from=dfad4702af08b4d706dbc57a8badfa1dfe0cd046 diff --git a/vendor/phpunit/phpunit/.gitignore b/vendor/phpunit/phpunit/.gitignore deleted file mode 100644 index 611443e..0000000 --- a/vendor/phpunit/phpunit/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -/.ant_targets -/.idea -/.php_cs -/.php_cs.cache -/build/documentation -/build/logfiles -/build/phar -/build/phar-scoped -/build/phpdox -/build/*.phar -/build/*.phar.asc -/build/binary-phar-autoload.php -/cache.properties -/composer.lock -/tests/end-to-end/*.diff -/tests/end-to-end/*.exp -/tests/end-to-end/*.log -/tests/end-to-end/*.out -/tests/end-to-end/*.php -/vendor -.phpunit.result.cache diff --git a/vendor/phpunit/phpunit/.php_cs.dist b/vendor/phpunit/phpunit/.php_cs.dist deleted file mode 100644 index 4d54151..0000000 --- a/vendor/phpunit/phpunit/.php_cs.dist +++ /dev/null @@ -1,207 +0,0 @@ - - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. -EOF; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules( - [ - 'align_multiline_comment' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ - 'operators' => [ - '=' => 'align', - '=>' => 'align', - ], - ], - 'blank_line_after_namespace' => true, - 'blank_line_before_statement' => [ - 'statements' => [ - 'break', - 'continue', - 'declare', - 'do', - 'for', - 'foreach', - 'if', - 'include', - 'include_once', - 'require', - 'require_once', - 'return', - 'switch', - 'throw', - 'try', - 'while', - 'yield', - ], - ], - 'braces' => true, - 'cast_spaces' => true, - 'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], - 'combine_consecutive_issets' => true, - 'combine_consecutive_unsets' => true, - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'declare_equal_normalize' => ['space' => 'none'], - 'declare_strict_types' => true, - 'dir_constant' => true, - 'elseif' => true, - 'encoding' => true, - 'full_opening_tag' => true, - 'function_declaration' => true, - 'header_comment' => ['header' => $header, 'separate' => 'none'], - 'indentation_type' => true, - 'is_null' => true, - 'line_ending' => true, - 'list_syntax' => ['syntax' => 'short'], - 'logical_operators' => true, - 'lowercase_cast' => true, - 'lowercase_constants' => true, - 'lowercase_keywords' => true, - 'lowercase_static_reference' => true, - 'magic_constant_casing' => true, - 'method_argument_space' => ['ensure_fully_multiline' => true], - 'modernize_types_casting' => true, - 'multiline_comment_opening_closing' => true, - 'multiline_whitespace_before_semicolons' => true, - 'native_constant_invocation' => true, - 'native_function_casing' => true, - 'native_function_invocation' => true, - 'new_with_braces' => false, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_class_opening' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_blank_lines_before_namespace' => true, - 'no_closing_tag' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_homoglyph_names' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'print'], - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_null_property_initialization' => true, - 'no_php4_constructor' => true, - 'no_short_bool_cast' => true, - 'no_short_echo_tag' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_trailing_whitespace' => true, - 'no_trailing_whitespace_in_comment' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unneeded_curly_braces' => true, - 'no_unneeded_final_method' => true, - 'no_unreachable_default_argument_value' => true, - 'no_unset_on_property' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'non_printable_character' => true, - 'normalize_index_brace' => true, - 'object_operator_without_whitespace' => true, - 'ordered_class_elements' => [ - 'order' => [ - 'use_trait', - 'constant_public', - 'constant_protected', - 'constant_private', - 'property_public_static', - 'property_protected_static', - 'property_private_static', - 'property_public', - 'property_protected', - 'property_private', - 'method_public_static', - 'construct', - 'destruct', - 'magic', - 'phpunit', - 'method_public', - 'method_protected', - 'method_private', - 'method_protected_static', - 'method_private_static', - ], - ], - 'ordered_imports' => true, - 'ordered_interfaces' => [ - 'direction' => 'ascend', - 'order' => 'alpha', - ], - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_align' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_types' => ['groups' => ['simple', 'meta']], - 'phpdoc_types_order' => true, - 'phpdoc_var_without_name' => true, - 'pow_to_exponentiation' => true, - 'protected_to_private' => true, - 'return_assignment' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'self_accessor' => true, - 'semicolon_after_instruction' => true, - 'set_type_to_cast' => true, - 'short_scalar_cast' => true, - 'simplified_null_return' => false, - 'single_blank_line_at_eof' => true, - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'single_quote' => true, - 'standardize_not_equals' => true, - 'ternary_to_null_coalescing' => true, - 'trailing_comma_in_multiline_array' => true, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, - 'visibility_required' => [ - 'elements' => [ - 'const', - 'method', - 'property', - ], - ], - 'void_return' => true, - 'whitespace_after_comma_in_array' => true, - ] - ) - ->setFinder( - PhpCsFixer\Finder::create() - ->files() - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests/_files') - ->in(__DIR__ . '/tests/basic') - ->in(__DIR__ . '/tests/end-to-end') - ->in(__DIR__ . '/tests/fail') - ->in(__DIR__ . '/tests/unit') - ->notName('*.phpt') - ->notName('ClassWithAllPossibleReturnTypes.php') - ); diff --git a/vendor/phpunit/phpunit/.phpstorm.meta.php b/vendor/phpunit/phpunit/.phpstorm.meta.php deleted file mode 100644 index 5e4c4c2..0000000 --- a/vendor/phpunit/phpunit/.phpstorm.meta.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - $expectedElement->childNodes->item($i) - $actualElement->childNodes->item($i) - - - $subset - $expected - $expected - - - $expectedElement->childNodes->item($i) - $actualElement->childNodes->item($i) - - - $expectedAttribute->name - - - $expectedAttribute->name - - - - - Assert::anything(...\func_get_args()) - Assert::isTrue(...\func_get_args()) - Assert::isFalse(...\func_get_args()) - Assert::isJson(...\func_get_args()) - Assert::isNull(...\func_get_args()) - Assert::isFinite(...\func_get_args()) - Assert::isInfinite(...\func_get_args()) - Assert::isNan(...\func_get_args()) - Assert::isEmpty(...\func_get_args()) - Assert::isWritable(...\func_get_args()) - Assert::isReadable(...\func_get_args()) - Assert::directoryExists(...\func_get_args()) - Assert::fileExists(...\func_get_args()) - - - - - $this->getCountOf($other) - - - - - $other - - - - - $other - - - - - $other - - - - - $this->className - - - - - $error - - - - - bool - - - - - $this->getCountOf($expected) - - - - - "--- Expected\n+++ Actual\n" - - - - - $className - - - - - $comparisonFailure - - - - - $t->getPrevious() - - - - - self - - - $this->will($stub) - $this->will($stub) - $this->will($stub) - $this->will($stub) - $this->will($stub) - $this->will($stub) - $this->will($stub) - $this->will($stub) - - - self - self - self - self - self - self - self - self - - - - - $className - $className - $interfaceName - $className - - - $e - - - \strpos($args[$i], '$') - - - \WSDL_CACHE_NONE - - - - - $this->type - $this->type - - - $type - - - - - allowsNull - - - - - $invocation === null - - - - - null - - - - - $class_name - $this->expectedException - - - $header - - - - null - $beStrictAboutChangesToGlobalState - null - - - filter - - - $categories - - - - - getDiff - - - - - $isAnyCoverageRequired - - - - - $className - $className - - - $afterClassMethod - - - - - $matches[2] - $matches[3] - - - - - $sections['FILEEOF'] - - - append - - - $sectionOffset - - - - - \strpos($test->getName(), '::') - - - getName - - - - - $suite - $suite - $suite - $printerClass - - - - $class->newInstance($outputStream) - - - null|Printer|string - - - \strrpos($this->arguments['test'], '.') - - - $suite - $suite - $suite - $suite - - - - - $option['desc'] - $option['desc'] - - - - - $color - - - - - - Printer - - - $loader - - - $whitelistFromConfigurationFile - - - $arguments['printer'] - $this->createPrinter($arguments['printer'], $arguments) - $this->createPrinter(ResultPrinter::class, $arguments) - - - - - - - - Invoker - - - - - $extension - $listener - $testSuiteNodes->item(0) - $testSuiteNode - - - bool - - - \version_compare(\PHP_VERSION, $phpVersion, $phpVersionOperator) - - - $result[$array][$name]['verbatim'] - $result[$array][$name]['force'] - $result[$array][$name]['value'] - - - $testSuiteNodes->item(0) - - - hasAttribute - getAttribute - hasAttribute - getAttribute - - - hasAttribute - getAttribute - hasAttribute - getAttribute - getAttribute - getAttribute - getAttribute - - - - - - - - getTrace - - - - - $i - $i - $i - - - $long_options - - - - - $constants['user'] - - - - - $suite->getName() - - - $this->testSuiteTimes - - - null - - - getName - getName - - - - - $className - - - getName - getName - getName - getName - getName - getName - getName - - - - - $this->getException($warnings[0]) - $this->getException($failures[0]) - - - - $exception - - - Exception - - - \strrpos($key, "\0") - - - $childResult->getCodeCoverage() - - - merge - - - setResult - addToAssertionCount - - - - - $out[1] - - - $out[1] - - - $out - - - - - $matches - - - - - \array_flip($lineNumbers) - - - - - $prefix['start'] - $prefix['message'] - $prefix['diff'] - $prefix['default'] - $prefix['trace'] - $prefix['last'] - - - - - $this->currentTestClassPrettified - - - - - $value - - - $test->dataName() - $name - $name - - - - - getName - - - - - $this->currentTestClassPrettified - - - - - $suite->getIterator() - - - - - $item - - - (new DOMDocument)->importNode($element, true) - - - DOMElement - - - $item - - - $arguments - - - $element->childNodes->item(0)->childNodes - - - - - $suite->getIterator() - - - diff --git a/vendor/phpunit/phpunit/.psalm/config.xml b/vendor/phpunit/phpunit/.psalm/config.xml deleted file mode 100644 index 5e4031a..0000000 --- a/vendor/phpunit/phpunit/.psalm/config.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/.psalm/static-analysis.xml b/vendor/phpunit/phpunit/.psalm/static-analysis.xml deleted file mode 100644 index cfe79f5..0000000 --- a/vendor/phpunit/phpunit/.psalm/static-analysis.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/.travis.yml b/vendor/phpunit/phpunit/.travis.yml deleted file mode 100644 index 1595780..0000000 --- a/vendor/phpunit/phpunit/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: php - -addons: - apt: - packages: - - libxml2-utils - -php: - - 7.2 - - 7.3 - - 7.4snapshot - - nightly - -matrix: - allow_failures: - - php: nightly - fast_finish: true - -env: - matrix: - - DEPENDENCIES="high" - - DEPENDENCIES="low" - global: - - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest" - -before_install: - - ./tools/composer clear-cache - -install: - - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS; fi - - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi - -before_script: - - echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - -script: - - ./phpunit --coverage-clover=coverage.xml - - ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi; - - xmllint --noout --schema phpunit.xsd phpunit.xml - - xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml - - xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml - - xmllint --noout --schema phpunit.xsd tests/_files/configuration_xinclude.xml -xinclude - -after_success: - - bash <(curl -s https://codecov.io/bash) - -notifications: - email: false diff --git a/vendor/phpunit/phpunit/ChangeLog-8.4.md b/vendor/phpunit/phpunit/ChangeLog-8.4.md deleted file mode 100644 index 7e8324c..0000000 --- a/vendor/phpunit/phpunit/ChangeLog-8.4.md +++ /dev/null @@ -1,26 +0,0 @@ -# Changes in PHPUnit 8.4 - -All notable changes of the PHPUnit 8.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [8.4.1] - 2019-10-07 - -### Fixed - -* Fixed [#3879](https://github.com/sebastianbergmann/phpunit/issues/3879): Tests with data providers in parent class do not work anymore -* Fixed [#3881](https://github.com/sebastianbergmann/phpunit/issues/3881): Regression with multiple test case classes declared in a single sourcecode file -* Fixed [#3884](https://github.com/sebastianbergmann/phpunit/issues/3884): Uncaught `ReflectionException` with TestDox XML report - -## [8.4.0] - 2019-10-04 - -### Added - -* Implemented [#3120](https://github.com/sebastianbergmann/phpunit/issues/3120): Provide `TestCase::createStub()` method as alternative to `TestCase::createMock()` -* Implemented [#3775](https://github.com/sebastianbergmann/phpunit/issues/3775): Explicit API for expecting PHP errors, warnings, and notices - -### Changed - -* The method `expectExceptionMessageRegExp()` is now deprecated. There is no behavioral change in this version of PHPUnit. Using this method will trigger a deprecation warning in PHPUnit 9 and in PHPUnit 10 it will be removed. Please use `expectExceptionMessageMatches()` instead. - -[8.4.1]: https://github.com/sebastianbergmann/phpunit/compare/8.4.0...8.4 -[8.4.0]: https://github.com/sebastianbergmann/phpunit/compare/8.3.5...8.4.0 - diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE deleted file mode 100644 index 46fabcb..0000000 --- a/vendor/phpunit/phpunit/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -PHPUnit - -Copyright (c) 2001-2019, Sebastian Bergmann . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/phpunit/README.md b/vendor/phpunit/phpunit/README.md deleted file mode 100644 index b1df7d6..0000000 --- a/vendor/phpunit/phpunit/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# PHPUnit - -PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. - -[![Latest Stable Version](https://img.shields.io/packagist/v/phpunit/phpunit.svg?style=flat-square)](https://packagist.org/packages/phpunit/phpunit) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg?style=flat-square)](https://php.net/) -[![Build Status](https://img.shields.io/travis/sebastianbergmann/phpunit/8.4.svg?style=flat-square)](https://phpunit.de/build-status.html) -[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/phpunit/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/phpunit) - -## Installation - -We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required (as well as some optional) dependencies of PHPUnit 8.4 bundled in a single file: - -```bash -$ wget https://phar.phpunit.de/phpunit-8.4.phar - -$ php phpunit-8.4.phar --version -``` - -Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the "[Getting Started](https://phpunit.de/getting-started-with-phpunit.html)" guide for details on how to install PHPUnit. - -## Contribute - -Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/.github/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects. - -## List of Contributors - -Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components: - -* [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors) -* [php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors) - -A very special thanks to everyone who has contributed to the documentation and helps maintain the translations: - -* [English](https://github.com/sebastianbergmann/phpunit-documentation-english/graphs/contributors) -* [Spanish](https://github.com/sebastianbergmann/phpunit-documentation-spanish/graphs/contributors) -* [French](https://github.com/sebastianbergmann/phpunit-documentation-french/graphs/contributors) -* [Japanese](https://github.com/sebastianbergmann/phpunit-documentation-japanese/graphs/contributors) -* [Brazilian Portuguese](https://github.com/sebastianbergmann/phpunit-documentation-brazilian-portuguese/graphs/contributors) -* [Simplified Chinese](https://github.com/sebastianbergmann/phpunit-documentation-chinese/graphs/contributors) - diff --git a/vendor/phpunit/phpunit/build.xml b/vendor/phpunit/phpunit/build.xml deleted file mode 100644 index 5df2994..0000000 --- a/vendor/phpunit/phpunit/build.xml +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/composer.json b/vendor/phpunit/phpunit/composer.json deleted file mode 100644 index 18db3fc..0000000 --- a/vendor/phpunit/phpunit/composer.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "phpunit/phpunit", - "description": "The PHP Unit Testing framework.", - "type": "library", - "keywords": [ - "phpunit", - "xunit", - "testing" - ], - "homepage": "https://phpunit.de/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues" - }, - "prefer-stable": true, - "require": { - "php": "^7.2", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "doctrine/instantiator": "^1.2.0", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" - }, - "require-dev": { - "ext-PDO": "*" - }, - "config": { - "platform": { - "php": "7.2.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "suggest": { - "phpunit/php-invoker": "^2.0.0", - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/" - ], - "files": [ - "src/Framework/Assert/Functions.php", - "tests/_files/CoverageNamespacedFunctionTest.php", - "tests/_files/CoveredFunction.php", - "tests/_files/NamespaceCoveredFunction.php" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "8.4-dev" - } - } -} diff --git a/vendor/phpunit/phpunit/phive.xml b/vendor/phpunit/phpunit/phive.xml deleted file mode 100644 index 0c3086e..0000000 --- a/vendor/phpunit/phpunit/phive.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit deleted file mode 100755 index d8393f8..0000000 --- a/vendor/phpunit/phpunit/phpunit +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (version_compare('7.2.0', PHP_VERSION, '>')) { - fwrite( - STDERR, - sprintf( - 'This version of PHPUnit is supported on PHP 7.2, PHP 7.3, and PHP 7.4.' . PHP_EOL . - 'You are using PHP %s (%s).' . PHP_EOL, - PHP_VERSION, - PHP_BINARY - ) - ); - - die(1); -} - -if (!ini_get('date.timezone')) { - ini_set('date.timezone', 'UTC'); -} - -foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) { - if (file_exists($file)) { - define('PHPUNIT_COMPOSER_INSTALL', $file); - - break; - } -} - -unset($file); - -if (!defined('PHPUNIT_COMPOSER_INSTALL')) { - fwrite( - STDERR, - 'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL . - ' composer install' . PHP_EOL . PHP_EOL . - 'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL - ); - - die(1); -} - -$options = getopt('', array('prepend:')); - -if (isset($options['prepend'])) { - require $options['prepend']; -} - -unset($options); - -require PHPUNIT_COMPOSER_INSTALL; - -PHPUnit\TextUI\Command::main(); diff --git a/vendor/phpunit/phpunit/phpunit.xml b/vendor/phpunit/phpunit/phpunit.xml deleted file mode 100644 index 7e20e9f..0000000 --- a/vendor/phpunit/phpunit/phpunit.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - tests/unit - - - - tests/end-to-end - tests/end-to-end/_files - - - - - - src - - src/Framework/Assert/Functions.php - src/Util/PHP/eval-stdin.php - - - - - - - - diff --git a/vendor/phpunit/phpunit/phpunit.xsd b/vendor/phpunit/phpunit/phpunit.xsd deleted file mode 100644 index 9bacfa5..0000000 --- a/vendor/phpunit/phpunit/phpunit.xsd +++ /dev/null @@ -1,317 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 8.4 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Exception.php b/vendor/phpunit/phpunit/src/Exception.php deleted file mode 100644 index 075a315..0000000 --- a/vendor/phpunit/phpunit/src/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php deleted file mode 100644 index 08a1017..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Assert.php +++ /dev/null @@ -1,3312 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use ArrayAccess; -use Countable; -use DOMDocument; -use DOMElement; -use PHPUnit\Framework\Constraint\ArrayHasKey; -use PHPUnit\Framework\Constraint\ArraySubset; -use PHPUnit\Framework\Constraint\Attribute; -use PHPUnit\Framework\Constraint\Callback; -use PHPUnit\Framework\Constraint\ClassHasAttribute; -use PHPUnit\Framework\Constraint\ClassHasStaticAttribute; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\Count; -use PHPUnit\Framework\Constraint\DirectoryExists; -use PHPUnit\Framework\Constraint\FileExists; -use PHPUnit\Framework\Constraint\GreaterThan; -use PHPUnit\Framework\Constraint\IsAnything; -use PHPUnit\Framework\Constraint\IsEmpty; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\Constraint\IsFalse; -use PHPUnit\Framework\Constraint\IsFinite; -use PHPUnit\Framework\Constraint\IsIdentical; -use PHPUnit\Framework\Constraint\IsInfinite; -use PHPUnit\Framework\Constraint\IsInstanceOf; -use PHPUnit\Framework\Constraint\IsJson; -use PHPUnit\Framework\Constraint\IsNan; -use PHPUnit\Framework\Constraint\IsNull; -use PHPUnit\Framework\Constraint\IsReadable; -use PHPUnit\Framework\Constraint\IsTrue; -use PHPUnit\Framework\Constraint\IsType; -use PHPUnit\Framework\Constraint\IsWritable; -use PHPUnit\Framework\Constraint\JsonMatches; -use PHPUnit\Framework\Constraint\LessThan; -use PHPUnit\Framework\Constraint\LogicalAnd; -use PHPUnit\Framework\Constraint\LogicalNot; -use PHPUnit\Framework\Constraint\LogicalOr; -use PHPUnit\Framework\Constraint\LogicalXor; -use PHPUnit\Framework\Constraint\ObjectHasAttribute; -use PHPUnit\Framework\Constraint\RegularExpression; -use PHPUnit\Framework\Constraint\SameSize; -use PHPUnit\Framework\Constraint\StringContains; -use PHPUnit\Framework\Constraint\StringEndsWith; -use PHPUnit\Framework\Constraint\StringMatchesFormatDescription; -use PHPUnit\Framework\Constraint\StringStartsWith; -use PHPUnit\Framework\Constraint\TraversableContains; -use PHPUnit\Framework\Constraint\TraversableContainsOnly; -use PHPUnit\Util\Type; -use PHPUnit\Util\Xml; -use ReflectionClass; -use ReflectionObject; -use Traversable; - -/** - * A set of assertion methods. - */ -abstract class Assert -{ - /** - * @var int - */ - private static $count = 0; - - /** - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertArrayHasKey($key, $array, string $message = ''): void - { - if (!(\is_int($key) || \is_string($key))) { - throw InvalidArgumentException::create( - 1, - 'integer or string' - ); - } - - if (!(\is_array($array) || $array instanceof ArrayAccess)) { - throw InvalidArgumentException::create( - 2, - 'array or ArrayAccess' - ); - } - - $constraint = new ArrayHasKey($key); - - static::assertThat($array, $constraint, $message); - } - - /** - * Asserts that an array has a specified subset. - * - * @param array|ArrayAccess $subset - * @param array|ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3494 - */ - public static function assertArraySubset($subset, $array, bool $checkForObjectIdentity = false, string $message = ''): void - { - self::createWarning('assertArraySubset() is deprecated and will be removed in PHPUnit 9.'); - - if (!(\is_array($subset) || $subset instanceof ArrayAccess)) { - throw InvalidArgumentException::create( - 1, - 'array or ArrayAccess' - ); - } - - if (!(\is_array($array) || $array instanceof ArrayAccess)) { - throw InvalidArgumentException::create( - 2, - 'array or ArrayAccess' - ); - } - - $constraint = new ArraySubset($subset, $checkForObjectIdentity); - - static::assertThat($array, $constraint, $message); - } - - /** - * Asserts that an array does not have a specified key. - * - * @param int|string $key - * @param array|ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertArrayNotHasKey($key, $array, string $message = ''): void - { - if (!(\is_int($key) || \is_string($key))) { - throw InvalidArgumentException::create( - 1, - 'integer or string' - ); - } - - if (!(\is_array($array) || $array instanceof ArrayAccess)) { - throw InvalidArgumentException::create( - 2, - 'array or ArrayAccess' - ); - } - - $constraint = new LogicalNot( - new ArrayHasKey($key) - ); - - static::assertThat($array, $constraint, $message); - } - - /** - * Asserts that a haystack contains a needle. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertContains($needle, $haystack, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void - { - // @codeCoverageIgnoreStart - if (\is_string($haystack)) { - self::createWarning('Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.'); - } - - if (!$checkForObjectIdentity) { - self::createWarning('The optional $checkForObjectIdentity parameter of assertContains() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertContainsEquals() instead.'); - } - - if ($checkForNonObjectIdentity) { - self::createWarning('The optional $checkForNonObjectIdentity parameter of assertContains() is deprecated and will be removed in PHPUnit 9.'); - } - - if ($ignoreCase) { - self::createWarning('The optional $ignoreCase parameter of assertContains() is deprecated and will be removed in PHPUnit 9.'); - } - // @codeCoverageIgnoreEnd - - if (\is_array($haystack) || - (\is_object($haystack) && $haystack instanceof Traversable)) { - $constraint = new TraversableContains( - $needle, - $checkForObjectIdentity, - $checkForNonObjectIdentity - ); - } elseif (\is_string($haystack)) { - if (!\is_string($needle)) { - throw InvalidArgumentException::create( - 1, - 'string' - ); - } - - $constraint = new StringContains( - $needle, - $ignoreCase - ); - } else { - throw InvalidArgumentException::create( - 2, - 'array, traversable or string' - ); - } - - static::assertThat($haystack, $constraint, $message); - } - - public static function assertContainsEquals($needle, iterable $haystack, string $message = ''): void - { - $constraint = new TraversableContains($needle, false, false); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object contains a needle. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeContains($needle, string $haystackAttributeName, $haystackClassOrObject, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void - { - self::createWarning('assertAttributeContains() is deprecated and will be removed in PHPUnit 9.'); - - static::assertContains( - $needle, - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $message, - $ignoreCase, - $checkForObjectIdentity, - $checkForNonObjectIdentity - ); - } - - /** - * Asserts that a haystack does not contain a needle. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertNotContains($needle, $haystack, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void - { - // @codeCoverageIgnoreStart - if (\is_string($haystack)) { - self::createWarning('Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.'); - } - - if (!$checkForObjectIdentity) { - self::createWarning('The optional $checkForObjectIdentity parameter of assertNotContains() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertNotContainsEquals() instead.'); - } - - if ($checkForNonObjectIdentity) { - self::createWarning('The optional $checkForNonObjectIdentity parameter of assertNotContains() is deprecated and will be removed in PHPUnit 9.'); - } - - if ($ignoreCase) { - self::createWarning('The optional $ignoreCase parameter of assertNotContains() is deprecated and will be removed in PHPUnit 9.'); - } - // @codeCoverageIgnoreEnd - - if (\is_array($haystack) || - (\is_object($haystack) && $haystack instanceof Traversable)) { - $constraint = new LogicalNot( - new TraversableContains( - $needle, - $checkForObjectIdentity, - $checkForNonObjectIdentity - ) - ); - } elseif (\is_string($haystack)) { - if (!\is_string($needle)) { - throw InvalidArgumentException::create( - 1, - 'string' - ); - } - - $constraint = new LogicalNot( - new StringContains( - $needle, - $ignoreCase - ) - ); - } else { - throw InvalidArgumentException::create( - 2, - 'array, traversable or string' - ); - } - - static::assertThat($haystack, $constraint, $message); - } - - public static function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void - { - $constraint = new LogicalNot(new TraversableContains($needle, false, false)); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object does not contain a needle. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotContains($needle, string $haystackAttributeName, $haystackClassOrObject, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void - { - self::createWarning('assertAttributeNotContains() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotContains( - $needle, - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $message, - $ignoreCase, - $checkForObjectIdentity, - $checkForNonObjectIdentity - ); - } - - /** - * Asserts that a haystack contains only values of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - if ($isNativeType === null) { - $isNativeType = Type::isType($type); - } - - static::assertThat( - $haystack, - new TraversableContainsOnly( - $type, - $isNativeType - ), - $message - ); - } - - /** - * Asserts that a haystack contains only instances of a given class name. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - static::assertThat( - $haystack, - new TraversableContainsOnly( - $className, - false - ), - $message - ); - } - - /** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object contains only values of a given type. - * - * @param object|string $haystackClassOrObject - * @param bool $isNativeType - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeContainsOnly(string $type, string $haystackAttributeName, $haystackClassOrObject, ?bool $isNativeType = null, string $message = ''): void - { - self::createWarning('assertAttributeContainsOnly() is deprecated and will be removed in PHPUnit 9.'); - - static::assertContainsOnly( - $type, - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $isNativeType, - $message - ); - } - - /** - * Asserts that a haystack does not contain only values of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - if ($isNativeType === null) { - $isNativeType = Type::isType($type); - } - - static::assertThat( - $haystack, - new LogicalNot( - new TraversableContainsOnly( - $type, - $isNativeType - ) - ), - $message - ); - } - - /** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object does not contain only values of a given - * type. - * - * @param object|string $haystackClassOrObject - * @param bool $isNativeType - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotContainsOnly(string $type, string $haystackAttributeName, $haystackClassOrObject, ?bool $isNativeType = null, string $message = ''): void - { - self::createWarning('assertAttributeNotContainsOnly() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotContainsOnly( - $type, - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $isNativeType, - $message - ); - } - - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertCount(int $expectedCount, $haystack, string $message = ''): void - { - if (!$haystack instanceof Countable && !\is_iterable($haystack)) { - throw InvalidArgumentException::create(2, 'countable or iterable'); - } - - static::assertThat( - $haystack, - new Count($expectedCount), - $message - ); - } - - /** - * Asserts the number of elements of an array, Countable or Traversable - * that is stored in an attribute. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeCount(int $expectedCount, string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeCount() is deprecated and will be removed in PHPUnit 9.'); - - static::assertCount( - $expectedCount, - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $message - ); - } - - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void - { - if (!$haystack instanceof Countable && !\is_iterable($haystack)) { - throw InvalidArgumentException::create(2, 'countable or iterable'); - } - - $constraint = new LogicalNot( - new Count($expectedCount) - ); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts the number of elements of an array, Countable or Traversable - * that is stored in an attribute. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotCount(int $expectedCount, string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeNotCount() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotCount( - $expectedCount, - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $message - ); - } - - /** - * Asserts that two variables are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertEquals($expected, $actual, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void - { - // @codeCoverageIgnoreStart - if ($delta !== 0.0) { - self::createWarning('The optional $delta parameter of assertEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertEqualsWithDelta() instead.'); - } - - if ($maxDepth !== 10) { - self::createWarning('The optional $maxDepth parameter of assertEquals() is deprecated and will be removed in PHPUnit 9.'); - } - - if ($canonicalize) { - self::createWarning('The optional $canonicalize parameter of assertEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertEqualsCanonicalizing() instead.'); - } - - if ($ignoreCase) { - self::createWarning('The optional $ignoreCase parameter of assertEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertEqualsIgnoringCase() instead.'); - } - // @codeCoverageIgnoreEnd - - $constraint = new IsEqual( - $expected, - $delta, - $maxDepth, - $canonicalize, - $ignoreCase - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are equal (canonicalizing). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void - { - $constraint = new IsEqual( - $expected, - 0.0, - 10, - true, - false - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are equal (ignoring case). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void - { - $constraint = new IsEqual( - $expected, - 0.0, - 10, - false, - true - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are equal (with delta). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void - { - $constraint = new IsEqual( - $expected, - $delta - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that a variable is equal to an attribute of an object. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeEquals($expected, string $actualAttributeName, $actualClassOrObject, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void - { - self::createWarning('assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.'); - - static::assertEquals( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message, - $delta, - $maxDepth, - $canonicalize, - $ignoreCase - ); - } - - /** - * Asserts that two variables are not equal. - * - * @param float $delta - * @param int $maxDepth - * @param bool $canonicalize - * @param bool $ignoreCase - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotEquals($expected, $actual, string $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false): void - { - // @codeCoverageIgnoreStart - if ($delta !== 0.0) { - self::createWarning('The optional $delta parameter of assertNotEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertNotEqualsWithDelta() instead.'); - } - - if ($maxDepth !== 10) { - self::createWarning('The optional $maxDepth parameter of assertNotEquals() is deprecated and will be removed in PHPUnit 9.'); - } - - if ($canonicalize) { - self::createWarning('The optional $canonicalize parameter of assertNotEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertNotEqualsCanonicalizing() instead.'); - } - - if ($ignoreCase) { - self::createWarning('The optional $ignoreCase parameter of assertNotEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertNotEqualsIgnoringCase() instead.'); - } - // @codeCoverageIgnoreEnd - - $constraint = new LogicalNot( - new IsEqual( - $expected, - $delta, - $maxDepth, - $canonicalize, - $ignoreCase - ) - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal (canonicalizing). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqual( - $expected, - 0.0, - 10, - true, - false - ) - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal (ignoring case). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqual( - $expected, - 0.0, - 10, - false, - true - ) - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal (with delta). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqual( - $expected, - $delta - ) - ); - - static::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that a variable is not equal to an attribute of an object. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotEquals($expected, string $actualAttributeName, $actualClassOrObject, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void - { - self::createWarning('assertAttributeNotEquals() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotEquals( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message, - $delta, - $maxDepth, - $canonicalize, - $ignoreCase - ); - } - - /** - * Asserts that a variable is empty. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert empty $actual - */ - public static function assertEmpty($actual, string $message = ''): void - { - static::assertThat($actual, static::isEmpty(), $message); - } - - /** - * Asserts that a static attribute of a class or an attribute of an object - * is empty. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeEmpty(string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeEmpty() is deprecated and will be removed in PHPUnit 9.'); - - static::assertEmpty( - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $message - ); - } - - /** - * Asserts that a variable is not empty. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !empty $actual - */ - public static function assertNotEmpty($actual, string $message = ''): void - { - static::assertThat($actual, static::logicalNot(static::isEmpty()), $message); - } - - /** - * Asserts that a static attribute of a class or an attribute of an object - * is not empty. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotEmpty(string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeNotEmpty() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotEmpty( - static::readAttribute($haystackClassOrObject, $haystackAttributeName), - $message - ); - } - - /** - * Asserts that a value is greater than another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertGreaterThan($expected, $actual, string $message = ''): void - { - static::assertThat($actual, static::greaterThan($expected), $message); - } - - /** - * Asserts that an attribute is greater than another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeGreaterThan($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeGreaterThan() is deprecated and will be removed in PHPUnit 9.'); - - static::assertGreaterThan( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message - ); - } - - /** - * Asserts that a value is greater than or equal to another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void - { - static::assertThat( - $actual, - static::greaterThanOrEqual($expected), - $message - ); - } - - /** - * Asserts that an attribute is greater than or equal to another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeGreaterThanOrEqual($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeGreaterThanOrEqual() is deprecated and will be removed in PHPUnit 9.'); - - static::assertGreaterThanOrEqual( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message - ); - } - - /** - * Asserts that a value is smaller than another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertLessThan($expected, $actual, string $message = ''): void - { - static::assertThat($actual, static::lessThan($expected), $message); - } - - /** - * Asserts that an attribute is smaller than another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeLessThan($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeLessThan() is deprecated and will be removed in PHPUnit 9.'); - - static::assertLessThan( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message - ); - } - - /** - * Asserts that a value is smaller than or equal to another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertLessThanOrEqual($expected, $actual, string $message = ''): void - { - static::assertThat($actual, static::lessThanOrEqual($expected), $message); - } - - /** - * Asserts that an attribute is smaller than or equal to another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeLessThanOrEqual($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeLessThanOrEqual() is deprecated and will be removed in PHPUnit 9.'); - - static::assertLessThanOrEqual( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message - ); - } - - /** - * Asserts that the contents of one file is equal to the contents of another - * file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileEquals(string $expected, string $actual, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void - { - static::assertFileExists($expected, $message); - static::assertFileExists($actual, $message); - - $constraint = new IsEqual( - \file_get_contents($expected), - 0.0, - 10, - $canonicalize, - $ignoreCase - ); - - static::assertThat(\file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of one file is not equal to the contents of - * another file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileNotEquals(string $expected, string $actual, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void - { - static::assertFileExists($expected, $message); - static::assertFileExists($actual, $message); - - $constraint = new LogicalNot( - new IsEqual( - \file_get_contents($expected), - 0.0, - 10, - $canonicalize, - $ignoreCase - ) - ); - - static::assertThat(\file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of a string is equal - * to the contents of a file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void - { - static::assertFileExists($expectedFile, $message); - - $constraint = new IsEqual( - \file_get_contents($expectedFile), - 0.0, - 10, - $canonicalize, - $ignoreCase - ); - - static::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that the contents of a string is not equal - * to the contents of a file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void - { - static::assertFileExists($expectedFile, $message); - - $constraint = new LogicalNot( - new IsEqual( - \file_get_contents($expectedFile), - 0.0, - 10, - $canonicalize, - $ignoreCase - ) - ); - - static::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that a file/dir is readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertIsReadable(string $filename, string $message = ''): void - { - static::assertThat($filename, new IsReadable, $message); - } - - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotIsReadable(string $filename, string $message = ''): void - { - static::assertThat($filename, new LogicalNot(new IsReadable), $message); - } - - /** - * Asserts that a file/dir exists and is writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertIsWritable(string $filename, string $message = ''): void - { - static::assertThat($filename, new IsWritable, $message); - } - - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotIsWritable(string $filename, string $message = ''): void - { - static::assertThat($filename, new LogicalNot(new IsWritable), $message); - } - - /** - * Asserts that a directory exists. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDirectoryExists(string $directory, string $message = ''): void - { - static::assertThat($directory, new DirectoryExists, $message); - } - - /** - * Asserts that a directory does not exist. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDirectoryNotExists(string $directory, string $message = ''): void - { - static::assertThat($directory, new LogicalNot(new DirectoryExists), $message); - } - - /** - * Asserts that a directory exists and is readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDirectoryIsReadable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertIsReadable($directory, $message); - } - - /** - * Asserts that a directory exists and is not readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertNotIsReadable($directory, $message); - } - - /** - * Asserts that a directory exists and is writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDirectoryIsWritable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertIsWritable($directory, $message); - } - - /** - * Asserts that a directory exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertDirectoryNotIsWritable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertNotIsWritable($directory, $message); - } - - /** - * Asserts that a file exists. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileExists(string $filename, string $message = ''): void - { - static::assertThat($filename, new FileExists, $message); - } - - /** - * Asserts that a file does not exist. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileNotExists(string $filename, string $message = ''): void - { - static::assertThat($filename, new LogicalNot(new FileExists), $message); - } - - /** - * Asserts that a file exists and is readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileIsReadable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertIsReadable($file, $message); - } - - /** - * Asserts that a file exists and is not readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileNotIsReadable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertNotIsReadable($file, $message); - } - - /** - * Asserts that a file exists and is writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileIsWritable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertIsWritable($file, $message); - } - - /** - * Asserts that a file exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFileNotIsWritable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertNotIsWritable($file, $message); - } - - /** - * Asserts that a condition is true. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert true $condition - */ - public static function assertTrue($condition, string $message = ''): void - { - static::assertThat($condition, static::isTrue(), $message); - } - - /** - * Asserts that a condition is not true. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !true $condition - */ - public static function assertNotTrue($condition, string $message = ''): void - { - static::assertThat($condition, static::logicalNot(static::isTrue()), $message); - } - - /** - * Asserts that a condition is false. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert false $condition - */ - public static function assertFalse($condition, string $message = ''): void - { - static::assertThat($condition, static::isFalse(), $message); - } - - /** - * Asserts that a condition is not false. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !false $condition - */ - public static function assertNotFalse($condition, string $message = ''): void - { - static::assertThat($condition, static::logicalNot(static::isFalse()), $message); - } - - /** - * Asserts that a variable is null. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert null $actual - */ - public static function assertNull($actual, string $message = ''): void - { - static::assertThat($actual, static::isNull(), $message); - } - - /** - * Asserts that a variable is not null. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !null $actual - */ - public static function assertNotNull($actual, string $message = ''): void - { - static::assertThat($actual, static::logicalNot(static::isNull()), $message); - } - - /** - * Asserts that a variable is finite. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertFinite($actual, string $message = ''): void - { - static::assertThat($actual, static::isFinite(), $message); - } - - /** - * Asserts that a variable is infinite. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertInfinite($actual, string $message = ''): void - { - static::assertThat($actual, static::isInfinite(), $message); - } - - /** - * Asserts that a variable is nan. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNan($actual, string $message = ''): void - { - static::assertThat($actual, static::isNan(), $message); - } - - /** - * Asserts that a class has a specified attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void - { - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(1, 'valid attribute name'); - } - - if (!\class_exists($className)) { - throw InvalidArgumentException::create(2, 'class name'); - } - - static::assertThat($className, new ClassHasAttribute($attributeName), $message); - } - - /** - * Asserts that a class does not have a specified attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void - { - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(1, 'valid attribute name'); - } - - if (!\class_exists($className)) { - throw InvalidArgumentException::create(2, 'class name'); - } - - static::assertThat( - $className, - new LogicalNot( - new ClassHasAttribute($attributeName) - ), - $message - ); - } - - /** - * Asserts that a class has a specified static attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void - { - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(1, 'valid attribute name'); - } - - if (!\class_exists($className)) { - throw InvalidArgumentException::create(2, 'class name'); - } - - static::assertThat( - $className, - new ClassHasStaticAttribute($attributeName), - $message - ); - } - - /** - * Asserts that a class does not have a specified static attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void - { - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(1, 'valid attribute name'); - } - - if (!\class_exists($className)) { - throw InvalidArgumentException::create(2, 'class name'); - } - - static::assertThat( - $className, - new LogicalNot( - new ClassHasStaticAttribute($attributeName) - ), - $message - ); - } - - /** - * Asserts that an object has a specified attribute. - * - * @param object $object - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void - { - if (!self::isValidObjectAttributeName($attributeName)) { - throw InvalidArgumentException::create(1, 'valid attribute name'); - } - - if (!\is_object($object)) { - throw InvalidArgumentException::create(2, 'object'); - } - - static::assertThat( - $object, - new ObjectHasAttribute($attributeName), - $message - ); - } - - /** - * Asserts that an object does not have a specified attribute. - * - * @param object $object - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void - { - if (!self::isValidObjectAttributeName($attributeName)) { - throw InvalidArgumentException::create(1, 'valid attribute name'); - } - - if (!\is_object($object)) { - throw InvalidArgumentException::create(2, 'object'); - } - - static::assertThat( - $object, - new LogicalNot( - new ObjectHasAttribute($attributeName) - ), - $message - ); - } - - /** - * Asserts that two variables have the same type and value. - * Used on objects, it asserts that two variables reference - * the same object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-template ExpectedType - * @psalm-param ExpectedType $expected - * @psalm-assert =ExpectedType $actual - */ - public static function assertSame($expected, $actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsIdentical($expected), - $message - ); - } - - /** - * Asserts that a variable and an attribute of an object have the same type - * and value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeSame($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeSame() is deprecated and will be removed in PHPUnit 9.'); - - static::assertSame( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message - ); - } - - /** - * Asserts that two variables do not have the same type and value. - * Used on objects, it asserts that two variables do not reference - * the same object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotSame($expected, $actual, string $message = ''): void - { - if (\is_bool($expected) && \is_bool($actual)) { - static::assertNotEquals($expected, $actual, $message); - } - - static::assertThat( - $actual, - new LogicalNot( - new IsIdentical($expected) - ), - $message - ); - } - - /** - * Asserts that a variable and an attribute of an object do not have the - * same type and value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotSame($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void - { - self::createWarning('assertAttributeNotSame() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotSame( - $expected, - static::readAttribute($actualClassOrObject, $actualAttributeName), - $message - ); - } - - /** - * Asserts that a variable is of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @psalm-template ExpectedType of object - * @psalm-param class-string $expected - * @psalm-assert ExpectedType $actual - */ - public static function assertInstanceOf(string $expected, $actual, string $message = ''): void - { - if (!\class_exists($expected) && !\interface_exists($expected)) { - throw InvalidArgumentException::create(1, 'class or interface name'); - } - - static::assertThat( - $actual, - new IsInstanceOf($expected), - $message - ); - } - - /** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @psalm-param class-string $expected - */ - public static function assertAttributeInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void - { - self::createWarning('assertAttributeInstanceOf() is deprecated and will be removed in PHPUnit 9.'); - - static::assertInstanceOf( - $expected, - static::readAttribute($classOrObject, $attributeName), - $message - ); - } - - /** - * Asserts that a variable is not of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @psalm-template ExpectedType of object - * @psalm-param class-string $expected - * @psalm-assert !ExpectedType $actual - */ - public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void - { - if (!\class_exists($expected) && !\interface_exists($expected)) { - throw InvalidArgumentException::create(1, 'class or interface name'); - } - - static::assertThat( - $actual, - new LogicalNot( - new IsInstanceOf($expected) - ), - $message - ); - } - - /** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @psalm-param class-string $expected - */ - public static function assertAttributeNotInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void - { - self::createWarning('assertAttributeNotInstanceOf() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotInstanceOf( - $expected, - static::readAttribute($classOrObject, $attributeName), - $message - ); - } - - /** - * Asserts that a variable is of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3369 - * @codeCoverageIgnore - */ - public static function assertInternalType(string $expected, $actual, string $message = ''): void - { - self::createWarning('assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.'); - - static::assertThat( - $actual, - new IsType($expected), - $message - ); - } - - /** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeInternalType(string $expected, string $attributeName, $classOrObject, string $message = ''): void - { - self::createWarning('assertAttributeInternalType() is deprecated and will be removed in PHPUnit 9.'); - - static::assertInternalType( - $expected, - static::readAttribute($classOrObject, $attributeName), - $message - ); - } - - /** - * Asserts that a variable is of type array. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert array $actual - */ - public static function assertIsArray($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_ARRAY), - $message - ); - } - - /** - * Asserts that a variable is of type bool. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert bool $actual - */ - public static function assertIsBool($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_BOOL), - $message - ); - } - - /** - * Asserts that a variable is of type float. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert float $actual - */ - public static function assertIsFloat($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_FLOAT), - $message - ); - } - - /** - * Asserts that a variable is of type int. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert int $actual - */ - public static function assertIsInt($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_INT), - $message - ); - } - - /** - * Asserts that a variable is of type numeric. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert numeric $actual - */ - public static function assertIsNumeric($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_NUMERIC), - $message - ); - } - - /** - * Asserts that a variable is of type object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert object $actual - */ - public static function assertIsObject($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_OBJECT), - $message - ); - } - - /** - * Asserts that a variable is of type resource. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert resource $actual - */ - public static function assertIsResource($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_RESOURCE), - $message - ); - } - - /** - * Asserts that a variable is of type string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert string $actual - */ - public static function assertIsString($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_STRING), - $message - ); - } - - /** - * Asserts that a variable is of type scalar. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert scalar $actual - */ - public static function assertIsScalar($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_SCALAR), - $message - ); - } - - /** - * Asserts that a variable is of type callable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert callable $actual - */ - public static function assertIsCallable($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_CALLABLE), - $message - ); - } - - /** - * Asserts that a variable is of type iterable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert iterable $actual - */ - public static function assertIsIterable($actual, string $message = ''): void - { - static::assertThat( - $actual, - new IsType(IsType::TYPE_ITERABLE), - $message - ); - } - - /** - * Asserts that a variable is not of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3369 - * @codeCoverageIgnore - */ - public static function assertNotInternalType(string $expected, $actual, string $message = ''): void - { - self::createWarning('assertNotInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsNotArray(), assertIsNotBool(), assertIsNotFloat(), assertIsNotInt(), assertIsNotNumeric(), assertIsNotObject(), assertIsNotResource(), assertIsNotString(), assertIsNotScalar(), assertIsNotCallable(), or assertIsNotIterable() instead.'); - - static::assertThat( - $actual, - new LogicalNot( - new IsType($expected) - ), - $message - ); - } - - /** - * Asserts that a variable is not of type array. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !array $actual - */ - public static function assertIsNotArray($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_ARRAY)), - $message - ); - } - - /** - * Asserts that a variable is not of type bool. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !bool $actual - */ - public static function assertIsNotBool($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_BOOL)), - $message - ); - } - - /** - * Asserts that a variable is not of type float. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !float $actual - */ - public static function assertIsNotFloat($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_FLOAT)), - $message - ); - } - - /** - * Asserts that a variable is not of type int. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !int $actual - */ - public static function assertIsNotInt($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_INT)), - $message - ); - } - - /** - * Asserts that a variable is not of type numeric. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !numeric $actual - */ - public static function assertIsNotNumeric($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_NUMERIC)), - $message - ); - } - - /** - * Asserts that a variable is not of type object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !object $actual - */ - public static function assertIsNotObject($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_OBJECT)), - $message - ); - } - - /** - * Asserts that a variable is not of type resource. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !resource $actual - */ - public static function assertIsNotResource($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_RESOURCE)), - $message - ); - } - - /** - * Asserts that a variable is not of type string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !string $actual - */ - public static function assertIsNotString($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_STRING)), - $message - ); - } - - /** - * Asserts that a variable is not of type scalar. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !scalar $actual - */ - public static function assertIsNotScalar($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_SCALAR)), - $message - ); - } - - /** - * Asserts that a variable is not of type callable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !callable $actual - */ - public static function assertIsNotCallable($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_CALLABLE)), - $message - ); - } - - /** - * Asserts that a variable is not of type iterable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !iterable $actual - */ - public static function assertIsNotIterable($actual, string $message = ''): void - { - static::assertThat( - $actual, - new LogicalNot(new IsType(IsType::TYPE_ITERABLE)), - $message - ); - } - - /** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function assertAttributeNotInternalType(string $expected, string $attributeName, $classOrObject, string $message = ''): void - { - self::createWarning('assertAttributeNotInternalType() is deprecated and will be removed in PHPUnit 9.'); - - static::assertNotInternalType( - $expected, - static::readAttribute($classOrObject, $attributeName), - $message - ); - } - - /** - * Asserts that a string matches a given regular expression. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertRegExp(string $pattern, string $string, string $message = ''): void - { - static::assertThat($string, new RegularExpression($pattern), $message); - } - - /** - * Asserts that a string does not match a given regular expression. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertNotRegExp(string $pattern, string $string, string $message = ''): void - { - static::assertThat( - $string, - new LogicalNot( - new RegularExpression($pattern) - ), - $message - ); - } - - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertSameSize($expected, $actual, string $message = ''): void - { - if (!$expected instanceof Countable && !\is_iterable($expected)) { - throw InvalidArgumentException::create(1, 'countable or iterable'); - } - - if (!$actual instanceof Countable && !\is_iterable($actual)) { - throw InvalidArgumentException::create(2, 'countable or iterable'); - } - - static::assertThat( - $actual, - new SameSize($expected), - $message - ); - } - - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is not the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertNotSameSize($expected, $actual, string $message = ''): void - { - if (!$expected instanceof Countable && !\is_iterable($expected)) { - throw InvalidArgumentException::create(1, 'countable or iterable'); - } - - if (!$actual instanceof Countable && !\is_iterable($actual)) { - throw InvalidArgumentException::create(2, 'countable or iterable'); - } - - static::assertThat( - $actual, - new LogicalNot( - new SameSize($expected) - ), - $message - ); - } - - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void - { - static::assertThat($string, new StringMatchesFormatDescription($format), $message); - } - - /** - * Asserts that a string does not match a given format string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void - { - static::assertThat( - $string, - new LogicalNot( - new StringMatchesFormatDescription($format) - ), - $message - ); - } - - /** - * Asserts that a string matches a given format file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - static::assertFileExists($formatFile, $message); - - static::assertThat( - $string, - new StringMatchesFormatDescription( - \file_get_contents($formatFile) - ), - $message - ); - } - - /** - * Asserts that a string does not match a given format string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - static::assertFileExists($formatFile, $message); - - static::assertThat( - $string, - new LogicalNot( - new StringMatchesFormatDescription( - \file_get_contents($formatFile) - ) - ), - $message - ); - } - - /** - * Asserts that a string starts with a given prefix. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void - { - static::assertThat($string, new StringStartsWith($prefix), $message); - } - - /** - * Asserts that a string starts not with a given prefix. - * - * @param string $prefix - * @param string $string - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringStartsNotWith($prefix, $string, string $message = ''): void - { - static::assertThat( - $string, - new LogicalNot( - new StringStartsWith($prefix) - ), - $message - ); - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void - { - $constraint = new StringContains($needle, false); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - $constraint = new StringContains($needle, true); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void - { - $constraint = new LogicalNot(new StringContains($needle)); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - $constraint = new LogicalNot(new StringContains($needle, true)); - - static::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a string ends with a given suffix. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void - { - static::assertThat($string, new StringEndsWith($suffix), $message); - } - - /** - * Asserts that a string ends not with a given suffix. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void - { - static::assertThat( - $string, - new LogicalNot( - new StringEndsWith($suffix) - ), - $message - ); - } - - /** - * Asserts that two XML files are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - $expected = Xml::loadFile($expectedFile); - $actual = Xml::loadFile($actualFile); - - static::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML files are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - $expected = Xml::loadFile($expectedFile); - $actual = Xml::loadFile($actualFile); - - static::assertNotEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are equal. - * - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void - { - $expected = Xml::loadFile($expectedFile); - $actual = Xml::load($actualXml); - - static::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are not equal. - * - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void - { - $expected = Xml::loadFile($expectedFile); - $actual = Xml::load($actualXml); - - static::assertNotEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are equal. - * - * @param DOMDocument|string $expectedXml - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void - { - $expected = Xml::load($expectedXml); - $actual = Xml::load($actualXml); - - static::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are not equal. - * - * @param DOMDocument|string $expectedXml - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void - { - $expected = Xml::load($expectedXml); - $actual = Xml::load($actualXml); - - static::assertNotEquals($expected, $actual, $message); - } - - /** - * Asserts that a hierarchy of DOMElements matches. - * - * @throws AssertionFailedError - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void - { - $expectedElement = Xml::import($expectedElement); - $actualElement = Xml::import($actualElement); - - static::assertSame( - $expectedElement->tagName, - $actualElement->tagName, - $message - ); - - if ($checkAttributes) { - static::assertSame( - $expectedElement->attributes->length, - $actualElement->attributes->length, - \sprintf( - '%s%sNumber of attributes on node "%s" does not match', - $message, - !empty($message) ? "\n" : '', - $expectedElement->tagName - ) - ); - - for ($i = 0; $i < $expectedElement->attributes->length; $i++) { - $expectedAttribute = $expectedElement->attributes->item($i); - $actualAttribute = $actualElement->attributes->getNamedItem($expectedAttribute->name); - - \assert($expectedAttribute instanceof \DOMAttr); - - if (!$actualAttribute) { - static::fail( - \sprintf( - '%s%sCould not find attribute "%s" on node "%s"', - $message, - !empty($message) ? "\n" : '', - $expectedAttribute->name, - $expectedElement->tagName - ) - ); - } - } - } - - Xml::removeCharacterDataNodes($expectedElement); - Xml::removeCharacterDataNodes($actualElement); - - static::assertSame( - $expectedElement->childNodes->length, - $actualElement->childNodes->length, - \sprintf( - '%s%sNumber of child nodes of "%s" differs', - $message, - !empty($message) ? "\n" : '', - $expectedElement->tagName - ) - ); - - for ($i = 0; $i < $expectedElement->childNodes->length; $i++) { - static::assertEqualXMLStructure( - $expectedElement->childNodes->item($i), - $actualElement->childNodes->item($i), - $checkAttributes, - $message - ); - } - } - - /** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertThat($value, Constraint $constraint, string $message = ''): void - { - self::$count += \count($constraint); - - $constraint->evaluate($value, $message); - } - - /** - * Asserts that a string is a valid JSON string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJson(string $actualJson, string $message = ''): void - { - static::assertThat($actualJson, static::isJson(), $message); - } - - /** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - static::assertJson($expectedJson, $message); - static::assertJson($actualJson, $message); - - static::assertThat($actualJson, new JsonMatches($expectedJson), $message); - } - - /** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @param string $expectedJson - * @param string $actualJson - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void - { - static::assertJson($expectedJson, $message); - static::assertJson($actualJson, $message); - - static::assertThat( - $actualJson, - new LogicalNot( - new JsonMatches($expectedJson) - ), - $message - ); - } - - /** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - static::assertFileExists($expectedFile, $message); - $expectedJson = \file_get_contents($expectedFile); - - static::assertJson($expectedJson, $message); - static::assertJson($actualJson, $message); - - static::assertThat($actualJson, new JsonMatches($expectedJson), $message); - } - - /** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - static::assertFileExists($expectedFile, $message); - $expectedJson = \file_get_contents($expectedFile); - - static::assertJson($expectedJson, $message); - static::assertJson($actualJson, $message); - - static::assertThat( - $actualJson, - new LogicalNot( - new JsonMatches($expectedJson) - ), - $message - ); - } - - /** - * Asserts that two JSON files are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - static::assertFileExists($expectedFile, $message); - static::assertFileExists($actualFile, $message); - - $actualJson = \file_get_contents($actualFile); - $expectedJson = \file_get_contents($expectedFile); - - static::assertJson($expectedJson, $message); - static::assertJson($actualJson, $message); - - $constraintExpected = new JsonMatches( - $expectedJson - ); - - $constraintActual = new JsonMatches($actualJson); - - static::assertThat($expectedJson, $constraintActual, $message); - static::assertThat($actualJson, $constraintExpected, $message); - } - - /** - * Asserts that two JSON files are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - static::assertFileExists($expectedFile, $message); - static::assertFileExists($actualFile, $message); - - $actualJson = \file_get_contents($actualFile); - $expectedJson = \file_get_contents($expectedFile); - - static::assertJson($expectedJson, $message); - static::assertJson($actualJson, $message); - - $constraintExpected = new JsonMatches( - $expectedJson - ); - - $constraintActual = new JsonMatches($actualJson); - - static::assertThat($expectedJson, new LogicalNot($constraintActual), $message); - static::assertThat($actualJson, new LogicalNot($constraintExpected), $message); - } - - /** - * @throws Exception - */ - public static function logicalAnd(): LogicalAnd - { - $constraints = \func_get_args(); - - $constraint = new LogicalAnd; - $constraint->setConstraints($constraints); - - return $constraint; - } - - public static function logicalOr(): LogicalOr - { - $constraints = \func_get_args(); - - $constraint = new LogicalOr; - $constraint->setConstraints($constraints); - - return $constraint; - } - - public static function logicalNot(Constraint $constraint): LogicalNot - { - return new LogicalNot($constraint); - } - - public static function logicalXor(): LogicalXor - { - $constraints = \func_get_args(); - - $constraint = new LogicalXor; - $constraint->setConstraints($constraints); - - return $constraint; - } - - public static function anything(): IsAnything - { - return new IsAnything; - } - - public static function isTrue(): IsTrue - { - return new IsTrue; - } - - public static function callback(callable $callback): Callback - { - return new Callback($callback); - } - - public static function isFalse(): IsFalse - { - return new IsFalse; - } - - public static function isJson(): IsJson - { - return new IsJson; - } - - public static function isNull(): IsNull - { - return new IsNull; - } - - public static function isFinite(): IsFinite - { - return new IsFinite; - } - - public static function isInfinite(): IsInfinite - { - return new IsInfinite; - } - - public static function isNan(): IsNan - { - return new IsNan; - } - - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function attribute(Constraint $constraint, string $attributeName): Attribute - { - self::createWarning('attribute() is deprecated and will be removed in PHPUnit 9.'); - - return new Attribute($constraint, $attributeName); - } - - public static function contains($value, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): TraversableContains - { - return new TraversableContains($value, $checkForObjectIdentity, $checkForNonObjectIdentity); - } - - public static function containsOnly(string $type): TraversableContainsOnly - { - return new TraversableContainsOnly($type); - } - - public static function containsOnlyInstancesOf(string $className): TraversableContainsOnly - { - return new TraversableContainsOnly($className, false); - } - - /** - * @param int|string $key - */ - public static function arrayHasKey($key): ArrayHasKey - { - return new ArrayHasKey($key); - } - - public static function equalTo($value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): IsEqual - { - return new IsEqual($value, $delta, $maxDepth, $canonicalize, $ignoreCase); - } - - /** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function attributeEqualTo(string $attributeName, $value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): Attribute - { - self::createWarning('attributeEqualTo() is deprecated and will be removed in PHPUnit 9.'); - - return static::attribute( - static::equalTo( - $value, - $delta, - $maxDepth, - $canonicalize, - $ignoreCase - ), - $attributeName - ); - } - - public static function isEmpty(): IsEmpty - { - return new IsEmpty; - } - - public static function isWritable(): IsWritable - { - return new IsWritable; - } - - public static function isReadable(): IsReadable - { - return new IsReadable; - } - - public static function directoryExists(): DirectoryExists - { - return new DirectoryExists; - } - - public static function fileExists(): FileExists - { - return new FileExists; - } - - public static function greaterThan($value): GreaterThan - { - return new GreaterThan($value); - } - - public static function greaterThanOrEqual($value): LogicalOr - { - return static::logicalOr( - new IsEqual($value), - new GreaterThan($value) - ); - } - - public static function classHasAttribute(string $attributeName): ClassHasAttribute - { - return new ClassHasAttribute($attributeName); - } - - public static function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute - { - return new ClassHasStaticAttribute($attributeName); - } - - public static function objectHasAttribute($attributeName): ObjectHasAttribute - { - return new ObjectHasAttribute($attributeName); - } - - public static function identicalTo($value): IsIdentical - { - return new IsIdentical($value); - } - - public static function isInstanceOf(string $className): IsInstanceOf - { - return new IsInstanceOf($className); - } - - public static function isType(string $type): IsType - { - return new IsType($type); - } - - public static function lessThan($value): LessThan - { - return new LessThan($value); - } - - public static function lessThanOrEqual($value): LogicalOr - { - return static::logicalOr( - new IsEqual($value), - new LessThan($value) - ); - } - - public static function matchesRegularExpression(string $pattern): RegularExpression - { - return new RegularExpression($pattern); - } - - public static function matches(string $string): StringMatchesFormatDescription - { - return new StringMatchesFormatDescription($string); - } - - public static function stringStartsWith($prefix): StringStartsWith - { - return new StringStartsWith($prefix); - } - - public static function stringContains(string $string, bool $case = true): StringContains - { - return new StringContains($string, $case); - } - - public static function stringEndsWith(string $suffix): StringEndsWith - { - return new StringEndsWith($suffix); - } - - public static function countOf(int $count): Count - { - return new Count($count); - } - - /** - * Fails a test with the given message. - * - * @throws AssertionFailedError - * - * @psalm-return never-return - */ - public static function fail(string $message = ''): void - { - self::$count++; - - throw new AssertionFailedError($message); - } - - /** - * Returns the value of an attribute of a class or an object. - * This also works for attributes that are declared protected or private. - * - * @param object|string $classOrObject - * - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function readAttribute($classOrObject, string $attributeName) - { - self::createWarning('readAttribute() is deprecated and will be removed in PHPUnit 9.'); - - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(2, 'valid attribute name'); - } - - if (\is_string($classOrObject)) { - if (!\class_exists($classOrObject)) { - throw InvalidArgumentException::create( - 1, - 'class name' - ); - } - - return static::getStaticAttribute( - $classOrObject, - $attributeName - ); - } - - if (\is_object($classOrObject)) { - return static::getObjectAttribute( - $classOrObject, - $attributeName - ); - } - - throw InvalidArgumentException::create( - 1, - 'class name or object' - ); - } - - /** - * Returns the value of a static attribute. - * This also works for attributes that are declared protected or private. - * - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function getStaticAttribute(string $className, string $attributeName) - { - self::createWarning('getStaticAttribute() is deprecated and will be removed in PHPUnit 9.'); - - if (!\class_exists($className)) { - throw InvalidArgumentException::create(1, 'class name'); - } - - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(2, 'valid attribute name'); - } - - try { - $class = new ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - while ($class) { - $attributes = $class->getStaticProperties(); - - if (\array_key_exists($attributeName, $attributes)) { - return $attributes[$attributeName]; - } - - $class = $class->getParentClass(); - } - - throw new Exception( - \sprintf( - 'Attribute "%s" not found in class.', - $attributeName - ) - ); - } - - /** - * Returns the value of an object's attribute. - * This also works for attributes that are declared protected or private. - * - * @param object $object - * - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ - public static function getObjectAttribute($object, string $attributeName) - { - self::createWarning('getObjectAttribute() is deprecated and will be removed in PHPUnit 9.'); - - if (!\is_object($object)) { - throw InvalidArgumentException::create(1, 'object'); - } - - if (!self::isValidClassAttributeName($attributeName)) { - throw InvalidArgumentException::create(2, 'valid attribute name'); - } - - $reflector = new ReflectionObject($object); - - do { - try { - $attribute = $reflector->getProperty($attributeName); - - if (!$attribute || $attribute->isPublic()) { - return $object->$attributeName; - } - - $attribute->setAccessible(true); - $value = $attribute->getValue($object); - $attribute->setAccessible(false); - - return $value; - } catch (\ReflectionException $e) { - } - } while ($reflector = $reflector->getParentClass()); - - throw new Exception( - \sprintf( - 'Attribute "%s" not found in object.', - $attributeName - ) - ); - } - - /** - * Mark the test as incomplete. - * - * @throws IncompleteTestError - */ - public static function markTestIncomplete(string $message = ''): void - { - throw new IncompleteTestError($message); - } - - /** - * Mark the test as skipped. - * - * @throws SkippedTestError - * @throws SyntheticSkippedError - */ - public static function markTestSkipped(string $message = ''): void - { - if ($hint = self::detectLocationHint($message)) { - $trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS); - \array_unshift($trace, $hint); - - throw new SyntheticSkippedError($hint['message'], 0, $hint['file'], (int) $hint['line'], $trace); - } - - throw new SkippedTestError($message); - } - - /** - * Return the current assertion count. - */ - public static function getCount(): int - { - return self::$count; - } - - /** - * Reset the assertion counter. - */ - public static function resetCount(): void - { - self::$count = 0; - } - - private static function detectLocationHint(string $message): ?array - { - $hint = null; - $lines = \preg_split('/\r\n|\r|\n/', $message); - - while (\strpos($lines[0], '__OFFSET') !== false) { - $offset = \explode('=', \array_shift($lines)); - - if ($offset[0] === '__OFFSET_FILE') { - $hint['file'] = $offset[1]; - } - - if ($offset[0] === '__OFFSET_LINE') { - $hint['line'] = $offset[1]; - } - } - - if ($hint) { - $hint['message'] = \implode(\PHP_EOL, $lines); - } - - return $hint; - } - - private static function isValidObjectAttributeName(string $attributeName): bool - { - return (bool) \preg_match('/[^\x00-\x1f\x7f-\x9f]+/', $attributeName); - } - - private static function isValidClassAttributeName(string $attributeName): bool - { - return (bool) \preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $attributeName); - } - - /** - * @codeCoverageIgnore - */ - private static function createWarning(string $warning): void - { - foreach (\debug_backtrace() as $step) { - if (isset($step['object']) && $step['object'] instanceof TestCase) { - \assert($step['object'] instanceof TestCase); - - $step['object']->addWarning($warning); - - break; - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php deleted file mode 100644 index 375c8c2..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php +++ /dev/null @@ -1,2474 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\Constraint\ArrayHasKey; -use PHPUnit\Framework\Constraint\Attribute; -use PHPUnit\Framework\Constraint\Callback; -use PHPUnit\Framework\Constraint\ClassHasAttribute; -use PHPUnit\Framework\Constraint\ClassHasStaticAttribute; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\Count; -use PHPUnit\Framework\Constraint\DirectoryExists; -use PHPUnit\Framework\Constraint\FileExists; -use PHPUnit\Framework\Constraint\GreaterThan; -use PHPUnit\Framework\Constraint\IsAnything; -use PHPUnit\Framework\Constraint\IsEmpty; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\Constraint\IsFalse; -use PHPUnit\Framework\Constraint\IsFinite; -use PHPUnit\Framework\Constraint\IsIdentical; -use PHPUnit\Framework\Constraint\IsInfinite; -use PHPUnit\Framework\Constraint\IsInstanceOf; -use PHPUnit\Framework\Constraint\IsJson; -use PHPUnit\Framework\Constraint\IsNan; -use PHPUnit\Framework\Constraint\IsNull; -use PHPUnit\Framework\Constraint\IsReadable; -use PHPUnit\Framework\Constraint\IsTrue; -use PHPUnit\Framework\Constraint\IsType; -use PHPUnit\Framework\Constraint\IsWritable; -use PHPUnit\Framework\Constraint\LessThan; -use PHPUnit\Framework\Constraint\LogicalAnd; -use PHPUnit\Framework\Constraint\LogicalNot; -use PHPUnit\Framework\Constraint\LogicalOr; -use PHPUnit\Framework\Constraint\LogicalXor; -use PHPUnit\Framework\Constraint\ObjectHasAttribute; -use PHPUnit\Framework\Constraint\RegularExpression; -use PHPUnit\Framework\Constraint\StringContains; -use PHPUnit\Framework\Constraint\StringEndsWith; -use PHPUnit\Framework\Constraint\StringMatchesFormatDescription; -use PHPUnit\Framework\Constraint\StringStartsWith; -use PHPUnit\Framework\Constraint\TraversableContains; -use PHPUnit\Framework\Constraint\TraversableContainsOnly; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount as AnyInvokedCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtIndex as InvokedAtIndexMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount as InvokedAtLeastCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce as InvokedAtLeastOnceMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount as InvokedAtMostCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedCount as InvokedCountMatcher; -use PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls as ConsecutiveCallsStub; -use PHPUnit\Framework\MockObject\Stub\Exception as ExceptionStub; -use PHPUnit\Framework\MockObject\Stub\ReturnArgument as ReturnArgumentStub; -use PHPUnit\Framework\MockObject\Stub\ReturnCallback as ReturnCallbackStub; -use PHPUnit\Framework\MockObject\Stub\ReturnSelf as ReturnSelfStub; -use PHPUnit\Framework\MockObject\Stub\ReturnStub; -use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub; - -/** - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertArrayHasKey - */ -function assertArrayHasKey($key, $array, string $message = ''): void -{ - Assert::assertArrayHasKey(...\func_get_args()); -} - -/** - * Asserts that an array has a specified subset. - * - * @param array|ArrayAccess $subset - * @param array|ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3494 - * @see Assert::assertArraySubset - */ -function assertArraySubset($subset, $array, bool $checkForObjectIdentity = false, string $message = ''): void -{ - Assert::assertArraySubset(...\func_get_args()); -} - -/** - * Asserts that an array does not have a specified key. - * - * @param int|string $key - * @param array|ArrayAccess $array - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertArrayNotHasKey - */ -function assertArrayNotHasKey($key, $array, string $message = ''): void -{ - Assert::assertArrayNotHasKey(...\func_get_args()); -} - -/** - * Asserts that a haystack contains a needle. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertContains - */ -function assertContains($needle, $haystack, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void -{ - Assert::assertContains(...\func_get_args()); -} - -function assertContainsEquals($needle, iterable $haystack, string $message = ''): void -{ - Assert::assertContainsEquals(...\func_get_args()); -} - -/** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object contains a needle. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeContains - */ -function assertAttributeContains($needle, string $haystackAttributeName, $haystackClassOrObject, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void -{ - Assert::assertAttributeContains(...\func_get_args()); -} - -/** - * Asserts that a haystack does not contain a needle. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertNotContains - */ -function assertNotContains($needle, $haystack, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void -{ - Assert::assertNotContains(...\func_get_args()); -} - -function assertNotContainsEquals($needle, iterable $haystack, string $message = ''): void -{ - Assert::assertNotContainsEquals(...\func_get_args()); -} - -/** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object does not contain a needle. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotContains - */ -function assertAttributeNotContains($needle, string $haystackAttributeName, $haystackClassOrObject, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): void -{ - Assert::assertAttributeNotContains(...\func_get_args()); -} - -/** - * Asserts that a haystack contains only values of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertContainsOnly - */ -function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void -{ - Assert::assertContainsOnly(...\func_get_args()); -} - -/** - * Asserts that a haystack contains only instances of a given class name. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertContainsOnlyInstancesOf - */ -function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void -{ - Assert::assertContainsOnlyInstancesOf(...\func_get_args()); -} - -/** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object contains only values of a given type. - * - * @param object|string $haystackClassOrObject - * @param bool $isNativeType - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeContainsOnly - */ -function assertAttributeContainsOnly(string $type, string $haystackAttributeName, $haystackClassOrObject, ?bool $isNativeType = null, string $message = ''): void -{ - Assert::assertAttributeContainsOnly(...\func_get_args()); -} - -/** - * Asserts that a haystack does not contain only values of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotContainsOnly - */ -function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void -{ - Assert::assertNotContainsOnly(...\func_get_args()); -} - -/** - * Asserts that a haystack that is stored in a static attribute of a class - * or an attribute of an object does not contain only values of a given - * type. - * - * @param object|string $haystackClassOrObject - * @param bool $isNativeType - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotContainsOnly - */ -function assertAttributeNotContainsOnly(string $type, string $haystackAttributeName, $haystackClassOrObject, ?bool $isNativeType = null, string $message = ''): void -{ - Assert::assertAttributeNotContainsOnly(...\func_get_args()); -} - -/** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertCount - */ -function assertCount(int $expectedCount, $haystack, string $message = ''): void -{ - Assert::assertCount(...\func_get_args()); -} - -/** - * Asserts the number of elements of an array, Countable or Traversable - * that is stored in an attribute. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeCount - */ -function assertAttributeCount(int $expectedCount, string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void -{ - Assert::assertAttributeCount(...\func_get_args()); -} - -/** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertNotCount - */ -function assertNotCount(int $expectedCount, $haystack, string $message = ''): void -{ - Assert::assertNotCount(...\func_get_args()); -} - -/** - * Asserts the number of elements of an array, Countable or Traversable - * that is stored in an attribute. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotCount - */ -function assertAttributeNotCount(int $expectedCount, string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void -{ - Assert::assertAttributeNotCount(...\func_get_args()); -} - -/** - * Asserts that two variables are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertEquals - */ -function assertEquals($expected, $actual, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertEquals(...\func_get_args()); -} - -/** - * Asserts that two variables are equal (canonicalizing). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertEqualsCanonicalizing - */ -function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void -{ - Assert::assertEqualsCanonicalizing(...\func_get_args()); -} - -/** - * Asserts that two variables are equal (ignoring case). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertEqualsIgnoringCase - */ -function assertEqualsIgnoringCase($expected, $actual, string $message = ''): void -{ - Assert::assertEqualsIgnoringCase(...\func_get_args()); -} - -/** - * Asserts that two variables are equal (with delta). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertEqualsWithDelta - */ -function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void -{ - Assert::assertEqualsWithDelta(...\func_get_args()); -} - -/** - * Asserts that a variable is equal to an attribute of an object. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeEquals - */ -function assertAttributeEquals($expected, string $actualAttributeName, $actualClassOrObject, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertAttributeEquals(...\func_get_args()); -} - -/** - * Asserts that two variables are not equal. - * - * @param float $delta - * @param int $maxDepth - * @param bool $canonicalize - * @param bool $ignoreCase - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotEquals - */ -function assertNotEquals($expected, $actual, string $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false): void -{ - Assert::assertNotEquals(...\func_get_args()); -} - -/** - * Asserts that two variables are not equal (canonicalizing). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotEqualsCanonicalizing - */ -function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void -{ - Assert::assertNotEqualsCanonicalizing(...\func_get_args()); -} - -/** - * Asserts that two variables are not equal (ignoring case). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotEqualsIgnoringCase - */ -function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void -{ - Assert::assertNotEqualsIgnoringCase(...\func_get_args()); -} - -/** - * Asserts that two variables are not equal (with delta). - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotEqualsWithDelta - */ -function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): void -{ - Assert::assertNotEqualsWithDelta(...\func_get_args()); -} - -/** - * Asserts that a variable is not equal to an attribute of an object. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotEquals - */ -function assertAttributeNotEquals($expected, string $actualAttributeName, $actualClassOrObject, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertAttributeNotEquals(...\func_get_args()); -} - -/** - * Asserts that a variable is empty. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert empty $actual - * - * @see Assert::assertEmpty - */ -function assertEmpty($actual, string $message = ''): void -{ - Assert::assertEmpty(...\func_get_args()); -} - -/** - * Asserts that a static attribute of a class or an attribute of an object - * is empty. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeEmpty - */ -function assertAttributeEmpty(string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void -{ - Assert::assertAttributeEmpty(...\func_get_args()); -} - -/** - * Asserts that a variable is not empty. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !empty $actual - * - * @see Assert::assertNotEmpty - */ -function assertNotEmpty($actual, string $message = ''): void -{ - Assert::assertNotEmpty(...\func_get_args()); -} - -/** - * Asserts that a static attribute of a class or an attribute of an object - * is not empty. - * - * @param object|string $haystackClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotEmpty - */ -function assertAttributeNotEmpty(string $haystackAttributeName, $haystackClassOrObject, string $message = ''): void -{ - Assert::assertAttributeNotEmpty(...\func_get_args()); -} - -/** - * Asserts that a value is greater than another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertGreaterThan - */ -function assertGreaterThan($expected, $actual, string $message = ''): void -{ - Assert::assertGreaterThan(...\func_get_args()); -} - -/** - * Asserts that an attribute is greater than another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeGreaterThan - */ -function assertAttributeGreaterThan($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void -{ - Assert::assertAttributeGreaterThan(...\func_get_args()); -} - -/** - * Asserts that a value is greater than or equal to another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertGreaterThanOrEqual - */ -function assertGreaterThanOrEqual($expected, $actual, string $message = ''): void -{ - Assert::assertGreaterThanOrEqual(...\func_get_args()); -} - -/** - * Asserts that an attribute is greater than or equal to another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeGreaterThanOrEqual - */ -function assertAttributeGreaterThanOrEqual($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void -{ - Assert::assertAttributeGreaterThanOrEqual(...\func_get_args()); -} - -/** - * Asserts that a value is smaller than another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertLessThan - */ -function assertLessThan($expected, $actual, string $message = ''): void -{ - Assert::assertLessThan(...\func_get_args()); -} - -/** - * Asserts that an attribute is smaller than another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeLessThan - */ -function assertAttributeLessThan($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void -{ - Assert::assertAttributeLessThan(...\func_get_args()); -} - -/** - * Asserts that a value is smaller than or equal to another value. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertLessThanOrEqual - */ -function assertLessThanOrEqual($expected, $actual, string $message = ''): void -{ - Assert::assertLessThanOrEqual(...\func_get_args()); -} - -/** - * Asserts that an attribute is smaller than or equal to another value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeLessThanOrEqual - */ -function assertAttributeLessThanOrEqual($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void -{ - Assert::assertAttributeLessThanOrEqual(...\func_get_args()); -} - -/** - * Asserts that the contents of one file is equal to the contents of another - * file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileEquals - */ -function assertFileEquals(string $expected, string $actual, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertFileEquals(...\func_get_args()); -} - -/** - * Asserts that the contents of one file is not equal to the contents of - * another file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileNotEquals - */ -function assertFileNotEquals(string $expected, string $actual, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertFileNotEquals(...\func_get_args()); -} - -/** - * Asserts that the contents of a string is equal - * to the contents of a file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringEqualsFile - */ -function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertStringEqualsFile(...\func_get_args()); -} - -/** - * Asserts that the contents of a string is not equal - * to the contents of a file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringNotEqualsFile - */ -function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = '', bool $canonicalize = false, bool $ignoreCase = false): void -{ - Assert::assertStringNotEqualsFile(...\func_get_args()); -} - -/** - * Asserts that a file/dir is readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertIsReadable - */ -function assertIsReadable(string $filename, string $message = ''): void -{ - Assert::assertIsReadable(...\func_get_args()); -} - -/** - * Asserts that a file/dir exists and is not readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotIsReadable - */ -function assertNotIsReadable(string $filename, string $message = ''): void -{ - Assert::assertNotIsReadable(...\func_get_args()); -} - -/** - * Asserts that a file/dir exists and is writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertIsWritable - */ -function assertIsWritable(string $filename, string $message = ''): void -{ - Assert::assertIsWritable(...\func_get_args()); -} - -/** - * Asserts that a file/dir exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotIsWritable - */ -function assertNotIsWritable(string $filename, string $message = ''): void -{ - Assert::assertNotIsWritable(...\func_get_args()); -} - -/** - * Asserts that a directory exists. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertDirectoryExists - */ -function assertDirectoryExists(string $directory, string $message = ''): void -{ - Assert::assertDirectoryExists(...\func_get_args()); -} - -/** - * Asserts that a directory does not exist. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertDirectoryNotExists - */ -function assertDirectoryNotExists(string $directory, string $message = ''): void -{ - Assert::assertDirectoryNotExists(...\func_get_args()); -} - -/** - * Asserts that a directory exists and is readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertDirectoryIsReadable - */ -function assertDirectoryIsReadable(string $directory, string $message = ''): void -{ - Assert::assertDirectoryIsReadable(...\func_get_args()); -} - -/** - * Asserts that a directory exists and is not readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertDirectoryNotIsReadable - */ -function assertDirectoryNotIsReadable(string $directory, string $message = ''): void -{ - Assert::assertDirectoryNotIsReadable(...\func_get_args()); -} - -/** - * Asserts that a directory exists and is writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertDirectoryIsWritable - */ -function assertDirectoryIsWritable(string $directory, string $message = ''): void -{ - Assert::assertDirectoryIsWritable(...\func_get_args()); -} - -/** - * Asserts that a directory exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertDirectoryNotIsWritable - */ -function assertDirectoryNotIsWritable(string $directory, string $message = ''): void -{ - Assert::assertDirectoryNotIsWritable(...\func_get_args()); -} - -/** - * Asserts that a file exists. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileExists - */ -function assertFileExists(string $filename, string $message = ''): void -{ - Assert::assertFileExists(...\func_get_args()); -} - -/** - * Asserts that a file does not exist. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileNotExists - */ -function assertFileNotExists(string $filename, string $message = ''): void -{ - Assert::assertFileNotExists(...\func_get_args()); -} - -/** - * Asserts that a file exists and is readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileIsReadable - */ -function assertFileIsReadable(string $file, string $message = ''): void -{ - Assert::assertFileIsReadable(...\func_get_args()); -} - -/** - * Asserts that a file exists and is not readable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileNotIsReadable - */ -function assertFileNotIsReadable(string $file, string $message = ''): void -{ - Assert::assertFileNotIsReadable(...\func_get_args()); -} - -/** - * Asserts that a file exists and is writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileIsWritable - */ -function assertFileIsWritable(string $file, string $message = ''): void -{ - Assert::assertFileIsWritable(...\func_get_args()); -} - -/** - * Asserts that a file exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFileNotIsWritable - */ -function assertFileNotIsWritable(string $file, string $message = ''): void -{ - Assert::assertFileNotIsWritable(...\func_get_args()); -} - -/** - * Asserts that a condition is true. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert true $condition - * - * @see Assert::assertTrue - */ -function assertTrue($condition, string $message = ''): void -{ - Assert::assertTrue(...\func_get_args()); -} - -/** - * Asserts that a condition is not true. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !true $condition - * - * @see Assert::assertNotTrue - */ -function assertNotTrue($condition, string $message = ''): void -{ - Assert::assertNotTrue(...\func_get_args()); -} - -/** - * Asserts that a condition is false. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert false $condition - * - * @see Assert::assertFalse - */ -function assertFalse($condition, string $message = ''): void -{ - Assert::assertFalse(...\func_get_args()); -} - -/** - * Asserts that a condition is not false. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !false $condition - * - * @see Assert::assertNotFalse - */ -function assertNotFalse($condition, string $message = ''): void -{ - Assert::assertNotFalse(...\func_get_args()); -} - -/** - * Asserts that a variable is null. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert null $actual - * - * @see Assert::assertNull - */ -function assertNull($actual, string $message = ''): void -{ - Assert::assertNull(...\func_get_args()); -} - -/** - * Asserts that a variable is not null. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !null $actual - * - * @see Assert::assertNotNull - */ -function assertNotNull($actual, string $message = ''): void -{ - Assert::assertNotNull(...\func_get_args()); -} - -/** - * Asserts that a variable is finite. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertFinite - */ -function assertFinite($actual, string $message = ''): void -{ - Assert::assertFinite(...\func_get_args()); -} - -/** - * Asserts that a variable is infinite. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertInfinite - */ -function assertInfinite($actual, string $message = ''): void -{ - Assert::assertInfinite(...\func_get_args()); -} - -/** - * Asserts that a variable is nan. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNan - */ -function assertNan($actual, string $message = ''): void -{ - Assert::assertNan(...\func_get_args()); -} - -/** - * Asserts that a class has a specified attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertClassHasAttribute - */ -function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void -{ - Assert::assertClassHasAttribute(...\func_get_args()); -} - -/** - * Asserts that a class does not have a specified attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertClassNotHasAttribute - */ -function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void -{ - Assert::assertClassNotHasAttribute(...\func_get_args()); -} - -/** - * Asserts that a class has a specified static attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertClassHasStaticAttribute - */ -function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void -{ - Assert::assertClassHasStaticAttribute(...\func_get_args()); -} - -/** - * Asserts that a class does not have a specified static attribute. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertClassNotHasStaticAttribute - */ -function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void -{ - Assert::assertClassNotHasStaticAttribute(...\func_get_args()); -} - -/** - * Asserts that an object has a specified attribute. - * - * @param object $object - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertObjectHasAttribute - */ -function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void -{ - Assert::assertObjectHasAttribute(...\func_get_args()); -} - -/** - * Asserts that an object does not have a specified attribute. - * - * @param object $object - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertObjectNotHasAttribute - */ -function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void -{ - Assert::assertObjectNotHasAttribute(...\func_get_args()); -} - -/** - * Asserts that two variables have the same type and value. - * Used on objects, it asserts that two variables reference - * the same object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-template ExpectedType - * @psalm-param ExpectedType $expected - * @psalm-assert =ExpectedType $actual - * - * @see Assert::assertSame - */ -function assertSame($expected, $actual, string $message = ''): void -{ - Assert::assertSame(...\func_get_args()); -} - -/** - * Asserts that a variable and an attribute of an object have the same type - * and value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeSame - */ -function assertAttributeSame($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void -{ - Assert::assertAttributeSame(...\func_get_args()); -} - -/** - * Asserts that two variables do not have the same type and value. - * Used on objects, it asserts that two variables do not reference - * the same object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotSame - */ -function assertNotSame($expected, $actual, string $message = ''): void -{ - Assert::assertNotSame(...\func_get_args()); -} - -/** - * Asserts that a variable and an attribute of an object do not have the - * same type and value. - * - * @param object|string $actualClassOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotSame - */ -function assertAttributeNotSame($expected, string $actualAttributeName, $actualClassOrObject, string $message = ''): void -{ - Assert::assertAttributeNotSame(...\func_get_args()); -} - -/** - * Asserts that a variable is of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @psalm-template ExpectedType of object - * @psalm-param class-string $expected - * @psalm-assert ExpectedType $actual - * - * @see Assert::assertInstanceOf - */ -function assertInstanceOf(string $expected, $actual, string $message = ''): void -{ - Assert::assertInstanceOf(...\func_get_args()); -} - -/** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @psalm-param class-string $expected - * - * @see Assert::assertAttributeInstanceOf - */ -function assertAttributeInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void -{ - Assert::assertAttributeInstanceOf(...\func_get_args()); -} - -/** - * Asserts that a variable is not of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @psalm-template ExpectedType of object - * @psalm-param class-string $expected - * @psalm-assert !ExpectedType $actual - * - * @see Assert::assertNotInstanceOf - */ -function assertNotInstanceOf(string $expected, $actual, string $message = ''): void -{ - Assert::assertNotInstanceOf(...\func_get_args()); -} - -/** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @psalm-param class-string $expected - * - * @see Assert::assertAttributeNotInstanceOf - */ -function assertAttributeNotInstanceOf(string $expected, string $attributeName, $classOrObject, string $message = ''): void -{ - Assert::assertAttributeNotInstanceOf(...\func_get_args()); -} - -/** - * Asserts that a variable is of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3369 - * @codeCoverageIgnore - * - * @see Assert::assertInternalType - */ -function assertInternalType(string $expected, $actual, string $message = ''): void -{ - Assert::assertInternalType(...\func_get_args()); -} - -/** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeInternalType - */ -function assertAttributeInternalType(string $expected, string $attributeName, $classOrObject, string $message = ''): void -{ - Assert::assertAttributeInternalType(...\func_get_args()); -} - -/** - * Asserts that a variable is of type array. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert array $actual - * - * @see Assert::assertIsArray - */ -function assertIsArray($actual, string $message = ''): void -{ - Assert::assertIsArray(...\func_get_args()); -} - -/** - * Asserts that a variable is of type bool. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert bool $actual - * - * @see Assert::assertIsBool - */ -function assertIsBool($actual, string $message = ''): void -{ - Assert::assertIsBool(...\func_get_args()); -} - -/** - * Asserts that a variable is of type float. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert float $actual - * - * @see Assert::assertIsFloat - */ -function assertIsFloat($actual, string $message = ''): void -{ - Assert::assertIsFloat(...\func_get_args()); -} - -/** - * Asserts that a variable is of type int. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert int $actual - * - * @see Assert::assertIsInt - */ -function assertIsInt($actual, string $message = ''): void -{ - Assert::assertIsInt(...\func_get_args()); -} - -/** - * Asserts that a variable is of type numeric. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert numeric $actual - * - * @see Assert::assertIsNumeric - */ -function assertIsNumeric($actual, string $message = ''): void -{ - Assert::assertIsNumeric(...\func_get_args()); -} - -/** - * Asserts that a variable is of type object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert object $actual - * - * @see Assert::assertIsObject - */ -function assertIsObject($actual, string $message = ''): void -{ - Assert::assertIsObject(...\func_get_args()); -} - -/** - * Asserts that a variable is of type resource. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert resource $actual - * - * @see Assert::assertIsResource - */ -function assertIsResource($actual, string $message = ''): void -{ - Assert::assertIsResource(...\func_get_args()); -} - -/** - * Asserts that a variable is of type string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert string $actual - * - * @see Assert::assertIsString - */ -function assertIsString($actual, string $message = ''): void -{ - Assert::assertIsString(...\func_get_args()); -} - -/** - * Asserts that a variable is of type scalar. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert scalar $actual - * - * @see Assert::assertIsScalar - */ -function assertIsScalar($actual, string $message = ''): void -{ - Assert::assertIsScalar(...\func_get_args()); -} - -/** - * Asserts that a variable is of type callable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert callable $actual - * - * @see Assert::assertIsCallable - */ -function assertIsCallable($actual, string $message = ''): void -{ - Assert::assertIsCallable(...\func_get_args()); -} - -/** - * Asserts that a variable is of type iterable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert iterable $actual - * - * @see Assert::assertIsIterable - */ -function assertIsIterable($actual, string $message = ''): void -{ - Assert::assertIsIterable(...\func_get_args()); -} - -/** - * Asserts that a variable is not of a given type. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3369 - * @codeCoverageIgnore - * - * @see Assert::assertNotInternalType - */ -function assertNotInternalType(string $expected, $actual, string $message = ''): void -{ - Assert::assertNotInternalType(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type array. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !array $actual - * - * @see Assert::assertIsNotArray - */ -function assertIsNotArray($actual, string $message = ''): void -{ - Assert::assertIsNotArray(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type bool. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !bool $actual - * - * @see Assert::assertIsNotBool - */ -function assertIsNotBool($actual, string $message = ''): void -{ - Assert::assertIsNotBool(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type float. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !float $actual - * - * @see Assert::assertIsNotFloat - */ -function assertIsNotFloat($actual, string $message = ''): void -{ - Assert::assertIsNotFloat(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type int. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !int $actual - * - * @see Assert::assertIsNotInt - */ -function assertIsNotInt($actual, string $message = ''): void -{ - Assert::assertIsNotInt(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type numeric. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !numeric $actual - * - * @see Assert::assertIsNotNumeric - */ -function assertIsNotNumeric($actual, string $message = ''): void -{ - Assert::assertIsNotNumeric(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !object $actual - * - * @see Assert::assertIsNotObject - */ -function assertIsNotObject($actual, string $message = ''): void -{ - Assert::assertIsNotObject(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type resource. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !resource $actual - * - * @see Assert::assertIsNotResource - */ -function assertIsNotResource($actual, string $message = ''): void -{ - Assert::assertIsNotResource(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !string $actual - * - * @see Assert::assertIsNotString - */ -function assertIsNotString($actual, string $message = ''): void -{ - Assert::assertIsNotString(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type scalar. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !scalar $actual - * - * @see Assert::assertIsNotScalar - */ -function assertIsNotScalar($actual, string $message = ''): void -{ - Assert::assertIsNotScalar(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type callable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !callable $actual - * - * @see Assert::assertIsNotCallable - */ -function assertIsNotCallable($actual, string $message = ''): void -{ - Assert::assertIsNotCallable(...\func_get_args()); -} - -/** - * Asserts that a variable is not of type iterable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @psalm-assert !iterable $actual - * - * @see Assert::assertIsNotIterable - */ -function assertIsNotIterable($actual, string $message = ''): void -{ - Assert::assertIsNotIterable(...\func_get_args()); -} - -/** - * Asserts that an attribute is of a given type. - * - * @param object|string $classOrObject - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - * - * @see Assert::assertAttributeNotInternalType - */ -function assertAttributeNotInternalType(string $expected, string $attributeName, $classOrObject, string $message = ''): void -{ - Assert::assertAttributeNotInternalType(...\func_get_args()); -} - -/** - * Asserts that a string matches a given regular expression. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertRegExp - */ -function assertRegExp(string $pattern, string $string, string $message = ''): void -{ - Assert::assertRegExp(...\func_get_args()); -} - -/** - * Asserts that a string does not match a given regular expression. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertNotRegExp - */ -function assertNotRegExp(string $pattern, string $string, string $message = ''): void -{ - Assert::assertNotRegExp(...\func_get_args()); -} - -/** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertSameSize - */ -function assertSameSize($expected, $actual, string $message = ''): void -{ - Assert::assertSameSize(...\func_get_args()); -} - -/** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is not the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertNotSameSize - */ -function assertNotSameSize($expected, $actual, string $message = ''): void -{ - Assert::assertNotSameSize(...\func_get_args()); -} - -/** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringMatchesFormat - */ -function assertStringMatchesFormat(string $format, string $string, string $message = ''): void -{ - Assert::assertStringMatchesFormat(...\func_get_args()); -} - -/** - * Asserts that a string does not match a given format string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringNotMatchesFormat - */ -function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void -{ - Assert::assertStringNotMatchesFormat(...\func_get_args()); -} - -/** - * Asserts that a string matches a given format file. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringMatchesFormatFile - */ -function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void -{ - Assert::assertStringMatchesFormatFile(...\func_get_args()); -} - -/** - * Asserts that a string does not match a given format string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringNotMatchesFormatFile - */ -function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void -{ - Assert::assertStringNotMatchesFormatFile(...\func_get_args()); -} - -/** - * Asserts that a string starts with a given prefix. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringStartsWith - */ -function assertStringStartsWith(string $prefix, string $string, string $message = ''): void -{ - Assert::assertStringStartsWith(...\func_get_args()); -} - -/** - * Asserts that a string starts not with a given prefix. - * - * @param string $prefix - * @param string $string - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringStartsNotWith - */ -function assertStringStartsNotWith($prefix, $string, string $message = ''): void -{ - Assert::assertStringStartsNotWith(...\func_get_args()); -} - -/** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringContainsString - */ -function assertStringContainsString(string $needle, string $haystack, string $message = ''): void -{ - Assert::assertStringContainsString(...\func_get_args()); -} - -/** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringContainsStringIgnoringCase - */ -function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void -{ - Assert::assertStringContainsStringIgnoringCase(...\func_get_args()); -} - -/** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringNotContainsString - */ -function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void -{ - Assert::assertStringNotContainsString(...\func_get_args()); -} - -/** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringNotContainsStringIgnoringCase - */ -function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void -{ - Assert::assertStringNotContainsStringIgnoringCase(...\func_get_args()); -} - -/** - * Asserts that a string ends with a given suffix. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringEndsWith - */ -function assertStringEndsWith(string $suffix, string $string, string $message = ''): void -{ - Assert::assertStringEndsWith(...\func_get_args()); -} - -/** - * Asserts that a string ends not with a given suffix. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertStringEndsNotWith - */ -function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void -{ - Assert::assertStringEndsNotWith(...\func_get_args()); -} - -/** - * Asserts that two XML files are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertXmlFileEqualsXmlFile - */ -function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void -{ - Assert::assertXmlFileEqualsXmlFile(...\func_get_args()); -} - -/** - * Asserts that two XML files are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertXmlFileNotEqualsXmlFile - */ -function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void -{ - Assert::assertXmlFileNotEqualsXmlFile(...\func_get_args()); -} - -/** - * Asserts that two XML documents are equal. - * - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertXmlStringEqualsXmlFile - */ -function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void -{ - Assert::assertXmlStringEqualsXmlFile(...\func_get_args()); -} - -/** - * Asserts that two XML documents are not equal. - * - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertXmlStringNotEqualsXmlFile - */ -function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void -{ - Assert::assertXmlStringNotEqualsXmlFile(...\func_get_args()); -} - -/** - * Asserts that two XML documents are equal. - * - * @param DOMDocument|string $expectedXml - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertXmlStringEqualsXmlString - */ -function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void -{ - Assert::assertXmlStringEqualsXmlString(...\func_get_args()); -} - -/** - * Asserts that two XML documents are not equal. - * - * @param DOMDocument|string $expectedXml - * @param DOMDocument|string $actualXml - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - * - * @see Assert::assertXmlStringNotEqualsXmlString - */ -function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void -{ - Assert::assertXmlStringNotEqualsXmlString(...\func_get_args()); -} - -/** - * Asserts that a hierarchy of DOMElements matches. - * - * @throws AssertionFailedError - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertEqualXMLStructure - */ -function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = ''): void -{ - Assert::assertEqualXMLStructure(...\func_get_args()); -} - -/** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertThat - */ -function assertThat($value, Constraint $constraint, string $message = ''): void -{ - Assert::assertThat(...\func_get_args()); -} - -/** - * Asserts that a string is a valid JSON string. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJson - */ -function assertJson(string $actualJson, string $message = ''): void -{ - Assert::assertJson(...\func_get_args()); -} - -/** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJsonStringEqualsJsonString - */ -function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void -{ - Assert::assertJsonStringEqualsJsonString(...\func_get_args()); -} - -/** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @param string $expectedJson - * @param string $actualJson - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJsonStringNotEqualsJsonString - */ -function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, string $message = ''): void -{ - Assert::assertJsonStringNotEqualsJsonString(...\func_get_args()); -} - -/** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJsonStringEqualsJsonFile - */ -function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void -{ - Assert::assertJsonStringEqualsJsonFile(...\func_get_args()); -} - -/** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJsonStringNotEqualsJsonFile - */ -function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void -{ - Assert::assertJsonStringNotEqualsJsonFile(...\func_get_args()); -} - -/** - * Asserts that two JSON files are equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJsonFileEqualsJsonFile - */ -function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void -{ - Assert::assertJsonFileEqualsJsonFile(...\func_get_args()); -} - -/** - * Asserts that two JSON files are not equal. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @see Assert::assertJsonFileNotEqualsJsonFile - */ -function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void -{ - Assert::assertJsonFileNotEqualsJsonFile(...\func_get_args()); -} - -function logicalAnd(): LogicalAnd -{ - return Assert::logicalAnd(...\func_get_args()); -} - -function logicalOr(): LogicalOr -{ - return Assert::logicalOr(...\func_get_args()); -} - -function logicalNot(Constraint $constraint): LogicalNot -{ - return Assert::logicalNot(...\func_get_args()); -} - -function logicalXor(): LogicalXor -{ - return Assert::logicalXor(...\func_get_args()); -} - -function anything(): IsAnything -{ - return Assert::anything(...\func_get_args()); -} - -function isTrue(): IsTrue -{ - return Assert::isTrue(...\func_get_args()); -} - -function callback(callable $callback): Callback -{ - return Assert::callback(...\func_get_args()); -} - -function isFalse(): IsFalse -{ - return Assert::isFalse(...\func_get_args()); -} - -function isJson(): IsJson -{ - return Assert::isJson(...\func_get_args()); -} - -function isNull(): IsNull -{ - return Assert::isNull(...\func_get_args()); -} - -function isFinite(): IsFinite -{ - return Assert::isFinite(...\func_get_args()); -} - -function isInfinite(): IsInfinite -{ - return Assert::isInfinite(...\func_get_args()); -} - -function isNan(): IsNan -{ - return Assert::isNan(...\func_get_args()); -} - -function attribute(Constraint $constraint, string $attributeName): Attribute -{ - return Assert::attribute(...\func_get_args()); -} - -function contains($value, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false): TraversableContains -{ - return Assert::contains(...\func_get_args()); -} - -function containsOnly(string $type): TraversableContainsOnly -{ - return Assert::containsOnly(...\func_get_args()); -} - -function containsOnlyInstancesOf(string $className): TraversableContainsOnly -{ - return Assert::containsOnlyInstancesOf(...\func_get_args()); -} - -function arrayHasKey($key): ArrayHasKey -{ - return Assert::arrayHasKey(...\func_get_args()); -} - -function equalTo($value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): IsEqual -{ - return Assert::equalTo(...\func_get_args()); -} - -function attributeEqualTo(string $attributeName, $value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): Attribute -{ - return Assert::attributeEqualTo(...\func_get_args()); -} - -function isEmpty(): IsEmpty -{ - return Assert::isEmpty(...\func_get_args()); -} - -function isWritable(): IsWritable -{ - return Assert::isWritable(...\func_get_args()); -} - -function isReadable(): IsReadable -{ - return Assert::isReadable(...\func_get_args()); -} - -function directoryExists(): DirectoryExists -{ - return Assert::directoryExists(...\func_get_args()); -} - -function fileExists(): FileExists -{ - return Assert::fileExists(...\func_get_args()); -} - -function greaterThan($value): GreaterThan -{ - return Assert::greaterThan(...\func_get_args()); -} - -function greaterThanOrEqual($value): LogicalOr -{ - return Assert::greaterThanOrEqual(...\func_get_args()); -} - -function classHasAttribute(string $attributeName): ClassHasAttribute -{ - return Assert::classHasAttribute(...\func_get_args()); -} - -function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute -{ - return Assert::classHasStaticAttribute(...\func_get_args()); -} - -function objectHasAttribute($attributeName): ObjectHasAttribute -{ - return Assert::objectHasAttribute(...\func_get_args()); -} - -function identicalTo($value): IsIdentical -{ - return Assert::identicalTo(...\func_get_args()); -} - -function isInstanceOf(string $className): IsInstanceOf -{ - return Assert::isInstanceOf(...\func_get_args()); -} - -function isType(string $type): IsType -{ - return Assert::isType(...\func_get_args()); -} - -function lessThan($value): LessThan -{ - return Assert::lessThan(...\func_get_args()); -} - -function lessThanOrEqual($value): LogicalOr -{ - return Assert::lessThanOrEqual(...\func_get_args()); -} - -function matchesRegularExpression(string $pattern): RegularExpression -{ - return Assert::matchesRegularExpression(...\func_get_args()); -} - -function matches(string $string): StringMatchesFormatDescription -{ - return Assert::matches(...\func_get_args()); -} - -function stringStartsWith($prefix): StringStartsWith -{ - return Assert::stringStartsWith(...\func_get_args()); -} - -function stringContains(string $string, bool $case = true): StringContains -{ - return Assert::stringContains(...\func_get_args()); -} - -function stringEndsWith(string $suffix): StringEndsWith -{ - return Assert::stringEndsWith(...\func_get_args()); -} - -function countOf(int $count): Count -{ - return Assert::countOf(...\func_get_args()); -} - -/** - * Returns a matcher that matches when the method is executed - * zero or more times. - */ -function any(): AnyInvokedCountMatcher -{ - return new AnyInvokedCountMatcher; -} - -/** - * Returns a matcher that matches when the method is never executed. - */ -function never(): InvokedCountMatcher -{ - return new InvokedCountMatcher(0); -} - -/** - * Returns a matcher that matches when the method is executed - * at least N times. - */ -function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher -{ - return new InvokedAtLeastCountMatcher( - $requiredInvocations - ); -} - -/** - * Returns a matcher that matches when the method is executed at least once. - */ -function atLeastOnce(): InvokedAtLeastOnceMatcher -{ - return new InvokedAtLeastOnceMatcher; -} - -/** - * Returns a matcher that matches when the method is executed exactly once. - */ -function once(): InvokedCountMatcher -{ - return new InvokedCountMatcher(1); -} - -/** - * Returns a matcher that matches when the method is executed - * exactly $count times. - */ -function exactly(int $count): InvokedCountMatcher -{ - return new InvokedCountMatcher($count); -} - -/** - * Returns a matcher that matches when the method is executed - * at most N times. - */ -function atMost(int $allowedInvocations): InvokedAtMostCountMatcher -{ - return new InvokedAtMostCountMatcher($allowedInvocations); -} - -/** - * Returns a matcher that matches when the method is executed - * at the given index. - */ -function at(int $index): InvokedAtIndexMatcher -{ - return new InvokedAtIndexMatcher($index); -} - -function returnValue($value): ReturnStub -{ - return new ReturnStub($value); -} - -function returnValueMap(array $valueMap): ReturnValueMapStub -{ - return new ReturnValueMapStub($valueMap); -} - -function returnArgument(int $argumentIndex): ReturnArgumentStub -{ - return new ReturnArgumentStub($argumentIndex); -} - -function returnCallback($callback): ReturnCallbackStub -{ - return new ReturnCallbackStub($callback); -} - -/** - * Returns the current object. - * - * This method is useful when mocking a fluent interface. - */ -function returnSelf(): ReturnSelfStub -{ - return new ReturnSelfStub; -} - -function throwException(Throwable $exception): ExceptionStub -{ - return new ExceptionStub($exception); -} - -function onConsecutiveCalls(): ConsecutiveCallsStub -{ - $args = \func_get_args(); - - return new ConsecutiveCallsStub($args); -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php deleted file mode 100644 index eab5a49..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use ArrayAccess; - -/** - * Constraint that asserts that the array it is evaluated for has a given key. - * - * Uses array_key_exists() to check if the key is found in the input array, if - * not found the evaluation fails. - * - * The array key is passed in the constructor. - */ -final class ArrayHasKey extends Constraint -{ - /** - * @var int|string - */ - private $key; - - /** - * @param int|string $key - */ - public function __construct($key) - { - $this->key = $key; - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - return 'has the key ' . $this->exporter()->export($this->key); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - if (\is_array($other)) { - return \array_key_exists($this->key, $other); - } - - if ($other instanceof ArrayAccess) { - return $other->offsetExists($this->key); - } - - return false; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - return 'an array ' . $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php deleted file mode 100644 index a60c261..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Constraint that asserts that the array it is evaluated for has a specified subset. - * - * Uses array_replace_recursive() to check if a key value subset is part of the - * subject array. - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3494 - */ -final class ArraySubset extends Constraint -{ - /** - * @var iterable - */ - private $subset; - - /** - * @var bool - */ - private $strict; - - public function __construct(iterable $subset, bool $strict = false) - { - $this->strict = $strict; - $this->subset = $subset; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - //type cast $other & $this->subset as an array to allow - //support in standard array functions. - $other = $this->toArray($other); - $this->subset = $this->toArray($this->subset); - - $patched = \array_replace_recursive($other, $this->subset); - - if ($this->strict) { - $result = $other === $patched; - } else { - $result = $other == $patched; - } - - if ($returnResult) { - return $result; - } - - if (!$result) { - $f = new ComparisonFailure( - $patched, - $other, - \var_export($patched, true), - \var_export($other, true) - ); - - $this->fail($other, $description, $f); - } - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - return 'has the subset ' . $this->exporter()->export($this->subset); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - return 'an array ' . $this->toString(); - } - - private function toArray(iterable $other): array - { - if (\is_array($other)) { - return $other; - } - - if ($other instanceof \ArrayObject) { - return $other->getArrayCopy(); - } - - if ($other instanceof \Traversable) { - return \iterator_to_array($other); - } - - // Keep BC even if we know that array would not be the expected one - return (array) $other; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php deleted file mode 100644 index 36b0532..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\ExpectationFailedException; - -/** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ -final class Attribute extends Composite -{ - /** - * @var string - */ - private $attributeName; - - public function __construct(Constraint $constraint, string $attributeName) - { - parent::__construct($constraint); - - $this->attributeName = $attributeName; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \PHPUnit\Framework\Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - return parent::evaluate( - Assert::readAttribute( - $other, - $this->attributeName - ), - $description, - $returnResult - ); - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'attribute "' . $this->attributeName . '" ' . $this->innerConstraint()->toString(); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php deleted file mode 100644 index f537d09..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that evaluates against a specified closure. - */ -final class Callback extends Constraint -{ - /** - * @var callable - */ - private $callback; - - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is accepted by specified callback'; - } - - /** - * Evaluates the constraint for parameter $value. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \call_user_func($this->callback, $other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php deleted file mode 100644 index 1176c9a..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\Exception; -use ReflectionClass; - -/** - * Constraint that asserts that the class it is evaluated for has a given - * attribute. - * - * The attribute name is passed in the constructor. - */ -class ClassHasAttribute extends Constraint -{ - /** - * @var string - */ - private $attributeName; - - public function __construct(string $attributeName) - { - $this->attributeName = $attributeName; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return \sprintf( - 'has attribute "%s"', - $this->attributeName - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - try { - return (new ReflectionClass($other))->hasProperty($this->attributeName); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - '%sclass "%s" %s', - \is_object($other) ? 'object of ' : '', - \is_object($other) ? \get_class($other) : $other, - $this->toString() - ); - } - - protected function attributeName(): string - { - return $this->attributeName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php deleted file mode 100644 index 5ec97b5..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\Exception; -use ReflectionClass; - -/** - * Constraint that asserts that the class it is evaluated for has a given - * static attribute. - * - * The attribute name is passed in the constructor. - */ -final class ClassHasStaticAttribute extends ClassHasAttribute -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return \sprintf( - 'has static attribute "%s"', - $this->attributeName() - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - try { - $class = new ReflectionClass($other); - - if ($class->hasProperty($this->attributeName())) { - return $class->getProperty($this->attributeName())->isStatic(); - } - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php deleted file mode 100644 index ffb8ff9..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/3338 - * @codeCoverageIgnore - */ -abstract class Composite extends Constraint -{ - /** - * @var Constraint - */ - private $innerConstraint; - - public function __construct(Constraint $innerConstraint) - { - $this->innerConstraint = $innerConstraint; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - try { - return $this->innerConstraint->evaluate( - $other, - $description, - $returnResult - ); - } catch (ExpectationFailedException $e) { - $this->fail($other, $description, $e->getComparisonFailure()); - } - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return \count($this->innerConstraint); - } - - protected function innerConstraint(): Constraint - { - return $this->innerConstraint; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php deleted file mode 100644 index f60faff..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use Countable; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\SelfDescribing; -use SebastianBergmann\Comparator\ComparisonFailure; -use SebastianBergmann\Exporter\Exporter; - -/** - * Abstract base class for constraints which can be applied to any value. - */ -abstract class Constraint implements Countable, SelfDescribing -{ - /** - * @var Exporter - */ - private $exporter; - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - $success = false; - - if ($this->matches($other)) { - $success = true; - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return 1; - } - - protected function exporter(): Exporter - { - if ($this->exporter === null) { - $this->exporter = new Exporter; - } - - return $this->exporter; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * This method can be overridden to implement the evaluation algorithm. - * - * @param mixed $other value or object to evaluate - * @codeCoverageIgnore - */ - protected function matches($other): bool - { - return false; - } - - /** - * Throws an exception for the given compared value and test description - * - * @param mixed $other evaluated value or object - * @param string $description Additional information about the test - * @param ComparisonFailure $comparisonFailure - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void - { - $failureDescription = \sprintf( - 'Failed asserting that %s.', - $this->failureDescription($other) - ); - - $additionalFailureDescription = $this->additionalFailureDescription($other); - - if ($additionalFailureDescription) { - $failureDescription .= "\n" . $additionalFailureDescription; - } - - if (!empty($description)) { - $failureDescription = $description . "\n" . $failureDescription; - } - - throw new ExpectationFailedException( - $failureDescription, - $comparisonFailure - ); - } - - /** - * Return additional failure description where needed - * - * The function can be overridden to provide additional failure - * information like a diff - * - * @param mixed $other evaluated value or object - */ - protected function additionalFailureDescription($other): string - { - return ''; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * To provide additional failure information additionalFailureDescription - * can be used. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - return $this->exporter()->export($other) . ' ' . $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php deleted file mode 100644 index 857dddd..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use Countable; -use Generator; -use Iterator; -use IteratorAggregate; -use Traversable; - -class Count extends Constraint -{ - /** - * @var int - */ - private $expectedCount; - - public function __construct(int $expected) - { - $this->expectedCount = $expected; - } - - public function toString(): string - { - return \sprintf( - 'count matches %d', - $this->expectedCount - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches($other): bool - { - return $this->expectedCount === $this->getCountOf($other); - } - - /** - * @param iterable $other - */ - protected function getCountOf($other): ?int - { - if ($other instanceof \EmptyIterator) { - return 0; - } - - if ($other instanceof Countable || \is_array($other)) { - return \count($other); - } - - if ($other instanceof Traversable) { - while ($other instanceof IteratorAggregate) { - $other = $other->getIterator(); - } - - $iterator = $other; - - if ($iterator instanceof Generator) { - return $this->getCountOfGenerator($iterator); - } - - if (!$iterator instanceof Iterator) { - return \iterator_count($iterator); - } - - $key = $iterator->key(); - $count = \iterator_count($iterator); - - // Manually rewind $iterator to previous key, since iterator_count - // moves pointer. - if ($key !== null) { - $iterator->rewind(); - - while ($iterator->valid() && $key !== $iterator->key()) { - $iterator->next(); - } - } - - return $count; - } - - return null; - } - - /** - * Returns the total number of iterations from a generator. - * This will fully exhaust the generator. - */ - protected function getCountOfGenerator(Generator $generator): int - { - for ($count = 0; $generator->valid(); $generator->next()) { - ++$count; - } - - return $count; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - 'actual size %d matches expected size %d', - $this->getCountOf($other), - $this->expectedCount - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php deleted file mode 100644 index fe7ead8..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that checks if the directory(name) that it is evaluated for exists. - * - * The file path to check is passed as $other in evaluate(). - */ -final class DirectoryExists extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'directory exists'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \is_dir($other); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - 'directory "%s" exists', - $other - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php deleted file mode 100644 index 6a77c1d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Util\Filter; -use Throwable; - -final class Exception extends Constraint -{ - /** - * @var string - */ - private $className; - - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return \sprintf( - 'exception of type "%s"', - $this->className - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $other instanceof $this->className; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - if ($other !== null) { - $message = ''; - - if ($other instanceof Throwable) { - $message = '. Message was: "' . $other->getMessage() . '" at' - . "\n" . Filter::getFilteredStacktrace($other); - } - - return \sprintf( - 'exception of type "%s" matches expected exception "%s"%s', - \get_class($other), - $this->className, - $message - ); - } - - return \sprintf( - 'exception of type "%s" is thrown', - $this->className - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php deleted file mode 100644 index d664f5e..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -final class ExceptionCode extends Constraint -{ - /** - * @var int|string - */ - private $expectedCode; - - /** - * @param int|string $expected - */ - public function __construct($expected) - { - $this->expectedCode = $expected; - } - - public function toString(): string - { - return 'exception code is '; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param \Throwable $other - */ - protected function matches($other): bool - { - return (string) $other->getCode() === (string) $this->expectedCode; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - return \sprintf( - '%s is equal to expected exception code %s', - $this->exporter()->export($other->getCode()), - $this->exporter()->export($this->expectedCode) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php deleted file mode 100644 index 18b7a1d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -final class ExceptionMessage extends Constraint -{ - /** - * @var string - */ - private $expectedMessage; - - public function __construct(string $expected) - { - $this->expectedMessage = $expected; - } - - public function toString(): string - { - if ($this->expectedMessage === '') { - return 'exception message is empty'; - } - - return 'exception message contains '; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param \Throwable $other - */ - protected function matches($other): bool - { - if ($this->expectedMessage === '') { - return $other->getMessage() === ''; - } - - return \strpos((string) $other->getMessage(), $this->expectedMessage) !== false; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - if ($this->expectedMessage === '') { - return \sprintf( - "exception message is empty but is '%s'", - $other->getMessage() - ); - } - - return \sprintf( - "exception message '%s' contains '%s'", - $other->getMessage(), - $this->expectedMessage - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php deleted file mode 100644 index 747353d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Util\RegularExpression as RegularExpressionUtil; - -final class ExceptionMessageRegularExpression extends Constraint -{ - /** - * @var string - */ - private $expectedMessageRegExp; - - public function __construct(string $expected) - { - $this->expectedMessageRegExp = $expected; - } - - public function toString(): string - { - return 'exception message matches '; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param \PHPUnit\Framework\Exception $other - * - * @throws \Exception - * @throws \PHPUnit\Framework\Exception - */ - protected function matches($other): bool - { - $match = RegularExpressionUtil::safeMatch($this->expectedMessageRegExp, $other->getMessage()); - - if ($match === false) { - throw new \PHPUnit\Framework\Exception( - "Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'" - ); - } - - return $match === 1; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - "exception message '%s' matches '%s'", - $other->getMessage(), - $this->expectedMessageRegExp - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php deleted file mode 100644 index b62f9fa..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that checks if the file(name) that it is evaluated for exists. - * - * The file path to check is passed as $other in evaluate(). - */ -final class FileExists extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'file exists'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \file_exists($other); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - 'file "%s" exists', - $other - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php deleted file mode 100644 index b007615..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that the value it is evaluated for is greater - * than a given value. - */ -final class GreaterThan extends Constraint -{ - /** - * @var float|int - */ - private $value; - - /** - * @param float|int $value - */ - public function __construct($value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - return 'is greater than ' . $this->exporter()->export($this->value); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $this->value < $other; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php deleted file mode 100644 index f1a9e7d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * Constraint that accepts any input value. - */ -final class IsAnything extends Constraint -{ - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - return $returnResult ? true : null; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is anything'; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return 0; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php deleted file mode 100644 index 26db5b4..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use Countable; - -/** - * Constraint that checks whether a variable is empty(). - */ -final class IsEmpty extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is empty'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - if ($other instanceof \EmptyIterator) { - return true; - } - - if ($other instanceof Countable) { - return \count($other) === 0; - } - - return empty($other); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - $type = \gettype($other); - - return \sprintf( - '%s %s %s', - \strpos($type, 'a') === 0 || \strpos($type, 'o') === 0 ? 'an' : 'a', - $type, - $this->toString() - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php deleted file mode 100644 index 3306de7..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; -use SebastianBergmann\Comparator\ComparisonFailure; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; - -/** - * Constraint that checks if one value is equal to another. - * - * Equality is checked with PHP's == operator, the operator is explained in - * detail at {@url https://php.net/manual/en/types.comparisons.php}. - * Two values are equal if they have the same value disregarding type. - * - * The expected value is passed in the constructor. - */ -final class IsEqual extends Constraint -{ - /** - * @var mixed - */ - private $value; - - /** - * @var float - */ - private $delta; - - /** - * @var bool - */ - private $canonicalize; - - /** - * @var bool - */ - private $ignoreCase; - - public function __construct($value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false) - { - $this->value = $value; - $this->delta = $delta; - $this->canonicalize = $canonicalize; - $this->ignoreCase = $ignoreCase; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - // If $this->value and $other are identical, they are also equal. - // This is the most common path and will allow us to skip - // initialization of all the comparators. - if ($this->value === $other) { - return true; - } - - $comparatorFactory = ComparatorFactory::getInstance(); - - try { - $comparator = $comparatorFactory->getComparatorFor( - $this->value, - $other - ); - - $comparator->assertEquals( - $this->value, - $other, - $this->delta, - $this->canonicalize, - $this->ignoreCase - ); - } catch (ComparisonFailure $f) { - if ($returnResult) { - return false; - } - - throw new ExpectationFailedException( - \trim($description . "\n" . $f->getMessage()), - $f - ); - } - - return true; - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - $delta = ''; - - if (\is_string($this->value)) { - if (\strpos($this->value, "\n") !== false) { - return 'is equal to '; - } - - return \sprintf( - "is equal to '%s'", - $this->value - ); - } - - if ($this->delta != 0) { - $delta = \sprintf( - ' with delta <%F>', - $this->delta - ); - } - - return \sprintf( - 'is equal to %s%s', - $this->exporter()->export($this->value), - $delta - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php deleted file mode 100644 index 8b11e0a..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that accepts false. - */ -final class IsFalse extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is false'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $other === false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsFinite.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsFinite.php deleted file mode 100644 index b36f765..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsFinite.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that accepts finite. - */ -final class IsFinite extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is finite'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \is_finite($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php deleted file mode 100644 index df3daba..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Constraint that asserts that one value is identical to another. - * - * Identical check is performed with PHP's === operator, the operator is - * explained in detail at - * {@url https://php.net/manual/en/types.comparisons.php}. - * Two values are identical if they have the same value and are of the same - * type. - * - * The expected value is passed in the constructor. - */ -final class IsIdentical extends Constraint -{ - /** - * @var float - */ - private const EPSILON = 0.0000000001; - - /** - * @var mixed - */ - private $value; - - public function __construct($value) - { - $this->value = $value; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - if (\is_float($this->value) && \is_float($other) && - !\is_infinite($this->value) && !\is_infinite($other) && - !\is_nan($this->value) && !\is_nan($other)) { - $success = \abs($this->value - $other) < self::EPSILON; - } else { - $success = $this->value === $other; - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $f = null; - - // if both values are strings, make sure a diff is generated - if (\is_string($this->value) && \is_string($other)) { - $f = new ComparisonFailure( - $this->value, - $other, - \sprintf("'%s'", $this->value), - \sprintf("'%s'", $other) - ); - } - - // if both values are array, make sure a diff is generated - if (\is_array($this->value) && \is_array($other)) { - $f = new ComparisonFailure( - $this->value, - $other, - $this->exporter()->export($this->value), - $this->exporter()->export($other) - ); - } - - $this->fail($other, $description, $f); - } - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - if (\is_object($this->value)) { - return 'is identical to an object of class "' . - \get_class($this->value) . '"'; - } - - return 'is identical to ' . $this->exporter()->export($this->value); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - if (\is_object($this->value) && \is_object($other)) { - return 'two variables reference the same object'; - } - - if (\is_string($this->value) && \is_string($other)) { - return 'two strings are identical'; - } - - if (\is_array($this->value) && \is_array($other)) { - return 'two arrays are identical'; - } - - return parent::failureDescription($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php deleted file mode 100644 index 03b991c..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that accepts infinite. - */ -final class IsInfinite extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is infinite'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \is_infinite($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php deleted file mode 100644 index 9958e98..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use ReflectionClass; -use ReflectionException; - -/** - * Constraint that asserts that the object it is evaluated for is an instance - * of a given class. - * - * The expected class name is passed in the constructor. - */ -final class IsInstanceOf extends Constraint -{ - /** - * @var string - */ - private $className; - - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return \sprintf( - 'is instance of %s "%s"', - $this->getType(), - $this->className - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $other instanceof $this->className; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - return \sprintf( - '%s is an instance of %s "%s"', - $this->exporter()->shortenedExport($other), - $this->getType(), - $this->className - ); - } - - private function getType(): string - { - try { - $reflection = new ReflectionClass($this->className); - - if ($reflection->isInterface()) { - return 'interface'; - } - } catch (ReflectionException $e) { - } - - return 'class'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php deleted file mode 100644 index 7231628..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that a string is valid JSON. - */ -final class IsJson extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is valid JSON'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - if ($other === '') { - return false; - } - - \json_decode($other); - - if (\json_last_error()) { - return false; - } - - return true; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - if ($other === '') { - return 'an empty string is valid JSON'; - } - - \json_decode($other); - $error = JsonMatchesErrorMessageProvider::determineJsonError( - (string) \json_last_error() - ); - - return \sprintf( - '%s is valid JSON (%s)', - $this->exporter()->shortenedExport($other), - $error - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsNan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsNan.php deleted file mode 100644 index cc45631..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsNan.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that accepts nan. - */ -final class IsNan extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is nan'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \is_nan($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php deleted file mode 100644 index 1538138..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that accepts null. - */ -final class IsNull extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is null'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $other === null; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsReadable.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsReadable.php deleted file mode 100644 index c9d56ef..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsReadable.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that checks if the file/dir(name) that it is evaluated for is readable. - * - * The file path to check is passed as $other in evaluate(). - */ -final class IsReadable extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is readable'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \is_readable($other); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - '"%s" is readable', - $other - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php deleted file mode 100644 index 7948c8f..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that accepts true. - */ -final class IsTrue extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is true'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $other === true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php deleted file mode 100644 index 03654f4..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php +++ /dev/null @@ -1,199 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that the value it is evaluated for is of a - * specified type. - * - * The expected value is passed in the constructor. - */ -final class IsType extends Constraint -{ - /** - * @var string - */ - public const TYPE_ARRAY = 'array'; - - /** - * @var string - */ - public const TYPE_BOOL = 'bool'; - - /** - * @var string - */ - public const TYPE_FLOAT = 'float'; - - /** - * @var string - */ - public const TYPE_INT = 'int'; - - /** - * @var string - */ - public const TYPE_NULL = 'null'; - - /** - * @var string - */ - public const TYPE_NUMERIC = 'numeric'; - - /** - * @var string - */ - public const TYPE_OBJECT = 'object'; - - /** - * @var string - */ - public const TYPE_RESOURCE = 'resource'; - - /** - * @var string - */ - public const TYPE_STRING = 'string'; - - /** - * @var string - */ - public const TYPE_SCALAR = 'scalar'; - - /** - * @var string - */ - public const TYPE_CALLABLE = 'callable'; - - /** - * @var string - */ - public const TYPE_ITERABLE = 'iterable'; - - /** - * @var array - */ - private const KNOWN_TYPES = [ - 'array' => true, - 'boolean' => true, - 'bool' => true, - 'double' => true, - 'float' => true, - 'integer' => true, - 'int' => true, - 'null' => true, - 'numeric' => true, - 'object' => true, - 'real' => true, - 'resource' => true, - 'string' => true, - 'scalar' => true, - 'callable' => true, - 'iterable' => true, - ]; - - /** - * @var string - */ - private $type; - - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(string $type) - { - if (!isset(self::KNOWN_TYPES[$type])) { - throw new \PHPUnit\Framework\Exception( - \sprintf( - 'Type specified for PHPUnit\Framework\Constraint\IsType <%s> ' . - 'is not a valid type.', - $type - ) - ); - } - - $this->type = $type; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return \sprintf( - 'is of type "%s"', - $this->type - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - switch ($this->type) { - case 'numeric': - return \is_numeric($other); - - case 'integer': - case 'int': - return \is_int($other); - - case 'double': - case 'float': - case 'real': - return \is_float($other); - - case 'string': - return \is_string($other); - - case 'boolean': - case 'bool': - return \is_bool($other); - - case 'null': - return null === $other; - - case 'array': - return \is_array($other); - - case 'object': - return \is_object($other); - - case 'resource': - if (\is_resource($other)) { - return true; - } - - try { - $resource = @\get_resource_type($other); - - if (\is_string($resource)) { - return true; - } - } catch (\TypeError $e) { - } - - return false; - - case 'scalar': - return \is_scalar($other); - - case 'callable': - return \is_callable($other); - - case 'iterable': - return \is_iterable($other); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsWritable.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsWritable.php deleted file mode 100644 index 95d3185..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsWritable.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that checks if the file/dir(name) that it is evaluated for is writable. - * - * The file path to check is passed as $other in evaluate(). - */ -final class IsWritable extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is writable'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \is_writable($other); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription($other): string - { - return \sprintf( - '"%s" is writable', - $other - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php deleted file mode 100644 index c70edf2..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\Json; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Asserts whether or not two JSON objects are equal. - */ -final class JsonMatches extends Constraint -{ - /** - * @var string - */ - private $value; - - public function __construct(string $value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the object. - */ - public function toString(): string - { - return \sprintf( - 'matches JSON string "%s"', - $this->value - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * This method can be overridden to implement the evaluation algorithm. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - [$error, $recodedOther] = Json::canonicalize($other); - - if ($error) { - return false; - } - - [$error, $recodedValue] = Json::canonicalize($this->value); - - if ($error) { - return false; - } - - return $recodedOther == $recodedValue; - } - - /** - * Throws an exception for the given compared value and test description - * - * @param mixed $other evaluated value or object - * @param string $description Additional information about the test - * @param ComparisonFailure $comparisonFailure - * - * @throws ExpectationFailedException - * @throws \PHPUnit\Framework\Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void - { - if ($comparisonFailure === null) { - [$error] = Json::canonicalize($other); - - if ($error) { - parent::fail($other, $description); - } - - [$error] = Json::canonicalize($this->value); - - if ($error) { - parent::fail($other, $description); - } - - $comparisonFailure = new ComparisonFailure( - \json_decode($this->value), - \json_decode($other), - Json::prettify($this->value), - Json::prettify($other), - false, - 'Failed asserting that two json values are equal.' - ); - } - - parent::fail($other, $description, $comparisonFailure); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php deleted file mode 100644 index ac1b624..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Provides human readable messages for each JSON error. - */ -final class JsonMatchesErrorMessageProvider -{ - /** - * Translates JSON error to a human readable string. - */ - public static function determineJsonError(string $error, string $prefix = ''): ?string - { - switch ($error) { - case \JSON_ERROR_NONE: - return null; - case \JSON_ERROR_DEPTH: - return $prefix . 'Maximum stack depth exceeded'; - case \JSON_ERROR_STATE_MISMATCH: - return $prefix . 'Underflow or the modes mismatch'; - case \JSON_ERROR_CTRL_CHAR: - return $prefix . 'Unexpected control character found'; - case \JSON_ERROR_SYNTAX: - return $prefix . 'Syntax error, malformed JSON'; - case \JSON_ERROR_UTF8: - return $prefix . 'Malformed UTF-8 characters, possibly incorrectly encoded'; - default: - return $prefix . 'Unknown error'; - } - } - - /** - * Translates a given type to a human readable message prefix. - */ - public static function translateTypeToPrefix(string $type): string - { - switch (\strtolower($type)) { - case 'expected': - $prefix = 'Expected value JSON decode error - '; - - break; - case 'actual': - $prefix = 'Actual value JSON decode error - '; - - break; - default: - $prefix = ''; - - break; - } - - return $prefix; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php deleted file mode 100644 index 781c817..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that the value it is evaluated for is less than - * a given value. - */ -final class LessThan extends Constraint -{ - /** - * @var float|int - */ - private $value; - - /** - * @param float|int $value - */ - public function __construct($value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - return 'is less than ' . $this->exporter()->export($this->value); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return $this->value > $other; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php b/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php deleted file mode 100644 index 0e9a94b..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * Logical AND. - */ -final class LogicalAnd extends Constraint -{ - /** - * @var Constraint[] - */ - private $constraints = []; - - public static function fromConstraints(Constraint ...$constraints): self - { - $constraint = new self; - - $constraint->constraints = \array_values($constraints); - - return $constraint; - } - - /** - * @param Constraint[] $constraints - * - * @throws \PHPUnit\Framework\Exception - */ - public function setConstraints(array $constraints): void - { - $this->constraints = []; - - foreach ($constraints as $constraint) { - if (!($constraint instanceof Constraint)) { - throw new \PHPUnit\Framework\Exception( - 'All parameters to ' . __CLASS__ . - ' must be a constraint object.' - ); - } - - $this->constraints[] = $constraint; - } - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - $success = true; - - foreach ($this->constraints as $constraint) { - if (!$constraint->evaluate($other, $description, true)) { - $success = false; - - break; - } - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $text = ''; - - foreach ($this->constraints as $key => $constraint) { - if ($key > 0) { - $text .= ' and '; - } - - $text .= $constraint->toString(); - } - - return $text; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - $count = 0; - - foreach ($this->constraints as $constraint) { - $count += \count($constraint); - } - - return $count; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php b/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php deleted file mode 100644 index 0822863..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * Logical NOT. - */ -final class LogicalNot extends Constraint -{ - /** - * @var Constraint - */ - private $constraint; - - public static function negate(string $string): string - { - $positives = [ - 'contains ', - 'exists', - 'has ', - 'is ', - 'are ', - 'matches ', - 'starts with ', - 'ends with ', - 'reference ', - 'not not ', - ]; - - $negatives = [ - 'does not contain ', - 'does not exist', - 'does not have ', - 'is not ', - 'are not ', - 'does not match ', - 'starts not with ', - 'ends not with ', - 'don\'t reference ', - 'not ', - ]; - - \preg_match('/(\'[\w\W]*\')([\w\W]*)("[\w\W]*")/i', $string, $matches); - - if (\count($matches) > 0) { - $nonInput = $matches[2]; - - $negatedString = \str_replace( - $nonInput, - \str_replace( - $positives, - $negatives, - $nonInput - ), - $string - ); - } else { - $negatedString = \str_replace( - $positives, - $negatives, - $string - ); - } - - return $negatedString; - } - - /** - * @param Constraint|mixed $constraint - */ - public function __construct($constraint) - { - if (!($constraint instanceof Constraint)) { - $constraint = new IsEqual($constraint); - } - - $this->constraint = $constraint; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - $success = !$this->constraint->evaluate($other, $description, true); - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - switch (\get_class($this->constraint)) { - case LogicalAnd::class: - case self::class: - case LogicalOr::class: - return 'not( ' . $this->constraint->toString() . ' )'; - - default: - return self::negate( - $this->constraint->toString() - ); - } - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return \count($this->constraint); - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - switch (\get_class($this->constraint)) { - case LogicalAnd::class: - case self::class: - case LogicalOr::class: - return 'not( ' . $this->constraint->failureDescription($other) . ' )'; - - default: - return self::negate( - $this->constraint->failureDescription($other) - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php b/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php deleted file mode 100644 index 0362d39..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * Logical OR. - */ -final class LogicalOr extends Constraint -{ - /** - * @var Constraint[] - */ - private $constraints = []; - - public static function fromConstraints(Constraint ...$constraints): self - { - $constraint = new self; - - $constraint->constraints = \array_values($constraints); - - return $constraint; - } - - /** - * @param Constraint[] $constraints - */ - public function setConstraints(array $constraints): void - { - $this->constraints = []; - - foreach ($constraints as $constraint) { - if (!($constraint instanceof Constraint)) { - $constraint = new IsEqual( - $constraint - ); - } - - $this->constraints[] = $constraint; - } - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - $success = false; - - foreach ($this->constraints as $constraint) { - if ($constraint->evaluate($other, $description, true)) { - $success = true; - - break; - } - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $text = ''; - - foreach ($this->constraints as $key => $constraint) { - if ($key > 0) { - $text .= ' or '; - } - - $text .= $constraint->toString(); - } - - return $text; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - $count = 0; - - foreach ($this->constraints as $constraint) { - $count += \count($constraint); - } - - return $count; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php b/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php deleted file mode 100644 index de7f871..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * Logical XOR. - */ -final class LogicalXor extends Constraint -{ - /** - * @var Constraint[] - */ - private $constraints = []; - - public static function fromConstraints(Constraint ...$constraints): self - { - $constraint = new self; - - $constraint->constraints = \array_values($constraints); - - return $constraint; - } - - /** - * @param Constraint[] $constraints - */ - public function setConstraints(array $constraints): void - { - $this->constraints = []; - - foreach ($constraints as $constraint) { - if (!($constraint instanceof Constraint)) { - $constraint = new IsEqual( - $constraint - ); - } - - $this->constraints[] = $constraint; - } - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - $success = true; - $lastResult = null; - - foreach ($this->constraints as $constraint) { - $result = $constraint->evaluate($other, $description, true); - - if ($result === $lastResult) { - $success = false; - - break; - } - - $lastResult = $result; - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $text = ''; - - foreach ($this->constraints as $key => $constraint) { - if ($key > 0) { - $text .= ' xor '; - } - - $text .= $constraint->toString(); - } - - return $text; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - $count = 0; - - foreach ($this->constraints as $constraint) { - $count += \count($constraint); - } - - return $count; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php deleted file mode 100644 index 8543c22..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use ReflectionObject; - -/** - * Constraint that asserts that the object it is evaluated for has a given - * attribute. - * - * The attribute name is passed in the constructor. - */ -final class ObjectHasAttribute extends ClassHasAttribute -{ - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return (new ReflectionObject($other))->hasProperty($this->attributeName()); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php b/vendor/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php deleted file mode 100644 index 178b637..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that the string it is evaluated for matches - * a regular expression. - * - * Checks a given value using the Perl Compatible Regular Expression extension - * in PHP. The pattern is matched by executing preg_match(). - * - * The pattern string passed in the constructor. - */ -class RegularExpression extends Constraint -{ - /** - * @var string - */ - private $pattern; - - public function __construct(string $pattern) - { - $this->pattern = $pattern; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return \sprintf( - 'matches PCRE pattern "%s"', - $this->pattern - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \preg_match($this->pattern, $other) > 0; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php b/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php deleted file mode 100644 index c6b8703..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -final class SameSize extends Count -{ - public function __construct(iterable $expected) - { - parent::__construct($this->getCountOf($expected)); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php deleted file mode 100644 index 791fccc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that the string it is evaluated for contains - * a given string. - * - * Uses mb_strpos() to find the position of the string in the input, if not - * found the evaluation fails. - * - * The sub-string is passed in the constructor. - */ -final class StringContains extends Constraint -{ - /** - * @var string - */ - private $string; - - /** - * @var bool - */ - private $ignoreCase; - - public function __construct(string $string, bool $ignoreCase = false) - { - $this->string = $string; - $this->ignoreCase = $ignoreCase; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - if ($this->ignoreCase) { - $string = \mb_strtolower($this->string); - } else { - $string = $this->string; - } - - return \sprintf( - 'contains "%s"', - $string - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - if ('' === $this->string) { - return true; - } - - if ($this->ignoreCase) { - return \mb_stripos($other, $this->string) !== false; - } - - return \mb_strpos($other, $this->string) !== false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php deleted file mode 100644 index c4c3c14..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.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. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * Constraint that asserts that the string it is evaluated for ends with a given - * suffix. - */ -final class StringEndsWith extends Constraint -{ - /** - * @var string - */ - private $suffix; - - public function __construct(string $suffix) - { - $this->suffix = $suffix; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'ends with "' . $this->suffix . '"'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \substr($other, 0 - \strlen($this->suffix)) === $this->suffix; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php deleted file mode 100644 index ab7e622..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use SebastianBergmann\Diff\Differ; - -/** - * ... - */ -final class StringMatchesFormatDescription extends RegularExpression -{ - /** - * @var string - */ - private $string; - - public function __construct(string $string) - { - parent::__construct( - $this->createPatternFromFormat( - $this->convertNewlines($string) - ) - ); - - $this->string = $string; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return parent::matches( - $this->convertNewlines($other) - ); - } - - protected function failureDescription($other): string - { - return 'string matches format description'; - } - - protected function additionalFailureDescription($other): string - { - $from = \explode("\n", $this->string); - $to = \explode("\n", $this->convertNewlines($other)); - - foreach ($from as $index => $line) { - if (isset($to[$index]) && $line !== $to[$index]) { - $line = $this->createPatternFromFormat($line); - - if (\preg_match($line, $to[$index]) > 0) { - $from[$index] = $to[$index]; - } - } - } - - $this->string = \implode("\n", $from); - $other = \implode("\n", $to); - - return (new Differ("--- Expected\n+++ Actual\n"))->diff($this->string, $other); - } - - private function createPatternFromFormat(string $string): string - { - $string = \strtr( - \preg_quote($string, '/'), - [ - '%%' => '%', - '%e' => '\\' . \DIRECTORY_SEPARATOR, - '%s' => '[^\r\n]+', - '%S' => '[^\r\n]*', - '%a' => '.+', - '%A' => '.*', - '%w' => '\s*', - '%i' => '[+-]?\d+', - '%d' => '\d+', - '%x' => '[0-9a-fA-F]+', - '%f' => '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', - '%c' => '.', - ] - ); - - return '/^' . $string . '$/s'; - } - - private function convertNewlines($text): string - { - return \preg_replace('/\r\n/', "\n", $text); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php deleted file mode 100644 index 27c100a..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\InvalidArgumentException; - -/** - * Constraint that asserts that the string it is evaluated for begins with a - * given prefix. - */ -final class StringStartsWith extends Constraint -{ - /** - * @var string - */ - private $prefix; - - public function __construct(string $prefix) - { - if (\strlen($prefix) === 0) { - throw InvalidArgumentException::create(1, 'non-empty string'); - } - - $this->prefix = $prefix; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'starts with "' . $this->prefix . '"'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - return \strpos((string) $other, $this->prefix) === 0; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php deleted file mode 100644 index 0f2a123..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use SplObjectStorage; - -/** - * Constraint that asserts that the Traversable it is applied to contains - * a given value. - */ -final class TraversableContains extends Constraint -{ - /** - * @var bool - */ - private $checkForObjectIdentity; - - /** - * @var bool - */ - private $checkForNonObjectIdentity; - - /** - * @var mixed - */ - private $value; - - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct($value, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false) - { - $this->checkForObjectIdentity = $checkForObjectIdentity; - $this->checkForNonObjectIdentity = $checkForNonObjectIdentity; - $this->value = $value; - } - - /** - * Returns a string representation of the constraint. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - if (\is_string($this->value) && \strpos($this->value, "\n") !== false) { - return 'contains "' . $this->value . '"'; - } - - return 'contains ' . $this->exporter()->export($this->value); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches($other): bool - { - if ($other instanceof SplObjectStorage) { - return $other->contains($this->value); - } - - if (\is_object($this->value)) { - foreach ($other as $element) { - if ($this->checkForObjectIdentity && $element === $this->value) { - return true; - } - - if (!$this->checkForObjectIdentity && $element == $this->value) { - return true; - } - } - } else { - foreach ($other as $element) { - if ($this->checkForNonObjectIdentity && $element === $this->value) { - return true; - } - - if (!$this->checkForNonObjectIdentity && $element == $this->value) { - return true; - } - } - } - - return false; - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function failureDescription($other): string - { - return \sprintf( - '%s %s', - \is_array($other) ? 'an array' : 'a traversable', - $this->toString() - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php b/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php deleted file mode 100644 index 2191ae6..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * Constraint that asserts that the Traversable it is applied to contains - * only values of a given type. - */ -final class TraversableContainsOnly extends Constraint -{ - /** - * @var Constraint - */ - private $constraint; - - /** - * @var string - */ - private $type; - - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(string $type, bool $isNativeType = true) - { - if ($isNativeType) { - $this->constraint = new IsType($type); - } else { - $this->constraint = new IsInstanceOf( - $type - ); - } - - $this->type = $type; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function evaluate($other, string $description = '', bool $returnResult = false) - { - $success = true; - - foreach ($other as $item) { - if (!$this->constraint->evaluate($item, '', true)) { - $success = false; - - break; - } - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'contains only values of type "' . $this->type . '"'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php b/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php deleted file mode 100644 index a65dc34..0000000 --- a/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use PHPUnit\Util\Test as TestUtil; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DataProviderTestSuite extends TestSuite -{ - /** - * @var string[] - */ - private $dependencies = []; - - /** - * @param string[] $dependencies - */ - public function setDependencies(array $dependencies): void - { - $this->dependencies = $dependencies; - - foreach ($this->tests as $test) { - if (!$test instanceof TestCase) { - continue; - } - - $test->setDependencies($dependencies); - } - } - - public function getDependencies(): array - { - return $this->dependencies; - } - - public function hasDependencies(): bool - { - return \count($this->dependencies) > 0; - } - - /** - * Returns the size of the each test created using the data provider(s) - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function getSize(): int - { - [$className, $methodName] = \explode('::', $this->getName()); - - return TestUtil::getSize($className, $methodName); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php b/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php deleted file mode 100644 index 607c965..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Error; - -final class Deprecated extends Error -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Error.php b/vendor/phpunit/phpunit/src/Framework/Error/Error.php deleted file mode 100644 index 61e80f8..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Error/Error.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Error; - -use PHPUnit\Framework\Exception; - -class Error extends Exception -{ - public function __construct(string $message, int $code, string $file, int $line, \Exception $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->file = $file; - $this->line = $line; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Notice.php b/vendor/phpunit/phpunit/src/Framework/Error/Notice.php deleted file mode 100644 index 4a3d01d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Error/Notice.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Error; - -final class Notice extends Error -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Warning.php b/vendor/phpunit/phpunit/src/Framework/Error/Warning.php deleted file mode 100644 index d49f991..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Error/Warning.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Error; - -final class Warning extends Error -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php b/vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php deleted file mode 100644 index 0ba2528..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class AssertionFailedError extends Exception implements SelfDescribing -{ - /** - * Wrapper for getMessage() which is declared as final. - */ - public function toString(): string - { - return $this->getMessage(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php b/vendor/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php deleted file mode 100644 index 36b0723..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class CodeCoverageException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php b/vendor/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php deleted file mode 100644 index 78f89bc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CoveredCodeNotExecutedException extends RiskyTestError -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php deleted file mode 100644 index 0991989..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use PHPUnit\Util\Filter; - -/** - * Base class for all PHPUnit Framework exceptions. - * - * Ensures that exceptions thrown during a test run do not leave stray - * references behind. - * - * Every Exception contains a stack trace. Each stack frame contains the 'args' - * of the called function. The function arguments can contain references to - * instantiated objects. The references prevent the objects from being - * destructed (until test results are eventually printed), so memory cannot be - * freed up. - * - * With enabled process isolation, test results are serialized in the child - * process and unserialized in the parent process. The stack trace of Exceptions - * may contain objects that cannot be serialized or unserialized (e.g., PDO - * connections). Unserializing user-space objects from the child process into - * the parent would break the intended encapsulation of process isolation. - * - * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class Exception extends \RuntimeException implements \PHPUnit\Exception -{ - /** - * @var array - */ - protected $serializableTrace; - - public function __construct($message = '', $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->serializableTrace = $this->getTrace(); - - foreach ($this->serializableTrace as $i => $call) { - unset($this->serializableTrace[$i]['args']); - } - } - - public function __toString(): string - { - $string = TestFailure::exceptionToString($this); - - if ($trace = Filter::getFilteredStacktrace($this)) { - $string .= "\n" . $trace; - } - - return $string; - } - - public function __sleep(): array - { - return \array_keys(\get_object_vars($this)); - } - - /** - * Returns the serializable trace (without 'args'). - */ - public function getSerializableTrace(): array - { - return $this->serializableTrace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php deleted file mode 100644 index f7d7a9c..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Exception for expectations which failed their check. - * - * The exception contains the error message and optionally a - * SebastianBergmann\Comparator\ComparisonFailure which is used to - * generate diff output of the failed expectations. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExpectationFailedException extends AssertionFailedError -{ - /** - * @var ComparisonFailure - */ - protected $comparisonFailure; - - public function __construct(string $message, ComparisonFailure $comparisonFailure = null, \Exception $previous = null) - { - $this->comparisonFailure = $comparisonFailure; - - parent::__construct($message, 0, $previous); - } - - public function getComparisonFailure(): ?ComparisonFailure - { - return $this->comparisonFailure; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php b/vendor/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php deleted file mode 100644 index 65f9c8b..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestError extends AssertionFailedError implements IncompleteTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php deleted file mode 100644 index 48249ad..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidArgumentException extends Exception -{ - public static function create(int $argument, string $type): self - { - $stack = \debug_backtrace(); - - return new self( - \sprintf( - 'Argument #%d of %s::%s() must be %s %s', - $argument, - $stack[1]['class'], - $stack[1]['function'], - \in_array(\lcfirst($type)[0], ['a', 'e', 'i', 'o', 'u']) ? 'an' : 'a', - $type - ) - ); - } - - private function __construct(string $message = '', int $code = 0, \Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php deleted file mode 100644 index ebf2994..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidCoversTargetException extends CodeCoverageException -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php deleted file mode 100644 index 7e2ef24..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDataProviderException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php b/vendor/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php deleted file mode 100644 index 567a6c4..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MissingCoversAnnotationException extends RiskyTestError -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/OutputError.php b/vendor/phpunit/phpunit/src/Framework/Exception/OutputError.php deleted file mode 100644 index 1c8b37e..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/OutputError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class OutputError extends AssertionFailedError -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php b/vendor/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php deleted file mode 100644 index 1712613..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PHPTAssertionFailedError extends SyntheticError -{ - /** - * @var string - */ - private $diff; - - public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) - { - parent::__construct($message, $code, $file, $line, $trace); - $this->diff = $diff; - } - - public function getDiff(): string - { - return $this->diff; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php b/vendor/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php deleted file mode 100644 index a66552c..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class RiskyTestError extends AssertionFailedError -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php b/vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php deleted file mode 100644 index 7d553dc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestError extends AssertionFailedError implements SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php b/vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php deleted file mode 100644 index 5448508..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestSuiteError extends AssertionFailedError implements SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/SyntheticError.php b/vendor/phpunit/phpunit/src/Framework/Exception/SyntheticError.php deleted file mode 100644 index c3124ba..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/SyntheticError.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class SyntheticError extends AssertionFailedError -{ - /** - * The synthetic file. - * - * @var string - */ - protected $syntheticFile = ''; - - /** - * The synthetic line number. - * - * @var int - */ - protected $syntheticLine = 0; - - /** - * The synthetic trace. - * - * @var array - */ - protected $syntheticTrace = []; - - public function __construct(string $message, int $code, string $file, int $line, array $trace) - { - parent::__construct($message, $code); - - $this->syntheticFile = $file; - $this->syntheticLine = $line; - $this->syntheticTrace = $trace; - } - - public function getSyntheticFile(): string - { - return $this->syntheticFile; - } - - public function getSyntheticLine(): int - { - return $this->syntheticLine; - } - - public function getSyntheticTrace(): array - { - return $this->syntheticTrace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php b/vendor/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php deleted file mode 100644 index f6e155d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SyntheticSkippedError extends SyntheticError implements SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/UnexpectedValueException.php b/vendor/phpunit/phpunit/src/Framework/Exception/UnexpectedValueException.php deleted file mode 100644 index 70cd3bd..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -final class UnexpectedValueException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php b/vendor/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php deleted file mode 100644 index fcd1d82..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnintentionallyCoveredCodeError extends RiskyTestError -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Warning.php b/vendor/phpunit/phpunit/src/Framework/Exception/Warning.php deleted file mode 100644 index 35e9449..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Warning.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Warning extends Exception implements SelfDescribing -{ - /** - * Wrapper for getMessage() which is declared as final. - */ - public function toString(): string - { - return $this->getMessage(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php b/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php deleted file mode 100644 index 2e5b275..0000000 --- a/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use PHPUnit\Util\Filter; -use Throwable; - -/** - * Wraps Exceptions thrown by code under test. - * - * Re-instantiates Exceptions thrown by user-space code to retain their original - * class names, properties, and stack traces (but without arguments). - * - * Unlike PHPUnit\Framework_\Exception, the complete stack of previous Exceptions - * is processed. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionWrapper extends Exception -{ - /** - * @var string - */ - protected $className; - - /** - * @var null|ExceptionWrapper - */ - protected $previous; - - public function __construct(Throwable $t) - { - // PDOException::getCode() is a string. - // @see https://php.net/manual/en/class.pdoexception.php#95812 - parent::__construct($t->getMessage(), (int) $t->getCode()); - $this->setOriginalException($t); - } - - public function __toString(): string - { - $string = TestFailure::exceptionToString($this); - - if ($trace = Filter::getFilteredStacktrace($this)) { - $string .= "\n" . $trace; - } - - if ($this->previous) { - $string .= "\nCaused by\n" . $this->previous; - } - - return $string; - } - - public function getClassName(): string - { - return $this->className; - } - - public function getPreviousWrapped(): ?self - { - return $this->previous; - } - - public function setClassName(string $className): void - { - $this->className = $className; - } - - public function setOriginalException(\Throwable $t): void - { - $this->originalException($t); - - $this->className = \get_class($t); - $this->file = $t->getFile(); - $this->line = $t->getLine(); - - $this->serializableTrace = $t->getTrace(); - - foreach ($this->serializableTrace as $i => $call) { - unset($this->serializableTrace[$i]['args']); - } - - if ($t->getPrevious()) { - $this->previous = new self($t->getPrevious()); - } - } - - public function getOriginalException(): ?Throwable - { - return $this->originalException(); - } - - /** - * Method to contain static originalException to exclude it from stacktrace to prevent the stacktrace contents, - * which can be quite big, from being garbage-collected, thus blocking memory until shutdown. - * Approach works both for var_dump() and var_export() and print_r() - */ - private function originalException(Throwable $exceptionToStore = null): ?Throwable - { - static $originalExceptions; - - $instanceId = \spl_object_hash($this); - - if ($exceptionToStore) { - $originalExceptions[$instanceId] = $exceptionToStore; - } - - return $originalExceptions[$instanceId] ?? null; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php b/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php deleted file mode 100644 index 268957c..0000000 --- a/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface IncompleteTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php b/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php deleted file mode 100644 index e656248..0000000 --- a/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestCase extends TestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var bool - */ - protected $backupStaticAttributes = false; - - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - - /** - * @var bool - */ - protected $useErrorHandler = false; - - /** - * @var string - */ - private $message; - - public function __construct(string $className, string $methodName, string $message = '') - { - parent::__construct($className . '::' . $methodName); - - $this->message = $message; - } - - public function getMessage(): string - { - return $this->message; - } - - /** - * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - return $this->getName(); - } - - /** - * @throws Exception - */ - protected function runTest(): void - { - $this->markTestIncomplete($this->message); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php b/vendor/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php deleted file mode 100644 index feb9cc9..0000000 --- a/vendor/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidParameterGroupException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php deleted file mode 100644 index a2707b0..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMockerBuilder; -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; - -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait Api -{ - /** - * @var ConfigurableMethod[] - */ - private static $__phpunit_configurableMethods; - - /** - * @var @object - */ - private $__phpunit_originalObject; - - /** - * @var @bool - */ - private $__phpunit_returnValueGeneration = true; - - /** - * @var InvocationHandler - */ - private $__phpunit_invocationMocker; - - /** @noinspection MagicMethodsValidityInspection */ - public static function __phpunit_initConfigurableMethods(ConfigurableMethod ...$configurableMethods): void - { - if (isset(static::$__phpunit_configurableMethods)) { - throw new ConfigurableMethodsAlreadyInitializedException( - 'Configurable methods is already initialized and can not be reinitialized' - ); - } - - static::$__phpunit_configurableMethods = $configurableMethods; - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_setOriginalObject($originalObject): void - { - $this->__phpunit_originalObject = $originalObject; - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void - { - $this->__phpunit_returnValueGeneration = $returnValueGeneration; - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_getInvocationHandler(): InvocationHandler - { - if ($this->__phpunit_invocationMocker === null) { - $this->__phpunit_invocationMocker = new InvocationHandler( - static::$__phpunit_configurableMethods, - $this->__phpunit_returnValueGeneration - ); - } - - return $this->__phpunit_invocationMocker; - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_hasMatchers(): bool - { - return $this->__phpunit_getInvocationHandler()->hasMatchers(); - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_verify(bool $unsetInvocationMocker = true): void - { - $this->__phpunit_getInvocationHandler()->verify(); - - if ($unsetInvocationMocker) { - $this->__phpunit_invocationMocker = null; - } - } - - public function expects(InvocationOrder $matcher): InvocationMockerBuilder - { - return $this->__phpunit_getInvocationHandler()->expects($matcher); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php deleted file mode 100644 index 77d1770..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; - -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait Method -{ - public function method() - { - $expects = $this->expects(new AnyInvokedCount); - - return \call_user_func_array( - [$expects, 'method'], - \func_get_args() - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php deleted file mode 100644 index 91e35f9..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait MockedCloneMethod -{ - public function __clone() - { - $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php deleted file mode 100644 index 3f493d2..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait UnmockedCloneMethod -{ - public function __clone() - { - $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler(); - - parent::__clone(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php deleted file mode 100644 index a68bfad..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Identity -{ - /** - * Sets the identification of the expectation to $id. - * - * @note The identifier is unique per mock object. - * - * @param string $id unique identification of expectation - */ - public function id($id); -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php deleted file mode 100644 index e0e1065..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php +++ /dev/null @@ -1,276 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\MockObject\ConfigurableMethod; -use PHPUnit\Framework\MockObject\IncompatibleReturnValueException; -use PHPUnit\Framework\MockObject\InvocationHandler; -use PHPUnit\Framework\MockObject\Matcher; -use PHPUnit\Framework\MockObject\Rule; -use PHPUnit\Framework\MockObject\RuntimeException; -use PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls; -use PHPUnit\Framework\MockObject\Stub\Exception; -use PHPUnit\Framework\MockObject\Stub\ReturnArgument; -use PHPUnit\Framework\MockObject\Stub\ReturnCallback; -use PHPUnit\Framework\MockObject\Stub\ReturnReference; -use PHPUnit\Framework\MockObject\Stub\ReturnSelf; -use PHPUnit\Framework\MockObject\Stub\ReturnStub; -use PHPUnit\Framework\MockObject\Stub\ReturnValueMap; -use PHPUnit\Framework\MockObject\Stub\Stub; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationMocker implements InvocationStubber, MethodNameMatch -{ - /** - * @var InvocationHandler - */ - private $invocationHandler; - - /** - * @var Matcher - */ - private $matcher; - - /** - * @var ConfigurableMethod[] - */ - private $configurableMethods; - - public function __construct(InvocationHandler $handler, Matcher $matcher, ConfigurableMethod ...$configurableMethods) - { - $this->invocationHandler = $handler; - $this->matcher = $matcher; - $this->configurableMethods = $configurableMethods; - } - - public function id($id): self - { - $this->invocationHandler->registerMatcher($id, $this->matcher); - - return $this; - } - - public function will(Stub $stub): Identity - { - $this->matcher->setStub($stub); - - return $this; - } - - public function willReturn($value, ...$nextValues): self - { - if (\count($nextValues) === 0) { - $this->ensureTypeOfReturnValues([$value]); - - $stub = new ReturnStub($value); - } else { - $values = \array_merge([$value], $nextValues); - - $this->ensureTypeOfReturnValues($values); - - $stub = new ConsecutiveCalls($values); - } - - return $this->will($stub); - } - - /** {@inheritDoc} */ - public function willReturnReference(&$reference): self - { - $stub = new ReturnReference($reference); - - return $this->will($stub); - } - - public function willReturnMap(array $valueMap): self - { - $stub = new ReturnValueMap($valueMap); - - return $this->will($stub); - } - - public function willReturnArgument($argumentIndex): self - { - $stub = new ReturnArgument($argumentIndex); - - return $this->will($stub); - } - - /** {@inheritDoc} */ - public function willReturnCallback($callback): self - { - $stub = new ReturnCallback($callback); - - return $this->will($stub); - } - - public function willReturnSelf(): self - { - $stub = new ReturnSelf; - - return $this->will($stub); - } - - public function willReturnOnConsecutiveCalls(...$values): self - { - $stub = new ConsecutiveCalls($values); - - return $this->will($stub); - } - - public function willThrowException(\Throwable $exception): self - { - $stub = new Exception($exception); - - return $this->will($stub); - } - - public function after($id): self - { - $this->matcher->setAfterMatchBuilderId($id); - - return $this; - } - - /** - * @throws RuntimeException - */ - public function with(...$arguments): self - { - $this->canDefineParameters(); - - $this->matcher->setParametersRule(new Rule\Parameters($arguments)); - - return $this; - } - - /** - * @param array ...$arguments - * - * @throws RuntimeException - */ - public function withConsecutive(...$arguments): self - { - $this->canDefineParameters(); - - $this->matcher->setParametersRule(new Rule\ConsecutiveParameters($arguments)); - - return $this; - } - - /** - * @throws RuntimeException - */ - public function withAnyParameters(): self - { - $this->canDefineParameters(); - - $this->matcher->setParametersRule(new Rule\AnyParameters); - - return $this; - } - - /** - * @param Constraint|string $constraint - * - * @throws RuntimeException - */ - public function method($constraint): self - { - if ($this->matcher->hasMethodNameRule()) { - throw new RuntimeException( - 'Rule for method name is already defined, cannot redefine' - ); - } - - $configurableMethodNames = \array_map( - static function (ConfigurableMethod $configurable) { - return \strtolower($configurable->getName()); - }, - $this->configurableMethods - ); - - if (\is_string($constraint) && !\in_array(\strtolower($constraint), $configurableMethodNames, true)) { - throw new RuntimeException( - \sprintf( - 'Trying to configure method "%s" which cannot be configured because it does not exist, has not been specified, is final, or is static', - $constraint - ) - ); - } - - $this->matcher->setMethodNameRule(new Rule\MethodName($constraint)); - - return $this; - } - - /** - * Validate that a parameters rule can be defined, throw exceptions otherwise. - * - * @throws RuntimeException - */ - private function canDefineParameters(): void - { - if (!$this->matcher->hasMethodNameRule()) { - throw new RuntimeException( - 'Rule for method name is not defined, cannot define rule for parameters ' . - 'without one' - ); - } - - if ($this->matcher->hasParametersRule()) { - throw new RuntimeException( - 'Rule for parameters is already defined, cannot redefine' - ); - } - } - - private function getConfiguredMethod(): ?ConfigurableMethod - { - $configuredMethod = null; - - foreach ($this->configurableMethods as $configurableMethod) { - if ($this->matcher->getMethodNameRule()->matchesName($configurableMethod->getName())) { - if ($configuredMethod !== null) { - return null; - } - - $configuredMethod = $configurableMethod; - } - } - - return $configuredMethod; - } - - private function ensureTypeOfReturnValues(array $values): void - { - $configuredMethod = $this->getConfiguredMethod(); - - if ($configuredMethod === null) { - return; - } - - foreach ($values as $value) { - if (!$configuredMethod->mayReturn($value)) { - throw new IncompatibleReturnValueException( - \sprintf( - 'Method %s may not return value of type %s, its return declaration is "%s"', - $configuredMethod->getName(), - \is_object($value) ? \get_class($value) : \gettype($value), - $configuredMethod->getReturnTypeDeclaration() - ) - ); - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php deleted file mode 100644 index cb2e0ac..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -use PHPUnit\Framework\MockObject\Stub\Stub; - -interface InvocationStubber -{ - public function will(Stub $stub): Identity; - - /** @return self */ - public function willReturn($value, ...$nextValues)/*: self */; - - /** - * @param mixed $reference - * - * @return self - */ - public function willReturnReference(&$reference)/*: self */; - - /** - * @param array> $valueMap - * - * @return self - */ - public function willReturnMap(array $valueMap)/*: self */; - - /** - * @param int $argumentIndex - * - * @return self - */ - public function willReturnArgument($argumentIndex)/*: self */; - - /** - * @param callable $callback - * - * @return self - */ - public function willReturnCallback($callback)/*: self */; - - /** @return self */ - public function willReturnSelf()/*: self */; - - /** - * @param mixed $values - * - * @return self - */ - public function willReturnOnConsecutiveCalls(...$values)/*: self */; - - /** @return self */ - public function willThrowException(\Throwable $exception)/*: self */; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Match.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Match.php deleted file mode 100644 index d343eac..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Match.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Match extends Stub -{ - /** - * Defines the expectation which must occur before the current is valid. - * - * @param string $id the identification of the expectation that should - * occur before this one - * - * @return Stub - */ - public function after($id); -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php deleted file mode 100644 index f4b1150..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface MethodNameMatch extends ParametersMatch -{ - /** - * Adds a new method name match and returns the parameter match object for - * further matching possibilities. - * - * @param \PHPUnit\Framework\Constraint\Constraint $name Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual - * - * @return ParametersMatch - */ - public function method($name); -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php deleted file mode 100644 index 698c7c5..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.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. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -use PHPUnit\Framework\MockObject\Rule\AnyParameters; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface ParametersMatch extends Match -{ - /** - * Sets the parameters to match for, each parameter to this function will - * be part of match. To perform specific matches or constraints create a - * new PHPUnit\Framework\Constraint\Constraint and use it for the parameter. - * If the parameter value is not a constraint it will use the - * PHPUnit\Framework\Constraint\IsEqual for the value. - * - * Some examples: - * - * // match first parameter with value 2 - * $b->with(2); - * // match first parameter with value 'smock' and second identical to 42 - * $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42)); - * - * - * @return ParametersMatch - */ - public function with(...$arguments); - - /** - * Sets a rule which allows any kind of parameters. - * - * Some examples: - * - * // match any number of parameters - * $b->withAnyParameters(); - * - * - * @return AnyParameters - */ - public function withAnyParameters(); -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php deleted file mode 100644 index d7cb78f..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Builder; - -use PHPUnit\Framework\MockObject\Stub\Stub as BaseStub; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Stub extends Identity -{ - /** - * Stubs the matching method with the stub object $stub. Any invocations of - * the matched method will now be handled by the stub instead. - */ - public function will(BaseStub $stub): Identity; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php deleted file mode 100644 index f65983d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use SebastianBergmann\Type\Type; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurableMethod -{ - /** - * @var string - */ - private $name; - - /** - * @var Type - */ - private $returnType; - - public function __construct(string $name, Type $returnType) - { - $this->name = $name; - $this->returnType = $returnType; - } - - public function getName(): string - { - return $this->name; - } - - public function mayReturn($value): bool - { - if ($value === null && $this->returnType->allowsNull()) { - return true; - } - - return $this->returnType->isAssignable(Type::fromValue($value, false)); - } - - public function getReturnTypeDeclaration(): string - { - return $this->returnType->getReturnTypeDeclaration(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php deleted file mode 100644 index 7e655e2..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BadMethodCallException extends \BadMethodCallException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php deleted file mode 100644 index d12ac99..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurableMethodsAlreadyInitializedException extends \PHPUnit\Framework\Exception implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php deleted file mode 100644 index 7307fba..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php deleted file mode 100644 index f1ceb1d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php deleted file mode 100644 index 33b6a5b..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php deleted file mode 100644 index 8cf0673..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php +++ /dev/null @@ -1,961 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use Doctrine\Instantiator\Exception\ExceptionInterface as InstantiatorException; -use Doctrine\Instantiator\Instantiator; -use PHPUnit\Framework\InvalidArgumentException; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Generator -{ - /** - * @var array - */ - private const BLACKLISTED_METHOD_NAMES = [ - '__CLASS__' => true, - '__DIR__' => true, - '__FILE__' => true, - '__FUNCTION__' => true, - '__LINE__' => true, - '__METHOD__' => true, - '__NAMESPACE__' => true, - '__TRAIT__' => true, - '__clone' => true, - '__halt_compiler' => true, - ]; - - /** - * @var array - */ - private static $cache = []; - - /** - * @var \Text_Template[] - */ - private static $templates = []; - - /** - * Returns a mock object for the specified class. - * - * @param string|string[] $type - * @param null|array $methods - * - * @throws RuntimeException - */ - public function getMock($type, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false, object $proxyTarget = null, bool $allowMockingUnknownTypes = true, bool $returnValueGeneration = true): MockObject - { - if (!\is_array($type) && !\is_string($type)) { - throw InvalidArgumentException::create(1, 'array or string'); - } - - if (!\is_array($methods) && null !== $methods) { - throw InvalidArgumentException::create(2, 'array'); - } - - if ($type === 'Traversable' || $type === '\\Traversable') { - $type = 'Iterator'; - } - - if (\is_array($type)) { - $type = \array_unique( - \array_map( - static function ($type) { - if ($type === 'Traversable' || - $type === '\\Traversable' || - $type === '\\Iterator') { - return 'Iterator'; - } - - return $type; - }, - $type - ) - ); - } - - if (!$allowMockingUnknownTypes) { - if (\is_array($type)) { - foreach ($type as $_type) { - if (!\class_exists($_type, $callAutoload) && - !\interface_exists($_type, $callAutoload)) { - throw new RuntimeException( - \sprintf( - 'Cannot stub or mock class or interface "%s" which does not exist', - $_type - ) - ); - } - } - } elseif (!\class_exists($type, $callAutoload) && !\interface_exists($type, $callAutoload)) { - throw new RuntimeException( - \sprintf( - 'Cannot stub or mock class or interface "%s" which does not exist', - $type - ) - ); - } - } - - if (null !== $methods) { - foreach ($methods as $method) { - if (!\preg_match('~[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*~', (string) $method)) { - throw new RuntimeException( - \sprintf( - 'Cannot stub or mock method with invalid name "%s"', - $method - ) - ); - } - } - - if ($methods !== \array_unique($methods)) { - throw new RuntimeException( - \sprintf( - 'Cannot stub or mock using a method list that contains duplicates: "%s" (duplicate: "%s")', - \implode(', ', $methods), - \implode(', ', \array_unique(\array_diff_assoc($methods, \array_unique($methods)))) - ) - ); - } - } - - if ($mockClassName !== '' && \class_exists($mockClassName, false)) { - try { - $reflector = new \ReflectionClass($mockClassName); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$reflector->implementsInterface(MockObject::class)) { - throw new RuntimeException( - \sprintf( - 'Class "%s" already exists.', - $mockClassName - ) - ); - } - } - - if (!$callOriginalConstructor && $callOriginalMethods) { - throw new RuntimeException( - 'Proxying to original methods requires invoking the original constructor' - ); - } - - $mock = $this->generate( - $type, - $methods, - $mockClassName, - $callOriginalClone, - $callAutoload, - $cloneArguments, - $callOriginalMethods - ); - - return $this->getObject( - $mock, - $type, - $callOriginalConstructor, - $callAutoload, - $arguments, - $callOriginalMethods, - $proxyTarget, - $returnValueGeneration - ); - } - - /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. Concrete methods to mock can be specified with - * the $mockedMethods parameter - * - * @throws RuntimeException - */ - public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = true): MockObject - { - if (\class_exists($originalClassName, $callAutoload) || - \interface_exists($originalClassName, $callAutoload)) { - try { - $reflector = new \ReflectionClass($originalClassName); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $methods = $mockedMethods; - - foreach ($reflector->getMethods() as $method) { - if ($method->isAbstract() && !\in_array($method->getName(), $methods, true)) { - $methods[] = $method->getName(); - } - } - - if (empty($methods)) { - $methods = null; - } - - return $this->getMock( - $originalClassName, - $methods, - $arguments, - $mockClassName, - $callOriginalConstructor, - $callOriginalClone, - $callAutoload, - $cloneArguments - ); - } - - throw new RuntimeException( - \sprintf('Class "%s" does not exist.', $originalClassName) - ); - } - - /** - * Returns a mock object for the specified trait with all abstract methods - * of the trait mocked. Concrete methods to mock can be specified with the - * `$mockedMethods` parameter. - * - * @throws RuntimeException - */ - public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = true): MockObject - { - if (!\trait_exists($traitName, $callAutoload)) { - throw new RuntimeException( - \sprintf( - 'Trait "%s" does not exist.', - $traitName - ) - ); - } - - $className = $this->generateClassName( - $traitName, - '', - 'Trait_' - ); - - $classTemplate = $this->getTemplate('trait_class.tpl'); - - $classTemplate->setVar( - [ - 'prologue' => 'abstract ', - 'class_name' => $className['className'], - 'trait_name' => $traitName, - ] - ); - - $mockTrait = new MockTrait($classTemplate->render(), $className['className']); - $mockTrait->generate(); - - return $this->getMockForAbstractClass($className['className'], $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $mockedMethods, $cloneArguments); - } - - /** - * Returns an object for the specified trait. - * - * @throws RuntimeException - */ - public function getObjectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object - { - if (!\trait_exists($traitName, $callAutoload)) { - throw new RuntimeException( - \sprintf( - 'Trait "%s" does not exist.', - $traitName - ) - ); - } - - $className = $this->generateClassName( - $traitName, - $traitClassName, - 'Trait_' - ); - - $classTemplate = $this->getTemplate('trait_class.tpl'); - - $classTemplate->setVar( - [ - 'prologue' => '', - 'class_name' => $className['className'], - 'trait_name' => $traitName, - ] - ); - - return $this->getObject( - new MockTrait( - $classTemplate->render(), - $className['className'] - ), - '', - $callOriginalConstructor, - $callAutoload, - $arguments - ); - } - - public function generate($type, array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): MockClass - { - if (\is_array($type)) { - \sort($type); - } - - if ($mockClassName !== '') { - return $this->generateMock( - $type, - $methods, - $mockClassName, - $callOriginalClone, - $callAutoload, - $cloneArguments, - $callOriginalMethods - ); - } - - $key = \md5( - \is_array($type) ? \implode('_', $type) : $type . - \serialize($methods) . - \serialize($callOriginalClone) . - \serialize($cloneArguments) . - \serialize($callOriginalMethods) - ); - - if (!isset(self::$cache[$key])) { - self::$cache[$key] = $this->generateMock( - $type, - $methods, - $mockClassName, - $callOriginalClone, - $callAutoload, - $cloneArguments, - $callOriginalMethods - ); - } - - return self::$cache[$key]; - } - - /** - * @throws RuntimeException - */ - public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string - { - if (!\extension_loaded('soap')) { - throw new RuntimeException( - 'The SOAP extension is required to generate a mock object from WSDL.' - ); - } - - $options = \array_merge($options, ['cache_wsdl' => \WSDL_CACHE_NONE]); - - try { - $client = new \SoapClient($wsdlFile, $options); - $_methods = \array_unique($client->__getFunctions()); - unset($client); - } catch (\SoapFault $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - \sort($_methods); - - $methodTemplate = $this->getTemplate('wsdl_method.tpl'); - $methodsBuffer = ''; - - foreach ($_methods as $method) { - \preg_match_all('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\(/', $method, $matches, \PREG_OFFSET_CAPTURE); - $lastFunction = \array_pop($matches[0]); - $nameStart = $lastFunction[1]; - $nameEnd = $nameStart + \strlen($lastFunction[0]) - 1; - $name = \str_replace('(', '', $lastFunction[0]); - - if (empty($methods) || \in_array($name, $methods, true)) { - $args = \explode( - ',', - \str_replace(')', '', \substr($method, $nameEnd + 1)) - ); - - foreach (\range(0, \count($args) - 1) as $i) { - $args[$i] = \substr($args[$i], \strpos($args[$i], '$')); - } - - $methodTemplate->setVar( - [ - 'method_name' => $name, - 'arguments' => \implode(', ', $args), - ] - ); - - $methodsBuffer .= $methodTemplate->render(); - } - } - - $optionsBuffer = '['; - - foreach ($options as $key => $value) { - $optionsBuffer .= $key . ' => ' . $value; - } - - $optionsBuffer .= ']'; - - $classTemplate = $this->getTemplate('wsdl_class.tpl'); - $namespace = ''; - - if (\strpos($className, '\\') !== false) { - $parts = \explode('\\', $className); - $className = \array_pop($parts); - $namespace = 'namespace ' . \implode('\\', $parts) . ';' . "\n\n"; - } - - $classTemplate->setVar( - [ - 'namespace' => $namespace, - 'class_name' => $className, - 'wsdl' => $wsdlFile, - 'options' => $optionsBuffer, - 'methods' => $methodsBuffer, - ] - ); - - return $classTemplate->render(); - } - - /** - * @throws RuntimeException - * - * @return string[] - */ - public function getClassMethods(string $className): array - { - try { - $class = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $methods = []; - - foreach ($class->getMethods() as $method) { - if ($method->isPublic() || $method->isAbstract()) { - $methods[] = $method->getName(); - } - } - - return $methods; - } - - /** - * @throws RuntimeException - * - * @return MockMethod[] - */ - public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array - { - try { - $class = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $methods = []; - - foreach ($class->getMethods() as $method) { - if (($method->isPublic() || $method->isAbstract()) && $this->canMockMethod($method)) { - $methods[] = MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments); - } - } - - return $methods; - } - - /** - * @return \ReflectionMethod[] - */ - private function getInterfaceOwnMethods(string $interfaceName): array - { - try { - $reflect = new \ReflectionClass($interfaceName); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $methods = []; - - foreach ($reflect->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() === $interfaceName) { - $methods[] = $method; - } - } - - return $methods; - } - - private function getObject(MockType $mockClass, $type = '', bool $callOriginalConstructor = false, bool $callAutoload = false, array $arguments = [], bool $callOriginalMethods = false, object $proxyTarget = null, bool $returnValueGeneration = true) - { - $className = $mockClass->generate(); - - if ($callOriginalConstructor) { - if (\count($arguments) === 0) { - $object = new $className; - } else { - try { - $class = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $object = $class->newInstanceArgs($arguments); - } - } else { - try { - $object = (new Instantiator)->instantiate($className); - } catch (InstantiatorException $exception) { - throw new RuntimeException($exception->getMessage()); - } - } - - if ($callOriginalMethods) { - if (!\is_object($proxyTarget)) { - if (\count($arguments) === 0) { - $proxyTarget = new $type; - } else { - try { - $class = new \ReflectionClass($type); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $proxyTarget = $class->newInstanceArgs($arguments); - } - } - - $object->__phpunit_setOriginalObject($proxyTarget); - } - - if ($object instanceof MockObject) { - $object->__phpunit_setReturnValueGeneration($returnValueGeneration); - } - - return $object; - } - - /** - * @param array|string $type - * - * @throws RuntimeException - */ - private function generateMock($type, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone, bool $callAutoload, bool $cloneArguments, bool $callOriginalMethods): MockClass - { - $classTemplate = $this->getTemplate('mocked_class.tpl'); - $additionalInterfaces = []; - $mockedCloneMethod = false; - $unmockedCloneMethod = false; - $isClass = false; - $isInterface = false; - $class = null; - $mockMethods = new MockMethodSet; - - if (\is_array($type)) { - $interfaceMethods = []; - - foreach ($type as $_type) { - if (!\interface_exists($_type, $callAutoload)) { - throw new RuntimeException( - \sprintf( - 'Interface "%s" does not exist.', - $_type - ) - ); - } - - $additionalInterfaces[] = $_type; - - try { - $typeClass = new \ReflectionClass($_type); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - foreach ($this->getClassMethods($_type) as $methodTrait) { - if (\in_array($methodTrait, $interfaceMethods, true)) { - throw new RuntimeException( - \sprintf( - 'Duplicate method "%s" not allowed.', - $methodTrait - ) - ); - } - - try { - $methodReflection = $typeClass->getMethod($methodTrait); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($this->canMockMethod($methodReflection)) { - $mockMethods->addMethods( - MockMethod::fromReflection($methodReflection, $callOriginalMethods, $cloneArguments) - ); - - $interfaceMethods[] = $methodTrait; - } - } - } - - unset($interfaceMethods); - } - - $mockClassName = $this->generateClassName( - $type, - $mockClassName, - 'Mock_' - ); - - if (\class_exists($mockClassName['fullClassName'], $callAutoload)) { - $isClass = true; - } elseif (\interface_exists($mockClassName['fullClassName'], $callAutoload)) { - $isInterface = true; - } - - if (!$isClass && !$isInterface) { - $prologue = 'class ' . $mockClassName['originalClassName'] . "\n{\n}\n\n"; - - if (!empty($mockClassName['namespaceName'])) { - $prologue = 'namespace ' . $mockClassName['namespaceName'] . - " {\n\n" . $prologue . "}\n\n" . - "namespace {\n\n"; - - $epilogue = "\n\n}"; - } - - $mockedCloneMethod = true; - } else { - try { - $class = new \ReflectionClass($mockClassName['fullClassName']); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($class->isFinal()) { - throw new RuntimeException( - \sprintf( - 'Class "%s" is declared "final" and cannot be mocked.', - $mockClassName['fullClassName'] - ) - ); - } - - // @see https://github.com/sebastianbergmann/phpunit/issues/2995 - if ($isInterface && $class->implementsInterface(\Throwable::class)) { - $actualClassName = \Exception::class; - $additionalInterfaces[] = $class->getName(); - $isInterface = false; - - try { - $class = new \ReflectionClass($actualClassName); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - foreach ($this->getInterfaceOwnMethods($mockClassName['fullClassName']) as $methodTrait) { - $methodName = $methodTrait->getName(); - - if ($class->hasMethod($methodName)) { - try { - $classMethod = $class->getMethod($methodName); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$this->canMockMethod($classMethod)) { - continue; - } - } - - $mockMethods->addMethods( - MockMethod::fromReflection($methodTrait, $callOriginalMethods, $cloneArguments) - ); - } - - $mockClassName = $this->generateClassName( - $actualClassName, - '', - 'Mock_' - ); - } - - // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103 - if ($isInterface && $class->implementsInterface(\Traversable::class) && - !$class->implementsInterface(\Iterator::class) && - !$class->implementsInterface(\IteratorAggregate::class)) { - $additionalInterfaces[] = \Iterator::class; - - $mockMethods->addMethods( - ...$this->mockClassMethods(\Iterator::class, $callOriginalMethods, $cloneArguments) - ); - } - - if ($class->hasMethod('__clone')) { - try { - $cloneMethod = $class->getMethod('__clone'); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$cloneMethod->isFinal()) { - if ($callOriginalClone && !$isInterface) { - $unmockedCloneMethod = true; - } else { - $mockedCloneMethod = true; - } - } - } else { - $mockedCloneMethod = true; - } - } - - if ($explicitMethods === [] && - ($isClass || $isInterface)) { - $mockMethods->addMethods( - ...$this->mockClassMethods($mockClassName['fullClassName'], $callOriginalMethods, $cloneArguments) - ); - } - - if (\is_array($explicitMethods)) { - foreach ($explicitMethods as $methodName) { - if ($class !== null && $class->hasMethod($methodName)) { - try { - $methodTrait = $class->getMethod($methodName); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($this->canMockMethod($methodTrait)) { - $mockMethods->addMethods( - MockMethod::fromReflection($methodTrait, $callOriginalMethods, $cloneArguments) - ); - } - } else { - $mockMethods->addMethods( - MockMethod::fromName( - $mockClassName['fullClassName'], - $methodName, - $cloneArguments - ) - ); - } - } - } - - $mockedMethods = ''; - $configurable = []; - - foreach ($mockMethods->asArray() as $mockMethod) { - $mockedMethods .= $mockMethod->generateCode(); - $configurable[] = new ConfigurableMethod($mockMethod->getName(), $mockMethod->getReturnType()); - } - - $methodTrait = ''; - - if (!$mockMethods->hasMethod('method') && (!isset($class) || !$class->hasMethod('method'))) { - $methodTrait = \PHP_EOL . ' use \PHPUnit\Framework\MockObject\Method;'; - } - - $cloneTrait = ''; - - if ($mockedCloneMethod) { - $cloneTrait = \PHP_EOL . ' use \PHPUnit\Framework\MockObject\MockedCloneMethod;'; - } - - if ($unmockedCloneMethod) { - $cloneTrait = \PHP_EOL . ' use \PHPUnit\Framework\MockObject\UnmockedCloneMethod;'; - } - - $classTemplate->setVar( - [ - 'prologue' => $prologue ?? '', - 'epilogue' => $epilogue ?? '', - 'class_declaration' => $this->generateMockClassDeclaration( - $mockClassName, - $isInterface, - $additionalInterfaces - ), - 'clone' => $cloneTrait, - 'mock_class_name' => $mockClassName['className'], - 'mocked_methods' => $mockedMethods, - 'method' => $methodTrait, - ] - ); - - return new MockClass( - $classTemplate->render(), - $mockClassName['className'], - $configurable - ); - } - - /** - * @param array|string $type - */ - private function generateClassName($type, string $className, string $prefix): array - { - if (\is_array($type)) { - $type = \implode('_', $type); - } - - if ($type[0] === '\\') { - $type = \substr($type, 1); - } - - $classNameParts = \explode('\\', $type); - - if (\count($classNameParts) > 1) { - $type = \array_pop($classNameParts); - $namespaceName = \implode('\\', $classNameParts); - $fullClassName = $namespaceName . '\\' . $type; - } else { - $namespaceName = ''; - $fullClassName = $type; - } - - if ($className === '') { - do { - $className = $prefix . $type . '_' . - \substr(\md5((string) \mt_rand()), 0, 8); - } while (\class_exists($className, false)); - } - - return [ - 'className' => $className, - 'originalClassName' => $type, - 'fullClassName' => $fullClassName, - 'namespaceName' => $namespaceName, - ]; - } - - private function generateMockClassDeclaration(array $mockClassName, bool $isInterface, array $additionalInterfaces = []): string - { - $buffer = 'class '; - - $additionalInterfaces[] = MockObject::class; - $interfaces = \implode(', ', $additionalInterfaces); - - if ($isInterface) { - $buffer .= \sprintf( - '%s implements %s', - $mockClassName['className'], - $interfaces - ); - - if (!\in_array($mockClassName['originalClassName'], $additionalInterfaces, true)) { - $buffer .= ', '; - - if (!empty($mockClassName['namespaceName'])) { - $buffer .= $mockClassName['namespaceName'] . '\\'; - } - - $buffer .= $mockClassName['originalClassName']; - } - } else { - $buffer .= \sprintf( - '%s extends %s%s implements %s', - $mockClassName['className'], - !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '', - $mockClassName['originalClassName'], - $interfaces - ); - } - - return $buffer; - } - - private function canMockMethod(\ReflectionMethod $method): bool - { - return !($method->isConstructor() || $method->isFinal() || $method->isPrivate() || $this->isMethodNameBlacklisted($method->getName())); - } - - private function isMethodNameBlacklisted(string $name): bool - { - return isset(self::BLACKLISTED_METHOD_NAMES[$name]); - } - - private function getTemplate(string $template): \Text_Template - { - $filename = __DIR__ . \DIRECTORY_SEPARATOR . 'Generator' . \DIRECTORY_SEPARATOR . $template; - - if (!isset(self::$templates[$filename])) { - self::$templates[$filename] = new \Text_Template($filename); - } - - return self::$templates[$filename]; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/deprecation.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/deprecation.tpl deleted file mode 100644 index 5bf06f5..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/deprecation.tpl +++ /dev/null @@ -1,2 +0,0 @@ - - @trigger_error({deprecation}, E_USER_DEPRECATED); diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_class.tpl deleted file mode 100644 index 593119f..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_class.tpl +++ /dev/null @@ -1,6 +0,0 @@ -declare(strict_types=1); - -{prologue}{class_declaration} -{ - use \PHPUnit\Framework\MockObject\Api;{method}{clone} -{mocked_methods}}{epilogue} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method.tpl deleted file mode 100644 index 32304f3..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - {{deprecation} - $__phpunit_arguments = [{arguments_call}]; - $__phpunit_count = func_num_args(); - - if ($__phpunit_count > {arguments_count}) { - $__phpunit_arguments_tmp = func_get_args(); - - for ($__phpunit_i = {arguments_count}; $__phpunit_i < $__phpunit_count; $__phpunit_i++) { - $__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i]; - } - } - - $__phpunit_result = $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '{class_name}', '{method_name}', $__phpunit_arguments, '{return_declaration}', $this, {clone_arguments} - ) - ); - - return $__phpunit_result; - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method_void.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method_void.tpl deleted file mode 100644 index 6ea6f45..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method_void.tpl +++ /dev/null @@ -1,20 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - {{deprecation} - $__phpunit_arguments = [{arguments_call}]; - $__phpunit_count = func_num_args(); - - if ($__phpunit_count > {arguments_count}) { - $__phpunit_arguments_tmp = func_get_args(); - - for ($__phpunit_i = {arguments_count}; $__phpunit_i < $__phpunit_count; $__phpunit_i++) { - $__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i]; - } - } - - $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '{class_name}', '{method_name}', $__phpunit_arguments, '{return_declaration}', $this, {clone_arguments} - ) - ); - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_static_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_static_method.tpl deleted file mode 100644 index 5e5cf23..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_static_method.tpl +++ /dev/null @@ -1,5 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - { - throw new \PHPUnit\Framework\MockObject\BadMethodCallException('Static method "{method_name}" cannot be invoked on mock object'); - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method.tpl deleted file mode 100644 index 6f699be..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - { - $__phpunit_arguments = [{arguments_call}]; - $__phpunit_count = func_num_args(); - - if ($__phpunit_count > {arguments_count}) { - $__phpunit_arguments_tmp = func_get_args(); - - for ($__phpunit_i = {arguments_count}; $__phpunit_i < $__phpunit_count; $__phpunit_i++) { - $__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i]; - } - } - - $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '{class_name}', '{method_name}', $__phpunit_arguments, '{return_declaration}', $this, {clone_arguments}, true - ) - ); - - return call_user_func_array(array($this->__phpunit_originalObject, "{method_name}"), $__phpunit_arguments); - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method_void.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method_void.tpl deleted file mode 100644 index b2f963d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method_void.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - { - $__phpunit_arguments = [{arguments_call}]; - $__phpunit_count = func_num_args(); - - if ($__phpunit_count > {arguments_count}) { - $__phpunit_arguments_tmp = func_get_args(); - - for ($__phpunit_i = {arguments_count}; $__phpunit_i < $__phpunit_count; $__phpunit_i++) { - $__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i]; - } - } - - $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '{class_name}', '{method_name}', $__phpunit_arguments, '{return_declaration}', $this, {clone_arguments}, true - ) - ); - - call_user_func_array(array($this->__phpunit_originalObject, "{method_name}"), $__phpunit_arguments); - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/trait_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/trait_class.tpl deleted file mode 100644 index a8fe470..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/trait_class.tpl +++ /dev/null @@ -1,6 +0,0 @@ -declare(strict_types=1); - -{prologue}class {class_name} -{ - use {trait_name}; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_class.tpl deleted file mode 100644 index b3100b4..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_class.tpl +++ /dev/null @@ -1,9 +0,0 @@ -declare(strict_types=1); - -{namespace}class {class_name} extends \SoapClient -{ - public function __construct($wsdl, array $options) - { - parent::__construct('{wsdl}', $options); - } -{methods}} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_method.tpl deleted file mode 100644 index bb16e76..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_method.tpl +++ /dev/null @@ -1,4 +0,0 @@ - - public function {method_name}({arguments}) - { - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php deleted file mode 100644 index 228cf0d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Util\Type; -use SebastianBergmann\Exporter\Exporter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Invocation implements SelfDescribing -{ - /** - * @var string - */ - private $className; - - /** - * @var string - */ - private $methodName; - - /** - * @var array - */ - private $parameters; - - /** - * @var string - */ - private $returnType; - - /** - * @var bool - */ - private $isReturnTypeNullable = false; - - /** - * @var bool - */ - private $proxiedCall; - - /** - * @var object - */ - private $object; - - public function __construct(string $className, string $methodName, array $parameters, string $returnType, object $object, bool $cloneObjects = false, bool $proxiedCall = false) - { - $this->className = $className; - $this->methodName = $methodName; - $this->parameters = $parameters; - $this->object = $object; - $this->proxiedCall = $proxiedCall; - - $returnType = \ltrim($returnType, ': '); - - if (\strtolower($methodName) === '__tostring') { - $returnType = 'string'; - } - - if (\strpos($returnType, '?') === 0) { - $returnType = \substr($returnType, 1); - $this->isReturnTypeNullable = true; - } - - $this->returnType = $returnType; - - if (!$cloneObjects) { - return; - } - - foreach ($this->parameters as $key => $value) { - if (\is_object($value)) { - $this->parameters[$key] = $this->cloneObject($value); - } - } - } - - public function getClassName(): string - { - return $this->className; - } - - public function getMethodName(): string - { - return $this->methodName; - } - - public function getParameters(): array - { - return $this->parameters; - } - - /** - * @throws RuntimeException - * - * @return mixed Mocked return value - */ - public function generateReturnValue() - { - if ($this->isReturnTypeNullable || $this->proxiedCall) { - return; - } - - switch (\strtolower($this->returnType)) { - case '': - case 'void': - return; - - case 'string': - return ''; - - case 'float': - return 0.0; - - case 'int': - return 0; - - case 'bool': - return false; - - case 'array': - return []; - - case 'object': - return new \stdClass; - - case 'callable': - case 'closure': - return function (): void { - }; - - case 'traversable': - case 'generator': - case 'iterable': - $generator = static function () { - yield; - }; - - return $generator(); - - default: - $generator = new Generator; - - return $generator->getMock($this->returnType, [], [], '', false); - } - } - - public function toString(): string - { - $exporter = new Exporter; - - return \sprintf( - '%s::%s(%s)%s', - $this->className, - $this->methodName, - \implode( - ', ', - \array_map( - [$exporter, 'shortenedExport'], - $this->parameters - ) - ), - $this->returnType ? \sprintf(': %s', $this->returnType) : '' - ); - } - - public function getObject(): object - { - return $this->object; - } - - private function cloneObject(object $original): object - { - if (Type::isCloneable($original)) { - return clone $original; - } - - return $original; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php b/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php deleted file mode 100644 index cd1ea0d..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php +++ /dev/null @@ -1,194 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use Exception; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Builder\InvocationMocker; -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationHandler -{ - /** - * @var Matcher[] - */ - private $matchers = []; - - /** - * @var Matcher[] - */ - private $matcherMap = []; - - /** - * @var ConfigurableMethod[] - */ - private $configurableMethods; - - /** - * @var bool - */ - private $returnValueGeneration; - - /** - * @var \Throwable - */ - private $deferredError; - - public function __construct(array $configurableMethods, bool $returnValueGeneration) - { - $this->configurableMethods = $configurableMethods; - $this->returnValueGeneration = $returnValueGeneration; - } - - public function hasMatchers(): bool - { - foreach ($this->matchers as $matcher) { - if ($matcher->hasMatchers()) { - return true; - } - } - - return false; - } - - /** - * Looks up the match builder with identification $id and returns it. - * - * @param string $id The identification of the match builder - */ - public function lookupMatcher(string $id): ?Matcher - { - if (isset($this->matcherMap[$id])) { - return $this->matcherMap[$id]; - } - - return null; - } - - /** - * Registers a matcher with the identification $id. The matcher can later be - * looked up using lookupMatcher() to figure out if it has been invoked. - * - * @param string $id The identification of the matcher - * @param Matcher $matcher The builder which is being registered - * - * @throws RuntimeException - */ - public function registerMatcher(string $id, Matcher $matcher): void - { - if (isset($this->matcherMap[$id])) { - throw new RuntimeException( - 'Matcher with id <' . $id . '> is already registered.' - ); - } - - $this->matcherMap[$id] = $matcher; - } - - public function expects(InvocationOrder $rule): InvocationMocker - { - $matcher = new Matcher($rule); - $this->addMatcher($matcher); - - return new InvocationMocker( - $this, - $matcher, - ...$this->configurableMethods - ); - } - - /** - * @throws Exception - * - * @return mixed|void - */ - public function invoke(Invocation $invocation) - { - $exception = null; - $hasReturnValue = false; - $returnValue = null; - - foreach ($this->matchers as $match) { - try { - if ($match->matches($invocation)) { - $value = $match->invoked($invocation); - - if (!$hasReturnValue) { - $returnValue = $value; - $hasReturnValue = true; - } - } - } catch (Exception $e) { - $exception = $e; - } - } - - if ($exception !== null) { - throw $exception; - } - - if ($hasReturnValue) { - return $returnValue; - } - - if (!$this->returnValueGeneration) { - $exception = new ExpectationFailedException( - \sprintf( - 'Return value inference disabled and no expectation set up for %s::%s()', - $invocation->getClassName(), - $invocation->getMethodName() - ) - ); - - if (\strtolower($invocation->getMethodName()) === '__tostring') { - $this->deferredError = $exception; - - return ''; - } - - throw $exception; - } - - return $invocation->generateReturnValue(); - } - - public function matches(Invocation $invocation): bool - { - foreach ($this->matchers as $matcher) { - if (!$matcher->matches($invocation)) { - return false; - } - } - - return true; - } - - /** - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function verify(): void - { - foreach ($this->matchers as $matcher) { - $matcher->verify(); - } - - if ($this->deferredError) { - throw $this->deferredError; - } - } - - private function addMatcher(Matcher $matcher): void - { - $this->matchers[] = $matcher; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php deleted file mode 100644 index 6179eeb..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -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\InvokedCount; -use PHPUnit\Framework\MockObject\Rule\MethodName; -use PHPUnit\Framework\MockObject\Rule\ParametersRule; -use PHPUnit\Framework\MockObject\Stub\Stub; -use PHPUnit\Framework\TestFailure; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Matcher -{ - /** - * @var InvocationOrder - */ - private $invocationRule; - - /** - * @var mixed - */ - private $afterMatchBuilderId; - - /** - * @var bool - */ - private $afterMatchBuilderIsInvoked = false; - - /** - * @var MethodName - */ - private $methodNameRule; - - /** - * @var ParametersRule - */ - private $parametersRule; - - /** - * @var Stub - */ - private $stub; - - public function __construct(InvocationOrder $rule) - { - $this->invocationRule = $rule; - } - - public function hasMatchers(): bool - { - return !$this->invocationRule instanceof AnyInvokedCount; - } - - public function hasMethodNameRule(): bool - { - return $this->methodNameRule !== null; - } - - public function getMethodNameRule(): MethodName - { - return $this->methodNameRule; - } - - public function setMethodNameRule(MethodName $rule): void - { - $this->methodNameRule = $rule; - } - - public function hasParametersRule(): bool - { - return $this->parametersRule !== null; - } - - public function setParametersRule(ParametersRule $rule): void - { - $this->parametersRule = $rule; - } - - public function setStub(Stub $stub): void - { - $this->stub = $stub; - } - - public function setAfterMatchBuilderId(string $id): void - { - $this->afterMatchBuilderId = $id; - } - - /** - * @throws \Exception - * @throws RuntimeException - * @throws ExpectationFailedException - */ - public function invoked(Invocation $invocation) - { - if ($this->methodNameRule === null) { - throw new RuntimeException('No method rule is set'); - } - - if ($this->afterMatchBuilderId !== null) { - $matcher = $invocation->getObject() - ->__phpunit_getInvocationHandler() - ->lookupMatcher($this->afterMatchBuilderId); - - if (!$matcher) { - throw new RuntimeException( - \sprintf( - 'No builder found for match builder identification <%s>', - $this->afterMatchBuilderId - ) - ); - } - \assert($matcher instanceof self); - - if ($matcher->invocationRule->hasBeenInvoked()) { - $this->afterMatchBuilderIsInvoked = true; - } - } - - $this->invocationRule->invoked($invocation); - - try { - if ($this->parametersRule !== null) { - $this->parametersRule->apply($invocation); - } - } catch (ExpectationFailedException $e) { - throw new ExpectationFailedException( - \sprintf( - "Expectation failed for %s when %s\n%s", - $this->methodNameRule->toString(), - $this->invocationRule->toString(), - $e->getMessage() - ), - $e->getComparisonFailure() - ); - } - - if ($this->stub) { - return $this->stub->invoke($invocation); - } - - return $invocation->generateReturnValue(); - } - - /** - * @throws RuntimeException - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function matches(Invocation $invocation): bool - { - if ($this->afterMatchBuilderId !== null) { - $matcher = $invocation->getObject() - ->__phpunit_getInvocationHandler() - ->lookupMatcher($this->afterMatchBuilderId); - - if (!$matcher) { - throw new RuntimeException( - \sprintf( - 'No builder found for match builder identification <%s>', - $this->afterMatchBuilderId - ) - ); - } - \assert($matcher instanceof self); - - if (!$matcher->invocationRule->hasBeenInvoked()) { - return false; - } - } - - if ($this->methodNameRule === null) { - throw new RuntimeException('No method rule is set'); - } - - if (!$this->invocationRule->matches($invocation)) { - return false; - } - - try { - if (!$this->methodNameRule->matches($invocation)) { - return false; - } - } catch (ExpectationFailedException $e) { - throw new ExpectationFailedException( - \sprintf( - "Expectation failed for %s when %s\n%s", - $this->methodNameRule->toString(), - $this->invocationRule->toString(), - $e->getMessage() - ), - $e->getComparisonFailure() - ); - } - - return true; - } - - /** - * @throws RuntimeException - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function verify(): void - { - if ($this->methodNameRule === null) { - throw new RuntimeException('No method rule is set'); - } - - try { - $this->invocationRule->verify(); - - if ($this->parametersRule === null) { - $this->parametersRule = new AnyParameters; - } - - $invocationIsAny = $this->invocationRule instanceof AnyInvokedCount; - $invocationIsNever = $this->invocationRule instanceof InvokedCount && $this->invocationRule->isNever(); - - if (!$invocationIsAny && !$invocationIsNever) { - $this->parametersRule->verify(); - } - } catch (ExpectationFailedException $e) { - throw new ExpectationFailedException( - \sprintf( - "Expectation failed for %s when %s.\n%s", - $this->methodNameRule->toString(), - $this->invocationRule->toString(), - TestFailure::exceptionToString($e) - ) - ); - } - } - - public function toString(): string - { - $list = []; - - if ($this->invocationRule !== null) { - $list[] = $this->invocationRule->toString(); - } - - if ($this->methodNameRule !== null) { - $list[] = 'where ' . $this->methodNameRule->toString(); - } - - if ($this->parametersRule !== null) { - $list[] = 'and ' . $this->parametersRule->toString(); - } - - if ($this->afterMatchBuilderId !== null) { - $list[] = 'after ' . $this->afterMatchBuilderId; - } - - if ($this->stub !== null) { - $list[] = 'will ' . $this->stub->toString(); - } - - return \implode(' ', $list); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php deleted file mode 100644 index 18e5772..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\Constraint\Constraint; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameConstraint extends Constraint -{ - /** - * @var string - */ - private $methodName; - - public function __construct(string $methodName) - { - $this->methodName = $methodName; - } - - public function toString(): string - { - return \sprintf( - 'is "%s"', - $this->methodName - ); - } - - protected function matches($other): bool - { - if (!\is_string($other)) { - return false; - } - - return \strtolower($this->methodName) === \strtolower($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php deleted file mode 100644 index 649d19b..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php +++ /dev/null @@ -1,483 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\TestCase; - -/** - * @psalm-template MockedType - */ -final class MockBuilder -{ - /** - * @var TestCase - */ - private $testCase; - - /** - * @var string - */ - private $type; - - /** - * @var string[] - */ - private $methods = []; - - /** - * @var bool - */ - private $emptyMethodsArray = false; - - /** - * @var string - */ - private $mockClassName = ''; - - /** - * @var array - */ - private $constructorArgs = []; - - /** - * @var bool - */ - private $originalConstructor = true; - - /** - * @var bool - */ - private $originalClone = true; - - /** - * @var bool - */ - private $autoload = true; - - /** - * @var bool - */ - private $cloneArguments = false; - - /** - * @var bool - */ - private $callOriginalMethods = false; - - /** - * @var ?object - */ - private $proxyTarget; - - /** - * @var bool - */ - private $allowMockingUnknownTypes = true; - - /** - * @var bool - */ - private $returnValueGeneration = true; - - /** - * @var Generator - */ - private $generator; - - /** - * @var bool - */ - private $alreadyUsedMockMethodConfiguration = false; - - /** - * @param string|string[] $type - * - * @psalm-param class-string|string|string[] $type - */ - public function __construct(TestCase $testCase, $type) - { - $this->testCase = $testCase; - $this->type = $type; - $this->generator = new Generator; - } - - /** - * Creates a mock object using a fluent interface. - * - * @throws RuntimeException - * - * @psalm-return MockObject&MockedType - */ - public function getMock(): MockObject - { - $object = $this->generator->getMock( - $this->type, - !$this->emptyMethodsArray ? $this->methods : null, - $this->constructorArgs, - $this->mockClassName, - $this->originalConstructor, - $this->originalClone, - $this->autoload, - $this->cloneArguments, - $this->callOriginalMethods, - $this->proxyTarget, - $this->allowMockingUnknownTypes, - $this->returnValueGeneration - ); - - $this->testCase->registerMockObject($object); - - return $object; - } - - /** - * Creates a mock object for an abstract class using a fluent interface. - * - * @throws \PHPUnit\Framework\Exception - * @throws RuntimeException - * - * @psalm-return MockObject&MockedType - */ - public function getMockForAbstractClass(): MockObject - { - $object = $this->generator->getMockForAbstractClass( - $this->type, - $this->constructorArgs, - $this->mockClassName, - $this->originalConstructor, - $this->originalClone, - $this->autoload, - $this->methods, - $this->cloneArguments - ); - - $this->testCase->registerMockObject($object); - - return $object; - } - - /** - * Creates a mock object for a trait using a fluent interface. - * - * @throws \PHPUnit\Framework\Exception - * @throws RuntimeException - * - * @psalm-return MockObject&MockedType - */ - public function getMockForTrait(): MockObject - { - $object = $this->generator->getMockForTrait( - $this->type, - $this->constructorArgs, - $this->mockClassName, - $this->originalConstructor, - $this->originalClone, - $this->autoload, - $this->methods, - $this->cloneArguments - ); - - $this->testCase->registerMockObject($object); - - return $object; - } - - /** - * Specifies the subset of methods to mock. Default is to mock none of them. - * - * @deprecated https://github.com/sebastianbergmann/phpunit/pull/3687 - */ - public function setMethods(array $methods = null): self - { - $this->methods = $methods; - - $this->alreadyUsedMockMethodConfiguration = true; - - return $this; - } - - /** - * Specifies the subset of methods to mock, requiring each to exist in the class - * - * @param string[] $methods - * - * @throws RuntimeException - */ - public function onlyMethods(array $methods): self - { - if (empty($methods)) { - $this->emptyMethodsArray = true; - - return $this; - } - - if ($this->alreadyUsedMockMethodConfiguration) { - throw new RuntimeException( - \sprintf( - 'Cannot use onlyMethods() on "%s" mock because mocked methods were already configured.', - $this->type - ) - ); - } - - $this->alreadyUsedMockMethodConfiguration = true; - - try { - $reflector = new \ReflectionClass($this->type); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - foreach ($methods as $method) { - if (!$reflector->hasMethod($method)) { - throw new RuntimeException( - \sprintf( - 'Trying to set mock method "%s" with onlyMethods, but it does not exist in class "%s". Use addMethods() for methods that don\'t exist in the class.', - $method, - $this->type - ) - ); - } - } - - $this->methods = $methods; - - return $this; - } - - /** - * Specifies methods that don't exist in the class which you want to mock - * - * @param string[] $methods - * - * @throws RuntimeException - */ - public function addMethods(array $methods): self - { - if (empty($methods)) { - $this->emptyMethodsArray = true; - - return $this; - } - - if ($this->alreadyUsedMockMethodConfiguration) { - throw new RuntimeException( - \sprintf( - 'Cannot use addMethods() on "%s" mock because mocked methods were already configured.', - $this->type - ) - ); - } - - $this->alreadyUsedMockMethodConfiguration = true; - - try { - $reflector = new \ReflectionClass($this->type); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - foreach ($methods as $method) { - if ($reflector->hasMethod($method)) { - throw new RuntimeException( - \sprintf( - 'Trying to set mock method "%s" with addMethods(), but it exists in class "%s". Use onlyMethods() for methods that exist in the class.', - $method, - $this->type - ) - ); - } - } - - $this->methods = $methods; - - return $this; - } - - /** - * Specifies the subset of methods to not mock. Default is to mock all of them. - */ - public function setMethodsExcept(array $methods = []): self - { - return $this->setMethods( - \array_diff( - $this->generator->getClassMethods($this->type), - $methods - ) - ); - } - - /** - * Specifies the arguments for the constructor. - */ - public function setConstructorArgs(array $args): self - { - $this->constructorArgs = $args; - - return $this; - } - - /** - * Specifies the name for the mock class. - */ - public function setMockClassName(string $name): self - { - $this->mockClassName = $name; - - return $this; - } - - /** - * Disables the invocation of the original constructor. - */ - public function disableOriginalConstructor(): self - { - $this->originalConstructor = false; - - return $this; - } - - /** - * Enables the invocation of the original constructor. - */ - public function enableOriginalConstructor(): self - { - $this->originalConstructor = true; - - return $this; - } - - /** - * Disables the invocation of the original clone constructor. - */ - public function disableOriginalClone(): self - { - $this->originalClone = false; - - return $this; - } - - /** - * Enables the invocation of the original clone constructor. - */ - public function enableOriginalClone(): self - { - $this->originalClone = true; - - return $this; - } - - /** - * Disables the use of class autoloading while creating the mock object. - */ - public function disableAutoload(): self - { - $this->autoload = false; - - return $this; - } - - /** - * Enables the use of class autoloading while creating the mock object. - */ - public function enableAutoload(): self - { - $this->autoload = true; - - return $this; - } - - /** - * Disables the cloning of arguments passed to mocked methods. - */ - public function disableArgumentCloning(): self - { - $this->cloneArguments = false; - - return $this; - } - - /** - * Enables the cloning of arguments passed to mocked methods. - */ - public function enableArgumentCloning(): self - { - $this->cloneArguments = true; - - return $this; - } - - /** - * Enables the invocation of the original methods. - */ - public function enableProxyingToOriginalMethods(): self - { - $this->callOriginalMethods = true; - - return $this; - } - - /** - * Disables the invocation of the original methods. - */ - public function disableProxyingToOriginalMethods(): self - { - $this->callOriginalMethods = false; - $this->proxyTarget = null; - - return $this; - } - - /** - * Sets the proxy target. - */ - public function setProxyTarget(object $object): self - { - $this->proxyTarget = $object; - - return $this; - } - - public function allowMockingUnknownTypes(): self - { - $this->allowMockingUnknownTypes = true; - - return $this; - } - - public function disallowMockingUnknownTypes(): self - { - $this->allowMockingUnknownTypes = false; - - return $this; - } - - public function enableAutoReturnValueGeneration(): self - { - $this->returnValueGeneration = true; - - return $this; - } - - public function disableAutoReturnValueGeneration(): self - { - $this->returnValueGeneration = false; - - return $this; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php deleted file mode 100644 index 938db87..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockClass implements MockType -{ - /** - * @var string - */ - private $classCode; - - /** - * @var string - */ - private $mockName; - - /** - * @var ConfigurableMethod[] - */ - private $configurableMethods; - - public function __construct(string $classCode, string $mockName, array $configurableMethods) - { - $this->classCode = $classCode; - $this->mockName = $mockName; - $this->configurableMethods = $configurableMethods; - } - - public function generate(): string - { - if (!\class_exists($this->mockName, false)) { - eval($this->classCode); - - \call_user_func( - [ - $this->mockName, - '__phpunit_initConfigurableMethods', - ], - ...$this->configurableMethods - ); - } - - return $this->mockName; - } - - public function getClassCode(): string - { - return $this->classCode; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php deleted file mode 100644 index ccefba8..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php +++ /dev/null @@ -1,367 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use SebastianBergmann\Type\ObjectType; -use SebastianBergmann\Type\Type; -use SebastianBergmann\Type\UnknownType; -use SebastianBergmann\Type\VoidType; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockMethod -{ - /** - * @var \Text_Template[] - */ - private static $templates = []; - - /** - * @var string - */ - private $className; - - /** - * @var string - */ - private $methodName; - - /** - * @var bool - */ - private $cloneArguments; - - /** - * @var string string - */ - private $modifier; - - /** - * @var string - */ - private $argumentsForDeclaration; - - /** - * @var string - */ - private $argumentsForCall; - - /** - * @var Type - */ - private $returnType; - - /** - * @var string - */ - private $reference; - - /** - * @var bool - */ - private $callOriginalMethod; - - /** - * @var bool - */ - private $static; - - /** - * @var ?string - */ - private $deprecation; - - /** - * @var bool - */ - private $allowsReturnNull; - - /** - * @throws RuntimeException - */ - public static function fromReflection(\ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self - { - if ($method->isPrivate()) { - $modifier = 'private'; - } elseif ($method->isProtected()) { - $modifier = 'protected'; - } else { - $modifier = 'public'; - } - - if ($method->isStatic()) { - $modifier .= ' static'; - } - - if ($method->returnsReference()) { - $reference = '&'; - } else { - $reference = ''; - } - - $docComment = $method->getDocComment(); - - if (\is_string($docComment) && - \preg_match('#\*[ \t]*+@deprecated[ \t]*+(.*?)\r?+\n[ \t]*+\*(?:[ \t]*+@|/$)#s', $docComment, $deprecation)) { - $deprecation = \trim(\preg_replace('#[ \t]*\r?\n[ \t]*+\*[ \t]*+#', ' ', $deprecation[1])); - } else { - $deprecation = null; - } - - return new self( - $method->getDeclaringClass()->getName(), - $method->getName(), - $cloneArguments, - $modifier, - self::getMethodParameters($method), - self::getMethodParameters($method, true), - self::deriveReturnType($method), - $reference, - $callOriginalMethod, - $method->isStatic(), - $deprecation, - $method->hasReturnType() && $method->getReturnType()->allowsNull() - ); - } - - public static function fromName(string $fullClassName, string $methodName, bool $cloneArguments): self - { - return new self( - $fullClassName, - $methodName, - $cloneArguments, - 'public', - '', - '', - new UnknownType, - '', - false, - false, - null, - false - ); - } - - public function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation, bool $allowsReturnNull) - { - $this->className = $className; - $this->methodName = $methodName; - $this->cloneArguments = $cloneArguments; - $this->modifier = $modifier; - $this->argumentsForDeclaration = $argumentsForDeclaration; - $this->argumentsForCall = $argumentsForCall; - $this->returnType = $returnType; - $this->reference = $reference; - $this->callOriginalMethod = $callOriginalMethod; - $this->static = $static; - $this->deprecation = $deprecation; - $this->allowsReturnNull = $allowsReturnNull; - } - - public function getName(): string - { - return $this->methodName; - } - - /** - * @throws RuntimeException - */ - public function generateCode(): string - { - if ($this->static) { - $templateFile = 'mocked_static_method.tpl'; - } elseif ($this->returnType instanceof VoidType) { - $templateFile = \sprintf( - '%s_method_void.tpl', - $this->callOriginalMethod ? 'proxied' : 'mocked' - ); - } else { - $templateFile = \sprintf( - '%s_method.tpl', - $this->callOriginalMethod ? 'proxied' : 'mocked' - ); - } - - $deprecation = $this->deprecation; - - if (null !== $this->deprecation) { - $deprecation = "The $this->className::$this->methodName method is deprecated ($this->deprecation)."; - $deprecationTemplate = $this->getTemplate('deprecation.tpl'); - - $deprecationTemplate->setVar([ - 'deprecation' => \var_export($deprecation, true), - ]); - - $deprecation = $deprecationTemplate->render(); - } - - $template = $this->getTemplate($templateFile); - - $template->setVar( - [ - 'arguments_decl' => $this->argumentsForDeclaration, - 'arguments_call' => $this->argumentsForCall, - 'return_declaration' => $this->returnType->getReturnTypeDeclaration(), - 'arguments_count' => !empty($this->argumentsForCall) ? \substr_count($this->argumentsForCall, ',') + 1 : 0, - 'class_name' => $this->className, - 'method_name' => $this->methodName, - 'modifier' => $this->modifier, - 'reference' => $this->reference, - 'clone_arguments' => $this->cloneArguments ? 'true' : 'false', - 'deprecation' => $deprecation, - ] - ); - - return $template->render(); - } - - public function getReturnType(): Type - { - return $this->returnType; - } - - private function getTemplate(string $template): \Text_Template - { - $filename = __DIR__ . \DIRECTORY_SEPARATOR . 'Generator' . \DIRECTORY_SEPARATOR . $template; - - if (!isset(self::$templates[$filename])) { - self::$templates[$filename] = new \Text_Template($filename); - } - - return self::$templates[$filename]; - } - - /** - * Returns the parameters of a function or method. - * - * @throws RuntimeException - */ - private static function getMethodParameters(\ReflectionMethod $method, bool $forCall = false): string - { - $parameters = []; - - foreach ($method->getParameters() as $i => $parameter) { - $name = '$' . $parameter->getName(); - - /* Note: PHP extensions may use empty names for reference arguments - * or "..." for methods taking a variable number of arguments. - */ - if ($name === '$' || $name === '$...') { - $name = '$arg' . $i; - } - - if ($parameter->isVariadic()) { - if ($forCall) { - continue; - } - - $name = '...' . $name; - } - - $nullable = ''; - $default = ''; - $reference = ''; - $typeDeclaration = ''; - - if (!$forCall) { - if ($parameter->hasType() && $parameter->allowsNull()) { - $nullable = '?'; - } - - if ($parameter->hasType()) { - $type = $parameter->getType(); - - if ($type instanceof \ReflectionNamedType && $type->getName() !== 'self') { - $typeDeclaration = $type->getName() . ' '; - } else { - try { - $class = $parameter->getClass(); - } catch (\ReflectionException $e) { - throw new RuntimeException( - \sprintf( - 'Cannot mock %s::%s() because a class or ' . - 'interface used in the signature is not loaded', - $method->getDeclaringClass()->getName(), - $method->getName() - ), - 0, - $e - ); - } - - if ($class !== null) { - $typeDeclaration = $class->getName() . ' '; - } - } - } - - if (!$parameter->isVariadic()) { - if ($parameter->isDefaultValueAvailable()) { - try { - $value = \var_export($parameter->getDefaultValue(), true); - } catch (\ReflectionException $e) { - throw new RuntimeException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - $default = ' = ' . $value; - } elseif ($parameter->isOptional()) { - $default = ' = null'; - } - } - } - - if ($parameter->isPassedByReference()) { - $reference = '&'; - } - - $parameters[] = $nullable . $typeDeclaration . $reference . $name . $default; - } - - return \implode(', ', $parameters); - } - - private static function deriveReturnType(\ReflectionMethod $method): Type - { - $returnType = $method->getReturnType(); - - if ($returnType === null) { - return new UnknownType(); - } - - // @see https://bugs.php.net/bug.php?id=70722 - if ($returnType->getName() === 'self') { - return ObjectType::fromName($method->getDeclaringClass()->getName(), $returnType->allowsNull()); - } - - // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/406 - if ($returnType->getName() === 'parent') { - $parentClass = $method->getDeclaringClass()->getParentClass(); - - if ($parentClass === false) { - throw new RuntimeException( - \sprintf( - 'Cannot mock %s::%s because "parent" return type declaration is used but %s does not have a parent class', - $method->getDeclaringClass()->getName(), - $method->getName(), - $method->getDeclaringClass()->getName() - ) - ); - } - - return ObjectType::fromName($parentClass->getName(), $returnType->allowsNull()); - } - - return Type::fromName($returnType->getName(), $returnType->allowsNull()); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php deleted file mode 100644 index 939437e..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockMethodSet -{ - /** - * @var MockMethod[] - */ - private $methods = []; - - public function addMethods(MockMethod ...$methods): void - { - foreach ($methods as $method) { - $this->methods[\strtolower($method->getName())] = $method; - } - } - - /** - * @return MockMethod[] - */ - public function asArray(): array - { - return \array_values($this->methods); - } - - public function hasMethod(string $methodName): bool - { - return \array_key_exists(\strtolower($methodName), $this->methods); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockObject.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockObject.php deleted file mode 100644 index 4db11e1..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockObject.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\MockObject\Builder\InvocationMocker as BuilderInvocationMocker; -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; - -/** - * @method BuilderInvocationMocker method($constraint) - */ -interface MockObject extends Stub -{ - public function __phpunit_setOriginalObject($originalObject): void; - - public function __phpunit_verify(bool $unsetInvocationMocker = true): void; - - public function expects(InvocationOrder $invocationRule): BuilderInvocationMocker; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockTrait.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockTrait.php deleted file mode 100644 index 3ced889..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockTrait.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. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MockTrait implements MockType -{ - /** - * @var string - */ - private $classCode; - - /** - * @var string - */ - private $mockName; - - public function __construct(string $classCode, string $mockName) - { - $this->classCode = $classCode; - $this->mockName = $mockName; - } - - public function generate(): string - { - if (!\class_exists($this->mockName, false)) { - eval($this->classCode); - } - - return $this->mockName; - } - - public function getClassCode(): string - { - return $this->classCode; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockType.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockType.php deleted file mode 100644 index b35ac30..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockType.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface MockType -{ - public function generate(): string; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php deleted file mode 100644 index f93e568..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class AnyInvokedCount extends InvocationOrder -{ - public function toString(): string - { - return 'invoked zero or more times'; - } - - public function verify(): void - { - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } - - protected function invokedDo(BaseInvocation $invocation): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php deleted file mode 100644 index 61de788..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class AnyParameters implements ParametersRule -{ - public function toString(): string - { - return 'with any parameters'; - } - - public function apply(BaseInvocation $invocation): void - { - } - - public function verify(): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php deleted file mode 100644 index 3a1f528..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\InvalidParameterGroupException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConsecutiveParameters implements ParametersRule -{ - /** - * @var array - */ - private $parameterGroups = []; - - /** - * @var array - */ - private $invocations = []; - - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(array $parameterGroups) - { - foreach ($parameterGroups as $index => $parameters) { - if (!\is_iterable($parameters)) { - throw new InvalidParameterGroupException( - \sprintf( - 'Parameter group #%d must be an array or Traversable, got %s', - $index, - \gettype($parameters) - ) - ); - } - - foreach ($parameters as $parameter) { - if (!$parameter instanceof Constraint) { - $parameter = new IsEqual($parameter); - } - - $this->parameterGroups[$index][] = $parameter; - } - } - } - - public function toString(): string - { - return 'with consecutive parameters'; - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function apply(BaseInvocation $invocation): void - { - $this->invocations[] = $invocation; - $callIndex = \count($this->invocations) - 1; - - $this->verifyInvocation($invocation, $callIndex); - } - - /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function verify(): void - { - foreach ($this->invocations as $callIndex => $invocation) { - $this->verifyInvocation($invocation, $callIndex); - } - } - - /** - * Verify a single invocation - * - * @param int $callIndex - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function verifyInvocation(BaseInvocation $invocation, $callIndex): void - { - if (!isset($this->parameterGroups[$callIndex])) { - // no parameter assertion for this call index - return; - } - - if ($invocation === null) { - throw new ExpectationFailedException( - 'Mocked method does not exist.' - ); - } - - $parameters = $this->parameterGroups[$callIndex]; - - if (\count($invocation->getParameters()) < \count($parameters)) { - throw new ExpectationFailedException( - \sprintf( - 'Parameter count for invocation %s is too low.', - $invocation->toString() - ) - ); - } - - foreach ($parameters as $i => $parameter) { - $parameter->evaluate( - $invocation->getParameters()[$i], - \sprintf( - 'Parameter %s for invocation #%d %s does not match expected ' . - 'value.', - $i, - $callIndex, - $invocation->toString() - ) - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php deleted file mode 100644 index 1df95e5..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.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. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; -use PHPUnit\Framework\MockObject\Verifiable; -use PHPUnit\Framework\SelfDescribing; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class InvocationOrder implements SelfDescribing, Verifiable -{ - /** - * @var BaseInvocation[] - */ - private $invocations = []; - - public function getInvocationCount(): int - { - return \count($this->invocations); - } - - public function hasBeenInvoked(): bool - { - return \count($this->invocations) > 0; - } - - final public function invoked(BaseInvocation $invocation) - { - $this->invocations[] = $invocation; - - return $this->invokedDo($invocation); - } - - abstract public function matches(BaseInvocation $invocation): bool; - - abstract protected function invokedDo(BaseInvocation $invocation); -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php deleted file mode 100644 index 070ffee..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class InvokedAtIndex extends InvocationOrder -{ - /** - * @var int - */ - private $sequenceIndex; - - /** - * @var int - */ - private $currentIndex = -1; - - /** - * @param int $sequenceIndex - */ - public function __construct($sequenceIndex) - { - $this->sequenceIndex = $sequenceIndex; - } - - public function toString(): string - { - return 'invoked at sequence index ' . $this->sequenceIndex; - } - - public function matches(BaseInvocation $invocation): bool - { - $this->currentIndex++; - - return $this->currentIndex == $this->sequenceIndex; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - if ($this->currentIndex < $this->sequenceIndex) { - throw new ExpectationFailedException( - \sprintf( - 'The expected invocation at index %s was never reached.', - $this->sequenceIndex - ) - ); - } - } - - protected function invokedDo(BaseInvocation $invocation): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php deleted file mode 100644 index a84aa65..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtLeastCount extends InvocationOrder -{ - /** - * @var int - */ - private $requiredInvocations; - - /** - * @param int $requiredInvocations - */ - public function __construct($requiredInvocations) - { - $this->requiredInvocations = $requiredInvocations; - } - - public function toString(): string - { - return 'invoked at least ' . $this->requiredInvocations . ' times'; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $count = $this->getInvocationCount(); - - if ($count < $this->requiredInvocations) { - throw new ExpectationFailedException( - 'Expected invocation at least ' . $this->requiredInvocations . - ' times but it occurred ' . $count . ' time(s).' - ); - } - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } - - protected function invokedDo(BaseInvocation $invocation): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php deleted file mode 100644 index d0ad1f8..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.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. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtLeastOnce extends InvocationOrder -{ - public function toString(): string - { - return 'invoked at least once'; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $count = $this->getInvocationCount(); - - if ($count < 1) { - throw new ExpectationFailedException( - 'Expected invocation at least once but it never occurred.' - ); - } - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } - - protected function invokedDo(BaseInvocation $invocation): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php deleted file mode 100644 index c3b815a..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtMostCount extends InvocationOrder -{ - /** - * @var int - */ - private $allowedInvocations; - - /** - * @param int $allowedInvocations - */ - public function __construct($allowedInvocations) - { - $this->allowedInvocations = $allowedInvocations; - } - - public function toString(): string - { - return 'invoked at most ' . $this->allowedInvocations . ' times'; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $count = $this->getInvocationCount(); - - if ($count > $this->allowedInvocations) { - throw new ExpectationFailedException( - 'Expected invocation at most ' . $this->allowedInvocations . - ' times but it occurred ' . $count . ' time(s).' - ); - } - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } - - protected function invokedDo(BaseInvocation $invocation): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php deleted file mode 100644 index 37beffc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedCount extends InvocationOrder -{ - /** - * @var int - */ - private $expectedCount; - - /** - * @param int $expectedCount - */ - public function __construct($expectedCount) - { - $this->expectedCount = $expectedCount; - } - - public function isNever(): bool - { - return $this->expectedCount === 0; - } - - public function toString(): string - { - return 'invoked ' . $this->expectedCount . ' time(s)'; - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $count = $this->getInvocationCount(); - - if ($count !== $this->expectedCount) { - throw new ExpectationFailedException( - \sprintf( - 'Method was expected to be called %d times, ' . - 'actually called %d times.', - $this->expectedCount, - $count - ) - ); - } - } - - /** - * @throws ExpectationFailedException - */ - protected function invokedDo(BaseInvocation $invocation): void - { - $count = $this->getInvocationCount(); - - if ($count > $this->expectedCount) { - $message = $invocation->toString() . ' '; - - switch ($this->expectedCount) { - case 0: - $message .= 'was not expected to be called.'; - - break; - - case 1: - $message .= 'was not expected to be called more than once.'; - - break; - - default: - $message .= \sprintf( - 'was not expected to be called more than %d times.', - $this->expectedCount - ); - } - - throw new ExpectationFailedException($message); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php deleted file mode 100644 index e23180e..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\InvalidArgumentException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; -use PHPUnit\Framework\MockObject\MethodNameConstraint; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodName -{ - /** - * @var Constraint - */ - private $constraint; - - /** - * @param Constraint|string - * - * @throws Constraint - * @throws \PHPUnit\Framework\Exception - */ - public function __construct($constraint) - { - if (!$constraint instanceof Constraint) { - if (!\is_string($constraint)) { - throw InvalidArgumentException::create(1, 'string'); - } - - $constraint = new MethodNameConstraint($constraint); - } - - $this->constraint = $constraint; - } - - public function toString(): string - { - return 'method name ' . $this->constraint->toString(); - } - - /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function matches(BaseInvocation $invocation): bool - { - return $this->matchesName($invocation->getMethodName()); - } - - public function matchesName(string $methodName): bool - { - return $this->constraint->evaluate($methodName, '', true); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php deleted file mode 100644 index 2fa58c6..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\IsAnything; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Parameters implements ParametersRule -{ - /** - * @var Constraint[] - */ - private $parameters = []; - - /** - * @var BaseInvocation - */ - private $invocation; - - /** - * @var bool|ExpectationFailedException - */ - private $parameterVerificationResult; - - /** - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(array $parameters) - { - foreach ($parameters as $parameter) { - if (!($parameter instanceof Constraint)) { - $parameter = new IsEqual( - $parameter - ); - } - - $this->parameters[] = $parameter; - } - } - - public function toString(): string - { - $text = 'with parameter'; - - foreach ($this->parameters as $index => $parameter) { - if ($index > 0) { - $text .= ' and'; - } - - $text .= ' ' . $index . ' ' . $parameter->toString(); - } - - return $text; - } - - /** - * @throws \Exception - */ - public function apply(BaseInvocation $invocation): void - { - $this->invocation = $invocation; - $this->parameterVerificationResult = null; - - try { - $this->parameterVerificationResult = $this->doVerify(); - } catch (ExpectationFailedException $e) { - $this->parameterVerificationResult = $e; - - throw $this->parameterVerificationResult; - } - } - - /** - * Checks if the invocation $invocation matches the current rules. If it - * does the rule will get the invoked() method called which should check - * if an expectation is met. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function verify(): void - { - $this->doVerify(); - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function doVerify(): bool - { - if (isset($this->parameterVerificationResult)) { - return $this->guardAgainstDuplicateEvaluationOfParameterConstraints(); - } - - if ($this->invocation === null) { - throw new ExpectationFailedException('Mocked method does not exist.'); - } - - if (\count($this->invocation->getParameters()) < \count($this->parameters)) { - $message = 'Parameter count for invocation %s is too low.'; - - // The user called `->with($this->anything())`, but may have meant - // `->withAnyParameters()`. - // - // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/199 - if (\count($this->parameters) === 1 && - \get_class($this->parameters[0]) === IsAnything::class) { - $message .= "\nTo allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead."; - } - - throw new ExpectationFailedException( - \sprintf($message, $this->invocation->toString()) - ); - } - - foreach ($this->parameters as $i => $parameter) { - $parameter->evaluate( - $this->invocation->getParameters()[$i], - \sprintf( - 'Parameter %s for invocation %s does not match expected ' . - 'value.', - $i, - $this->invocation->toString() - ) - ); - } - - return true; - } - - /** - * @throws ExpectationFailedException - */ - private function guardAgainstDuplicateEvaluationOfParameterConstraints(): bool - { - if ($this->parameterVerificationResult instanceof ExpectationFailedException) { - throw $this->parameterVerificationResult; - } - - return (bool) $this->parameterVerificationResult; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php deleted file mode 100644 index 0c9f191..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; -use PHPUnit\Framework\MockObject\Verifiable; -use PHPUnit\Framework\SelfDescribing; - -interface ParametersRule extends SelfDescribing, Verifiable -{ - /** - * @throws ExpectationFailedException if the invocation violates the rule - */ - public function apply(BaseInvocation $invocation): void; - - public function verify(): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub.php deleted file mode 100644 index f7358af..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\MockObject\Builder\InvocationStubber; - -/** - * @method InvocationStubber method($constraint) - */ -interface Stub -{ - public function __phpunit_getInvocationHandler(): InvocationHandler; - - public function __phpunit_hasMatchers(): bool; - - public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php deleted file mode 100644 index d1d7bdb..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use SebastianBergmann\Exporter\Exporter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConsecutiveCalls implements Stub -{ - /** - * @var array - */ - private $stack; - - /** - * @var mixed - */ - private $value; - - public function __construct(array $stack) - { - $this->stack = $stack; - } - - public function invoke(Invocation $invocation) - { - $this->value = \array_shift($this->stack); - - if ($this->value instanceof Stub) { - $this->value = $this->value->invoke($invocation); - } - - return $this->value; - } - - public function toString(): string - { - $exporter = new Exporter; - - return \sprintf( - 'return user-specified value %s', - $exporter->export($this->value) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php deleted file mode 100644 index 11913c6..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use SebastianBergmann\Exporter\Exporter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception implements Stub -{ - private $exception; - - public function __construct(\Throwable $exception) - { - $this->exception = $exception; - } - - /** - * @throws \Throwable - */ - public function invoke(Invocation $invocation): void - { - throw $this->exception; - } - - public function toString(): string - { - $exporter = new Exporter; - - return \sprintf( - 'raise user-specified exception %s', - $exporter->export($this->exception) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php deleted file mode 100644 index bf0af3f..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnArgument implements Stub -{ - /** - * @var int - */ - private $argumentIndex; - - public function __construct($argumentIndex) - { - $this->argumentIndex = $argumentIndex; - } - - public function invoke(Invocation $invocation) - { - if (isset($invocation->getParameters()[$this->argumentIndex])) { - return $invocation->getParameters()[$this->argumentIndex]; - } - } - - public function toString(): string - { - return \sprintf('return argument #%d', $this->argumentIndex); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php deleted file mode 100644 index aa6dffb..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnCallback implements Stub -{ - private $callback; - - public function __construct($callback) - { - $this->callback = $callback; - } - - public function invoke(Invocation $invocation) - { - return \call_user_func_array($this->callback, $invocation->getParameters()); - } - - public function toString(): string - { - if (\is_array($this->callback)) { - if (\is_object($this->callback[0])) { - $class = \get_class($this->callback[0]); - $type = '->'; - } else { - $class = $this->callback[0]; - $type = '::'; - } - - return \sprintf( - 'return result of user defined callback %s%s%s() with the ' . - 'passed arguments', - $class, - $type, - $this->callback[1] - ); - } - - return 'return result of user defined callback ' . $this->callback . - ' with the passed arguments'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php deleted file mode 100644 index 0dd9476..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use SebastianBergmann\Exporter\Exporter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnReference implements Stub -{ - /** - * @var mixed - */ - private $reference; - - public function __construct(&$reference) - { - $this->reference = &$reference; - } - - public function invoke(Invocation $invocation) - { - return $this->reference; - } - - public function toString(): string - { - $exporter = new Exporter; - - return \sprintf( - 'return user-specified reference %s', - $exporter->export($this->reference) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php deleted file mode 100644 index 6d2137b..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use PHPUnit\Framework\MockObject\RuntimeException; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnSelf implements Stub -{ - /** - * @throws RuntimeException - */ - public function invoke(Invocation $invocation) - { - return $invocation->getObject(); - } - - public function toString(): string - { - return 'return the current object'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php deleted file mode 100644 index caaf4bc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use SebastianBergmann\Exporter\Exporter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnStub implements Stub -{ - /** - * @var mixed - */ - private $value; - - public function __construct($value) - { - $this->value = $value; - } - - public function invoke(Invocation $invocation) - { - return $this->value; - } - - public function toString(): string - { - $exporter = new Exporter; - - return \sprintf( - 'return user-specified value %s', - $exporter->export($this->value) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php deleted file mode 100644 index b44035a..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.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. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnValueMap implements Stub -{ - /** - * @var array - */ - private $valueMap; - - public function __construct(array $valueMap) - { - $this->valueMap = $valueMap; - } - - public function invoke(Invocation $invocation) - { - $parameterCount = \count($invocation->getParameters()); - - foreach ($this->valueMap as $map) { - if (!\is_array($map) || $parameterCount !== (\count($map) - 1)) { - continue; - } - - $return = \array_pop($map); - - if ($invocation->getParameters() === $map) { - return $return; - } - } - } - - public function toString(): string - { - return 'return value from a map'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php deleted file mode 100644 index 15cfce5..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use PHPUnit\Framework\SelfDescribing; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Stub extends SelfDescribing -{ - /** - * Fakes the processing of the invocation $invocation by returning a - * specific value. - * - * @param Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers - */ - public function invoke(Invocation $invocation); -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Verifiable.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Verifiable.php deleted file mode 100644 index 8c9a82c..0000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Verifiable.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\ExpectationFailedException; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Verifiable -{ - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php b/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php deleted file mode 100644 index 73034f6..0000000 --- a/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SelfDescribing -{ - /** - * Returns a string representation of the object. - */ - public function toString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTest.php b/vendor/phpunit/phpunit/src/Framework/SkippedTest.php deleted file mode 100644 index c5ac84e..0000000 --- a/vendor/phpunit/phpunit/src/Framework/SkippedTest.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php b/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php deleted file mode 100644 index b88dca3..0000000 --- a/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestCase extends TestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var bool - */ - protected $backupStaticAttributes = false; - - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - - /** - * @var bool - */ - protected $useErrorHandler = false; - - /** - * @var string - */ - private $message; - - public function __construct(string $className, string $methodName, string $message = '') - { - parent::__construct($className . '::' . $methodName); - - $this->message = $message; - } - - public function getMessage(): string - { - return $this->message; - } - - /** - * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function toString(): string - { - return $this->getName(); - } - - /** - * @throws Exception - */ - protected function runTest(): void - { - $this->markTestSkipped($this->message); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Test.php b/vendor/phpunit/phpunit/src/Framework/Test.php deleted file mode 100644 index 7740afc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Test.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use Countable; - -/** - * A Test can be run and collect its results. - */ -interface Test extends Countable -{ - /** - * Runs a test and collects its result in a TestResult instance. - */ - public function run(TestResult $result = null): TestResult; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php b/vendor/phpunit/phpunit/src/Framework/TestBuilder.php deleted file mode 100644 index 61894f7..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php +++ /dev/null @@ -1,214 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use PHPUnit\Util\Test as TestUtil; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestBuilder -{ - public function build(\ReflectionClass $theClass, string $methodName): Test - { - $className = $theClass->getName(); - - if (!$theClass->isInstantiable()) { - return new WarningTestCase( - \sprintf('Cannot instantiate class "%s".', $className) - ); - } - - $backupSettings = TestUtil::getBackupSettings( - $className, - $methodName - ); - - $preserveGlobalState = TestUtil::getPreserveGlobalStateSettings( - $className, - $methodName - ); - - $runTestInSeparateProcess = TestUtil::getProcessIsolationSettings( - $className, - $methodName - ); - - $runClassInSeparateProcess = TestUtil::getClassProcessIsolationSettings( - $className, - $methodName - ); - - $constructor = $theClass->getConstructor(); - - if ($constructor === null) { - throw new Exception('No valid test provided.'); - } - - $parameters = $constructor->getParameters(); - - // TestCase() or TestCase($name) - if (\count($parameters) < 2) { - $test = $this->buildTestWithoutData($className); - } // TestCase($name, $data) - else { - try { - $data = TestUtil::getProvidedData( - $className, - $methodName - ); - } catch (IncompleteTestError $e) { - $message = \sprintf( - 'Test for %s::%s marked incomplete by data provider', - $className, - $methodName - ); - $message = $this->appendExceptionMessageIfAvailable($e, $message); - $data = new IncompleteTestCase($className, $methodName, $message); - } catch (SkippedTestError $e) { - $message = \sprintf( - 'Test for %s::%s skipped by data provider', - $className, - $methodName - ); - $message = $this->appendExceptionMessageIfAvailable($e, $message); - $data = new SkippedTestCase($className, $methodName, $message); - } catch (\Throwable $t) { - $message = \sprintf( - 'The data provider specified for %s::%s is invalid.', - $className, - $methodName - ); - $message = $this->appendExceptionMessageIfAvailable($t, $message); - $data = new WarningTestCase($message); - } - - // Test method with @dataProvider. - if (isset($data)) { - $test = $this->buildDataProviderTestSuite( - $methodName, - $className, - $data, - $runTestInSeparateProcess, - $preserveGlobalState, - $runClassInSeparateProcess, - $backupSettings - ); - } else { - $test = $this->buildTestWithoutData($className); - } - } - - if ($test instanceof TestCase) { - $test->setName($methodName); - $this->configureTestCase( - $test, - $runTestInSeparateProcess, - $preserveGlobalState, - $runClassInSeparateProcess, - $backupSettings - ); - } - - return $test; - } - - private function appendExceptionMessageIfAvailable(\Throwable $e, string $message): string - { - $_message = $e->getMessage(); - - if (!empty($_message)) { - $message .= "\n" . $_message; - } - - return $message; - } - - /** @psalm-param class-string $className */ - private function buildTestWithoutData(string $className) - { - return new $className; - } - - /** @psalm-param class-string $className */ - private function buildDataProviderTestSuite( - string $methodName, - string $className, - $data, - bool $runTestInSeparateProcess, - ?bool $preserveGlobalState, - bool $runClassInSeparateProcess, - array $backupSettings - ): DataProviderTestSuite { - $dataProviderTestSuite = new DataProviderTestSuite( - $className . '::' . $methodName - ); - - $groups = TestUtil::getGroups($className, $methodName); - - if ($data instanceof WarningTestCase || - $data instanceof SkippedTestCase || - $data instanceof IncompleteTestCase) { - $dataProviderTestSuite->addTest($data, $groups); - } else { - foreach ($data as $_dataName => $_data) { - $_test = new $className($methodName, $_data, $_dataName); - - \assert($_test instanceof TestCase); - - $this->configureTestCase( - $_test, - $runTestInSeparateProcess, - $preserveGlobalState, - $runClassInSeparateProcess, - $backupSettings - ); - - $dataProviderTestSuite->addTest($_test, $groups); - } - } - - return $dataProviderTestSuite; - } - - private function configureTestCase( - TestCase $test, - bool $runTestInSeparateProcess, - ?bool $preserveGlobalState, - bool $runClassInSeparateProcess, - array $backupSettings - ): void { - if ($runTestInSeparateProcess) { - $test->setRunTestInSeparateProcess(true); - - if ($preserveGlobalState !== null) { - $test->setPreserveGlobalState($preserveGlobalState); - } - } - - if ($runClassInSeparateProcess) { - $test->setRunClassInSeparateProcess(true); - - if ($preserveGlobalState !== null) { - $test->setPreserveGlobalState($preserveGlobalState); - } - } - - if ($backupSettings['backupGlobals'] !== null) { - $test->setBackupGlobals($backupSettings['backupGlobals']); - } - - if ($backupSettings['backupStaticAttributes'] !== null) { - $test->setBackupStaticAttributes( - $backupSettings['backupStaticAttributes'] - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php deleted file mode 100644 index d04bc57..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ /dev/null @@ -1,2505 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use DeepCopy\DeepCopy; -use PHPUnit\Framework\Constraint\Exception as ExceptionConstraint; -use PHPUnit\Framework\Constraint\ExceptionCode; -use PHPUnit\Framework\Constraint\ExceptionMessage; -use PHPUnit\Framework\Constraint\ExceptionMessageRegularExpression; -use PHPUnit\Framework\Error\Deprecated; -use PHPUnit\Framework\Error\Error; -use PHPUnit\Framework\Error\Notice; -use PHPUnit\Framework\Error\Warning as WarningError; -use PHPUnit\Framework\MockObject\Generator as MockGenerator; -use PHPUnit\Framework\MockObject\MockBuilder; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount as AnyInvokedCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtIndex as InvokedAtIndexMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount as InvokedAtLeastCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce as InvokedAtLeastOnceMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount as InvokedAtMostCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedCount as InvokedCountMatcher; -use PHPUnit\Framework\MockObject\Stub; -use PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls as ConsecutiveCallsStub; -use PHPUnit\Framework\MockObject\Stub\Exception as ExceptionStub; -use PHPUnit\Framework\MockObject\Stub\ReturnArgument as ReturnArgumentStub; -use PHPUnit\Framework\MockObject\Stub\ReturnCallback as ReturnCallbackStub; -use PHPUnit\Framework\MockObject\Stub\ReturnSelf as ReturnSelfStub; -use PHPUnit\Framework\MockObject\Stub\ReturnStub; -use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub; -use PHPUnit\Runner\BaseTestRunner; -use PHPUnit\Runner\PhptTestCase; -use PHPUnit\Util\Exception as UtilException; -use PHPUnit\Util\GlobalState; -use PHPUnit\Util\PHP\AbstractPhpProcess; -use PHPUnit\Util\Test as TestUtil; -use PHPUnit\Util\Type; -use Prophecy\Exception\Prediction\PredictionException; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophet; -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; -use SebastianBergmann\Diff\Differ; -use SebastianBergmann\Exporter\Exporter; -use SebastianBergmann\GlobalState\Blacklist; -use SebastianBergmann\GlobalState\Restorer; -use SebastianBergmann\GlobalState\Snapshot; -use SebastianBergmann\ObjectEnumerator\Enumerator; - -abstract class TestCase extends Assert implements SelfDescribing, Test -{ - private const LOCALE_CATEGORIES = [\LC_ALL, \LC_COLLATE, \LC_CTYPE, \LC_MONETARY, \LC_NUMERIC, \LC_TIME]; - - /** - * @var bool - */ - protected $backupGlobals; - - /** - * @var string[] - */ - protected $backupGlobalsBlacklist = []; - - /** - * @var bool - */ - protected $backupStaticAttributes; - - /** - * @var array> - */ - protected $backupStaticAttributesBlacklist = []; - - /** - * @var bool - */ - protected $runTestInSeparateProcess; - - /** - * @var bool - */ - protected $preserveGlobalState = true; - - /** - * @var bool - */ - private $runClassInSeparateProcess; - - /** - * @var bool - */ - private $inIsolation = false; - - /** - * @var array - */ - private $data; - - /** - * @var string - */ - private $dataName; - - /** - * @var null|string - */ - private $expectedException; - - /** - * @var null|string - */ - private $expectedExceptionMessage; - - /** - * @var null|string - */ - private $expectedExceptionMessageRegExp; - - /** - * @var null|int|string - */ - private $expectedExceptionCode; - - /** - * @var string - */ - private $name = ''; - - /** - * @var string[] - */ - private $dependencies = []; - - /** - * @var array - */ - private $dependencyInput = []; - - /** - * @var array - */ - private $iniSettings = []; - - /** - * @var array - */ - private $locale = []; - - /** - * @var MockObject[] - */ - private $mockObjects = []; - - /** - * @var MockGenerator - */ - private $mockObjectGenerator; - - /** - * @var int - */ - private $status = BaseTestRunner::STATUS_UNKNOWN; - - /** - * @var string - */ - private $statusMessage = ''; - - /** - * @var int - */ - private $numAssertions = 0; - - /** - * @var TestResult - */ - private $result; - - /** - * @var mixed - */ - private $testResult; - - /** - * @var string - */ - private $output = ''; - - /** - * @var string - */ - private $outputExpectedRegex; - - /** - * @var string - */ - private $outputExpectedString; - - /** - * @var mixed - */ - private $outputCallback = false; - - /** - * @var bool - */ - private $outputBufferingActive = false; - - /** - * @var int - */ - private $outputBufferingLevel; - - /** - * @var bool - */ - private $outputRetrievedForAssertion = false; - - /** - * @var Snapshot - */ - private $snapshot; - - /** - * @var \Prophecy\Prophet - */ - private $prophet; - - /** - * @var bool - */ - private $beStrictAboutChangesToGlobalState = false; - - /** - * @var bool - */ - private $registerMockObjectsFromTestArgumentsRecursively = false; - - /** - * @var string[] - */ - private $warnings = []; - - /** - * @var string[] - */ - private $groups = []; - - /** - * @var bool - */ - private $doesNotPerformAssertions = false; - - /** - * @var Comparator[] - */ - private $customComparators = []; - - /** - * @var string[] - */ - private $doubledTypes = []; - - /** - * Returns a matcher that matches when the method is executed - * zero or more times. - */ - public static function any(): AnyInvokedCountMatcher - { - return new AnyInvokedCountMatcher; - } - - /** - * Returns a matcher that matches when the method is never executed. - */ - public static function never(): InvokedCountMatcher - { - return new InvokedCountMatcher(0); - } - - /** - * Returns a matcher that matches when the method is executed - * at least N times. - */ - public static function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher - { - return new InvokedAtLeastCountMatcher( - $requiredInvocations - ); - } - - /** - * Returns a matcher that matches when the method is executed at least once. - */ - public static function atLeastOnce(): InvokedAtLeastOnceMatcher - { - return new InvokedAtLeastOnceMatcher; - } - - /** - * Returns a matcher that matches when the method is executed exactly once. - */ - public static function once(): InvokedCountMatcher - { - return new InvokedCountMatcher(1); - } - - /** - * Returns a matcher that matches when the method is executed - * exactly $count times. - */ - public static function exactly(int $count): InvokedCountMatcher - { - return new InvokedCountMatcher($count); - } - - /** - * Returns a matcher that matches when the method is executed - * at most N times. - */ - public static function atMost(int $allowedInvocations): InvokedAtMostCountMatcher - { - return new InvokedAtMostCountMatcher($allowedInvocations); - } - - /** - * Returns a matcher that matches when the method is executed - * at the given index. - */ - public static function at(int $index): InvokedAtIndexMatcher - { - return new InvokedAtIndexMatcher($index); - } - - public static function returnValue($value): ReturnStub - { - return new ReturnStub($value); - } - - public static function returnValueMap(array $valueMap): ReturnValueMapStub - { - return new ReturnValueMapStub($valueMap); - } - - public static function returnArgument(int $argumentIndex): ReturnArgumentStub - { - return new ReturnArgumentStub($argumentIndex); - } - - public static function returnCallback($callback): ReturnCallbackStub - { - return new ReturnCallbackStub($callback); - } - - /** - * Returns the current object. - * - * This method is useful when mocking a fluent interface. - */ - public static function returnSelf(): ReturnSelfStub - { - return new ReturnSelfStub; - } - - public static function throwException(\Throwable $exception): ExceptionStub - { - return new ExceptionStub($exception); - } - - public static function onConsecutiveCalls(...$args): ConsecutiveCallsStub - { - return new ConsecutiveCallsStub($args); - } - - /** - * @param string $name - * @param string $dataName - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function __construct($name = null, array $data = [], $dataName = '') - { - if ($name !== null) { - $this->setName($name); - } - - $this->data = $data; - $this->dataName = $dataName; - } - - /** - * This method is called before the first test of this test class is run. - */ - public static function setUpBeforeClass(): void - { - } - - /** - * This method is called after the last test of this test class is run. - */ - public static function tearDownAfterClass(): void - { - } - - /** - * This method is called before each test. - */ - protected function setUp(): void - { - } - - /** - * This method is called after each test. - */ - protected function tearDown(): void - { - } - - /** - * Returns a string representation of the test case. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - public function toString(): string - { - try { - $class = new \ReflectionClass($this); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $buffer = \sprintf( - '%s::%s', - $class->name, - $this->getName(false) - ); - - return $buffer . $this->getDataSetAsString(); - } - - public function count(): int - { - return 1; - } - - public function getActualOutputForAssertion(): string - { - $this->outputRetrievedForAssertion = true; - - return $this->getActualOutput(); - } - - public function expectOutputRegex(string $expectedRegex): void - { - $this->outputExpectedRegex = $expectedRegex; - } - - public function expectOutputString(string $expectedString): void - { - $this->outputExpectedString = $expectedString; - } - - /** - * @psalm-param class-string<\Throwable> $exception - */ - public function expectException(string $exception): void - { - $this->expectedException = $exception; - } - - /** - * @param int|string $code - */ - public function expectExceptionCode($code): void - { - $this->expectedExceptionCode = $code; - } - - public function expectExceptionMessage(string $message): void - { - $this->expectedExceptionMessage = $message; - } - - public function expectExceptionMessageMatches(string $regularExpression): void - { - $this->expectedExceptionMessageRegExp = $regularExpression; - } - - /** - * @deprecated Use expectExceptionMessageMatches() instead - */ - public function expectExceptionMessageRegExp(string $regularExpression): void - { - $this->expectExceptionMessageMatches($regularExpression); - } - - /** - * Sets up an expectation for an exception to be raised by the code under test. - * Information for expected exception class, expected exception message, and - * expected exception code are retrieved from a given Exception object. - */ - public function expectExceptionObject(\Exception $exception): void - { - $this->expectException(\get_class($exception)); - $this->expectExceptionMessage($exception->getMessage()); - $this->expectExceptionCode($exception->getCode()); - } - - public function expectNotToPerformAssertions(): void - { - $this->doesNotPerformAssertions = true; - } - - public function expectDeprecation(): void - { - $this->expectException(Deprecated::class); - } - - public function expectDeprecationMessage(string $message): void - { - $this->expectExceptionMessage($message); - } - - public function expectDeprecationMessageMatches(string $regularExpression): void - { - $this->expectExceptionMessageRegExp($regularExpression); - } - - public function expectNotice(): void - { - $this->expectException(Notice::class); - } - - public function expectNoticeMessage(string $message): void - { - $this->expectExceptionMessage($message); - } - - public function expectNoticeMessageMatches(string $regularExpression): void - { - $this->expectExceptionMessageRegExp($regularExpression); - } - - public function expectWarning(): void - { - $this->expectException(WarningError::class); - } - - public function expectWarningMessage(string $message): void - { - $this->expectExceptionMessage($message); - } - - public function expectWarningMessageMatches(string $regularExpression): void - { - $this->expectExceptionMessageRegExp($regularExpression); - } - - public function expectError(): void - { - $this->expectException(Error::class); - } - - public function expectErrorMessage(string $message): void - { - $this->expectExceptionMessage($message); - } - - public function expectErrorMessageMatches(string $regularExpression): void - { - $this->expectExceptionMessageRegExp($regularExpression); - } - - public function getStatus(): int - { - return $this->status; - } - - public function markAsRisky(): void - { - $this->status = BaseTestRunner::STATUS_RISKY; - } - - public function getStatusMessage(): string - { - return $this->statusMessage; - } - - public function hasFailed(): bool - { - $status = $this->getStatus(); - - return $status === BaseTestRunner::STATUS_FAILURE || $status === BaseTestRunner::STATUS_ERROR; - } - - /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. - * - * @throws CodeCoverageException - * @throws UtilException - * @throws \SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\MissingCoversAnnotationException - * @throws \SebastianBergmann\CodeCoverage\RuntimeException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function run(TestResult $result = null): TestResult - { - if ($result === null) { - $result = $this->createResult(); - } - - if (!$this instanceof WarningTestCase) { - $this->setTestResultObject($result); - } - - if (!$this instanceof WarningTestCase && - !$this instanceof SkippedTestCase && - !$this->handleDependencies()) { - return $result; - } - - if ($this->runInSeparateProcess()) { - $runEntireClass = $this->runClassInSeparateProcess && !$this->runTestInSeparateProcess; - - try { - $class = new \ReflectionClass($this); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($runEntireClass) { - $template = new \Text_Template( - __DIR__ . '/../Util/PHP/Template/TestCaseClass.tpl' - ); - } else { - $template = new \Text_Template( - __DIR__ . '/../Util/PHP/Template/TestCaseMethod.tpl' - ); - } - - if ($this->preserveGlobalState) { - $constants = GlobalState::getConstantsAsString(); - $globals = GlobalState::getGlobalsAsString(); - $includedFiles = GlobalState::getIncludedFilesAsString(); - $iniSettings = GlobalState::getIniSettingsAsString(); - } else { - $constants = ''; - - if (!empty($GLOBALS['__PHPUNIT_BOOTSTRAP'])) { - $globals = '$GLOBALS[\'__PHPUNIT_BOOTSTRAP\'] = ' . \var_export($GLOBALS['__PHPUNIT_BOOTSTRAP'], true) . ";\n"; - } else { - $globals = ''; - } - - $includedFiles = ''; - $iniSettings = ''; - } - - $coverage = $result->getCollectCodeCoverageInformation() ? 'true' : 'false'; - $isStrictAboutTestsThatDoNotTestAnything = $result->isStrictAboutTestsThatDoNotTestAnything() ? 'true' : 'false'; - $isStrictAboutOutputDuringTests = $result->isStrictAboutOutputDuringTests() ? 'true' : 'false'; - $enforcesTimeLimit = $result->enforcesTimeLimit() ? 'true' : 'false'; - $isStrictAboutTodoAnnotatedTests = $result->isStrictAboutTodoAnnotatedTests() ? 'true' : 'false'; - $isStrictAboutResourceUsageDuringSmallTests = $result->isStrictAboutResourceUsageDuringSmallTests() ? 'true' : 'false'; - - if (\defined('PHPUNIT_COMPOSER_INSTALL')) { - $composerAutoload = \var_export(PHPUNIT_COMPOSER_INSTALL, true); - } else { - $composerAutoload = '\'\''; - } - - if (\defined('__PHPUNIT_PHAR__')) { - $phar = \var_export(__PHPUNIT_PHAR__, true); - } else { - $phar = '\'\''; - } - - if ($result->getCodeCoverage()) { - $codeCoverageFilter = $result->getCodeCoverage()->filter(); - } else { - $codeCoverageFilter = null; - } - - $data = \var_export(\serialize($this->data), true); - $dataName = \var_export($this->dataName, true); - $dependencyInput = \var_export(\serialize($this->dependencyInput), true); - $includePath = \var_export(\get_include_path(), true); - $codeCoverageFilter = \var_export(\serialize($codeCoverageFilter), true); - // must do these fixes because TestCaseMethod.tpl has unserialize('{data}') in it, and we can't break BC - // the lines above used to use addcslashes() rather than var_export(), which breaks null byte escape sequences - $data = "'." . $data . ".'"; - $dataName = "'.(" . $dataName . ").'"; - $dependencyInput = "'." . $dependencyInput . ".'"; - $includePath = "'." . $includePath . ".'"; - $codeCoverageFilter = "'." . $codeCoverageFilter . ".'"; - - $configurationFilePath = $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] ?? ''; - - $var = [ - 'composerAutoload' => $composerAutoload, - 'phar' => $phar, - 'filename' => $class->getFileName(), - 'className' => $class->getName(), - 'collectCodeCoverageInformation' => $coverage, - 'data' => $data, - 'dataName' => $dataName, - 'dependencyInput' => $dependencyInput, - 'constants' => $constants, - 'globals' => $globals, - 'include_path' => $includePath, - 'included_files' => $includedFiles, - 'iniSettings' => $iniSettings, - 'isStrictAboutTestsThatDoNotTestAnything' => $isStrictAboutTestsThatDoNotTestAnything, - 'isStrictAboutOutputDuringTests' => $isStrictAboutOutputDuringTests, - 'enforcesTimeLimit' => $enforcesTimeLimit, - 'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests, - 'isStrictAboutResourceUsageDuringSmallTests' => $isStrictAboutResourceUsageDuringSmallTests, - 'codeCoverageFilter' => $codeCoverageFilter, - 'configurationFilePath' => $configurationFilePath, - 'name' => $this->getName(false), - ]; - - if (!$runEntireClass) { - $var['methodName'] = $this->name; - } - - $template->setVar($var); - - $php = AbstractPhpProcess::factory(); - $php->runTestJob($template->render(), $this, $result); - } else { - $result->run($this); - } - - $this->result = null; - - return $result; - } - - /** - * Returns a builder object to create mock objects using a fluent interface. - * - * @param string|string[] $className - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|string[] $className - * @psalm-return MockBuilder - */ - public function getMockBuilder($className): MockBuilder - { - $this->recordDoubledType($className); - - return new MockBuilder($this, $className); - } - - public function registerComparator(Comparator $comparator): void - { - ComparatorFactory::getInstance()->register($comparator); - - $this->customComparators[] = $comparator; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @deprecated Invoking this method has no effect; it will be removed in PHPUnit 9 - */ - public function setUseErrorHandler(bool $useErrorHandler): void - { - } - - /** - * @return string[] - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function doubledTypes(): array - { - return \array_unique($this->doubledTypes); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getGroups(): array - { - return $this->groups; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setGroups(array $groups): void - { - $this->groups = $groups; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getAnnotations(): array - { - return TestUtil::parseTestMethodAnnotations( - \get_class($this), - $this->name - ); - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getName(bool $withDataSet = true): string - { - if ($withDataSet) { - return $this->name . $this->getDataSetAsString(false); - } - - return $this->name; - } - - /** - * Returns the size of the test. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getSize(): int - { - return TestUtil::getSize( - \get_class($this), - $this->getName(false) - ); - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function hasSize(): bool - { - return $this->getSize() !== TestUtil::UNKNOWN; - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isSmall(): bool - { - return $this->getSize() === TestUtil::SMALL; - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isMedium(): bool - { - return $this->getSize() === TestUtil::MEDIUM; - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isLarge(): bool - { - return $this->getSize() === TestUtil::LARGE; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getActualOutput(): string - { - if (!$this->outputBufferingActive) { - return $this->output; - } - - return (string) \ob_get_contents(); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function hasOutput(): bool - { - if ($this->output === '') { - return false; - } - - if ($this->hasExpectationOnOutput()) { - return false; - } - - return true; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function doesNotPerformAssertions(): bool - { - return $this->doesNotPerformAssertions; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function hasExpectationOnOutput(): bool - { - return \is_string($this->outputExpectedString) || \is_string($this->outputExpectedRegex) || $this->outputRetrievedForAssertion; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getExpectedException(): ?string - { - return $this->expectedException; - } - - /** - * @return null|int|string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getExpectedExceptionCode() - { - return $this->expectedExceptionCode; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getExpectedExceptionMessage(): ?string - { - return $this->expectedExceptionMessage; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getExpectedExceptionMessageRegExp(): ?string - { - return $this->expectedExceptionMessageRegExp; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void - { - $this->registerMockObjectsFromTestArgumentsRecursively = $flag; - } - - /** - * @throws \Throwable - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function runBare(): void - { - $this->numAssertions = 0; - - $this->snapshotGlobalState(); - $this->startOutputBuffering(); - \clearstatcache(); - $currentWorkingDirectory = \getcwd(); - - $hookMethods = TestUtil::getHookMethods(\get_class($this)); - - $hasMetRequirements = false; - - try { - $this->checkRequirements(); - $hasMetRequirements = true; - - if ($this->inIsolation) { - foreach ($hookMethods['beforeClass'] as $method) { - $this->$method(); - } - } - - $this->setExpectedExceptionFromAnnotation(); - $this->setDoesNotPerformAssertionsFromAnnotation(); - - foreach ($hookMethods['before'] as $method) { - $this->$method(); - } - - $this->assertPreConditions(); - $this->testResult = $this->runTest(); - $this->verifyMockObjects(); - $this->assertPostConditions(); - - if (!empty($this->warnings)) { - throw new Warning( - \implode( - "\n", - \array_unique($this->warnings) - ) - ); - } - - $this->status = BaseTestRunner::STATUS_PASSED; - } catch (IncompleteTest $e) { - $this->status = BaseTestRunner::STATUS_INCOMPLETE; - $this->statusMessage = $e->getMessage(); - } catch (SkippedTest $e) { - $this->status = BaseTestRunner::STATUS_SKIPPED; - $this->statusMessage = $e->getMessage(); - } catch (Warning $e) { - $this->status = BaseTestRunner::STATUS_WARNING; - $this->statusMessage = $e->getMessage(); - } catch (AssertionFailedError $e) { - $this->status = BaseTestRunner::STATUS_FAILURE; - $this->statusMessage = $e->getMessage(); - } catch (PredictionException $e) { - $this->status = BaseTestRunner::STATUS_FAILURE; - $this->statusMessage = $e->getMessage(); - } catch (\Throwable $_e) { - $e = $_e; - $this->status = BaseTestRunner::STATUS_ERROR; - $this->statusMessage = $_e->getMessage(); - } - - $this->mockObjects = []; - $this->prophet = null; - - // Tear down the fixture. An exception raised in tearDown() will be - // caught and passed on when no exception was raised before. - try { - if ($hasMetRequirements) { - foreach ($hookMethods['after'] as $method) { - $this->$method(); - } - - if ($this->inIsolation) { - foreach ($hookMethods['afterClass'] as $method) { - $this->$method(); - } - } - } - } catch (\Throwable $_e) { - $e = $e ?? $_e; - } - - try { - $this->stopOutputBuffering(); - } catch (RiskyTestError $_e) { - $e = $e ?? $_e; - } - - if (isset($_e)) { - $this->status = BaseTestRunner::STATUS_ERROR; - $this->statusMessage = $_e->getMessage(); - } - - \clearstatcache(); - - if ($currentWorkingDirectory !== \getcwd()) { - \chdir($currentWorkingDirectory); - } - - $this->restoreGlobalState(); - $this->unregisterCustomComparators(); - $this->cleanupIniSettings(); - $this->cleanupLocaleSettings(); - \libxml_clear_errors(); - - // Perform assertion on output. - if (!isset($e)) { - try { - if ($this->outputExpectedRegex !== null) { - $this->assertRegExp($this->outputExpectedRegex, $this->output); - } elseif ($this->outputExpectedString !== null) { - $this->assertEquals($this->outputExpectedString, $this->output); - } - } catch (\Throwable $_e) { - $e = $_e; - } - } - - // Workaround for missing "finally". - if (isset($e)) { - if ($e instanceof PredictionException) { - $e = new AssertionFailedError($e->getMessage()); - } - - $this->onNotSuccessfulTest($e); - } - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setName(string $name): void - { - $this->name = $name; - } - - /** - * @param string[] $dependencies - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setDependencies(array $dependencies): void - { - $this->dependencies = $dependencies; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getDependencies(): array - { - return $this->dependencies; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function hasDependencies(): bool - { - return \count($this->dependencies) > 0; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setDependencyInput(array $dependencyInput): void - { - $this->dependencyInput = $dependencyInput; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getDependencyInput(): array - { - return $this->dependencyInput; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setBeStrictAboutChangesToGlobalState(?bool $beStrictAboutChangesToGlobalState): void - { - $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setBackupGlobals(?bool $backupGlobals): void - { - if ($this->backupGlobals === null && $backupGlobals !== null) { - $this->backupGlobals = $backupGlobals; - } - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setBackupStaticAttributes(?bool $backupStaticAttributes): void - { - if ($this->backupStaticAttributes === null && $backupStaticAttributes !== null) { - $this->backupStaticAttributes = $backupStaticAttributes; - } - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void - { - if ($this->runTestInSeparateProcess === null) { - $this->runTestInSeparateProcess = $runTestInSeparateProcess; - } - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void - { - if ($this->runClassInSeparateProcess === null) { - $this->runClassInSeparateProcess = $runClassInSeparateProcess; - } - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setPreserveGlobalState(bool $preserveGlobalState): void - { - $this->preserveGlobalState = $preserveGlobalState; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setInIsolation(bool $inIsolation): void - { - $this->inIsolation = $inIsolation; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isInIsolation(): bool - { - return $this->inIsolation; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getResult() - { - return $this->testResult; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setResult($result): void - { - $this->testResult = $result; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setOutputCallback(callable $callback): void - { - $this->outputCallback = $callback; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getTestResultObject(): ?TestResult - { - return $this->result; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function setTestResultObject(TestResult $result): void - { - $this->result = $result; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function registerMockObject(MockObject $mockObject): void - { - $this->mockObjects[] = $mockObject; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function addToAssertionCount(int $count): void - { - $this->numAssertions += $count; - } - - /** - * Returns the number of assertions performed by this test. - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getNumAssertions(): int - { - return $this->numAssertions; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function usesDataProvider(): bool - { - return !empty($this->data); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function dataDescription(): string - { - return \is_string($this->dataName) ? $this->dataName : ''; - } - - /** - * @return int|string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function dataName() - { - return $this->dataName; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getDataSetAsString(bool $includeData = true): string - { - $buffer = ''; - - if (!empty($this->data)) { - if (\is_int($this->dataName)) { - $buffer .= \sprintf(' with data set #%d', $this->dataName); - } else { - $buffer .= \sprintf(' with data set "%s"', $this->dataName); - } - - $exporter = new Exporter; - - if ($includeData) { - $buffer .= \sprintf(' (%s)', $exporter->shortenedRecursiveExport($this->data)); - } - } - - return $buffer; - } - - /** - * Gets the data set of a TestCase. - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function getProvidedData(): array - { - return $this->data; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function addWarning(string $warning): void - { - $this->warnings[] = $warning; - } - - /** - * Override to run the test and assert its state. - * - * @throws AssertionFailedError - * @throws Exception - * @throws ExpectationFailedException - * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException - * @throws \Throwable - */ - protected function runTest() - { - if (\trim($this->name) === '') { - throw new Exception( - 'PHPUnit\Framework\TestCase::$name must be a non-blank string.' - ); - } - - $testArguments = \array_merge($this->data, $this->dependencyInput); - - $this->registerMockObjectsFromTestArguments($testArguments); - - try { - $testResult = $this->{$this->name}(...\array_values($testArguments)); - } catch (\Throwable $exception) { - if (!$this->checkExceptionExpectations($exception)) { - throw $exception; - } - - if ($this->expectedException !== null) { - $this->assertThat( - $exception, - new ExceptionConstraint( - $this->expectedException - ) - ); - } - - if ($this->expectedExceptionMessage !== null) { - $this->assertThat( - $exception, - new ExceptionMessage( - $this->expectedExceptionMessage - ) - ); - } - - if ($this->expectedExceptionMessageRegExp !== null) { - $this->assertThat( - $exception, - new ExceptionMessageRegularExpression( - $this->expectedExceptionMessageRegExp - ) - ); - } - - if ($this->expectedExceptionCode !== null) { - $this->assertThat( - $exception, - new ExceptionCode( - $this->expectedExceptionCode - ) - ); - } - - return; - } - - if ($this->expectedException !== null) { - $this->assertThat( - null, - new ExceptionConstraint( - $this->expectedException - ) - ); - } elseif ($this->expectedExceptionMessage !== null) { - $this->numAssertions++; - - throw new AssertionFailedError( - \sprintf( - 'Failed asserting that exception with message "%s" is thrown', - $this->expectedExceptionMessage - ) - ); - } elseif ($this->expectedExceptionMessageRegExp !== null) { - $this->numAssertions++; - - throw new AssertionFailedError( - \sprintf( - 'Failed asserting that exception with message matching "%s" is thrown', - $this->expectedExceptionMessageRegExp - ) - ); - } elseif ($this->expectedExceptionCode !== null) { - $this->numAssertions++; - - throw new AssertionFailedError( - \sprintf( - 'Failed asserting that exception with code "%s" is thrown', - $this->expectedExceptionCode - ) - ); - } - - return $testResult; - } - - /** - * This method is a wrapper for the ini_set() function that automatically - * resets the modified php.ini setting to its original value after the - * test is run. - * - * @throws Exception - */ - protected function iniSet(string $varName, string $newValue): void - { - $currentValue = \ini_set($varName, $newValue); - - if ($currentValue !== false) { - $this->iniSettings[$varName] = $currentValue; - } else { - throw new Exception( - \sprintf( - 'INI setting "%s" could not be set to "%s".', - $varName, - $newValue - ) - ); - } - } - - /** - * This method is a wrapper for the setlocale() function that automatically - * resets the locale to its original value after the test is run. - * - * @throws Exception - */ - protected function setLocale(...$args): void - { - if (\count($args) < 2) { - throw new Exception; - } - - [$category, $locale] = $args; - - if (\defined('LC_MESSAGES')) { - $categories[] = \LC_MESSAGES; - } - - if (!\in_array($category, self::LOCALE_CATEGORIES, true)) { - throw new Exception; - } - - if (!\is_array($locale) && !\is_string($locale)) { - throw new Exception; - } - - $this->locale[$category] = \setlocale($category, 0); - - $result = \setlocale(...$args); - - if ($result === false) { - throw new Exception( - 'The locale functionality is not implemented on your platform, ' . - 'the specified locale does not exist or the category name is ' . - 'invalid.' - ); - } - } - - /** - * Makes configurable stub for the specified class. - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string $originalClassName - * @psalm-return Stub&RealInstanceType - */ - protected function createStub(string $originalClassName): Stub - { - return $this->createMock($originalClassName); - } - - /** - * Returns a mock object for the specified class. - * - * @param string|string[] $originalClassName - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|string[] $originalClassName - * @psalm-return MockObject&RealInstanceType - */ - protected function createMock($originalClassName): MockObject - { - return $this->getMockBuilder($originalClassName) - ->disableOriginalConstructor() - ->disableOriginalClone() - ->disableArgumentCloning() - ->disallowMockingUnknownTypes() - ->getMock(); - } - - /** - * Returns a configured mock object for the specified class. - * - * @param string|string[] $originalClassName - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|string[] $originalClassName - * @psalm-return MockObject&RealInstanceType - */ - protected function createConfiguredMock($originalClassName, array $configuration): MockObject - { - $o = $this->createMock($originalClassName); - - foreach ($configuration as $method => $return) { - $o->method($method)->willReturn($return); - } - - return $o; - } - - /** - * Returns a partial mock object for the specified class. - * - * @param string|string[] $originalClassName - * @param string[] $methods - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|string[] $originalClassName - * @psalm-return MockObject&RealInstanceType - */ - protected function createPartialMock($originalClassName, array $methods): MockObject - { - $class_names = \is_array($originalClassName) ? $originalClassName : [$originalClassName]; - - foreach ($class_names as $class_name) { - $reflection = new \ReflectionClass($class_name); - - $mockedMethodsThatDontExist = \array_filter( - $methods, - static function (string $method) use ($reflection) { - return !$reflection->hasMethod($method); - } - ); - - if ($mockedMethodsThatDontExist) { - $this->addWarning( - \sprintf( - 'createPartialMock called with method(s) %s that do not exist in %s. This will not be allowed in future versions of PHPUnit.', - \implode(', ', $mockedMethodsThatDontExist), - $class_name - ) - ); - } - } - - return $this->getMockBuilder($originalClassName) - ->disableOriginalConstructor() - ->disableOriginalClone() - ->disableArgumentCloning() - ->disallowMockingUnknownTypes() - ->setMethods(empty($methods) ? null : $methods) - ->getMock(); - } - - /** - * Returns a test proxy for the specified class. - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string $originalClassName - * @psalm-return MockObject&RealInstanceType - */ - protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject - { - return $this->getMockBuilder($originalClassName) - ->setConstructorArgs($constructorArguments) - ->enableProxyingToOriginalMethods() - ->getMock(); - } - - /** - * Mocks the specified class and returns the name of the mocked class. - * - * @param string $originalClassName - * @param array $methods - * @param string $mockClassName - * @param bool $callOriginalConstructor - * @param bool $callOriginalClone - * @param bool $callAutoload - * @param bool $cloneArguments - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|string $originalClassName - * @psalm-return class-string - */ - protected function getMockClass($originalClassName, $methods = [], array $arguments = [], $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false): string - { - $this->recordDoubledType($originalClassName); - - $mock = $this->getMockObjectGenerator()->getMock( - $originalClassName, - $methods, - $arguments, - $mockClassName, - $callOriginalConstructor, - $callOriginalClone, - $callAutoload, - $cloneArguments - ); - - return \get_class($mock); - } - - /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. Concrete methods are not mocked by default. - * To mock concrete methods, use the 7th parameter ($mockedMethods). - * - * @param string $originalClassName - * @param string $mockClassName - * @param bool $callOriginalConstructor - * @param bool $callOriginalClone - * @param bool $callAutoload - * @param array $mockedMethods - * @param bool $cloneArguments - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string $originalClassName - * @psalm-return MockObject&RealInstanceType - */ - protected function getMockForAbstractClass($originalClassName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = false): MockObject - { - $this->recordDoubledType($originalClassName); - - $mockObject = $this->getMockObjectGenerator()->getMockForAbstractClass( - $originalClassName, - $arguments, - $mockClassName, - $callOriginalConstructor, - $callOriginalClone, - $callAutoload, - $mockedMethods, - $cloneArguments - ); - - $this->registerMockObject($mockObject); - - return $mockObject; - } - - /** - * Returns a mock object based on the given WSDL file. - * - * @param string $wsdlFile - * @param string $originalClassName - * @param string $mockClassName - * @param bool $callOriginalConstructor - * @param array $options An array of options passed to SOAPClient::_construct - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|string $originalClassName - * @psalm-return MockObject&RealInstanceType - */ - protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = [], $callOriginalConstructor = true, array $options = []): MockObject - { - $this->recordDoubledType('SoapClient'); - - if ($originalClassName === '') { - $fileName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), \PATHINFO_FILENAME); - $originalClassName = \preg_replace('/[^a-zA-Z0-9_]/', '', $fileName); - } - - if (!\class_exists($originalClassName)) { - eval( - $this->getMockObjectGenerator()->generateClassFromWsdl( - $wsdlFile, - $originalClassName, - $methods, - $options - ) - ); - } - - $mockObject = $this->getMockObjectGenerator()->getMock( - $originalClassName, - $methods, - ['', $options], - $mockClassName, - $callOriginalConstructor, - false, - false - ); - - $this->registerMockObject($mockObject); - - return $mockObject; - } - - /** - * Returns a mock object for the specified trait with all abstract methods - * of the trait mocked. Concrete methods to mock can be specified with the - * `$mockedMethods` parameter. - * - * @param string $traitName - * @param string $mockClassName - * @param bool $callOriginalConstructor - * @param bool $callOriginalClone - * @param bool $callAutoload - * @param array $mockedMethods - * @param bool $cloneArguments - */ - protected function getMockForTrait($traitName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = false): MockObject - { - $this->recordDoubledType($traitName); - - $mockObject = $this->getMockObjectGenerator()->getMockForTrait( - $traitName, - $arguments, - $mockClassName, - $callOriginalConstructor, - $callOriginalClone, - $callAutoload, - $mockedMethods, - $cloneArguments - ); - - $this->registerMockObject($mockObject); - - return $mockObject; - } - - /** - * Returns an object for the specified trait. - * - * @param string $traitName - * @param string $traitClassName - * @param bool $callOriginalConstructor - * @param bool $callOriginalClone - * @param bool $callAutoload - * - * @return object - */ - protected function getObjectForTrait($traitName, array $arguments = [], $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true)/*: object*/ - { - $this->recordDoubledType($traitName); - - return $this->getMockObjectGenerator()->getObjectForTrait( - $traitName, - $traitClassName, - $callAutoload, - $callOriginalConstructor, - $arguments - ); - } - - /** - * @param null|string $classOrInterface - * - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException - * - * @psalm-template RealInstanceType of object - * @psalm-param class-string|null $classOrInterface - * @psalm-return ObjectProphecy - */ - protected function prophesize($classOrInterface = null): ObjectProphecy - { - if (\is_string($classOrInterface)) { - $this->recordDoubledType($classOrInterface); - } - - return $this->getProphet()->prophesize($classOrInterface); - } - - /** - * Creates a default TestResult object. - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - protected function createResult(): TestResult - { - return new TestResult; - } - - /** - * Performs assertions shared by all tests of a test case. - * - * This method is called between setUp() and test. - */ - protected function assertPreConditions(): void - { - } - - /** - * Performs assertions shared by all tests of a test case. - * - * This method is called between test and tearDown(). - */ - protected function assertPostConditions(): void - { - } - - /** - * This method is called when a test method did not execute successfully. - * - * @throws \Throwable - */ - protected function onNotSuccessfulTest(\Throwable $t): void - { - throw $t; - } - - private function setExpectedExceptionFromAnnotation(): void - { - if ($this->name === null) { - return; - } - - try { - $expectedException = TestUtil::getExpectedException( - \get_class($this), - $this->name - ); - - if ($expectedException !== false) { - $this->addWarning('The @expectedException, @expectedExceptionCode, @expectedExceptionMessage, and @expectedExceptionMessageRegExp annotations are deprecated. They will be removed in PHPUnit 9. Refactor your test to use expectException(), expectExceptionCode(), expectExceptionMessage(), or expectExceptionMessageRegExp() instead.'); - - $this->expectException($expectedException['class']); - - if ($expectedException['code'] !== null) { - $this->expectExceptionCode($expectedException['code']); - } - - if ($expectedException['message'] !== '') { - $this->expectExceptionMessage($expectedException['message']); - } elseif ($expectedException['message_regex'] !== '') { - $this->expectExceptionMessageRegExp($expectedException['message_regex']); - } - } - } catch (UtilException $e) { - } - } - - /** - * @throws Warning - * @throws SkippedTestError - * @throws SyntheticSkippedError - */ - private function checkRequirements(): void - { - if (!$this->name || !\method_exists($this, $this->name)) { - return; - } - - $missingRequirements = TestUtil::getMissingRequirements( - \get_class($this), - $this->name - ); - - if (!empty($missingRequirements)) { - $this->markTestSkipped(\implode(\PHP_EOL, $missingRequirements)); - } - } - - /** - * @throws \Throwable - */ - private function verifyMockObjects(): void - { - foreach ($this->mockObjects as $mockObject) { - if ($mockObject->__phpunit_hasMatchers()) { - $this->numAssertions++; - } - - $mockObject->__phpunit_verify( - $this->shouldInvocationMockerBeReset($mockObject) - ); - } - - if ($this->prophet !== null) { - try { - $this->prophet->checkPredictions(); - } catch (\Throwable $t) { - /* Intentionally left empty */ - } - - foreach ($this->prophet->getProphecies() as $objectProphecy) { - foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) { - foreach ($methodProphecies as $methodProphecy) { - \assert($methodProphecy instanceof MethodProphecy); - - $this->numAssertions += \count($methodProphecy->getCheckedPredictions()); - } - } - } - - if (isset($t)) { - throw $t; - } - } - } - - private function handleDependencies(): bool - { - if (!empty($this->dependencies) && !$this->inIsolation) { - $className = \get_class($this); - $passed = $this->result->passed(); - $passedKeys = \array_keys($passed); - - foreach ($passedKeys as $key => $value) { - $pos = \strpos($value, ' with data set'); - - if ($pos !== false) { - $passedKeys[$key] = \substr($value, 0, $pos); - } - } - - $passedKeys = \array_flip(\array_unique($passedKeys)); - - foreach ($this->dependencies as $dependency) { - $deepClone = false; - $shallowClone = false; - - if (empty($dependency)) { - $this->markSkippedForNotSpecifyingDependency(); - - return false; - } - - if (\strpos($dependency, 'clone ') === 0) { - $deepClone = true; - $dependency = \substr($dependency, \strlen('clone ')); - } elseif (\strpos($dependency, '!clone ') === 0) { - $deepClone = false; - $dependency = \substr($dependency, \strlen('!clone ')); - } - - if (\strpos($dependency, 'shallowClone ') === 0) { - $shallowClone = true; - $dependency = \substr($dependency, \strlen('shallowClone ')); - } elseif (\strpos($dependency, '!shallowClone ') === 0) { - $shallowClone = false; - $dependency = \substr($dependency, \strlen('!shallowClone ')); - } - - if (\strpos($dependency, '::') === false) { - $dependency = $className . '::' . $dependency; - } - - if (!isset($passedKeys[$dependency])) { - if (!$this->isCallableTestMethod($dependency)) { - $this->warnAboutDependencyThatDoesNotExist($dependency); - } else { - $this->markSkippedForMissingDependency($dependency); - } - - return false; - } - - if (isset($passed[$dependency])) { - if ($passed[$dependency]['size'] !== TestUtil::UNKNOWN && - $this->getSize() !== TestUtil::UNKNOWN && - $passed[$dependency]['size'] > $this->getSize()) { - $this->result->addError( - $this, - new SkippedTestError( - 'This test depends on a test that is larger than itself.' - ), - 0 - ); - - return false; - } - - if ($deepClone) { - $deepCopy = new DeepCopy; - $deepCopy->skipUncloneable(false); - - $this->dependencyInput[$dependency] = $deepCopy->copy($passed[$dependency]['result']); - } elseif ($shallowClone) { - $this->dependencyInput[$dependency] = clone $passed[$dependency]['result']; - } else { - $this->dependencyInput[$dependency] = $passed[$dependency]['result']; - } - } else { - $this->dependencyInput[$dependency] = null; - } - } - } - - return true; - } - - private function markSkippedForNotSpecifyingDependency(): void - { - $this->status = BaseTestRunner::STATUS_SKIPPED; - - $this->result->startTest($this); - - $this->result->addError( - $this, - new SkippedTestError( - \sprintf('This method has an invalid @depends annotation.') - ), - 0 - ); - - $this->result->endTest($this, 0); - } - - private function markSkippedForMissingDependency(string $dependency): void - { - $this->status = BaseTestRunner::STATUS_SKIPPED; - - $this->result->startTest($this); - - $this->result->addError( - $this, - new SkippedTestError( - \sprintf( - 'This test depends on "%s" to pass.', - $dependency - ) - ), - 0 - ); - - $this->result->endTest($this, 0); - } - - private function warnAboutDependencyThatDoesNotExist(string $dependency): void - { - $this->status = BaseTestRunner::STATUS_WARNING; - - $this->result->startTest($this); - - $this->result->addWarning( - $this, - new Warning( - \sprintf( - 'This test depends on "%s" which does not exist.', - $dependency - ) - ), - 0 - ); - - $this->result->endTest($this, 0); - } - - /** - * Get the mock object generator, creating it if it doesn't exist. - */ - private function getMockObjectGenerator(): MockGenerator - { - if ($this->mockObjectGenerator === null) { - $this->mockObjectGenerator = new MockGenerator; - } - - return $this->mockObjectGenerator; - } - - private function startOutputBuffering(): void - { - \ob_start(); - - $this->outputBufferingActive = true; - $this->outputBufferingLevel = \ob_get_level(); - } - - /** - * @throws RiskyTestError - */ - private function stopOutputBuffering(): void - { - if (\ob_get_level() !== $this->outputBufferingLevel) { - while (\ob_get_level() >= $this->outputBufferingLevel) { - \ob_end_clean(); - } - - throw new RiskyTestError( - 'Test code or tested code did not (only) close its own output buffers' - ); - } - - $this->output = \ob_get_contents(); - - if ($this->outputCallback !== false) { - $this->output = (string) \call_user_func($this->outputCallback, $this->output); - } - - \ob_end_clean(); - - $this->outputBufferingActive = false; - $this->outputBufferingLevel = \ob_get_level(); - } - - private function snapshotGlobalState(): void - { - if ($this->runTestInSeparateProcess || $this->inIsolation || - (!$this->backupGlobals && !$this->backupStaticAttributes)) { - return; - } - - $this->snapshot = $this->createGlobalStateSnapshot($this->backupGlobals === true); - } - - /** - * @throws RiskyTestError - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function restoreGlobalState(): void - { - if (!$this->snapshot instanceof Snapshot) { - return; - } - - if ($this->beStrictAboutChangesToGlobalState) { - try { - $this->compareGlobalStateSnapshots( - $this->snapshot, - $this->createGlobalStateSnapshot($this->backupGlobals === true) - ); - } catch (RiskyTestError $rte) { - // Intentionally left empty - } - } - - $restorer = new Restorer; - - if ($this->backupGlobals) { - $restorer->restoreGlobalVariables($this->snapshot); - } - - if ($this->backupStaticAttributes) { - $restorer->restoreStaticAttributes($this->snapshot); - } - - $this->snapshot = null; - - if (isset($rte)) { - throw $rte; - } - } - - private function createGlobalStateSnapshot(bool $backupGlobals): Snapshot - { - $blacklist = new Blacklist; - - foreach ($this->backupGlobalsBlacklist as $globalVariable) { - $blacklist->addGlobalVariable($globalVariable); - } - - if (!\defined('PHPUNIT_TESTSUITE')) { - $blacklist->addClassNamePrefix('PHPUnit'); - $blacklist->addClassNamePrefix('SebastianBergmann\CodeCoverage'); - $blacklist->addClassNamePrefix('SebastianBergmann\FileIterator'); - $blacklist->addClassNamePrefix('SebastianBergmann\Invoker'); - $blacklist->addClassNamePrefix('SebastianBergmann\Timer'); - $blacklist->addClassNamePrefix('PHP_Token'); - $blacklist->addClassNamePrefix('Symfony'); - $blacklist->addClassNamePrefix('Text_Template'); - $blacklist->addClassNamePrefix('Doctrine\Instantiator'); - $blacklist->addClassNamePrefix('Prophecy'); - - foreach ($this->backupStaticAttributesBlacklist as $class => $attributes) { - foreach ($attributes as $attribute) { - $blacklist->addStaticAttribute($class, $attribute); - } - } - } - - return new Snapshot( - $blacklist, - $backupGlobals, - (bool) $this->backupStaticAttributes, - false, - false, - false, - false, - false, - false, - false - ); - } - - /** - * @throws RiskyTestError - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after): void - { - $backupGlobals = $this->backupGlobals === null || $this->backupGlobals; - - if ($backupGlobals) { - $this->compareGlobalStateSnapshotPart( - $before->globalVariables(), - $after->globalVariables(), - "--- Global variables before the test\n+++ Global variables after the test\n" - ); - - $this->compareGlobalStateSnapshotPart( - $before->superGlobalVariables(), - $after->superGlobalVariables(), - "--- Super-global variables before the test\n+++ Super-global variables after the test\n" - ); - } - - if ($this->backupStaticAttributes) { - $this->compareGlobalStateSnapshotPart( - $before->staticAttributes(), - $after->staticAttributes(), - "--- Static attributes before the test\n+++ Static attributes after the test\n" - ); - } - } - - /** - * @throws RiskyTestError - */ - private function compareGlobalStateSnapshotPart(array $before, array $after, string $header): void - { - if ($before != $after) { - $differ = new Differ($header); - $exporter = new Exporter; - - $diff = $differ->diff( - $exporter->export($before), - $exporter->export($after) - ); - - throw new RiskyTestError( - $diff - ); - } - } - - private function getProphet(): Prophet - { - if ($this->prophet === null) { - $this->prophet = new Prophet; - } - - return $this->prophet; - } - - /** - * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException - */ - private function shouldInvocationMockerBeReset(MockObject $mock): bool - { - $enumerator = new Enumerator; - - foreach ($enumerator->enumerate($this->dependencyInput) as $object) { - if ($mock === $object) { - return false; - } - } - - if (!\is_array($this->testResult) && !\is_object($this->testResult)) { - return true; - } - - return !\in_array($mock, $enumerator->enumerate($this->testResult), true); - } - - /** - * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException - * @throws \SebastianBergmann\ObjectReflector\InvalidArgumentException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function registerMockObjectsFromTestArguments(array $testArguments, array &$visited = []): void - { - if ($this->registerMockObjectsFromTestArgumentsRecursively) { - foreach ((new Enumerator)->enumerate($testArguments) as $object) { - if ($object instanceof MockObject) { - $this->registerMockObject($object); - } - } - } else { - foreach ($testArguments as $testArgument) { - if ($testArgument instanceof MockObject) { - if (Type::isCloneable($testArgument)) { - $testArgument = clone $testArgument; - } - - $this->registerMockObject($testArgument); - } elseif (\is_array($testArgument) && !\in_array($testArgument, $visited, true)) { - $visited[] = $testArgument; - - $this->registerMockObjectsFromTestArguments( - $testArgument, - $visited - ); - } - } - } - } - - private function setDoesNotPerformAssertionsFromAnnotation(): void - { - $annotations = $this->getAnnotations(); - - if (isset($annotations['method']['doesNotPerformAssertions'])) { - $this->doesNotPerformAssertions = true; - } - } - - private function unregisterCustomComparators(): void - { - $factory = ComparatorFactory::getInstance(); - - foreach ($this->customComparators as $comparator) { - $factory->unregister($comparator); - } - - $this->customComparators = []; - } - - private function cleanupIniSettings(): void - { - foreach ($this->iniSettings as $varName => $oldValue) { - \ini_set($varName, $oldValue); - } - - $this->iniSettings = []; - } - - private function cleanupLocaleSettings(): void - { - foreach ($this->locale as $category => $locale) { - \setlocale($category, $locale); - } - - $this->locale = []; - } - - /** - * @throws Exception - */ - private function checkExceptionExpectations(\Throwable $throwable): bool - { - $result = false; - - if ($this->expectedException !== null || $this->expectedExceptionCode !== null || $this->expectedExceptionMessage !== null || $this->expectedExceptionMessageRegExp !== null) { - $result = true; - } - - if ($throwable instanceof Exception) { - $result = false; - } - - if (\is_string($this->expectedException)) { - try { - $reflector = new \ReflectionClass($this->expectedException); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($this->expectedException === 'PHPUnit\Framework\Exception' || - $this->expectedException === '\PHPUnit\Framework\Exception' || - $reflector->isSubclassOf(Exception::class)) { - $result = true; - } - } - - return $result; - } - - private function runInSeparateProcess(): bool - { - return ($this->runTestInSeparateProcess || $this->runClassInSeparateProcess) && - !$this->inIsolation && !$this instanceof PhptTestCase; - } - - /** - * @param string|string[] $originalClassName - */ - private function recordDoubledType($originalClassName): void - { - if (\is_string($originalClassName)) { - $this->doubledTypes[] = $originalClassName; - } - - if (\is_array($originalClassName)) { - foreach ($originalClassName as $_originalClassName) { - if (\is_string($_originalClassName)) { - $this->doubledTypes[] = $_originalClassName; - } - } - } - } - - private function isCallableTestMethod(string $dependency): bool - { - [$className, $methodName] = \explode('::', $dependency); - - if (!\class_exists($className)) { - return false; - } - - try { - $class = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - return false; - } - - if (!$class->isSubclassOf(__CLASS__)) { - return false; - } - - if (!$class->hasMethod($methodName)) { - return false; - } - - try { - $method = $class->getMethod($methodName); - } catch (\ReflectionException $e) { - return false; - } - - return TestUtil::isTestMethod($method); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestFailure.php b/vendor/phpunit/phpunit/src/Framework/TestFailure.php deleted file mode 100644 index 6fe25f5..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestFailure.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use PHPUnit\Framework\Error\Error; -use Throwable; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFailure -{ - /** - * @var null|Test - */ - private $failedTest; - - /** - * @var Throwable - */ - private $thrownException; - - /** - * @var string - */ - private $testName; - - /** - * Returns a description for an exception. - */ - public static function exceptionToString(Throwable $e): string - { - if ($e instanceof SelfDescribing) { - $buffer = $e->toString(); - - if ($e instanceof ExpectationFailedException && $e->getComparisonFailure()) { - $buffer .= $e->getComparisonFailure()->getDiff(); - } - - if ($e instanceof PHPTAssertionFailedError) { - $buffer .= $e->getDiff(); - } - - if (!empty($buffer)) { - $buffer = \trim($buffer) . "\n"; - } - - return $buffer; - } - - if ($e instanceof Error) { - return $e->getMessage() . "\n"; - } - - if ($e instanceof ExceptionWrapper) { - return $e->getClassName() . ': ' . $e->getMessage() . "\n"; - } - - return \get_class($e) . ': ' . $e->getMessage() . "\n"; - } - - /** - * Constructs a TestFailure with the given test and exception. - * - * @param Throwable $t - */ - public function __construct(Test $failedTest, $t) - { - if ($failedTest instanceof SelfDescribing) { - $this->testName = $failedTest->toString(); - } else { - $this->testName = \get_class($failedTest); - } - - if (!$failedTest instanceof TestCase || !$failedTest->isInIsolation()) { - $this->failedTest = $failedTest; - } - - $this->thrownException = $t; - } - - /** - * Returns a short description of the failure. - */ - public function toString(): string - { - return \sprintf( - '%s: %s', - $this->testName, - $this->thrownException->getMessage() - ); - } - - /** - * Returns a description for the thrown exception. - */ - public function getExceptionAsString(): string - { - return self::exceptionToString($this->thrownException); - } - - /** - * Returns the name of the failing test (including data set, if any). - */ - public function getTestName(): string - { - return $this->testName; - } - - /** - * Returns the failing test. - * - * Note: The test object is not set when the test is executed in process - * isolation. - * - * @see Exception - */ - public function failedTest(): ?Test - { - return $this->failedTest; - } - - /** - * Gets the thrown exception. - */ - public function thrownException(): Throwable - { - return $this->thrownException; - } - - /** - * Returns the exception's message. - */ - public function exceptionMessage(): string - { - return $this->thrownException()->getMessage(); - } - - /** - * Returns true if the thrown exception - * is of type AssertionFailedError. - */ - public function isFailure(): bool - { - return $this->thrownException() instanceof AssertionFailedError; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestListener.php b/vendor/phpunit/phpunit/src/Framework/TestListener.php deleted file mode 100644 index 0390151..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestListener.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @deprecated Use the `TestHook` interfaces instead - */ -interface TestListener -{ - /** - * An error occurred. - * - * @deprecated Use `AfterTestErrorHook::executeAfterTestError` instead - */ - public function addError(Test $test, \Throwable $t, float $time): void; - - /** - * A warning occurred. - * - * @deprecated Use `AfterTestWarningHook::executeAfterTestWarning` instead - */ - public function addWarning(Test $test, Warning $e, float $time): void; - - /** - * A failure occurred. - * - * @deprecated Use `AfterTestFailureHook::executeAfterTestFailure` instead - */ - public function addFailure(Test $test, AssertionFailedError $e, float $time): void; - - /** - * Incomplete test. - * - * @deprecated Use `AfterIncompleteTestHook::executeAfterIncompleteTest` instead - */ - public function addIncompleteTest(Test $test, \Throwable $t, float $time): void; - - /** - * Risky test. - * - * @deprecated Use `AfterRiskyTestHook::executeAfterRiskyTest` instead - */ - public function addRiskyTest(Test $test, \Throwable $t, float $time): void; - - /** - * Skipped test. - * - * @deprecated Use `AfterSkippedTestHook::executeAfterSkippedTest` instead - */ - public function addSkippedTest(Test $test, \Throwable $t, float $time): void; - - /** - * A test suite started. - */ - public function startTestSuite(TestSuite $suite): void; - - /** - * A test suite ended. - */ - public function endTestSuite(TestSuite $suite): void; - - /** - * A test started. - * - * @deprecated Use `BeforeTestHook::executeBeforeTest` instead - */ - public function startTest(Test $test): void; - - /** - * A test ended. - * - * @deprecated Use `AfterTestHook::executeAfterTest` instead - */ - public function endTest(Test $test, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php b/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php deleted file mode 100644 index 9c080af..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @deprecated The `TestListener` interface is deprecated - */ -trait TestListenerDefaultImplementation -{ - public function addError(Test $test, \Throwable $t, float $time): void - { - } - - public function addWarning(Test $test, Warning $e, float $time): void - { - } - - public function addFailure(Test $test, AssertionFailedError $e, float $time): void - { - } - - public function addIncompleteTest(Test $test, \Throwable $t, float $time): void - { - } - - public function addRiskyTest(Test $test, \Throwable $t, float $time): void - { - } - - public function addSkippedTest(Test $test, \Throwable $t, float $time): void - { - } - - public function startTestSuite(TestSuite $suite): void - { - } - - public function endTestSuite(TestSuite $suite): void - { - } - - public function startTest(Test $test): void - { - } - - public function endTest(Test $test, float $time): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestResult.php b/vendor/phpunit/phpunit/src/Framework/TestResult.php deleted file mode 100644 index 10f02bd..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestResult.php +++ /dev/null @@ -1,1211 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use AssertionError; -use Countable; -use Error; -use PHPUnit\Framework\MockObject\Exception as MockObjectException; -use PHPUnit\Util\Blacklist; -use PHPUnit\Util\ErrorHandler; -use PHPUnit\Util\Printer; -use PHPUnit\Util\Test as TestUtil; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException as OriginalCoveredCodeNotExecutedException; -use SebastianBergmann\CodeCoverage\Exception as OriginalCodeCoverageException; -use SebastianBergmann\CodeCoverage\MissingCoversAnnotationException as OriginalMissingCoversAnnotationException; -use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; -use SebastianBergmann\Invoker\Invoker; -use SebastianBergmann\Invoker\TimeoutException; -use SebastianBergmann\ResourceOperations\ResourceOperations; -use SebastianBergmann\Timer\Timer; -use Throwable; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestResult implements Countable -{ - /** - * @var array - */ - private $passed = []; - - /** - * @var TestFailure[] - */ - private $errors = []; - - /** - * @var TestFailure[] - */ - private $failures = []; - - /** - * @var TestFailure[] - */ - private $warnings = []; - - /** - * @var TestFailure[] - */ - private $notImplemented = []; - - /** - * @var TestFailure[] - */ - private $risky = []; - - /** - * @var TestFailure[] - */ - private $skipped = []; - - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @var TestListener[] - */ - private $listeners = []; - - /** - * @var int - */ - private $runTests = 0; - - /** - * @var float - */ - private $time = 0; - - /** - * @var TestSuite - */ - private $topTestSuite; - - /** - * Code Coverage information. - * - * @var CodeCoverage - */ - private $codeCoverage; - - /** - * @var bool - */ - private $convertDeprecationsToExceptions = true; - - /** - * @var bool - */ - private $convertErrorsToExceptions = true; - - /** - * @var bool - */ - private $convertNoticesToExceptions = true; - - /** - * @var bool - */ - private $convertWarningsToExceptions = true; - - /** - * @var bool - */ - private $stop = false; - - /** - * @var bool - */ - private $stopOnError = false; - - /** - * @var bool - */ - private $stopOnFailure = false; - - /** - * @var bool - */ - private $stopOnWarning = false; - - /** - * @var bool - */ - private $beStrictAboutTestsThatDoNotTestAnything = true; - - /** - * @var bool - */ - private $beStrictAboutOutputDuringTests = false; - - /** - * @var bool - */ - private $beStrictAboutTodoAnnotatedTests = false; - - /** - * @var bool - */ - private $beStrictAboutResourceUsageDuringSmallTests = false; - - /** - * @var bool - */ - private $enforceTimeLimit = false; - - /** - * @var int - */ - private $timeoutForSmallTests = 1; - - /** - * @var int - */ - private $timeoutForMediumTests = 10; - - /** - * @var int - */ - private $timeoutForLargeTests = 60; - - /** - * @var bool - */ - private $stopOnRisky = false; - - /** - * @var bool - */ - private $stopOnIncomplete = false; - - /** - * @var bool - */ - private $stopOnSkipped = false; - - /** - * @var bool - */ - private $lastTestFailed = false; - - /** - * @var int - */ - private $defaultTimeLimit = 0; - - /** - * @var bool - */ - private $stopOnDefect = false; - - /** - * @var bool - */ - private $registerMockObjectsFromTestArgumentsRecursively = false; - - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @codeCoverageIgnore - * - * Registers a TestListener. - */ - public function addListener(TestListener $listener): void - { - $this->listeners[] = $listener; - } - - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @codeCoverageIgnore - * - * Unregisters a TestListener. - */ - public function removeListener(TestListener $listener): void - { - foreach ($this->listeners as $key => $_listener) { - if ($listener === $_listener) { - unset($this->listeners[$key]); - } - } - } - - /** - * @deprecated Use the `TestHook` interfaces instead - * - * @codeCoverageIgnore - * - * Flushes all flushable TestListeners. - */ - public function flushListeners(): void - { - foreach ($this->listeners as $listener) { - if ($listener instanceof Printer) { - $listener->flush(); - } - } - } - - /** - * Adds an error to the list of errors. - */ - public function addError(Test $test, Throwable $t, float $time): void - { - if ($t instanceof RiskyTestError) { - $this->risky[] = new TestFailure($test, $t); - $notifyMethod = 'addRiskyTest'; - - if ($test instanceof TestCase) { - $test->markAsRisky(); - } - - if ($this->stopOnRisky || $this->stopOnDefect) { - $this->stop(); - } - } elseif ($t instanceof IncompleteTest) { - $this->notImplemented[] = new TestFailure($test, $t); - $notifyMethod = 'addIncompleteTest'; - - if ($this->stopOnIncomplete) { - $this->stop(); - } - } elseif ($t instanceof SkippedTest) { - $this->skipped[] = new TestFailure($test, $t); - $notifyMethod = 'addSkippedTest'; - - if ($this->stopOnSkipped) { - $this->stop(); - } - } else { - $this->errors[] = new TestFailure($test, $t); - $notifyMethod = 'addError'; - - if ($this->stopOnError || $this->stopOnFailure) { - $this->stop(); - } - } - - // @see https://github.com/sebastianbergmann/phpunit/issues/1953 - if ($t instanceof Error) { - $t = new ExceptionWrapper($t); - } - - foreach ($this->listeners as $listener) { - $listener->$notifyMethod($test, $t, $time); - } - - $this->lastTestFailed = true; - $this->time += $time; - } - - /** - * Adds a warning to the list of warnings. - * The passed in exception caused the warning. - */ - public function addWarning(Test $test, Warning $e, float $time): void - { - if ($this->stopOnWarning || $this->stopOnDefect) { - $this->stop(); - } - - $this->warnings[] = new TestFailure($test, $e); - - foreach ($this->listeners as $listener) { - $listener->addWarning($test, $e, $time); - } - - $this->time += $time; - } - - /** - * Adds a failure to the list of failures. - * The passed in exception caused the failure. - */ - public function addFailure(Test $test, AssertionFailedError $e, float $time): void - { - if ($e instanceof RiskyTestError || $e instanceof OutputError) { - $this->risky[] = new TestFailure($test, $e); - $notifyMethod = 'addRiskyTest'; - - if ($test instanceof TestCase) { - $test->markAsRisky(); - } - - if ($this->stopOnRisky || $this->stopOnDefect) { - $this->stop(); - } - } elseif ($e instanceof IncompleteTest) { - $this->notImplemented[] = new TestFailure($test, $e); - $notifyMethod = 'addIncompleteTest'; - - if ($this->stopOnIncomplete) { - $this->stop(); - } - } elseif ($e instanceof SkippedTest) { - $this->skipped[] = new TestFailure($test, $e); - $notifyMethod = 'addSkippedTest'; - - if ($this->stopOnSkipped) { - $this->stop(); - } - } else { - $this->failures[] = new TestFailure($test, $e); - $notifyMethod = 'addFailure'; - - if ($this->stopOnFailure || $this->stopOnDefect) { - $this->stop(); - } - } - - foreach ($this->listeners as $listener) { - $listener->$notifyMethod($test, $e, $time); - } - - $this->lastTestFailed = true; - $this->time += $time; - } - - /** - * Informs the result that a test suite will be started. - */ - public function startTestSuite(TestSuite $suite): void - { - if ($this->topTestSuite === null) { - $this->topTestSuite = $suite; - } - - foreach ($this->listeners as $listener) { - $listener->startTestSuite($suite); - } - } - - /** - * Informs the result that a test suite was completed. - */ - public function endTestSuite(TestSuite $suite): void - { - foreach ($this->listeners as $listener) { - $listener->endTestSuite($suite); - } - } - - /** - * Informs the result that a test will be started. - */ - public function startTest(Test $test): void - { - $this->lastTestFailed = false; - $this->runTests += \count($test); - - foreach ($this->listeners as $listener) { - $listener->startTest($test); - } - } - - /** - * Informs the result that a test was completed. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function endTest(Test $test, float $time): void - { - foreach ($this->listeners as $listener) { - $listener->endTest($test, $time); - } - - if (!$this->lastTestFailed && $test instanceof TestCase) { - $class = \get_class($test); - $key = $class . '::' . $test->getName(); - - $this->passed[$key] = [ - 'result' => $test->getResult(), - 'size' => \PHPUnit\Util\Test::getSize( - $class, - $test->getName(false) - ), - ]; - - $this->time += $time; - } - } - - /** - * Returns true if no risky test occurred. - */ - public function allHarmless(): bool - { - return $this->riskyCount() == 0; - } - - /** - * Gets the number of risky tests. - */ - public function riskyCount(): int - { - return \count($this->risky); - } - - /** - * Returns true if no incomplete test occurred. - */ - public function allCompletelyImplemented(): bool - { - return $this->notImplementedCount() == 0; - } - - /** - * Gets the number of incomplete tests. - */ - public function notImplementedCount(): int - { - return \count($this->notImplemented); - } - - /** - * Returns an array of TestFailure objects for the risky tests - * - * @return TestFailure[] - */ - public function risky(): array - { - return $this->risky; - } - - /** - * Returns an array of TestFailure objects for the incomplete tests - * - * @return TestFailure[] - */ - public function notImplemented(): array - { - return $this->notImplemented; - } - - /** - * Returns true if no test has been skipped. - */ - public function noneSkipped(): bool - { - return $this->skippedCount() == 0; - } - - /** - * Gets the number of skipped tests. - */ - public function skippedCount(): int - { - return \count($this->skipped); - } - - /** - * Returns an array of TestFailure objects for the skipped tests - * - * @return TestFailure[] - */ - public function skipped(): array - { - return $this->skipped; - } - - /** - * Gets the number of detected errors. - */ - public function errorCount(): int - { - return \count($this->errors); - } - - /** - * Returns an array of TestFailure objects for the errors - * - * @return TestFailure[] - */ - public function errors(): array - { - return $this->errors; - } - - /** - * Gets the number of detected failures. - */ - public function failureCount(): int - { - return \count($this->failures); - } - - /** - * Returns an array of TestFailure objects for the failures - * - * @return TestFailure[] - */ - public function failures(): array - { - return $this->failures; - } - - /** - * Gets the number of detected warnings. - */ - public function warningCount(): int - { - return \count($this->warnings); - } - - /** - * Returns an array of TestFailure objects for the warnings - * - * @return TestFailure[] - */ - public function warnings(): array - { - return $this->warnings; - } - - /** - * Returns the names of the tests that have passed. - */ - public function passed(): array - { - return $this->passed; - } - - /** - * Returns the (top) test suite. - */ - public function topTestSuite(): TestSuite - { - return $this->topTestSuite; - } - - /** - * Returns whether code coverage information should be collected. - */ - public function getCollectCodeCoverageInformation(): bool - { - return $this->codeCoverage !== null; - } - - /** - * Runs a TestCase. - * - * @throws CodeCoverageException - * @throws OriginalCoveredCodeNotExecutedException - * @throws OriginalMissingCoversAnnotationException - * @throws UnintentionallyCoveredCodeException - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\RuntimeException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function run(Test $test): void - { - Assert::resetCount(); - - if ($test instanceof TestCase) { - $test->setRegisterMockObjectsFromTestArgumentsRecursively( - $this->registerMockObjectsFromTestArgumentsRecursively - ); - - $isAnyCoverageRequired = TestUtil::requiresCodeCoverageDataCollection($test); - } - - $error = false; - $failure = false; - $warning = false; - $incomplete = false; - $risky = false; - $skipped = false; - - $this->startTest($test); - - if ($this->convertDeprecationsToExceptions || $this->convertErrorsToExceptions || $this->convertNoticesToExceptions || $this->convertWarningsToExceptions) { - $errorHandler = new ErrorHandler( - $this->convertDeprecationsToExceptions, - $this->convertErrorsToExceptions, - $this->convertNoticesToExceptions, - $this->convertWarningsToExceptions - ); - - $errorHandler->register(); - } - - $collectCodeCoverage = $this->codeCoverage !== null && - !$test instanceof WarningTestCase && - $isAnyCoverageRequired; - - if ($collectCodeCoverage) { - $this->codeCoverage->start($test); - } - - $monitorFunctions = $this->beStrictAboutResourceUsageDuringSmallTests && - !$test instanceof WarningTestCase && - $test->getSize() == \PHPUnit\Util\Test::SMALL && - \function_exists('xdebug_start_function_monitor'); - - if ($monitorFunctions) { - /* @noinspection ForgottenDebugOutputInspection */ - \xdebug_start_function_monitor(ResourceOperations::getFunctions()); - } - - Timer::start(); - - try { - if (!$test instanceof WarningTestCase && - $this->enforceTimeLimit && - ($this->defaultTimeLimit || $test->getSize() != \PHPUnit\Util\Test::UNKNOWN) && - \extension_loaded('pcntl') && \class_exists(Invoker::class)) { - switch ($test->getSize()) { - case \PHPUnit\Util\Test::SMALL: - $_timeout = $this->timeoutForSmallTests; - - break; - - case \PHPUnit\Util\Test::MEDIUM: - $_timeout = $this->timeoutForMediumTests; - - break; - - case \PHPUnit\Util\Test::LARGE: - $_timeout = $this->timeoutForLargeTests; - - break; - - case \PHPUnit\Util\Test::UNKNOWN: - $_timeout = $this->defaultTimeLimit; - - break; - } - - $invoker = new Invoker; - $invoker->invoke([$test, 'runBare'], [], $_timeout); - } else { - $test->runBare(); - } - } catch (TimeoutException $e) { - $this->addFailure( - $test, - new RiskyTestError( - $e->getMessage() - ), - $_timeout - ); - - $risky = true; - } catch (MockObjectException $e) { - $e = new Warning( - $e->getMessage() - ); - - $warning = true; - } catch (AssertionFailedError $e) { - $failure = true; - - if ($e instanceof RiskyTestError) { - $risky = true; - } elseif ($e instanceof IncompleteTestError) { - $incomplete = true; - } elseif ($e instanceof SkippedTestError) { - $skipped = true; - } - } catch (AssertionError $e) { - $test->addToAssertionCount(1); - - $failure = true; - $frame = $e->getTrace()[0]; - - $e = new AssertionFailedError( - \sprintf( - '%s in %s:%s', - $e->getMessage(), - $frame['file'], - $frame['line'] - ) - ); - } catch (Warning $e) { - $warning = true; - } catch (Exception $e) { - $error = true; - } catch (Throwable $e) { - $e = new ExceptionWrapper($e); - $error = true; - } - - $time = Timer::stop(); - $test->addToAssertionCount(Assert::getCount()); - - if ($monitorFunctions) { - $blacklist = new Blacklist; - - /** @noinspection ForgottenDebugOutputInspection */ - $functions = \xdebug_get_monitored_functions(); - - /* @noinspection ForgottenDebugOutputInspection */ - \xdebug_stop_function_monitor(); - - foreach ($functions as $function) { - if (!$blacklist->isBlacklisted($function['filename'])) { - $this->addFailure( - $test, - new RiskyTestError( - \sprintf( - '%s() used in %s:%s', - $function['function'], - $function['filename'], - $function['lineno'] - ) - ), - $time - ); - } - } - } - - if ($this->beStrictAboutTestsThatDoNotTestAnything && - $test->getNumAssertions() == 0) { - $risky = true; - } - - if ($collectCodeCoverage) { - $append = !$risky && !$incomplete && !$skipped; - $linesToBeCovered = []; - $linesToBeUsed = []; - - if ($append && $test instanceof TestCase) { - try { - $linesToBeCovered = \PHPUnit\Util\Test::getLinesToBeCovered( - \get_class($test), - $test->getName(false) - ); - - $linesToBeUsed = \PHPUnit\Util\Test::getLinesToBeUsed( - \get_class($test), - $test->getName(false) - ); - } catch (InvalidCoversTargetException $cce) { - $this->addWarning( - $test, - new Warning( - $cce->getMessage() - ), - $time - ); - } - } - - try { - $this->codeCoverage->stop( - $append, - $linesToBeCovered, - $linesToBeUsed - ); - } catch (UnintentionallyCoveredCodeException $cce) { - $this->addFailure( - $test, - new UnintentionallyCoveredCodeError( - 'This test executed code that is not listed as code to be covered or used:' . - \PHP_EOL . $cce->getMessage() - ), - $time - ); - } catch (OriginalCoveredCodeNotExecutedException $cce) { - $this->addFailure( - $test, - new CoveredCodeNotExecutedException( - 'This test did not execute all the code that is listed as code to be covered:' . - \PHP_EOL . $cce->getMessage() - ), - $time - ); - } catch (OriginalMissingCoversAnnotationException $cce) { - if ($linesToBeCovered !== false) { - $this->addFailure( - $test, - new MissingCoversAnnotationException( - 'This test does not have a @covers annotation but is expected to have one' - ), - $time - ); - } - } catch (OriginalCodeCoverageException $cce) { - $error = true; - - $e = $e ?? $cce; - } - } - - if (isset($errorHandler)) { - $errorHandler->unregister(); - - unset($errorHandler); - } - - if ($error) { - $this->addError($test, $e, $time); - } elseif ($failure) { - $this->addFailure($test, $e, $time); - } elseif ($warning) { - $this->addWarning($test, $e, $time); - } elseif ($this->beStrictAboutTestsThatDoNotTestAnything && - !$test->doesNotPerformAssertions() && - $test->getNumAssertions() == 0) { - try { - $reflected = new \ReflectionClass($test); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $name = $test->getName(false); - - if ($name && $reflected->hasMethod($name)) { - try { - $reflected = $reflected->getMethod($name); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } - - $this->addFailure( - $test, - new RiskyTestError( - \sprintf( - "This test did not perform any assertions\n\n%s:%d", - $reflected->getFileName(), - $reflected->getStartLine() - ) - ), - $time - ); - } elseif ($this->beStrictAboutTestsThatDoNotTestAnything && - $test->doesNotPerformAssertions() && - $test->getNumAssertions() > 0) { - $this->addFailure( - $test, - new RiskyTestError( - \sprintf( - 'This test is annotated with "@doesNotPerformAssertions" but performed %d assertions', - $test->getNumAssertions() - ) - ), - $time - ); - } elseif ($this->beStrictAboutOutputDuringTests && $test->hasOutput()) { - $this->addFailure( - $test, - new OutputError( - \sprintf( - 'This test printed output: %s', - $test->getActualOutput() - ) - ), - $time - ); - } elseif ($this->beStrictAboutTodoAnnotatedTests && $test instanceof TestCase) { - $annotations = $test->getAnnotations(); - - if (isset($annotations['method']['todo'])) { - $this->addFailure( - $test, - new RiskyTestError( - 'Test method is annotated with @todo' - ), - $time - ); - } - } - - $this->endTest($test, $time); - } - - /** - * Gets the number of run tests. - */ - public function count(): int - { - return $this->runTests; - } - - /** - * Checks whether the test run should stop. - */ - public function shouldStop(): bool - { - return $this->stop; - } - - /** - * Marks that the test run should stop. - */ - public function stop(): void - { - $this->stop = true; - } - - /** - * Returns the code coverage object. - */ - public function getCodeCoverage(): ?CodeCoverage - { - return $this->codeCoverage; - } - - /** - * Sets the code coverage object. - */ - public function setCodeCoverage(CodeCoverage $codeCoverage): void - { - $this->codeCoverage = $codeCoverage; - } - - /** - * Enables or disables the deprecation-to-exception conversion. - */ - public function convertDeprecationsToExceptions(bool $flag): void - { - $this->convertDeprecationsToExceptions = $flag; - } - - /** - * Returns the deprecation-to-exception conversion setting. - */ - public function getConvertDeprecationsToExceptions(): bool - { - return $this->convertDeprecationsToExceptions; - } - - /** - * Enables or disables the error-to-exception conversion. - */ - public function convertErrorsToExceptions(bool $flag): void - { - $this->convertErrorsToExceptions = $flag; - } - - /** - * Returns the error-to-exception conversion setting. - */ - public function getConvertErrorsToExceptions(): bool - { - return $this->convertErrorsToExceptions; - } - - /** - * Enables or disables the notice-to-exception conversion. - */ - public function convertNoticesToExceptions(bool $flag): void - { - $this->convertNoticesToExceptions = $flag; - } - - /** - * Returns the notice-to-exception conversion setting. - */ - public function getConvertNoticesToExceptions(): bool - { - return $this->convertNoticesToExceptions; - } - - /** - * Enables or disables the warning-to-exception conversion. - */ - public function convertWarningsToExceptions(bool $flag): void - { - $this->convertWarningsToExceptions = $flag; - } - - /** - * Returns the warning-to-exception conversion setting. - */ - public function getConvertWarningsToExceptions(): bool - { - return $this->convertWarningsToExceptions; - } - - /** - * Enables or disables the stopping when an error occurs. - */ - public function stopOnError(bool $flag): void - { - $this->stopOnError = $flag; - } - - /** - * Enables or disables the stopping when a failure occurs. - */ - public function stopOnFailure(bool $flag): void - { - $this->stopOnFailure = $flag; - } - - /** - * Enables or disables the stopping when a warning occurs. - */ - public function stopOnWarning(bool $flag): void - { - $this->stopOnWarning = $flag; - } - - public function beStrictAboutTestsThatDoNotTestAnything(bool $flag): void - { - $this->beStrictAboutTestsThatDoNotTestAnything = $flag; - } - - public function isStrictAboutTestsThatDoNotTestAnything(): bool - { - return $this->beStrictAboutTestsThatDoNotTestAnything; - } - - public function beStrictAboutOutputDuringTests(bool $flag): void - { - $this->beStrictAboutOutputDuringTests = $flag; - } - - public function isStrictAboutOutputDuringTests(): bool - { - return $this->beStrictAboutOutputDuringTests; - } - - public function beStrictAboutResourceUsageDuringSmallTests(bool $flag): void - { - $this->beStrictAboutResourceUsageDuringSmallTests = $flag; - } - - public function isStrictAboutResourceUsageDuringSmallTests(): bool - { - return $this->beStrictAboutResourceUsageDuringSmallTests; - } - - public function enforceTimeLimit(bool $flag): void - { - $this->enforceTimeLimit = $flag; - } - - public function enforcesTimeLimit(): bool - { - return $this->enforceTimeLimit; - } - - public function beStrictAboutTodoAnnotatedTests(bool $flag): void - { - $this->beStrictAboutTodoAnnotatedTests = $flag; - } - - public function isStrictAboutTodoAnnotatedTests(): bool - { - return $this->beStrictAboutTodoAnnotatedTests; - } - - /** - * Enables or disables the stopping for risky tests. - */ - public function stopOnRisky(bool $flag): void - { - $this->stopOnRisky = $flag; - } - - /** - * Enables or disables the stopping for incomplete tests. - */ - public function stopOnIncomplete(bool $flag): void - { - $this->stopOnIncomplete = $flag; - } - - /** - * Enables or disables the stopping for skipped tests. - */ - public function stopOnSkipped(bool $flag): void - { - $this->stopOnSkipped = $flag; - } - - /** - * Enables or disables the stopping for defects: error, failure, warning - */ - public function stopOnDefect(bool $flag): void - { - $this->stopOnDefect = $flag; - } - - /** - * Returns the time spent running the tests. - */ - public function time(): float - { - return $this->time; - } - - /** - * Returns whether the entire test was successful or not. - */ - public function wasSuccessful(): bool - { - return $this->wasSuccessfulIgnoringWarnings() && empty($this->warnings); - } - - public function wasSuccessfulIgnoringWarnings(): bool - { - return empty($this->errors) && empty($this->failures); - } - - /** - * Sets the default timeout for tests - */ - public function setDefaultTimeLimit(int $timeout): void - { - $this->defaultTimeLimit = $timeout; - } - - /** - * Sets the timeout for small tests. - */ - public function setTimeoutForSmallTests(int $timeout): void - { - $this->timeoutForSmallTests = $timeout; - } - - /** - * Sets the timeout for medium tests. - */ - public function setTimeoutForMediumTests(int $timeout): void - { - $this->timeoutForMediumTests = $timeout; - } - - /** - * Sets the timeout for large tests. - */ - public function setTimeoutForLargeTests(int $timeout): void - { - $this->timeoutForLargeTests = $timeout; - } - - /** - * Returns the set timeout for large tests. - */ - public function getTimeoutForLargeTests(): int - { - return $this->timeoutForLargeTests; - } - - public function setRegisterMockObjectsFromTestArgumentsRecursively(bool $flag): void - { - $this->registerMockObjectsFromTestArgumentsRecursively = $flag; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/vendor/phpunit/phpunit/src/Framework/TestSuite.php deleted file mode 100644 index 83c9d9a..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ /dev/null @@ -1,750 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use PHPUnit\Runner\BaseTestRunner; -use PHPUnit\Runner\Filter\Factory; -use PHPUnit\Runner\PhptTestCase; -use PHPUnit\Util\FileLoader; -use PHPUnit\Util\Test as TestUtil; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class TestSuite implements \IteratorAggregate, SelfDescribing, Test -{ - /** - * Enable or disable the backup and restoration of the $GLOBALS array. - * - * @var bool - */ - protected $backupGlobals; - - /** - * Enable or disable the backup and restoration of static attributes. - * - * @var bool - */ - protected $backupStaticAttributes; - - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - - /** - * The name of the test suite. - * - * @var string - */ - protected $name = ''; - - /** - * The test groups of the test suite. - * - * @var array - */ - protected $groups = []; - - /** - * The tests in the test suite. - * - * @var Test[] - */ - protected $tests = []; - - /** - * The number of tests in the test suite. - * - * @var int - */ - protected $numTests = -1; - - /** - * @var bool - */ - protected $testCase = false; - - /** - * @var string[] - */ - protected $foundClasses = []; - - /** - * Last count of tests in this suite. - * - * @var null|int - */ - private $cachedNumTests; - - /** - * @var bool - */ - private $beStrictAboutChangesToGlobalState; - - /** - * @var Factory - */ - private $iteratorFilter; - - /** - * @var string[] - */ - private $declaredClasses; - - /** - * Constructs a new TestSuite: - * - * - PHPUnit\Framework\TestSuite() constructs an empty TestSuite. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass) constructs a - * TestSuite from the given class. - * - * - PHPUnit\Framework\TestSuite(ReflectionClass, String) - * constructs a TestSuite from the given class with the given - * name. - * - * - PHPUnit\Framework\TestSuite(String) either constructs a - * TestSuite from the given class (if the passed string is the - * name of an existing class) or constructs an empty TestSuite - * with the given name. - * - * @param \ReflectionClass|string $theClass - * - * @throws Exception - */ - public function __construct($theClass = '', string $name = '') - { - if (!\is_string($theClass) && !$theClass instanceof \ReflectionClass) { - throw InvalidArgumentException::create( - 1, - 'ReflectionClass object or string' - ); - } - - $this->declaredClasses = \get_declared_classes(); - - if (!$theClass instanceof \ReflectionClass) { - if (\class_exists($theClass, true)) { - if ($name === '') { - $name = $theClass; - } - - try { - $theClass = new \ReflectionClass($theClass); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } else { - $this->setName($theClass); - - return; - } - } - - if (!$theClass->isSubclassOf(TestCase::class)) { - $this->setName((string) $theClass); - - return; - } - - if ($name !== '') { - $this->setName($name); - } else { - $this->setName($theClass->getName()); - } - - $constructor = $theClass->getConstructor(); - - if ($constructor !== null && - !$constructor->isPublic()) { - $this->addTest( - new WarningTestCase( - \sprintf( - 'Class "%s" has no public constructor.', - $theClass->getName() - ) - ) - ); - - return; - } - - foreach ($theClass->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() === Assert::class) { - continue; - } - - if ($method->getDeclaringClass()->getName() === TestCase::class) { - continue; - } - - $this->addTestMethod($theClass, $method); - } - - if (empty($this->tests)) { - $this->addTest( - new WarningTestCase( - \sprintf( - 'No tests found in class "%s".', - $theClass->getName() - ) - ) - ); - } - - $this->testCase = true; - } - - /** - * Returns a string representation of the test suite. - */ - public function toString(): string - { - return $this->getName(); - } - - /** - * Adds a test to the suite. - * - * @param array $groups - */ - public function addTest(Test $test, $groups = []): void - { - try { - $class = new \ReflectionClass($test); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$class->isAbstract()) { - $this->tests[] = $test; - $this->numTests = -1; - - if ($test instanceof self && empty($groups)) { - $groups = $test->getGroups(); - } - - if (empty($groups)) { - $groups = ['default']; - } - - foreach ($groups as $group) { - if (!isset($this->groups[$group])) { - $this->groups[$group] = [$test]; - } else { - $this->groups[$group][] = $test; - } - } - - if ($test instanceof TestCase) { - $test->setGroups($groups); - } - } - } - - /** - * Adds the tests from the given class to the suite. - * - * @param object|string $testClass - * - * @throws Exception - */ - public function addTestSuite($testClass): void - { - if (!(\is_object($testClass) || (\is_string($testClass) && \class_exists($testClass)))) { - throw InvalidArgumentException::create( - 1, - 'class name or object' - ); - } - - if (!\is_object($testClass)) { - try { - $testClass = new \ReflectionClass($testClass); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } - - if ($testClass instanceof self) { - $this->addTest($testClass); - } elseif ($testClass instanceof \ReflectionClass) { - $suiteMethod = false; - - if (!$testClass->isAbstract() && $testClass->hasMethod(BaseTestRunner::SUITE_METHODNAME)) { - try { - $method = $testClass->getMethod( - BaseTestRunner::SUITE_METHODNAME - ); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($method->isStatic()) { - $this->addTest( - $method->invoke(null, $testClass->getName()) - ); - - $suiteMethod = true; - } - } - - if (!$suiteMethod && !$testClass->isAbstract() && $testClass->isSubclassOf(TestCase::class)) { - $this->addTest(new self($testClass)); - } - } else { - throw new Exception; - } - } - - /** - * Wraps both addTest() and addTestSuite - * as well as the separate import statements for the user's convenience. - * - * If the named file cannot be read or there are no new tests that can be - * added, a PHPUnit\Framework\WarningTestCase will be created instead, - * leaving the current test run untouched. - * - * @throws Exception - */ - public function addTestFile(string $filename): void - { - if (\file_exists($filename) && \substr($filename, -5) === '.phpt') { - $this->addTest( - new PhptTestCase($filename) - ); - - return; - } - - // The given file may contain further stub classes in addition to the - // test class itself. Figure out the actual test class. - $filename = FileLoader::checkAndLoad($filename); - $newClasses = \array_diff(\get_declared_classes(), $this->declaredClasses); - - // The diff is empty in case a parent class (with test methods) is added - // AFTER a child class that inherited from it. To account for that case, - // accumulate all discovered classes, so the parent class may be found in - // a later invocation. - if (!empty($newClasses)) { - // On the assumption that test classes are defined first in files, - // process discovered classes in approximate LIFO order, so as to - // avoid unnecessary reflection. - $this->foundClasses = \array_merge($newClasses, $this->foundClasses); - $this->declaredClasses = \get_declared_classes(); - } - - // The test class's name must match the filename, either in full, or as - // a PEAR/PSR-0 prefixed short name ('NameSpace_ShortName'), or as a - // PSR-1 local short name ('NameSpace\ShortName'). The comparison must be - // anchored to prevent false-positive matches (e.g., 'OtherShortName'). - $shortName = \basename($filename, '.php'); - $shortNameRegEx = '/(?:^|_|\\\\)' . \preg_quote($shortName, '/') . '$/'; - - foreach ($this->foundClasses as $i => $className) { - if (\preg_match($shortNameRegEx, $className)) { - try { - $class = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($class->getFileName() == $filename) { - $newClasses = [$className]; - unset($this->foundClasses[$i]); - - break; - } - } - } - - foreach ($newClasses as $className) { - try { - $class = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (\dirname($class->getFileName()) === __DIR__) { - continue; - } - - if (!$class->isAbstract()) { - if ($class->hasMethod(BaseTestRunner::SUITE_METHODNAME)) { - try { - $method = $class->getMethod( - BaseTestRunner::SUITE_METHODNAME - ); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($method->isStatic()) { - $this->addTest($method->invoke(null, $className)); - } - } elseif ($class->implementsInterface(Test::class)) { - $this->addTestSuite($class); - } - } - } - - $this->numTests = -1; - } - - /** - * Wrapper for addTestFile() that adds multiple test files. - * - * @throws Exception - */ - public function addTestFiles(iterable $fileNames): void - { - foreach ($fileNames as $filename) { - $this->addTestFile((string) $filename); - } - } - - /** - * Counts the number of test cases that will be run by this test. - */ - public function count(bool $preferCache = false): int - { - if ($preferCache && $this->cachedNumTests !== null) { - return $this->cachedNumTests; - } - - $numTests = 0; - - foreach ($this as $test) { - $numTests += \count($test); - } - - $this->cachedNumTests = $numTests; - - return $numTests; - } - - /** - * Returns the name of the suite. - */ - public function getName(): string - { - return $this->name; - } - - /** - * Returns the test groups of the suite. - */ - public function getGroups(): array - { - return \array_keys($this->groups); - } - - public function getGroupDetails(): array - { - return $this->groups; - } - - /** - * Set tests groups of the test case - */ - public function setGroupDetails(array $groups): void - { - $this->groups = $groups; - } - - /** - * Runs the tests and collects their result in a TestResult. - * - * @throws \PHPUnit\Framework\CodeCoverageException - * @throws \SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\MissingCoversAnnotationException - * @throws \SebastianBergmann\CodeCoverage\RuntimeException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Warning - */ - public function run(TestResult $result = null): TestResult - { - if ($result === null) { - $result = $this->createResult(); - } - - if (\count($this) === 0) { - return $result; - } - - /** @psalm-var class-string $className */ - $className = $this->name; - $hookMethods = TestUtil::getHookMethods($className); - - $result->startTestSuite($this); - - try { - foreach ($hookMethods['beforeClass'] as $beforeClassMethod) { - if ($this->testCase && - \class_exists($this->name, false) && - \method_exists($this->name, $beforeClassMethod)) { - if ($missingRequirements = TestUtil::getMissingRequirements($this->name, $beforeClassMethod)) { - $this->markTestSuiteSkipped(\implode(\PHP_EOL, $missingRequirements)); - } - - \call_user_func([$this->name, $beforeClassMethod]); - } - } - } catch (SkippedTestSuiteError $error) { - foreach ($this->tests() as $test) { - $result->startTest($test); - $result->addFailure($test, $error, 0); - $result->endTest($test, 0); - } - - $result->endTestSuite($this); - - return $result; - } catch (\Throwable $t) { - foreach ($this->tests() as $test) { - if ($result->shouldStop()) { - break; - } - - $result->startTest($test); - $result->addError($test, $t, 0); - $result->endTest($test, 0); - } - - $result->endTestSuite($this); - - return $result; - } - - foreach ($this as $test) { - if ($result->shouldStop()) { - break; - } - - if ($test instanceof TestCase || $test instanceof self) { - $test->setBeStrictAboutChangesToGlobalState($this->beStrictAboutChangesToGlobalState); - $test->setBackupGlobals($this->backupGlobals); - $test->setBackupStaticAttributes($this->backupStaticAttributes); - $test->setRunTestInSeparateProcess($this->runTestInSeparateProcess); - } - - $test->run($result); - } - - try { - foreach ($hookMethods['afterClass'] as $afterClassMethod) { - if ($this->testCase && - \class_exists($this->name, false) && - \method_exists($this->name, $afterClassMethod)) { - \call_user_func([$this->name, $afterClassMethod]); - } - } - } catch (\Throwable $t) { - $message = "Exception in {$this->name}::$afterClassMethod" . \PHP_EOL . $t->getMessage(); - $error = new SyntheticError($message, 0, $t->getFile(), $t->getLine(), $t->getTrace()); - - $placeholderTest = clone $test; - $placeholderTest->setName($afterClassMethod); - - $result->startTest($placeholderTest); - $result->addFailure($placeholderTest, $error, 0); - $result->endTest($placeholderTest, 0); - } - - $result->endTestSuite($this); - - return $result; - } - - public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void - { - $this->runTestInSeparateProcess = $runTestInSeparateProcess; - } - - public function setName(string $name): void - { - $this->name = $name; - } - - /** - * Returns the test at the given index. - * - * @return false|Test - */ - public function testAt(int $index) - { - return $this->tests[$index] ?? false; - } - - /** - * Returns the tests as an enumeration. - * - * @return Test[] - */ - public function tests(): array - { - return $this->tests; - } - - /** - * Set tests of the test suite - * - * @param Test[] $tests - */ - public function setTests(array $tests): void - { - $this->tests = $tests; - } - - /** - * Mark the test suite as skipped. - * - * @param string $message - * - * @throws SkippedTestSuiteError - */ - public function markTestSuiteSkipped($message = ''): void - { - throw new SkippedTestSuiteError($message); - } - - /** - * @param bool $beStrictAboutChangesToGlobalState - */ - public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState): void - { - if (null === $this->beStrictAboutChangesToGlobalState && \is_bool($beStrictAboutChangesToGlobalState)) { - $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; - } - } - - /** - * @param bool $backupGlobals - */ - public function setBackupGlobals($backupGlobals): void - { - if (null === $this->backupGlobals && \is_bool($backupGlobals)) { - $this->backupGlobals = $backupGlobals; - } - } - - /** - * @param bool $backupStaticAttributes - */ - public function setBackupStaticAttributes($backupStaticAttributes): void - { - if (null === $this->backupStaticAttributes && \is_bool($backupStaticAttributes)) { - $this->backupStaticAttributes = $backupStaticAttributes; - } - } - - /** - * Returns an iterator for this test suite. - */ - public function getIterator(): \Iterator - { - $iterator = new TestSuiteIterator($this); - - if ($this->iteratorFilter !== null) { - $iterator = $this->iteratorFilter->factory($iterator, $this); - } - - return $iterator; - } - - public function injectFilter(Factory $filter): void - { - $this->iteratorFilter = $filter; - - foreach ($this as $test) { - if ($test instanceof self) { - $test->injectFilter($filter); - } - } - } - - /** - * Creates a default TestResult object. - */ - protected function createResult(): TestResult - { - return new TestResult; - } - - /** - * @throws Exception - */ - protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method): void - { - if (!TestUtil::isTestMethod($method)) { - return; - } - - $methodName = $method->getName(); - - if (!$method->isPublic()) { - $this->addTest( - new WarningTestCase( - \sprintf( - 'Test method "%s" in test class "%s" is not public.', - $methodName, - $class->getName() - ) - ) - ); - - return; - } - - $test = (new TestBuilder)->build($class, $methodName); - - if ($test instanceof TestCase || $test instanceof DataProviderTestSuite) { - $test->setDependencies( - TestUtil::getDependencies($class->getName(), $methodName) - ); - } - - $this->addTest( - $test, - TestUtil::getGroups($class->getName(), $methodName) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php b/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php deleted file mode 100644 index a6fb1dc..0000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use RecursiveIterator; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteIterator implements RecursiveIterator -{ - /** - * @var int - */ - private $position = 0; - - /** - * @var Test[] - */ - private $tests; - - public function __construct(TestSuite $testSuite) - { - $this->tests = $testSuite->tests(); - } - - /** - * Rewinds the Iterator to the first element. - */ - public function rewind(): void - { - $this->position = 0; - } - - /** - * Checks if there is a current element after calls to rewind() or next(). - */ - public function valid(): bool - { - return $this->position < \count($this->tests); - } - - /** - * Returns the key of the current element. - */ - public function key(): int - { - return $this->position; - } - - /** - * Returns the current element. - */ - public function current(): ?Test - { - return $this->valid() ? $this->tests[$this->position] : null; - } - - /** - * Moves forward to next element. - */ - public function next(): void - { - $this->position++; - } - - /** - * Returns the sub iterator for the current element. - * - * @throws \UnexpectedValueException if the current element is no TestSuite - */ - public function getChildren(): self - { - if (!$this->hasChildren()) { - throw new UnexpectedValueException( - 'The current item is no TestSuite instance and hence cannot have any children.', - 1567849414 - ); - } - - /** @var TestSuite $current */ - $current = $this->current(); - - return new self($current); - } - - /** - * Checks whether the current element has children. - */ - public function hasChildren(): bool - { - return $this->current() instanceof TestSuite; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php b/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php deleted file mode 100644 index 381cf19..0000000 --- a/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class WarningTestCase extends TestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var bool - */ - protected $backupStaticAttributes = false; - - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - - /** - * @var bool - */ - protected $useErrorHandler = false; - - /** - * @var string - */ - private $message; - - /** - * @param string $message - */ - public function __construct($message = '') - { - $this->message = $message; - parent::__construct('Warning'); - } - - public function getMessage(): string - { - return $this->message; - } - - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - return 'Warning'; - } - - /** - * @throws Exception - */ - protected function runTest(): void - { - throw new Warning($this->message); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php b/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php deleted file mode 100644 index c302dad..0000000 --- a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestSuite; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class BaseTestRunner -{ - /** - * @var int - */ - public const STATUS_UNKNOWN = -1; - - /** - * @var int - */ - public const STATUS_PASSED = 0; - - /** - * @var int - */ - public const STATUS_SKIPPED = 1; - - /** - * @var int - */ - public const STATUS_INCOMPLETE = 2; - - /** - * @var int - */ - public const STATUS_FAILURE = 3; - - /** - * @var int - */ - public const STATUS_ERROR = 4; - - /** - * @var int - */ - public const STATUS_RISKY = 5; - - /** - * @var int - */ - public const STATUS_WARNING = 6; - - /** - * @var string - */ - public const SUITE_METHODNAME = 'suite'; - - /** - * Returns the loader to be used. - */ - public function getLoader(): TestSuiteLoader - { - return new StandardTestSuiteLoader; - } - - /** - * Returns the Test corresponding to the given suite. - * This is a template method, subclasses override - * the runFailed() and clearStatus() methods. - * - * @param string|string[] $suffixes - * - * @throws Exception - */ - public function getTest(string $suiteClassName, string $suiteClassFile = '', $suffixes = ''): ?Test - { - if (empty($suiteClassFile) && \is_dir($suiteClassName) && !\is_file($suiteClassName . '.php')) { - /** @var string[] $files */ - $files = (new FileIteratorFacade)->getFilesAsArray( - $suiteClassName, - $suffixes - ); - - $suite = new TestSuite($suiteClassName); - $suite->addTestFiles($files); - - return $suite; - } - - try { - $testClass = $this->loadSuiteClass( - $suiteClassName, - $suiteClassFile - ); - } catch (Exception $e) { - $this->runFailed($e->getMessage()); - - return null; - } - - try { - $suiteMethod = $testClass->getMethod(self::SUITE_METHODNAME); - - if (!$suiteMethod->isStatic()) { - $this->runFailed( - 'suite() method must be static.' - ); - - return null; - } - - $test = $suiteMethod->invoke(null, $testClass->getName()); - } catch (\ReflectionException $e) { - try { - $test = new TestSuite($testClass); - } catch (Exception $e) { - $test = new TestSuite; - $test->setName($suiteClassName); - } - } - - $this->clearStatus(); - - return $test; - } - - /** - * Returns the loaded ReflectionClass for a suite name. - */ - protected function loadSuiteClass(string $suiteClassName, string $suiteClassFile = ''): \ReflectionClass - { - return $this->getLoader()->load($suiteClassName, $suiteClassFile); - } - - /** - * Clears the status message. - */ - protected function clearStatus(): void - { - } - - /** - * Override to define how to handle a failed loading of - * a test suite. - */ - abstract protected function runFailed(string $message): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php b/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php deleted file mode 100644 index a56ceab..0000000 --- a/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use PHPUnit\Util\ErrorHandler; -use PHPUnit\Util\Filesystem; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DefaultTestResultCache implements \Serializable, TestResultCache -{ - /** - * @var string - */ - public const DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache'; - - /** - * Provide extra protection against incomplete or corrupt caches - * - * @var int[] - */ - private const ALLOWED_CACHE_TEST_STATUSES = [ - BaseTestRunner::STATUS_SKIPPED, - BaseTestRunner::STATUS_INCOMPLETE, - BaseTestRunner::STATUS_FAILURE, - BaseTestRunner::STATUS_ERROR, - BaseTestRunner::STATUS_RISKY, - BaseTestRunner::STATUS_WARNING, - ]; - - /** - * Path and filename for result cache file - * - * @var string - */ - private $cacheFilename; - - /** - * The list of defective tests - * - * - * // Mark a test skipped - * $this->defects[$testName] = BaseTestRunner::TEST_SKIPPED; - * - * - * @var array - */ - private $defects = []; - - /** - * The list of execution duration of suites and tests (in seconds) - * - * - * // Record running time for test - * $this->times[$testName] = 1.234; - * - * - * @var array - */ - private $times = []; - - public function __construct(?string $filepath = null) - { - if ($filepath !== null && \is_dir($filepath)) { - // cache path provided, use default cache filename in that location - $filepath .= \DIRECTORY_SEPARATOR . self::DEFAULT_RESULT_CACHE_FILENAME; - } - - $this->cacheFilename = $filepath ?? $_ENV['PHPUNIT_RESULT_CACHE'] ?? self::DEFAULT_RESULT_CACHE_FILENAME; - } - - /** - * @throws Exception - */ - public function persist(): void - { - $this->saveToFile(); - } - - /** - * @throws Exception - */ - public function saveToFile(): void - { - if (\defined('PHPUNIT_TESTSUITE_RESULTCACHE')) { - return; - } - - if (!Filesystem::createDirectory(\dirname($this->cacheFilename))) { - throw new Exception( - \sprintf( - 'Cannot create directory "%s" for result cache file', - $this->cacheFilename - ) - ); - } - - \file_put_contents( - $this->cacheFilename, - \serialize($this) - ); - } - - public function setState(string $testName, int $state): void - { - if ($state !== BaseTestRunner::STATUS_PASSED) { - $this->defects[$testName] = $state; - } - } - - public function getState(string $testName): int - { - return $this->defects[$testName] ?? BaseTestRunner::STATUS_UNKNOWN; - } - - public function setTime(string $testName, float $time): void - { - $this->times[$testName] = $time; - } - - public function getTime(string $testName): float - { - return $this->times[$testName] ?? 0.0; - } - - public function load(): void - { - $this->clear(); - - if (!\is_file($this->cacheFilename)) { - return; - } - - $cacheData = @\file_get_contents($this->cacheFilename); - - // @codeCoverageIgnoreStart - if ($cacheData === false) { - return; - } - // @codeCoverageIgnoreEnd - - $cache = ErrorHandler::invokeIgnoringWarnings( - static function () use ($cacheData) { - return @\unserialize($cacheData, ['allowed_classes' => [self::class]]); - } - ); - - if ($cache === false) { - return; - } - - if ($cache instanceof self) { - /* @var DefaultTestResultCache $cache */ - $cache->copyStateToCache($this); - } - } - - public function copyStateToCache(self $targetCache): void - { - foreach ($this->defects as $name => $state) { - $targetCache->setState($name, $state); - } - - foreach ($this->times as $name => $time) { - $targetCache->setTime($name, $time); - } - } - - public function clear(): void - { - $this->defects = []; - $this->times = []; - } - - public function serialize(): string - { - return \serialize([ - 'defects' => $this->defects, - 'times' => $this->times, - ]); - } - - /** - * @param string $serialized - */ - public function unserialize($serialized): void - { - $data = \unserialize($serialized); - - if (isset($data['times'])) { - foreach ($data['times'] as $testName => $testTime) { - \assert(\is_string($testName)); - \assert(\is_float($testTime)); - $this->times[$testName] = $testTime; - } - } - - if (isset($data['defects'])) { - foreach ($data['defects'] as $testName => $testResult) { - \assert(\is_string($testName)); - \assert(\is_int($testResult)); - - if (\in_array($testResult, self::ALLOWED_CACHE_TEST_STATUSES, true)) { - $this->defects[$testName] = $testResult; - } - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception.php b/vendor/phpunit/phpunit/src/Runner/Exception.php deleted file mode 100644 index 44705f5..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php deleted file mode 100644 index d8a8643..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeGroupFilterIterator extends GroupFilterIterator -{ - protected function doAccept(string $hash): bool - { - return !\in_array($hash, $this->groupTests, true); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php deleted file mode 100644 index 4072ad2..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use FilterIterator; -use InvalidArgumentException; -use Iterator; -use PHPUnit\Framework\TestSuite; -use ReflectionClass; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Factory -{ - /** - * @var array - */ - private $filters = []; - - /** - * @throws InvalidArgumentException - */ - public function addFilter(ReflectionClass $filter, $args): void - { - if (!$filter->isSubclassOf(\RecursiveFilterIterator::class)) { - throw new InvalidArgumentException( - \sprintf( - 'Class "%s" does not extend RecursiveFilterIterator', - $filter->name - ) - ); - } - - $this->filters[] = [$filter, $args]; - } - - public function factory(Iterator $iterator, TestSuite $suite): FilterIterator - { - foreach ($this->filters as $filter) { - [$class, $args] = $filter; - $iterator = $class->newInstance($iterator, $args, $suite); - } - - return $iterator; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php deleted file mode 100644 index 1d778a6..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use PHPUnit\Framework\TestSuite; -use RecursiveFilterIterator; -use RecursiveIterator; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class GroupFilterIterator extends RecursiveFilterIterator -{ - /** - * @var string[] - */ - protected $groupTests = []; - - public function __construct(RecursiveIterator $iterator, array $groups, TestSuite $suite) - { - parent::__construct($iterator); - - foreach ($suite->getGroupDetails() as $group => $tests) { - if (\in_array((string) $group, $groups, true)) { - $testHashes = \array_map( - 'spl_object_hash', - $tests - ); - - $this->groupTests = \array_merge($this->groupTests, $testHashes); - } - } - } - - public function accept(): bool - { - $test = $this->getInnerIterator()->current(); - - if ($test instanceof TestSuite) { - return true; - } - - return $this->doAccept(\spl_object_hash($test)); - } - - abstract protected function doAccept(string $hash); -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php deleted file mode 100644 index 5f004f9..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncludeGroupFilterIterator extends GroupFilterIterator -{ - protected function doAccept(string $hash): bool - { - return \in_array($hash, $this->groupTests, true); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php deleted file mode 100644 index 53a5c86..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use PHPUnit\Framework\TestSuite; -use PHPUnit\Framework\WarningTestCase; -use PHPUnit\Util\RegularExpression; -use RecursiveFilterIterator; -use RecursiveIterator; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NameFilterIterator extends RecursiveFilterIterator -{ - /** - * @var string - */ - private $filter; - - /** - * @var int - */ - private $filterMin; - - /** - * @var int - */ - private $filterMax; - - /** - * @throws \Exception - */ - public function __construct(RecursiveIterator $iterator, string $filter) - { - parent::__construct($iterator); - - $this->setFilter($filter); - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function accept(): bool - { - $test = $this->getInnerIterator()->current(); - - if ($test instanceof TestSuite) { - return true; - } - - $tmp = \PHPUnit\Util\Test::describe($test); - - if ($test instanceof WarningTestCase) { - $name = $test->getMessage(); - } elseif ($tmp[0] !== '') { - $name = \implode('::', $tmp); - } else { - $name = $tmp[1]; - } - - $accepted = @\preg_match($this->filter, $name, $matches); - - if ($accepted && isset($this->filterMax)) { - $set = \end($matches); - $accepted = $set >= $this->filterMin && $set <= $this->filterMax; - } - - return (bool) $accepted; - } - - /** - * @throws \Exception - */ - private function setFilter(string $filter): void - { - if (RegularExpression::safeMatch($filter, '') === false) { - // Handles: - // * testAssertEqualsSucceeds#4 - // * testAssertEqualsSucceeds#4-8 - if (\preg_match('/^(.*?)#(\d+)(?:-(\d+))?$/', $filter, $matches)) { - if (isset($matches[3]) && $matches[2] < $matches[3]) { - $filter = \sprintf( - '%s.*with data set #(\d+)$', - $matches[1] - ); - - $this->filterMin = $matches[2]; - $this->filterMax = $matches[3]; - } else { - $filter = \sprintf( - '%s.*with data set #%s$', - $matches[1], - $matches[2] - ); - } - } // Handles: - // * testDetermineJsonError@JSON_ERROR_NONE - // * testDetermineJsonError@JSON.* - elseif (\preg_match('/^(.*?)@(.+)$/', $filter, $matches)) { - $filter = \sprintf( - '%s.*with data set "%s"$', - $matches[1], - $matches[2] - ); - } - - // Escape delimiters in regular expression. Do NOT use preg_quote, - // to keep magic characters. - $filter = \sprintf('/%s/i', \str_replace( - '/', - '\\/', - $filter - )); - } - - $this->filter = $filter; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php deleted file mode 100644 index 35ded5d..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterIncompleteTestHook extends TestHook -{ - public function executeAfterIncompleteTest(string $test, string $message, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php deleted file mode 100644 index 7dee9f9..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterLastTestHook extends Hook -{ - public function executeAfterLastTest(): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php deleted file mode 100644 index 7fe9ee7..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterRiskyTestHook extends TestHook -{ - public function executeAfterRiskyTest(string $test, string $message, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php deleted file mode 100644 index f9253b5..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterSkippedTestHook extends TestHook -{ - public function executeAfterSkippedTest(string $test, string $message, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php deleted file mode 100644 index 6b55cc8..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterSuccessfulTestHook extends TestHook -{ - public function executeAfterSuccessfulTest(string $test, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php deleted file mode 100644 index f5c23fb..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterTestErrorHook extends TestHook -{ - public function executeAfterTestError(string $test, string $message, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php deleted file mode 100644 index 9ed2939..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterTestFailureHook extends TestHook -{ - public function executeAfterTestFailure(string $test, string $message, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php deleted file mode 100644 index 7e0af80..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterTestHook extends TestHook -{ - /** - * This hook will fire after any test, regardless of the result. - * - * For more fine grained control, have a look at the other hooks - * that extend PHPUnit\Runner\Hook. - */ - public function executeAfterTest(string $test, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php deleted file mode 100644 index 12de80f..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface AfterTestWarningHook extends TestHook -{ - public function executeAfterTestWarning(string $test, string $message, float $time): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php deleted file mode 100644 index 59b6666..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface BeforeFirstTestHook extends Hook -{ - public function executeBeforeFirstTest(): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php deleted file mode 100644 index 8bbf8a9..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface BeforeTestHook extends TestHook -{ - public function executeBeforeTest(string $test): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/Hook.php b/vendor/phpunit/phpunit/src/Runner/Hook/Hook.php deleted file mode 100644 index 546f1a3..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/Hook.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface Hook -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/TestHook.php b/vendor/phpunit/phpunit/src/Runner/Hook/TestHook.php deleted file mode 100644 index 47c41f9..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/TestHook.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -interface TestHook extends Hook -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php b/vendor/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php deleted file mode 100644 index a4dfa4b..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestListener; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Framework\Warning; -use PHPUnit\Util\Test as TestUtil; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestListenerAdapter implements TestListener -{ - /** - * @var TestHook[] - */ - private $hooks = []; - - /** - * @var bool - */ - private $lastTestWasNotSuccessful; - - public function add(TestHook $hook): void - { - $this->hooks[] = $hook; - } - - public function startTest(Test $test): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof BeforeTestHook) { - $hook->executeBeforeTest(TestUtil::describeAsString($test)); - } - } - - $this->lastTestWasNotSuccessful = false; - } - - public function addError(Test $test, \Throwable $t, float $time): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterTestErrorHook) { - $hook->executeAfterTestError(TestUtil::describeAsString($test), $t->getMessage(), $time); - } - } - - $this->lastTestWasNotSuccessful = true; - } - - public function addWarning(Test $test, Warning $e, float $time): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterTestWarningHook) { - $hook->executeAfterTestWarning(TestUtil::describeAsString($test), $e->getMessage(), $time); - } - } - - $this->lastTestWasNotSuccessful = true; - } - - public function addFailure(Test $test, AssertionFailedError $e, float $time): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterTestFailureHook) { - $hook->executeAfterTestFailure(TestUtil::describeAsString($test), $e->getMessage(), $time); - } - } - - $this->lastTestWasNotSuccessful = true; - } - - public function addIncompleteTest(Test $test, \Throwable $t, float $time): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterIncompleteTestHook) { - $hook->executeAfterIncompleteTest(TestUtil::describeAsString($test), $t->getMessage(), $time); - } - } - - $this->lastTestWasNotSuccessful = true; - } - - public function addRiskyTest(Test $test, \Throwable $t, float $time): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterRiskyTestHook) { - $hook->executeAfterRiskyTest(TestUtil::describeAsString($test), $t->getMessage(), $time); - } - } - - $this->lastTestWasNotSuccessful = true; - } - - public function addSkippedTest(Test $test, \Throwable $t, float $time): void - { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterSkippedTestHook) { - $hook->executeAfterSkippedTest(TestUtil::describeAsString($test), $t->getMessage(), $time); - } - } - - $this->lastTestWasNotSuccessful = true; - } - - public function endTest(Test $test, float $time): void - { - if (!$this->lastTestWasNotSuccessful) { - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterSuccessfulTestHook) { - $hook->executeAfterSuccessfulTest(TestUtil::describeAsString($test), $time); - } - } - } - - foreach ($this->hooks as $hook) { - if ($hook instanceof AfterTestHook) { - $hook->executeAfterTest(TestUtil::describeAsString($test), $time); - } - } - } - - public function startTestSuite(TestSuite $suite): void - { - } - - public function endTestSuite(TestSuite $suite): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/NullTestResultCache.php b/vendor/phpunit/phpunit/src/Runner/NullTestResultCache.php deleted file mode 100644 index 2aa8653..0000000 --- a/vendor/phpunit/phpunit/src/Runner/NullTestResultCache.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NullTestResultCache implements TestResultCache -{ - public function setState(string $testName, int $state): void - { - } - - public function getState(string $testName): int - { - return BaseTestRunner::STATUS_UNKNOWN; - } - - public function setTime(string $testName, float $time): void - { - } - - public function getTime(string $testName): float - { - return 0; - } - - public function load(): void - { - } - - public function persist(): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php b/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php deleted file mode 100644 index 85bc722..0000000 --- a/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php +++ /dev/null @@ -1,751 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\IncompleteTestError; -use PHPUnit\Framework\PHPTAssertionFailedError; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Framework\SkippedTestError; -use PHPUnit\Framework\SyntheticSkippedError; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestResult; -use PHPUnit\Util\PHP\AbstractPhpProcess; -use SebastianBergmann\Timer\Timer; -use Text_Template; -use Throwable; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PhptTestCase implements SelfDescribing, Test -{ - /** - * @var string[] - */ - private const SETTINGS = [ - 'allow_url_fopen=1', - 'auto_append_file=', - 'auto_prepend_file=', - 'disable_functions=', - 'display_errors=1', - 'docref_root=', - 'docref_ext=.html', - 'error_append_string=', - 'error_prepend_string=', - 'error_reporting=-1', - 'html_errors=0', - 'log_errors=0', - 'magic_quotes_runtime=0', - 'output_handler=', - 'open_basedir=', - 'output_buffering=Off', - 'report_memleaks=0', - 'report_zend_debug=0', - 'safe_mode=0', - 'xdebug.default_enable=0', - ]; - - /** - * @var string - */ - private $filename; - - /** - * @var AbstractPhpProcess - */ - private $phpUtil; - - /** - * @var string - */ - private $output = ''; - - /** - * Constructs a test case with the given filename. - * - * @throws Exception - */ - public function __construct(string $filename, AbstractPhpProcess $phpUtil = null) - { - if (!\is_file($filename)) { - throw new Exception( - \sprintf( - 'File "%s" does not exist.', - $filename - ) - ); - } - - $this->filename = $filename; - $this->phpUtil = $phpUtil ?: AbstractPhpProcess::factory(); - } - - /** - * Counts the number of test cases executed by run(TestResult result). - */ - public function count(): int - { - return 1; - } - - /** - * Runs a test and collects its result in a TestResult instance. - * - * @throws Exception - * @throws \SebastianBergmann\CodeCoverage\CoveredCodeNotExecutedException - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\MissingCoversAnnotationException - * @throws \SebastianBergmann\CodeCoverage\RuntimeException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function run(TestResult $result = null): TestResult - { - if ($result === null) { - $result = new TestResult; - } - - try { - $sections = $this->parse(); - } catch (Exception $e) { - $result->startTest($this); - $result->addFailure($this, new SkippedTestError($e->getMessage()), 0); - $result->endTest($this, 0); - - return $result; - } - - $code = $this->render($sections['FILE']); - $xfail = false; - $settings = $this->parseIniSection(self::SETTINGS); - - $result->startTest($this); - - if (isset($sections['INI'])) { - $settings = $this->parseIniSection($sections['INI'], $settings); - } - - if (isset($sections['ENV'])) { - $env = $this->parseEnvSection($sections['ENV']); - $this->phpUtil->setEnv($env); - } - - $this->phpUtil->setUseStderrRedirection(true); - - if ($result->enforcesTimeLimit()) { - $this->phpUtil->setTimeout($result->getTimeoutForLargeTests()); - } - - $skip = $this->runSkip($sections, $result, $settings); - - if ($skip) { - return $result; - } - - if (isset($sections['XFAIL'])) { - $xfail = \trim($sections['XFAIL']); - } - - if (isset($sections['STDIN'])) { - $this->phpUtil->setStdin($sections['STDIN']); - } - - if (isset($sections['ARGS'])) { - $this->phpUtil->setArgs($sections['ARGS']); - } - - if ($result->getCollectCodeCoverageInformation()) { - $this->renderForCoverage($code); - } - - Timer::start(); - - $jobResult = $this->phpUtil->runJob($code, $this->stringifyIni($settings)); - $time = Timer::stop(); - $this->output = $jobResult['stdout'] ?? ''; - - if ($result->getCollectCodeCoverageInformation() && ($coverage = $this->cleanupForCoverage())) { - $result->getCodeCoverage()->append($coverage, $this, true, [], [], true); - } - - try { - $this->assertPhptExpectation($sections, $jobResult['stdout']); - } catch (AssertionFailedError $e) { - $failure = $e; - - if ($xfail !== false) { - $failure = new IncompleteTestError($xfail, 0, $e); - } elseif ($e instanceof ExpectationFailedException) { - $comparisonFailure = $e->getComparisonFailure(); - - if ($comparisonFailure) { - $diff = $comparisonFailure->getDiff(); - } else { - $diff = $e->getMessage(); - } - - $hint = $this->getLocationHintFromDiff($diff, $sections); - $trace = \array_merge($hint, \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS)); - $failure = new PHPTAssertionFailedError( - $e->getMessage(), - 0, - $trace[0]['file'], - $trace[0]['line'], - $trace, - $comparisonFailure ? $diff : '' - ); - } - - $result->addFailure($this, $failure, $time); - } catch (Throwable $t) { - $result->addError($this, $t, $time); - } - - if ($xfail !== false && $result->allCompletelyImplemented()) { - $result->addFailure($this, new IncompleteTestError('XFAIL section but test passes'), $time); - } - - $this->runClean($sections); - - $result->endTest($this, $time); - - return $result; - } - - /** - * Returns the name of the test case. - */ - public function getName(): string - { - return $this->toString(); - } - - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - return $this->filename; - } - - public function usesDataProvider(): bool - { - return false; - } - - public function getNumAssertions(): int - { - return 1; - } - - public function getActualOutput(): string - { - return $this->output; - } - - public function hasOutput(): bool - { - return !empty($this->output); - } - - /** - * Parse --INI-- section key value pairs and return as array. - * - * @param array|string - */ - private function parseIniSection($content, $ini = []): array - { - if (\is_string($content)) { - $content = \explode("\n", \trim($content)); - } - - foreach ($content as $setting) { - if (\strpos($setting, '=') === false) { - continue; - } - - $setting = \explode('=', $setting, 2); - $name = \trim($setting[0]); - $value = \trim($setting[1]); - - if ($name === 'extension' || $name === 'zend_extension') { - if (!isset($ini[$name])) { - $ini[$name] = []; - } - - $ini[$name][] = $value; - - continue; - } - - $ini[$name] = $value; - } - - return $ini; - } - - private function parseEnvSection(string $content): array - { - $env = []; - - foreach (\explode("\n", \trim($content)) as $e) { - $e = \explode('=', \trim($e), 2); - - if (!empty($e[0]) && isset($e[1])) { - $env[$e[0]] = $e[1]; - } - } - - return $env; - } - - /** - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * @throws Exception - */ - private function assertPhptExpectation(array $sections, string $output): void - { - $assertions = [ - 'EXPECT' => 'assertEquals', - 'EXPECTF' => 'assertStringMatchesFormat', - 'EXPECTREGEX' => 'assertRegExp', - ]; - - $actual = \preg_replace('/\r\n/', "\n", \trim($output)); - - foreach ($assertions as $sectionName => $sectionAssertion) { - if (isset($sections[$sectionName])) { - $sectionContent = \preg_replace('/\r\n/', "\n", \trim($sections[$sectionName])); - $expected = $sectionName === 'EXPECTREGEX' ? "/{$sectionContent}/" : $sectionContent; - - if ($expected === null) { - throw new Exception('No PHPT expectation found'); - } - - Assert::$sectionAssertion($expected, $actual); - - return; - } - } - - throw new Exception('No PHPT assertion found'); - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function runSkip(array &$sections, TestResult $result, array $settings): bool - { - if (!isset($sections['SKIPIF'])) { - return false; - } - - $skipif = $this->render($sections['SKIPIF']); - $jobResult = $this->phpUtil->runJob($skipif, $this->stringifyIni($settings)); - - if (!\strncasecmp('skip', \ltrim($jobResult['stdout']), 4)) { - $message = ''; - - if (\preg_match('/^\s*skip\s*(.+)\s*/i', $jobResult['stdout'], $skipMatch)) { - $message = \substr($skipMatch[1], 2); - } - - $hint = $this->getLocationHint($message, $sections, 'SKIPIF'); - $trace = \array_merge($hint, \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS)); - $result->addFailure( - $this, - new SyntheticSkippedError($message, 0, $trace[0]['file'], $trace[0]['line'], $trace), - 0 - ); - $result->endTest($this, 0); - - return true; - } - - return false; - } - - private function runClean(array &$sections): void - { - $this->phpUtil->setStdin(''); - $this->phpUtil->setArgs(''); - - if (isset($sections['CLEAN'])) { - $cleanCode = $this->render($sections['CLEAN']); - - $this->phpUtil->runJob($cleanCode, self::SETTINGS); - } - } - - /** - * @throws Exception - */ - private function parse(): array - { - $sections = []; - $section = ''; - - $unsupportedSections = [ - 'REDIRECTTEST', - 'REQUEST', - 'POST', - 'PUT', - 'POST_RAW', - 'GZIP_POST', - 'DEFLATE_POST', - 'GET', - 'COOKIE', - 'HEADERS', - 'CGI', - 'EXPECTHEADERS', - 'EXTENSIONS', - 'PHPDBG', - ]; - - $lineNr = 0; - - foreach (\file($this->filename) as $line) { - $lineNr++; - - if (\preg_match('/^--([_A-Z]+)--/', $line, $result)) { - $section = $result[1]; - $sections[$section] = ''; - $sections[$section . '_offset'] = $lineNr; - - continue; - } - - if (empty($section)) { - throw new Exception('Invalid PHPT file: empty section header'); - } - - $sections[$section] .= $line; - } - - if (isset($sections['FILEEOF'])) { - $sections['FILE'] = \rtrim($sections['FILEEOF'], "\r\n"); - unset($sections['FILEEOF']); - } - - $this->parseExternal($sections); - - if (!$this->validate($sections)) { - throw new Exception('Invalid PHPT file'); - } - - foreach ($unsupportedSections as $section) { - if (isset($sections[$section])) { - throw new Exception( - "PHPUnit does not support PHPT $section sections" - ); - } - } - - return $sections; - } - - /** - * @throws Exception - */ - private function parseExternal(array &$sections): void - { - $allowSections = [ - 'FILE', - 'EXPECT', - 'EXPECTF', - 'EXPECTREGEX', - ]; - $testDirectory = \dirname($this->filename) . \DIRECTORY_SEPARATOR; - - foreach ($allowSections as $section) { - if (isset($sections[$section . '_EXTERNAL'])) { - $externalFilename = \trim($sections[$section . '_EXTERNAL']); - - if (!\is_file($testDirectory . $externalFilename) || - !\is_readable($testDirectory . $externalFilename)) { - throw new Exception( - \sprintf( - 'Could not load --%s-- %s for PHPT file', - $section . '_EXTERNAL', - $testDirectory . $externalFilename - ) - ); - } - - $sections[$section] = \file_get_contents($testDirectory . $externalFilename); - } - } - } - - private function validate(array &$sections): bool - { - $requiredSections = [ - 'FILE', - [ - 'EXPECT', - 'EXPECTF', - 'EXPECTREGEX', - ], - ]; - - foreach ($requiredSections as $section) { - if (\is_array($section)) { - $foundSection = false; - - foreach ($section as $anySection) { - if (isset($sections[$anySection])) { - $foundSection = true; - - break; - } - } - - if (!$foundSection) { - return false; - } - - continue; - } - - if (!isset($sections[$section])) { - return false; - } - } - - return true; - } - - private function render(string $code): string - { - return \str_replace( - [ - '__DIR__', - '__FILE__', - ], - [ - "'" . \dirname($this->filename) . "'", - "'" . $this->filename . "'", - ], - $code - ); - } - - private function getCoverageFiles(): array - { - $baseDir = \dirname(\realpath($this->filename)) . \DIRECTORY_SEPARATOR; - $basename = \basename($this->filename, 'phpt'); - - return [ - 'coverage' => $baseDir . $basename . 'coverage', - 'job' => $baseDir . $basename . 'php', - ]; - } - - private function renderForCoverage(string &$job): void - { - $files = $this->getCoverageFiles(); - - $template = new Text_Template( - __DIR__ . '/../Util/PHP/Template/PhptTestCase.tpl' - ); - - $composerAutoload = '\'\''; - - if (\defined('PHPUNIT_COMPOSER_INSTALL') && !\defined('PHPUNIT_TESTSUITE')) { - $composerAutoload = \var_export(PHPUNIT_COMPOSER_INSTALL, true); - } - - $phar = '\'\''; - - if (\defined('__PHPUNIT_PHAR__')) { - $phar = \var_export(__PHPUNIT_PHAR__, true); - } - - $globals = ''; - - if (!empty($GLOBALS['__PHPUNIT_BOOTSTRAP'])) { - $globals = '$GLOBALS[\'__PHPUNIT_BOOTSTRAP\'] = ' . \var_export( - $GLOBALS['__PHPUNIT_BOOTSTRAP'], - true - ) . ";\n"; - } - - $template->setVar( - [ - 'composerAutoload' => $composerAutoload, - 'phar' => $phar, - 'globals' => $globals, - 'job' => $files['job'], - 'coverageFile' => $files['coverage'], - ] - ); - - \file_put_contents($files['job'], $job); - $job = $template->render(); - } - - private function cleanupForCoverage(): array - { - $files = $this->getCoverageFiles(); - $coverage = @\unserialize(\file_get_contents($files['coverage'])); - - if ($coverage === false) { - $coverage = []; - } - - foreach ($files as $file) { - @\unlink($file); - } - - return $coverage; - } - - private function stringifyIni(array $ini): array - { - $settings = []; - - foreach ($ini as $key => $value) { - if (\is_array($value)) { - foreach ($value as $val) { - $settings[] = $key . '=' . $val; - } - - continue; - } - - $settings[] = $key . '=' . $value; - } - - return $settings; - } - - private function getLocationHintFromDiff(string $message, array $sections): array - { - $needle = ''; - $previousLine = ''; - $block = 'message'; - - foreach (\preg_split('/\r\n|\r|\n/', $message) as $line) { - $line = \trim($line); - - if ($block === 'message' && $line === '--- Expected') { - $block = 'expected'; - } - - if ($block === 'expected' && $line === '@@ @@') { - $block = 'diff'; - } - - if ($block === 'diff') { - if (\strpos($line, '+') === 0) { - $needle = $this->getCleanDiffLine($previousLine); - - break; - } - - if (\strpos($line, '-') === 0) { - $needle = $this->getCleanDiffLine($line); - - break; - } - } - - if (!empty($line)) { - $previousLine = $line; - } - } - - return $this->getLocationHint($needle, $sections); - } - - private function getCleanDiffLine(string $line): string - { - if (\preg_match('/^[\-+]([\'\"]?)(.*)\1$/', $line, $matches)) { - $line = $matches[2]; - } - - return $line; - } - - private function getLocationHint(string $needle, array $sections, ?string $sectionName = null): array - { - $needle = \trim($needle); - - if (empty($needle)) { - return [[ - 'file' => \realpath($this->filename), - 'line' => 1, - ]]; - } - - if ($sectionName) { - $search = [$sectionName]; - } else { - $search = [ - // 'FILE', - 'EXPECT', - 'EXPECTF', - 'EXPECTREGEX', - ]; - } - - foreach ($search as $section) { - if (!isset($sections[$section])) { - continue; - } - - if (isset($sections[$section . '_EXTERNAL'])) { - $externalFile = \trim($sections[$section . '_EXTERNAL']); - - return [ - [ - 'file' => \realpath(\dirname($this->filename) . \DIRECTORY_SEPARATOR . $externalFile), - 'line' => 1, - ], - [ - 'file' => \realpath($this->filename), - 'line' => ($sections[$section . '_EXTERNAL_offset'] ?? 0) + 1, - ], - ]; - } - - $sectionOffset = $sections[$section . '_offset'] ?? 0; - $offset = $sectionOffset + 1; - - foreach (\preg_split('/\r\n|\r|\n/', $sections[$section]) as $line) { - if (\strpos($line, $needle) !== false) { - return [[ - 'file' => \realpath($this->filename), - 'line' => $offset, - ]]; - } - $offset++; - } - } - - if ($sectionName) { - // String not found in specified section, show user the start of the named section - return [[ - 'file' => \realpath($this->filename), - 'line' => $sectionOffset, - ]]; - } - - // No section specified, show user start of code - return [[ - 'file' => \realpath($this->filename), - 'line' => 1, - ]]; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCacheExtension.php b/vendor/phpunit/phpunit/src/Runner/ResultCacheExtension.php deleted file mode 100644 index f9a9b13..0000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCacheExtension.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ResultCacheExtension implements AfterIncompleteTestHook, AfterLastTestHook, AfterRiskyTestHook, AfterSkippedTestHook, AfterSuccessfulTestHook, AfterTestErrorHook, AfterTestFailureHook, AfterTestWarningHook -{ - /** - * @var TestResultCache - */ - private $cache; - - public function __construct(TestResultCache $cache) - { - $this->cache = $cache; - } - - public function flush(): void - { - $this->cache->persist(); - } - - public function executeAfterSuccessfulTest(string $test, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - } - - public function executeAfterIncompleteTest(string $test, string $message, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - $this->cache->setState($testName, BaseTestRunner::STATUS_INCOMPLETE); - } - - public function executeAfterRiskyTest(string $test, string $message, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - $this->cache->setState($testName, BaseTestRunner::STATUS_RISKY); - } - - public function executeAfterSkippedTest(string $test, string $message, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - $this->cache->setState($testName, BaseTestRunner::STATUS_SKIPPED); - } - - public function executeAfterTestError(string $test, string $message, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - $this->cache->setState($testName, BaseTestRunner::STATUS_ERROR); - } - - public function executeAfterTestFailure(string $test, string $message, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - $this->cache->setState($testName, BaseTestRunner::STATUS_FAILURE); - } - - public function executeAfterTestWarning(string $test, string $message, float $time): void - { - $testName = $this->getTestName($test); - - $this->cache->setTime($testName, \round($time, 3)); - $this->cache->setState($testName, BaseTestRunner::STATUS_WARNING); - } - - public function executeAfterLastTest(): void - { - $this->flush(); - } - - /** - * @param string $test A long description format of the current test - * - * @return string The test name without TestSuiteClassName:: and @dataprovider details - */ - private function getTestName(string $test): string - { - $matches = []; - - if (\preg_match('/^(?\S+::\S+)(?:(? with data set (?:#\d+|"[^"]+"))\s\()?/', $test, $matches)) { - $test = $matches['name'] . ($matches['dataname'] ?? ''); - } - - return $test; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php b/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php deleted file mode 100644 index 9126b08..0000000 --- a/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use PHPUnit\Util\FileLoader; -use PHPUnit\Util\Filesystem; -use ReflectionClass; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class StandardTestSuiteLoader implements TestSuiteLoader -{ - /** - * @throws Exception - * @throws \PHPUnit\Framework\Exception - */ - public function load(string $suiteClassName, string $suiteClassFile = ''): ReflectionClass - { - $suiteClassName = \str_replace('.php', '', \basename($suiteClassName)); - - if (empty($suiteClassFile)) { - $suiteClassFile = Filesystem::classNameToFilename( - $suiteClassName - ); - } - - $loadedClasses = \get_declared_classes(); - $filename = FileLoader::checkAndLoad($suiteClassFile); - $loadedClasses = \array_values( - \array_diff(\get_declared_classes(), $loadedClasses) - ); - - $offset = 0 - \strlen($suiteClassName); - $class = null; - - foreach ($loadedClasses as $loadedClass) { - try { - $class = new ReflectionClass($loadedClass); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($class->isAbstract()) { - continue; - } - - if (\substr($loadedClass, $offset) === $suiteClassName && - $class->getFileName() == $filename) { - $suiteClassName = $loadedClass; - - break; - } - } - - if (!\class_exists($suiteClassName, false) || - !($class instanceof ReflectionClass)) { - throw new Exception( - \sprintf( - "Class '%s' could not be found in '%s'.", - $suiteClassName, - $suiteClassFile - ) - ); - } - - return $class; - } - - public function reload(ReflectionClass $aClass): ReflectionClass - { - return $aClass; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResultCache.php b/vendor/phpunit/phpunit/src/Runner/TestResultCache.php deleted file mode 100644 index 69e6282..0000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResultCache.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface TestResultCache -{ - public function setState(string $testName, int $state): void; - - public function getState(string $testName): int; - - public function setTime(string $testName, float $time): void; - - public function getTime(string $testName): float; - - public function load(): void; - - public function persist(): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php deleted file mode 100644 index f059688..0000000 --- a/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use ReflectionClass; - -/** - * An interface to define how a test suite should be loaded. - */ -interface TestSuiteLoader -{ - public function load(string $suiteClassName, string $suiteClassFile = ''): ReflectionClass; - - public function reload(ReflectionClass $aClass): ReflectionClass; -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php deleted file mode 100644 index c75976d..0000000 --- a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php +++ /dev/null @@ -1,434 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use PHPUnit\Framework\DataProviderTestSuite; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Util\Test as TestUtil; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteSorter -{ - /** - * @var int - */ - public const ORDER_DEFAULT = 0; - - /** - * @var int - */ - public const ORDER_RANDOMIZED = 1; - - /** - * @var int - */ - public const ORDER_REVERSED = 2; - - /** - * @var int - */ - public const ORDER_DEFECTS_FIRST = 3; - - /** - * @var int - */ - public const ORDER_DURATION = 4; - - /** - * Order tests by @size annotation 'small', 'medium', 'large' - * - * @var int - */ - public const ORDER_SIZE = 5; - - /** - * List of sorting weights for all test result codes. A higher number gives higher priority. - */ - private const DEFECT_SORT_WEIGHT = [ - BaseTestRunner::STATUS_ERROR => 6, - BaseTestRunner::STATUS_FAILURE => 5, - BaseTestRunner::STATUS_WARNING => 4, - BaseTestRunner::STATUS_INCOMPLETE => 3, - BaseTestRunner::STATUS_RISKY => 2, - BaseTestRunner::STATUS_SKIPPED => 1, - BaseTestRunner::STATUS_UNKNOWN => 0, - ]; - - private const SIZE_SORT_WEIGHT = [ - TestUtil::SMALL => 1, - TestUtil::MEDIUM => 2, - TestUtil::LARGE => 3, - TestUtil::UNKNOWN => 4, - ]; - - /** - * @var array Associative array of (string => DEFECT_SORT_WEIGHT) elements - */ - private $defectSortOrder = []; - - /** - * @var TestResultCache - */ - private $cache; - - /** - * @var string[] A list of normalized names of tests before reordering - */ - private $originalExecutionOrder = []; - - /** - * @var string[] A list of normalized names of tests affected by reordering - */ - private $executionOrder = []; - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function getTestSorterUID(Test $test): string - { - if ($test instanceof PhptTestCase) { - return $test->getName(); - } - - if ($test instanceof TestCase) { - $testName = $test->getName(true); - - if (\strpos($testName, '::') === false) { - $testName = \get_class($test) . '::' . $testName; - } - - return $testName; - } - - return $test->getName(); - } - - public function __construct(?TestResultCache $cache = null) - { - $this->cache = $cache ?? new NullTestResultCache; - } - - /** - * @throws Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function reorderTestsInSuite(Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void - { - $allowedOrders = [ - self::ORDER_DEFAULT, - self::ORDER_REVERSED, - self::ORDER_RANDOMIZED, - self::ORDER_DURATION, - self::ORDER_SIZE, - ]; - - if (!\in_array($order, $allowedOrders, true)) { - throw new Exception( - '$order must be one of TestSuiteSorter::ORDER_[DEFAULT|REVERSED|RANDOMIZED|DURATION|SIZE]' - ); - } - - $allowedOrderDefects = [ - self::ORDER_DEFAULT, - self::ORDER_DEFECTS_FIRST, - ]; - - if (!\in_array($orderDefects, $allowedOrderDefects, true)) { - throw new Exception( - '$orderDefects must be one of TestSuiteSorter::ORDER_DEFAULT, TestSuiteSorter::ORDER_DEFECTS_FIRST' - ); - } - - if ($isRootTestSuite) { - $this->originalExecutionOrder = $this->calculateTestExecutionOrder($suite); - } - - if ($suite instanceof TestSuite) { - foreach ($suite as $_suite) { - $this->reorderTestsInSuite($_suite, $order, $resolveDependencies, $orderDefects, false); - } - - if ($orderDefects === self::ORDER_DEFECTS_FIRST) { - $this->addSuiteToDefectSortOrder($suite); - } - - $this->sort($suite, $order, $resolveDependencies, $orderDefects); - } - - if ($isRootTestSuite) { - $this->executionOrder = $this->calculateTestExecutionOrder($suite); - } - } - - public function getOriginalExecutionOrder(): array - { - return $this->originalExecutionOrder; - } - - public function getExecutionOrder(): array - { - return $this->executionOrder; - } - - private function sort(TestSuite $suite, int $order, bool $resolveDependencies, int $orderDefects): void - { - if (empty($suite->tests())) { - return; - } - - if ($order === self::ORDER_REVERSED) { - $suite->setTests($this->reverse($suite->tests())); - } elseif ($order === self::ORDER_RANDOMIZED) { - $suite->setTests($this->randomize($suite->tests())); - } elseif ($order === self::ORDER_DURATION && $this->cache !== null) { - $suite->setTests($this->sortByDuration($suite->tests())); - } elseif ($order === self::ORDER_SIZE) { - $suite->setTests($this->sortBySize($suite->tests())); - } - - if ($orderDefects === self::ORDER_DEFECTS_FIRST && $this->cache !== null) { - $suite->setTests($this->sortDefectsFirst($suite->tests())); - } - - if ($resolveDependencies && !($suite instanceof DataProviderTestSuite) && $this->suiteOnlyContainsTests($suite)) { - /** @var TestCase[] $tests */ - $tests = $suite->tests(); - - $suite->setTests($this->resolveDependencies($tests)); - } - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function addSuiteToDefectSortOrder(TestSuite $suite): void - { - $max = 0; - - foreach ($suite->tests() as $test) { - $testname = self::getTestSorterUID($test); - - if (!isset($this->defectSortOrder[$testname])) { - $this->defectSortOrder[$testname] = self::DEFECT_SORT_WEIGHT[$this->cache->getState($testname)]; - $max = \max($max, $this->defectSortOrder[$testname]); - } - } - - $this->defectSortOrder[$suite->getName()] = $max; - } - - private function suiteOnlyContainsTests(TestSuite $suite): bool - { - return \array_reduce( - $suite->tests(), - static function ($carry, $test) { - return $carry && ($test instanceof TestCase || $test instanceof DataProviderTestSuite); - }, - true - ); - } - - private function reverse(array $tests): array - { - return \array_reverse($tests); - } - - private function randomize(array $tests): array - { - \shuffle($tests); - - return $tests; - } - - private function sortDefectsFirst(array $tests): array - { - \usort( - $tests, - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - function ($left, $right) { - return $this->cmpDefectPriorityAndTime($left, $right); - } - ); - - return $tests; - } - - private function sortByDuration(array $tests): array - { - \usort( - $tests, - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - function ($left, $right) { - return $this->cmpDuration($left, $right); - } - ); - - return $tests; - } - - private function sortBySize(array $tests): array - { - \usort( - $tests, - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - function ($left, $right) { - return $this->cmpSize($left, $right); - } - ); - - return $tests; - } - - /** - * Comparator callback function to sort tests for "reach failure as fast as possible": - * 1. sort tests by defect weight defined in self::DEFECT_SORT_WEIGHT - * 2. when tests are equally defective, sort the fastest to the front - * 3. do not reorder successful tests - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function cmpDefectPriorityAndTime(Test $a, Test $b): int - { - $priorityA = $this->defectSortOrder[self::getTestSorterUID($a)] ?? 0; - $priorityB = $this->defectSortOrder[self::getTestSorterUID($b)] ?? 0; - - if ($priorityB <=> $priorityA) { - // Sort defect weight descending - return $priorityB <=> $priorityA; - } - - if ($priorityA || $priorityB) { - return $this->cmpDuration($a, $b); - } - - // do not change execution order - return 0; - } - - /** - * Compares test duration for sorting tests by duration ascending. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function cmpDuration(Test $a, Test $b): int - { - return $this->cache->getTime(self::getTestSorterUID($a)) <=> $this->cache->getTime(self::getTestSorterUID($b)); - } - - /** - * Compares test size for sorting tests small->medium->large->unknown - */ - private function cmpSize(Test $a, Test $b): int - { - $sizeA = ($a instanceof TestCase || $a instanceof DataProviderTestSuite) - ? $a->getSize() - : TestUtil::UNKNOWN; - $sizeB = ($b instanceof TestCase || $b instanceof DataProviderTestSuite) - ? $b->getSize() - : TestUtil::UNKNOWN; - - return self::SIZE_SORT_WEIGHT[$sizeA] <=> self::SIZE_SORT_WEIGHT[$sizeB]; - } - - /** - * Reorder Tests within a TestCase in such a way as to resolve as many dependencies as possible. - * The algorithm will leave the tests in original running order when it can. - * For more details see the documentation for test dependencies. - * - * Short description of algorithm: - * 1. Pick the next Test from remaining tests to be checked for dependencies. - * 2. If the test has no dependencies: mark done, start again from the top - * 3. If the test has dependencies but none left to do: mark done, start again from the top - * 4. When we reach the end add any leftover tests to the end. These will be marked 'skipped' during execution. - * - * @param array $tests - * - * @return array - */ - private function resolveDependencies(array $tests): array - { - $newTestOrder = []; - $i = 0; - - do { - $todoNames = \array_map( - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - static function ($test) { - return self::getTestSorterUID($test); - }, - $tests - ); - - if (!$tests[$i]->hasDependencies() || empty(\array_intersect($this->getNormalizedDependencyNames($tests[$i]), $todoNames))) { - $newTestOrder = \array_merge($newTestOrder, \array_splice($tests, $i, 1)); - $i = 0; - } else { - $i++; - } - } while (!empty($tests) && ($i < \count($tests))); - - return \array_merge($newTestOrder, $tests); - } - - /** - * @param DataProviderTestSuite|TestCase $test - * - * @return array A list of full test names as "TestSuiteClassName::testMethodName" - */ - private function getNormalizedDependencyNames($test): array - { - if ($test instanceof DataProviderTestSuite) { - $testClass = \substr($test->getName(), 0, \strpos($test->getName(), '::')); - } else { - $testClass = \get_class($test); - } - - $names = \array_map( - static function ($name) use ($testClass) { - return \strpos($name, '::') === false ? $testClass . '::' . $name : $name; - }, - $test->getDependencies() - ); - - return $names; - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function calculateTestExecutionOrder(Test $suite): array - { - $tests = []; - - if ($suite instanceof TestSuite) { - foreach ($suite->tests() as $test) { - if (!($test instanceof TestSuite)) { - $tests[] = self::getTestSorterUID($test); - } else { - $tests = \array_merge($tests, $this->calculateTestExecutionOrder($test)); - } - } - } - - return $tests; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php deleted file mode 100644 index 6e130dd..0000000 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use SebastianBergmann\Version as VersionId; - -final class Version -{ - /** - * @var string - */ - private static $pharVersion = ''; - - /** - * @var string - */ - private static $version = ''; - - /** - * Returns the current version of PHPUnit. - */ - public static function id(): string - { - if (self::$pharVersion !== '') { - return self::$pharVersion; - } - - if (self::$version === '') { - self::$version = (new VersionId('8.4.1', \dirname(__DIR__, 2)))->getVersion(); - } - - return self::$version; - } - - public static function series(): string - { - if (\strpos(self::id(), '-')) { - $version = \explode('-', self::id())[0]; - } else { - $version = self::id(); - } - - return \implode('.', \array_slice(\explode('.', $version), 0, 2)); - } - - public static function getVersionString(): string - { - return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.'; - } - - public static function getReleaseChannel(): string - { - if (\strpos(self::$pharVersion, '-') !== false) { - return '-nightly'; - } - - return ''; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command.php b/vendor/phpunit/phpunit/src/TextUI/Command.php deleted file mode 100644 index de36c6c..0000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command.php +++ /dev/null @@ -1,1315 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use PharIo\Manifest\ApplicationName; -use PharIo\Manifest\Exception as ManifestException; -use PharIo\Manifest\ManifestLoader; -use PharIo\Version\Version as PharIoVersion; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestListener; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\StandardTestSuiteLoader; -use PHPUnit\Runner\TestSuiteLoader; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\Runner\Version; -use PHPUnit\Util\Configuration; -use PHPUnit\Util\ConfigurationGenerator; -use PHPUnit\Util\FileLoader; -use PHPUnit\Util\Filesystem; -use PHPUnit\Util\Getopt; -use PHPUnit\Util\Log\TeamCity; -use PHPUnit\Util\Printer; -use PHPUnit\Util\TestDox\CliTestDoxPrinter; -use PHPUnit\Util\TextTestListRenderer; -use PHPUnit\Util\XmlTestListRenderer; -use ReflectionClass; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; - -use Throwable; - -/** - * A TestRunner for the Command Line Interface (CLI) - * PHP SAPI Module. - */ -class Command -{ - /** - * @var array - */ - protected $arguments = [ - 'listGroups' => false, - 'listSuites' => false, - 'listTests' => false, - 'listTestsXml' => false, - 'loader' => null, - 'useDefaultConfiguration' => true, - 'loadedExtensions' => [], - 'notLoadedExtensions' => [], - ]; - - /** - * @var array - */ - protected $options = []; - - /** - * @var array - */ - protected $longOptions = [ - 'atleast-version=' => null, - 'prepend=' => null, - 'bootstrap=' => null, - 'cache-result' => null, - 'do-not-cache-result' => null, - 'cache-result-file=' => null, - 'check-version' => null, - 'colors==' => null, - 'columns=' => null, - 'configuration=' => null, - 'coverage-clover=' => null, - 'coverage-crap4j=' => null, - 'coverage-html=' => null, - 'coverage-php=' => null, - 'coverage-text==' => null, - 'coverage-xml=' => null, - 'debug' => null, - 'disallow-test-output' => null, - 'disallow-resource-usage' => null, - 'disallow-todo-tests' => null, - 'default-time-limit=' => null, - 'enforce-time-limit' => null, - 'exclude-group=' => null, - 'filter=' => null, - 'generate-configuration' => null, - 'globals-backup' => null, - 'group=' => null, - 'help' => null, - 'resolve-dependencies' => null, - 'ignore-dependencies' => null, - 'include-path=' => null, - 'list-groups' => null, - 'list-suites' => null, - 'list-tests' => null, - 'list-tests-xml=' => null, - 'loader=' => null, - 'log-junit=' => null, - 'log-teamcity=' => null, - 'no-configuration' => null, - 'no-coverage' => null, - 'no-logging' => null, - 'no-interaction' => null, - 'no-extensions' => null, - 'order-by=' => null, - 'printer=' => null, - 'process-isolation' => null, - 'repeat=' => null, - 'dont-report-useless-tests' => null, - 'random-order' => null, - 'random-order-seed=' => null, - 'reverse-order' => null, - 'reverse-list' => null, - 'static-backup' => null, - 'stderr' => null, - 'stop-on-defect' => null, - 'stop-on-error' => null, - 'stop-on-failure' => null, - 'stop-on-warning' => null, - 'stop-on-incomplete' => null, - 'stop-on-risky' => null, - 'stop-on-skipped' => null, - 'fail-on-warning' => null, - 'fail-on-risky' => null, - 'strict-coverage' => null, - 'disable-coverage-ignore' => null, - 'strict-global-state' => null, - 'teamcity' => null, - 'testdox' => null, - 'testdox-group=' => null, - 'testdox-exclude-group=' => null, - 'testdox-html=' => null, - 'testdox-text=' => null, - 'testdox-xml=' => null, - 'test-suffix=' => null, - 'testsuite=' => null, - 'verbose' => null, - 'version' => null, - 'whitelist=' => null, - 'dump-xdebug-filter=' => null, - ]; - - /** - * @var bool - */ - private $versionStringPrinted = false; - - /** - * @throws \PHPUnit\Framework\Exception - */ - public static function main(bool $exit = true): int - { - return (new static)->run($_SERVER['argv'], $exit); - } - - /** - * @throws Exception - */ - public function run(array $argv, bool $exit = true): int - { - $this->handleArguments($argv); - - $runner = $this->createRunner(); - - if ($this->arguments['test'] instanceof Test) { - $suite = $this->arguments['test']; - } else { - $suite = $runner->getTest( - $this->arguments['test'], - $this->arguments['testFile'], - $this->arguments['testSuffixes'] - ); - } - - if ($this->arguments['listGroups']) { - return $this->handleListGroups($suite, $exit); - } - - if ($this->arguments['listSuites']) { - return $this->handleListSuites($exit); - } - - if ($this->arguments['listTests']) { - return $this->handleListTests($suite, $exit); - } - - if ($this->arguments['listTestsXml']) { - return $this->handleListTestsXml($suite, $this->arguments['listTestsXml'], $exit); - } - - unset($this->arguments['test'], $this->arguments['testFile']); - - try { - $result = $runner->doRun($suite, $this->arguments, $exit); - } catch (Exception $e) { - print $e->getMessage() . \PHP_EOL; - } - - $return = TestRunner::FAILURE_EXIT; - - if (isset($result) && $result->wasSuccessful()) { - $return = TestRunner::SUCCESS_EXIT; - } elseif (!isset($result) || $result->errorCount() > 0) { - $return = TestRunner::EXCEPTION_EXIT; - } - - if ($exit) { - exit($return); - } - - return $return; - } - - /** - * Create a TestRunner, override in subclasses. - */ - protected function createRunner(): TestRunner - { - return new TestRunner($this->arguments['loader']); - } - - /** - * Handles the command-line arguments. - * - * A child class of PHPUnit\TextUI\Command can hook into the argument - * parsing by adding the switch(es) to the $longOptions array and point to a - * callback method that handles the switch(es) in the child class like this - * - * - * longOptions['my-switch'] = 'myHandler'; - * // my-secondswitch will accept a value - note the equals sign - * $this->longOptions['my-secondswitch='] = 'myOtherHandler'; - * } - * - * // --my-switch -> myHandler() - * protected function myHandler() - * { - * } - * - * // --my-secondswitch foo -> myOtherHandler('foo') - * protected function myOtherHandler ($value) - * { - * } - * - * // You will also need this - the static keyword in the - * // PHPUnit\TextUI\Command will mean that it'll be - * // PHPUnit\TextUI\Command that gets instantiated, - * // not MyCommand - * public static function main($exit = true) - * { - * $command = new static; - * - * return $command->run($_SERVER['argv'], $exit); - * } - * - * } - * - * - * @throws Exception - */ - protected function handleArguments(array $argv): void - { - try { - $this->options = Getopt::getopt( - $argv, - 'd:c:hv', - \array_keys($this->longOptions) - ); - } catch (Exception $t) { - $this->exitWithErrorMessage($t->getMessage()); - } - - foreach ($this->options[0] as $option) { - switch ($option[0]) { - case '--colors': - $this->arguments['colors'] = $option[1] ?: ResultPrinter::COLOR_AUTO; - - break; - - case '--bootstrap': - $this->arguments['bootstrap'] = $option[1]; - - break; - - case '--cache-result': - $this->arguments['cacheResult'] = true; - - break; - - case '--do-not-cache-result': - $this->arguments['cacheResult'] = false; - - break; - - case '--cache-result-file': - $this->arguments['cacheResultFile'] = $option[1]; - - break; - - case '--columns': - if (\is_numeric($option[1])) { - $this->arguments['columns'] = (int) $option[1]; - } elseif ($option[1] === 'max') { - $this->arguments['columns'] = 'max'; - } - - break; - - case 'c': - case '--configuration': - $this->arguments['configuration'] = $option[1]; - - break; - - case '--coverage-clover': - $this->arguments['coverageClover'] = $option[1]; - - break; - - case '--coverage-crap4j': - $this->arguments['coverageCrap4J'] = $option[1]; - - break; - - case '--coverage-html': - $this->arguments['coverageHtml'] = $option[1]; - - break; - - case '--coverage-php': - $this->arguments['coveragePHP'] = $option[1]; - - break; - - case '--coverage-text': - if ($option[1] === null) { - $option[1] = 'php://stdout'; - } - - $this->arguments['coverageText'] = $option[1]; - $this->arguments['coverageTextShowUncoveredFiles'] = false; - $this->arguments['coverageTextShowOnlySummary'] = false; - - break; - - case '--coverage-xml': - $this->arguments['coverageXml'] = $option[1]; - - break; - - case 'd': - $ini = \explode('=', $option[1]); - - if (isset($ini[0])) { - if (isset($ini[1])) { - \ini_set($ini[0], $ini[1]); - } else { - \ini_set($ini[0], '1'); - } - } - - break; - - case '--debug': - $this->arguments['debug'] = true; - - break; - - case 'h': - case '--help': - $this->showHelp(); - exit(TestRunner::SUCCESS_EXIT); - - break; - - case '--filter': - $this->arguments['filter'] = $option[1]; - - break; - - case '--testsuite': - $this->arguments['testsuite'] = $option[1]; - - break; - - case '--generate-configuration': - $this->printVersionString(); - - print 'Generating phpunit.xml in ' . \getcwd() . \PHP_EOL . \PHP_EOL; - - print 'Bootstrap script (relative to path shown above; default: vendor/autoload.php): '; - $bootstrapScript = \trim(\fgets(\STDIN)); - - print 'Tests directory (relative to path shown above; default: tests): '; - $testsDirectory = \trim(\fgets(\STDIN)); - - print 'Source directory (relative to path shown above; default: src): '; - $src = \trim(\fgets(\STDIN)); - - if ($bootstrapScript === '') { - $bootstrapScript = 'vendor/autoload.php'; - } - - if ($testsDirectory === '') { - $testsDirectory = 'tests'; - } - - if ($src === '') { - $src = 'src'; - } - - $generator = new ConfigurationGenerator; - - \file_put_contents( - 'phpunit.xml', - $generator->generateDefaultConfiguration( - Version::series(), - $bootstrapScript, - $testsDirectory, - $src - ) - ); - - print \PHP_EOL . 'Generated phpunit.xml in ' . \getcwd() . \PHP_EOL; - - exit(TestRunner::SUCCESS_EXIT); - - break; - - case '--group': - $this->arguments['groups'] = \explode(',', $option[1]); - - break; - - case '--exclude-group': - $this->arguments['excludeGroups'] = \explode( - ',', - $option[1] - ); - - break; - - case '--test-suffix': - $this->arguments['testSuffixes'] = \explode( - ',', - $option[1] - ); - - break; - - case '--include-path': - $includePath = $option[1]; - - break; - - case '--list-groups': - $this->arguments['listGroups'] = true; - - break; - - case '--list-suites': - $this->arguments['listSuites'] = true; - - break; - - case '--list-tests': - $this->arguments['listTests'] = true; - - break; - - case '--list-tests-xml': - $this->arguments['listTestsXml'] = $option[1]; - - break; - - case '--printer': - $this->arguments['printer'] = $option[1]; - - break; - - case '--loader': - $this->arguments['loader'] = $option[1]; - - break; - - case '--log-junit': - $this->arguments['junitLogfile'] = $option[1]; - - break; - - case '--log-teamcity': - $this->arguments['teamcityLogfile'] = $option[1]; - - break; - - case '--order-by': - $this->handleOrderByOption($option[1]); - - break; - - case '--process-isolation': - $this->arguments['processIsolation'] = true; - - break; - - case '--repeat': - $this->arguments['repeat'] = (int) $option[1]; - - break; - - case '--stderr': - $this->arguments['stderr'] = true; - - break; - - case '--stop-on-defect': - $this->arguments['stopOnDefect'] = true; - - break; - - case '--stop-on-error': - $this->arguments['stopOnError'] = true; - - break; - - case '--stop-on-failure': - $this->arguments['stopOnFailure'] = true; - - break; - - case '--stop-on-warning': - $this->arguments['stopOnWarning'] = true; - - break; - - case '--stop-on-incomplete': - $this->arguments['stopOnIncomplete'] = true; - - break; - - case '--stop-on-risky': - $this->arguments['stopOnRisky'] = true; - - break; - - case '--stop-on-skipped': - $this->arguments['stopOnSkipped'] = true; - - break; - - case '--fail-on-warning': - $this->arguments['failOnWarning'] = true; - - break; - - case '--fail-on-risky': - $this->arguments['failOnRisky'] = true; - - break; - - case '--teamcity': - $this->arguments['printer'] = TeamCity::class; - - break; - - case '--testdox': - $this->arguments['printer'] = CliTestDoxPrinter::class; - - break; - - case '--testdox-group': - $this->arguments['testdoxGroups'] = \explode( - ',', - $option[1] - ); - - break; - - case '--testdox-exclude-group': - $this->arguments['testdoxExcludeGroups'] = \explode( - ',', - $option[1] - ); - - break; - - case '--testdox-html': - $this->arguments['testdoxHTMLFile'] = $option[1]; - - break; - - case '--testdox-text': - $this->arguments['testdoxTextFile'] = $option[1]; - - break; - - case '--testdox-xml': - $this->arguments['testdoxXMLFile'] = $option[1]; - - break; - - case '--no-configuration': - $this->arguments['useDefaultConfiguration'] = false; - - break; - - case '--no-extensions': - $this->arguments['noExtensions'] = true; - - break; - - case '--no-coverage': - $this->arguments['noCoverage'] = true; - - break; - - case '--no-logging': - $this->arguments['noLogging'] = true; - - break; - - case '--no-interaction': - $this->arguments['noInteraction'] = true; - - break; - - case '--globals-backup': - $this->arguments['backupGlobals'] = true; - - break; - - case '--static-backup': - $this->arguments['backupStaticAttributes'] = true; - - break; - - case 'v': - case '--verbose': - $this->arguments['verbose'] = true; - - break; - - case '--atleast-version': - if (\version_compare(Version::id(), $option[1], '>=')) { - exit(TestRunner::SUCCESS_EXIT); - } - - exit(TestRunner::FAILURE_EXIT); - - break; - - case '--version': - $this->printVersionString(); - exit(TestRunner::SUCCESS_EXIT); - - break; - - case '--dont-report-useless-tests': - $this->arguments['reportUselessTests'] = false; - - break; - - case '--strict-coverage': - $this->arguments['strictCoverage'] = true; - - break; - - case '--disable-coverage-ignore': - $this->arguments['disableCodeCoverageIgnore'] = true; - - break; - - case '--strict-global-state': - $this->arguments['beStrictAboutChangesToGlobalState'] = true; - - break; - - case '--disallow-test-output': - $this->arguments['disallowTestOutput'] = true; - - break; - - case '--disallow-resource-usage': - $this->arguments['beStrictAboutResourceUsageDuringSmallTests'] = true; - - break; - - case '--default-time-limit': - $this->arguments['defaultTimeLimit'] = (int) $option[1]; - - break; - - case '--enforce-time-limit': - $this->arguments['enforceTimeLimit'] = true; - - break; - - case '--disallow-todo-tests': - $this->arguments['disallowTodoAnnotatedTests'] = true; - - break; - - case '--reverse-list': - $this->arguments['reverseList'] = true; - - break; - - case '--check-version': - $this->handleVersionCheck(); - - break; - - case '--whitelist': - $this->arguments['whitelist'] = $option[1]; - - break; - - case '--random-order': - $this->handleOrderByOption('random'); - - break; - - case '--random-order-seed': - $this->arguments['randomOrderSeed'] = (int) $option[1]; - - break; - - case '--resolve-dependencies': - $this->handleOrderByOption('depends'); - - break; - - case '--ignore-dependencies': - $this->handleOrderByOption('no-depends'); - - break; - - case '--reverse-order': - $this->handleOrderByOption('reverse'); - - break; - - case '--dump-xdebug-filter': - $this->arguments['xdebugFilterFile'] = $option[1]; - - break; - - default: - $optionName = \str_replace('--', '', $option[0]); - - $handler = null; - - if (isset($this->longOptions[$optionName])) { - $handler = $this->longOptions[$optionName]; - } elseif (isset($this->longOptions[$optionName . '='])) { - $handler = $this->longOptions[$optionName . '=']; - } - - if (isset($handler) && \is_callable([$this, $handler])) { - $this->$handler($option[1]); - } - } - } - - $this->handleCustomTestSuite(); - - if (!isset($this->arguments['testSuffixes'])) { - $this->arguments['testSuffixes'] = ['Test.php', '.phpt']; - } - - if (!isset($this->arguments['test'])) { - if (isset($this->options[1][0])) { - $this->arguments['test'] = $this->options[1][0]; - } - - if (isset($this->options[1][1])) { - $testFile = \realpath($this->options[1][1]); - - if ($testFile === false) { - $this->exitWithErrorMessage( - \sprintf( - 'Cannot open file "%s".', - $this->options[1][1] - ) - ); - } - $this->arguments['testFile'] = $testFile; - } else { - $this->arguments['testFile'] = ''; - } - - if (isset($this->arguments['test']) && - \is_file($this->arguments['test']) && - \substr($this->arguments['test'], -5, 5) !== '.phpt') { - $this->arguments['testFile'] = \realpath($this->arguments['test']); - $this->arguments['test'] = \substr($this->arguments['test'], 0, \strrpos($this->arguments['test'], '.')); - } - - if (isset($this->arguments['test']) && - \is_string($this->arguments['test']) && - \substr($this->arguments['test'], -5, 5) === '.phpt') { - $suite = new TestSuite; - $suite->addTestFile($this->arguments['test']); - $this->arguments['test'] = $suite; - } - } - - if (isset($includePath)) { - \ini_set( - 'include_path', - $includePath . \PATH_SEPARATOR . \ini_get('include_path') - ); - } - - if ($this->arguments['loader'] !== null) { - $this->arguments['loader'] = $this->handleLoader($this->arguments['loader']); - } - - if (isset($this->arguments['configuration']) && - \is_dir($this->arguments['configuration'])) { - $configurationFile = $this->arguments['configuration'] . '/phpunit.xml'; - - if (\file_exists($configurationFile)) { - $this->arguments['configuration'] = \realpath( - $configurationFile - ); - } elseif (\file_exists($configurationFile . '.dist')) { - $this->arguments['configuration'] = \realpath( - $configurationFile . '.dist' - ); - } - } elseif (!isset($this->arguments['configuration']) && - $this->arguments['useDefaultConfiguration']) { - if (\file_exists('phpunit.xml')) { - $this->arguments['configuration'] = \realpath('phpunit.xml'); - } elseif (\file_exists('phpunit.xml.dist')) { - $this->arguments['configuration'] = \realpath( - 'phpunit.xml.dist' - ); - } - } - - if (isset($this->arguments['configuration'])) { - try { - $configuration = Configuration::getInstance( - $this->arguments['configuration'] - ); - } catch (Throwable $t) { - print $t->getMessage() . \PHP_EOL; - exit(TestRunner::FAILURE_EXIT); - } - - $phpunitConfiguration = $configuration->getPHPUnitConfiguration(); - - $configuration->handlePHPConfiguration(); - - /* - * Issue #1216 - */ - if (isset($this->arguments['bootstrap'])) { - $this->handleBootstrap($this->arguments['bootstrap']); - } elseif (isset($phpunitConfiguration['bootstrap'])) { - $this->handleBootstrap($phpunitConfiguration['bootstrap']); - } - - /* - * Issue #657 - */ - if (isset($phpunitConfiguration['stderr']) && !isset($this->arguments['stderr'])) { - $this->arguments['stderr'] = $phpunitConfiguration['stderr']; - } - - if (isset($phpunitConfiguration['extensionsDirectory']) && !isset($this->arguments['noExtensions']) && \extension_loaded('phar')) { - $this->handleExtensions($phpunitConfiguration['extensionsDirectory']); - } - - if (isset($phpunitConfiguration['columns']) && !isset($this->arguments['columns'])) { - $this->arguments['columns'] = $phpunitConfiguration['columns']; - } - - if (!isset($this->arguments['printer']) && isset($phpunitConfiguration['printerClass'])) { - $file = $phpunitConfiguration['printerFile'] ?? ''; - - $this->arguments['printer'] = $this->handlePrinter( - $phpunitConfiguration['printerClass'], - $file - ); - } - - if (isset($phpunitConfiguration['testSuiteLoaderClass'])) { - $file = $phpunitConfiguration['testSuiteLoaderFile'] ?? ''; - - $this->arguments['loader'] = $this->handleLoader( - $phpunitConfiguration['testSuiteLoaderClass'], - $file - ); - } - - if (!isset($this->arguments['testsuite']) && isset($phpunitConfiguration['defaultTestSuite'])) { - $this->arguments['testsuite'] = $phpunitConfiguration['defaultTestSuite']; - } - - if (!isset($this->arguments['test'])) { - $testSuite = $configuration->getTestSuiteConfiguration($this->arguments['testsuite'] ?? ''); - - if ($testSuite !== null) { - $this->arguments['test'] = $testSuite; - } - } - } elseif (isset($this->arguments['bootstrap'])) { - $this->handleBootstrap($this->arguments['bootstrap']); - } - - if (isset($this->arguments['printer']) && - \is_string($this->arguments['printer'])) { - $this->arguments['printer'] = $this->handlePrinter($this->arguments['printer']); - } - - if (!isset($this->arguments['test'])) { - $this->showHelp(); - exit(TestRunner::EXCEPTION_EXIT); - } - } - - /** - * Handles the loading of the PHPUnit\Runner\TestSuiteLoader implementation. - */ - protected function handleLoader(string $loaderClass, string $loaderFile = ''): ?TestSuiteLoader - { - if (!\class_exists($loaderClass, false)) { - if ($loaderFile == '') { - $loaderFile = Filesystem::classNameToFilename( - $loaderClass - ); - } - - $loaderFile = \stream_resolve_include_path($loaderFile); - - if ($loaderFile) { - require $loaderFile; - } - } - - if (\class_exists($loaderClass, false)) { - try { - $class = new ReflectionClass($loaderClass); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($class->implementsInterface(TestSuiteLoader::class) && $class->isInstantiable()) { - $object = $class->newInstance(); - - \assert($object instanceof TestSuiteLoader); - - return $object; - } - } - - if ($loaderClass == StandardTestSuiteLoader::class) { - return null; - } - - $this->exitWithErrorMessage( - \sprintf( - 'Could not use "%s" as loader.', - $loaderClass - ) - ); - - return null; - } - - /** - * Handles the loading of the PHPUnit\Util\Printer implementation. - * - * @return null|Printer|string - */ - protected function handlePrinter(string $printerClass, string $printerFile = '') - { - if (!\class_exists($printerClass, false)) { - if ($printerFile == '') { - $printerFile = Filesystem::classNameToFilename( - $printerClass - ); - } - - $printerFile = \stream_resolve_include_path($printerFile); - - if ($printerFile) { - require $printerFile; - } - } - - if (!\class_exists($printerClass)) { - $this->exitWithErrorMessage( - \sprintf( - 'Could not use "%s" as printer: class does not exist', - $printerClass - ) - ); - } - - try { - $class = new ReflectionClass($printerClass); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$class->implementsInterface(TestListener::class)) { - $this->exitWithErrorMessage( - \sprintf( - 'Could not use "%s" as printer: class does not implement %s', - $printerClass, - TestListener::class - ) - ); - } - - if (!$class->isSubclassOf(Printer::class)) { - $this->exitWithErrorMessage( - \sprintf( - 'Could not use "%s" as printer: class does not extend %s', - $printerClass, - Printer::class - ) - ); - } - - if (!$class->isInstantiable()) { - $this->exitWithErrorMessage( - \sprintf( - 'Could not use "%s" as printer: class cannot be instantiated', - $printerClass - ) - ); - } - - if ($class->isSubclassOf(ResultPrinter::class)) { - return $printerClass; - } - - $outputStream = isset($this->arguments['stderr']) ? 'php://stderr' : null; - - return $class->newInstance($outputStream); - } - - /** - * Loads a bootstrap file. - */ - protected function handleBootstrap(string $filename): void - { - try { - FileLoader::checkAndLoad($filename); - } catch (Exception $e) { - $this->exitWithErrorMessage($e->getMessage()); - } - } - - protected function handleVersionCheck(): void - { - $this->printVersionString(); - - $latestVersion = \file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit'); - $isOutdated = \version_compare($latestVersion, Version::id(), '>'); - - if ($isOutdated) { - \printf( - 'You are not using the latest version of PHPUnit.' . \PHP_EOL . - 'The latest version is PHPUnit %s.' . \PHP_EOL, - $latestVersion - ); - } else { - print 'You are using the latest version of PHPUnit.' . \PHP_EOL; - } - - exit(TestRunner::SUCCESS_EXIT); - } - - /** - * Show the help message. - */ - protected function showHelp(): void - { - $this->printVersionString(); - (new Help)->writeToConsole(); - } - - /** - * Custom callback for test suite discovery. - */ - protected function handleCustomTestSuite(): void - { - } - - private function printVersionString(): void - { - if ($this->versionStringPrinted) { - return; - } - - print Version::getVersionString() . \PHP_EOL . \PHP_EOL; - - $this->versionStringPrinted = true; - } - - private function exitWithErrorMessage(string $message): void - { - $this->printVersionString(); - - print $message . \PHP_EOL; - - exit(TestRunner::FAILURE_EXIT); - } - - private function handleExtensions(string $directory): void - { - foreach ((new FileIteratorFacade)->getFilesAsArray($directory, '.phar') as $file) { - if (!\file_exists('phar://' . $file . '/manifest.xml')) { - $this->arguments['notLoadedExtensions'][] = $file . ' is not an extension for PHPUnit'; - - continue; - } - - try { - $applicationName = new ApplicationName('phpunit/phpunit'); - $version = new PharIoVersion(Version::series()); - $manifest = ManifestLoader::fromFile('phar://' . $file . '/manifest.xml'); - - if (!$manifest->isExtensionFor($applicationName)) { - $this->arguments['notLoadedExtensions'][] = $file . ' is not an extension for PHPUnit'; - - continue; - } - - if (!$manifest->isExtensionFor($applicationName, $version)) { - $this->arguments['notLoadedExtensions'][] = $file . ' is not compatible with this version of PHPUnit'; - - continue; - } - } catch (ManifestException $e) { - $this->arguments['notLoadedExtensions'][] = $file . ': ' . $e->getMessage(); - - continue; - } - - require $file; - - $this->arguments['loadedExtensions'][] = $manifest->getName() . ' ' . $manifest->getVersion()->getVersionString(); - } - } - - private function handleListGroups(TestSuite $suite, bool $exit): int - { - $this->printVersionString(); - - print 'Available test group(s):' . \PHP_EOL; - - $groups = $suite->getGroups(); - \sort($groups); - - foreach ($groups as $group) { - \printf( - ' - %s' . \PHP_EOL, - $group - ); - } - - if ($exit) { - exit(TestRunner::SUCCESS_EXIT); - } - - return TestRunner::SUCCESS_EXIT; - } - - /** - * @throws \PHPUnit\Framework\Exception - */ - private function handleListSuites(bool $exit): int - { - $this->printVersionString(); - - print 'Available test suite(s):' . \PHP_EOL; - - $configuration = Configuration::getInstance( - $this->arguments['configuration'] - ); - - foreach ($configuration->getTestSuiteNames() as $suiteName) { - \printf( - ' - %s' . \PHP_EOL, - $suiteName - ); - } - - if ($exit) { - exit(TestRunner::SUCCESS_EXIT); - } - - return TestRunner::SUCCESS_EXIT; - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function handleListTests(TestSuite $suite, bool $exit): int - { - $this->printVersionString(); - - $renderer = new TextTestListRenderer; - - print $renderer->render($suite); - - if ($exit) { - exit(TestRunner::SUCCESS_EXIT); - } - - return TestRunner::SUCCESS_EXIT; - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function handleListTestsXml(TestSuite $suite, string $target, bool $exit): int - { - $this->printVersionString(); - - $renderer = new XmlTestListRenderer; - - \file_put_contents($target, $renderer->render($suite)); - - \printf( - 'Wrote list of tests that would have been run to %s' . \PHP_EOL, - $target - ); - - if ($exit) { - exit(TestRunner::SUCCESS_EXIT); - } - - return TestRunner::SUCCESS_EXIT; - } - - private function handleOrderByOption(string $value): void - { - foreach (\explode(',', $value) as $order) { - switch ($order) { - case 'default': - $this->arguments['executionOrder'] = TestSuiteSorter::ORDER_DEFAULT; - $this->arguments['executionOrderDefects'] = TestSuiteSorter::ORDER_DEFAULT; - $this->arguments['resolveDependencies'] = true; - - break; - - case 'defects': - $this->arguments['executionOrderDefects'] = TestSuiteSorter::ORDER_DEFECTS_FIRST; - - break; - - case 'depends': - $this->arguments['resolveDependencies'] = true; - - break; - - case 'duration': - $this->arguments['executionOrder'] = TestSuiteSorter::ORDER_DURATION; - - break; - - case 'no-depends': - $this->arguments['resolveDependencies'] = false; - - break; - - case 'random': - $this->arguments['executionOrder'] = TestSuiteSorter::ORDER_RANDOMIZED; - - break; - - case 'reverse': - $this->arguments['executionOrder'] = TestSuiteSorter::ORDER_REVERSED; - - break; - - case 'size': - $this->arguments['executionOrder'] = TestSuiteSorter::ORDER_SIZE; - - break; - - default: - $this->exitWithErrorMessage("unrecognized --order-by option: $order"); - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception.php b/vendor/phpunit/phpunit/src/TextUI/Exception.php deleted file mode 100644 index a660a87..0000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Help.php b/vendor/phpunit/phpunit/src/TextUI/Help.php deleted file mode 100644 index 9b49efd..0000000 --- a/vendor/phpunit/phpunit/src/TextUI/Help.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use PHPUnit\Util\Color; -use SebastianBergmann\Environment\Console; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Help -{ - private const LEFT_MARGIN = ' '; - - private const HELP_TEXT = [ - 'Usage' => [ - ['text' => 'phpunit [options] UnitTest [UnitTest.php]'], - ['text' => 'phpunit [options] '], - ], - 'Code Coverage Options' => [ - ['arg' => '--coverage-clover ', 'desc' => 'Generate code coverage report in Clover XML format'], - ['arg' => '--coverage-crap4j ', 'desc' => 'Generate code coverage report in Crap4J XML format'], - ['arg' => '--coverage-html ', 'desc' => 'Generate code coverage report in HTML format'], - ['arg' => '--coverage-php ', 'desc' => 'Export PHP_CodeCoverage object to file'], - ['arg' => '--coverage-text=', 'desc' => 'Generate code coverage report in text format [default: standard output]'], - ['arg' => '--coverage-xml ', 'desc' => 'Generate code coverage report in PHPUnit XML format'], - ['arg' => '--whitelist ', 'desc' => 'Whitelist for code coverage analysis'], - ['arg' => '--disable-coverage-ignore', 'desc' => 'Disable annotations for ignoring code coverage'], - ['arg' => '--no-coverage', 'desc' => 'Ignore code coverage configuration'], - ['arg' => '--dump-xdebug-filter ', 'desc' => 'Generate script to set Xdebug code coverage filter'], - ], - - 'Logging Options' => [ - ['arg' => '--log-junit ', 'desc' => 'Log test execution in JUnit XML format to file'], - ['arg' => '--log-teamcity ', 'desc' => 'Log test execution in TeamCity format to file'], - ['arg' => '--testdox-html ', 'desc' => 'Write agile documentation in HTML format to file'], - ['arg' => '--testdox-text ', 'desc' => 'Write agile documentation in Text format to file'], - ['arg' => '--testdox-xml ', 'desc' => 'Write agile documentation in XML format to file'], - ['arg' => '--reverse-list', 'desc' => 'Print defects in reverse order'], - ], - - 'Test Selection Options' => [ - ['arg' => '--filter ', 'desc' => 'Filter which tests to run'], - ['arg' => '--testsuite ', 'desc' => 'Filter which testsuite to run'], - ['arg' => '--group ', 'desc' => 'Only runs tests from the specified group(s)'], - ['arg' => '--exclude-group ', 'desc' => 'Exclude tests from the specified group(s)'], - ['arg' => '--list-groups', 'desc' => 'List available test groups'], - ['arg' => '--list-suites', 'desc' => 'List available test suites'], - ['arg' => '--list-tests', 'desc' => 'List available tests'], - ['arg' => '--list-tests-xml ', 'desc' => 'List available tests in XML format'], - ['arg' => '--test-suffix ', 'desc' => 'Only search for test in files with specified suffix(es). Default: Test.php,.phpt'], - ], - - 'Test Execution Options' => [ - ['arg' => '--dont-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'], - ['arg' => '--strict-coverage', 'desc' => 'Be strict about @covers annotation usage'], - ['arg' => '--strict-global-state', 'desc' => 'Be strict about changes to global state'], - ['arg' => '--disallow-test-output', 'desc' => 'Be strict about output during tests'], - ['arg' => '--disallow-resource-usage', 'desc' => 'Be strict about resource usage during small tests'], - ['arg' => '--enforce-time-limit', 'desc' => 'Enforce time limit based on test size'], - ['arg' => '--default-time-limit=', 'desc' => 'Timeout in seconds for tests without @small, @medium or @large'], - ['arg' => '--disallow-todo-tests', 'desc' => 'Disallow @todo-annotated tests'], - ['spacer' => ''], - - ['arg' => '--process-isolation', 'desc' => 'Run each test in a separate PHP process'], - ['arg' => '--globals-backup', 'desc' => 'Backup and restore $GLOBALS for each test'], - ['arg' => '--static-backup', 'desc' => 'Backup and restore static attributes for each test'], - ['spacer' => ''], - - ['arg' => '--colors=', 'desc' => 'Use colors in output ("never", "auto" or "always")'], - ['arg' => '--columns ', 'desc' => 'Number of columns to use for progress output'], - ['arg' => '--columns max', 'desc' => 'Use maximum number of columns for progress output'], - ['arg' => '--stderr', 'desc' => 'Write to STDERR instead of STDOUT'], - ['arg' => '--stop-on-defect', 'desc' => 'Stop execution upon first not-passed test'], - ['arg' => '--stop-on-error', 'desc' => 'Stop execution upon first error'], - ['arg' => '--stop-on-failure', 'desc' => 'Stop execution upon first error or failure'], - ['arg' => '--stop-on-warning', 'desc' => 'Stop execution upon first warning'], - ['arg' => '--stop-on-risky', 'desc' => 'Stop execution upon first risky test'], - ['arg' => '--stop-on-skipped', 'desc' => 'Stop execution upon first skipped test'], - ['arg' => '--stop-on-incomplete', 'desc' => 'Stop execution upon first incomplete test'], - ['arg' => '--fail-on-warning', 'desc' => 'Treat tests with warnings as failures'], - ['arg' => '--fail-on-risky', 'desc' => 'Treat risky tests as failures'], - ['arg' => '-v|--verbose', 'desc' => 'Output more verbose information'], - ['arg' => '--debug', 'desc' => 'Display debugging information'], - ['spacer' => ''], - - ['arg' => '--loader ', 'desc' => 'TestSuiteLoader implementation to use'], - ['arg' => '--repeat ', 'desc' => 'Runs the test(s) repeatedly'], - ['arg' => '--teamcity', 'desc' => 'Report test execution progress in TeamCity format'], - ['arg' => '--testdox', 'desc' => 'Report test execution progress in TestDox format'], - ['arg' => '--testdox-group', 'desc' => 'Only include tests from the specified group(s)'], - ['arg' => '--testdox-exclude-group', 'desc' => 'Exclude tests from the specified group(s)'], - ['arg' => '--printer ', 'desc' => 'TestListener implementation to use'], - ['spacer' => ''], - - ['arg' => '--order-by=', 'desc' => 'Run tests in order: default|defects|duration|no-depends|random|reverse|size'], - ['arg' => '--random-order-seed=', 'desc' => 'Use a specific random seed for random order'], - ['arg' => '--cache-result', 'desc' => 'Write test results to cache file'], - ['arg' => '--do-not-cache-result', 'desc' => 'Do not write test results to cache file'], - ], - - 'Configuration Options' => [ - ['arg' => '--prepend ', 'desc' => 'A PHP script that is included as early as possible'], - ['arg' => '--bootstrap ', 'desc' => 'A PHP script that is included before the tests run'], - ['arg' => '-c|--configuration ', 'desc' => 'Read configuration from XML file'], - ['arg' => '--no-configuration', 'desc' => 'Ignore default configuration file (phpunit.xml)'], - ['arg' => '--no-logging', 'desc' => 'Ignore logging configuration'], - ['arg' => '--no-extensions', 'desc' => 'Do not load PHPUnit extensions'], - ['arg' => '--include-path ', 'desc' => 'Prepend PHP\'s include_path with given path(s)'], - ['arg' => '-d ', 'desc' => 'Sets a php.ini value'], - ['arg' => '--generate-configuration', 'desc' => 'Generate configuration file with suggested settings'], - ['arg' => '--cache-result-file=', 'desc' => 'Specify result cache path and filename'], - ], - - 'Miscellaneous Options' => [ - ['arg' => '-h|--help', 'desc' => 'Prints this usage information'], - ['arg' => '--version', 'desc' => 'Prints the version and exits'], - ['arg' => '--atleast-version ', 'desc' => 'Checks that version is greater than min and exits'], - ['arg' => '--check-version', 'desc' => 'Check whether PHPUnit is the latest version'], - ], - - ]; - - /** - * @var int Number of columns required to write the longest option name to the console - */ - private $maxArgLength = 0; - - /** - * @var int Number of columns left for the description field after padding and option - */ - private $maxDescLength; - - /** - * @var bool Use color highlights for sections, options and parameters - */ - private $hasColor = false; - - public function __construct(?int $width = null, ?bool $withColor = null) - { - if ($width === null) { - $width = (new Console)->getNumberOfColumns(); - } - - if ($withColor === null) { - $this->hasColor = (new Console)->hasColorSupport(); - } else { - $this->hasColor = $withColor; - } - - foreach (self::HELP_TEXT as $section => $options) { - foreach ($options as $option) { - if (isset($option['arg'])) { - $this->maxArgLength = \max($this->maxArgLength, isset($option['arg']) ? \strlen($option['arg']) : 0); - } - } - } - - $this->maxDescLength = $width - $this->maxArgLength - 4; - } - - /** - * Write the help file to the CLI, adapting width and colors to the console - */ - public function writeToConsole(): void - { - if ($this->hasColor) { - $this->writeWithColor(); - } else { - $this->writePlaintext(); - } - } - - private function writePlaintext(): void - { - foreach (self::HELP_TEXT as $section => $options) { - print "$section:" . \PHP_EOL; - - if ($section !== 'Usage') { - print \PHP_EOL; - } - - foreach ($options as $option) { - if (isset($option['spacer'])) { - print \PHP_EOL; - } - - if (isset($option['text'])) { - print self::LEFT_MARGIN . $option['text'] . \PHP_EOL; - } - - if (isset($option['arg'])) { - $arg = \str_pad($option['arg'], $this->maxArgLength); - print self::LEFT_MARGIN . $arg . ' ' . $option['desc'] . \PHP_EOL; - } - } - - print \PHP_EOL; - } - } - - private function writeWithColor(): void - { - foreach (self::HELP_TEXT as $section => $options) { - print Color::colorize('fg-yellow', "$section:") . \PHP_EOL; - - foreach ($options as $option) { - if (isset($option['spacer'])) { - print \PHP_EOL; - } - - if (isset($option['text'])) { - print self::LEFT_MARGIN . $option['text'] . \PHP_EOL; - } - - if (isset($option['arg'])) { - $arg = Color::colorize('fg-green', \str_pad($option['arg'], $this->maxArgLength)); - $arg = \preg_replace_callback( - '/(<[^>]+>)/', - static function ($matches) { - return Color::colorize('fg-cyan', $matches[0]); - }, - $arg - ); - $desc = \explode(\PHP_EOL, \wordwrap($option['desc'], $this->maxDescLength, \PHP_EOL)); - - print self::LEFT_MARGIN . $arg . ' ' . $desc[0] . \PHP_EOL; - - for ($i = 1; $i < \count($desc); $i++) { - print \str_repeat(' ', $this->maxArgLength + 3) . $desc[$i] . \PHP_EOL; - } - } - } - - print \PHP_EOL; - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php deleted file mode 100644 index d6a68a6..0000000 --- a/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php +++ /dev/null @@ -1,571 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\InvalidArgumentException; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestFailure; -use PHPUnit\Framework\TestListener; -use PHPUnit\Framework\TestResult; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Framework\Warning; -use PHPUnit\Runner\PhptTestCase; -use PHPUnit\Util\Color; -use PHPUnit\Util\Printer; -use SebastianBergmann\Environment\Console; -use SebastianBergmann\Timer\Timer; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class ResultPrinter extends Printer implements TestListener -{ - public const EVENT_TEST_START = 0; - - public const EVENT_TEST_END = 1; - - public const EVENT_TESTSUITE_START = 2; - - public const EVENT_TESTSUITE_END = 3; - - public const COLOR_NEVER = 'never'; - - public const COLOR_AUTO = 'auto'; - - public const COLOR_ALWAYS = 'always'; - - public const COLOR_DEFAULT = self::COLOR_NEVER; - - private const AVAILABLE_COLORS = [self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS]; - - /** - * @var int - */ - protected $column = 0; - - /** - * @var int - */ - protected $maxColumn; - - /** - * @var bool - */ - protected $lastTestFailed = false; - - /** - * @var int - */ - protected $numAssertions = 0; - - /** - * @var int - */ - protected $numTests = -1; - - /** - * @var int - */ - protected $numTestsRun = 0; - - /** - * @var int - */ - protected $numTestsWidth; - - /** - * @var bool - */ - protected $colors = false; - - /** - * @var bool - */ - protected $debug = false; - - /** - * @var bool - */ - protected $verbose = false; - - /** - * @var int - */ - private $numberOfColumns; - - /** - * @var bool - */ - private $reverse; - - /** - * @var bool - */ - private $defectListPrinted = false; - - /** - * Constructor. - * - * @param null|resource|string $out - * @param int|string $numberOfColumns - * - * @throws Exception - */ - public function __construct($out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, $numberOfColumns = 80, bool $reverse = false) - { - parent::__construct($out); - - if (!\in_array($colors, self::AVAILABLE_COLORS, true)) { - throw InvalidArgumentException::create( - 3, - \vsprintf('value from "%s", "%s" or "%s"', self::AVAILABLE_COLORS) - ); - } - - if (!\is_int($numberOfColumns) && $numberOfColumns !== 'max') { - throw InvalidArgumentException::create(5, 'integer or "max"'); - } - - $console = new Console; - $maxNumberOfColumns = $console->getNumberOfColumns(); - - if ($numberOfColumns === 'max' || ($numberOfColumns !== 80 && $numberOfColumns > $maxNumberOfColumns)) { - $numberOfColumns = $maxNumberOfColumns; - } - - $this->numberOfColumns = $numberOfColumns; - $this->verbose = $verbose; - $this->debug = $debug; - $this->reverse = $reverse; - - if ($colors === self::COLOR_AUTO && $console->hasColorSupport()) { - $this->colors = true; - } else { - $this->colors = (self::COLOR_ALWAYS === $colors); - } - } - - /** - * @throws \SebastianBergmann\Timer\RuntimeException - */ - public function printResult(TestResult $result): void - { - $this->printHeader(); - $this->printErrors($result); - $this->printWarnings($result); - $this->printFailures($result); - $this->printRisky($result); - - if ($this->verbose) { - $this->printIncompletes($result); - $this->printSkipped($result); - } - - $this->printFooter($result); - } - - /** - * An error occurred. - */ - public function addError(Test $test, \Throwable $t, float $time): void - { - $this->writeProgressWithColor('fg-red, bold', 'E'); - $this->lastTestFailed = true; - } - - /** - * A failure occurred. - */ - public function addFailure(Test $test, AssertionFailedError $e, float $time): void - { - $this->writeProgressWithColor('bg-red, fg-white', 'F'); - $this->lastTestFailed = true; - } - - /** - * A warning occurred. - */ - public function addWarning(Test $test, Warning $e, float $time): void - { - $this->writeProgressWithColor('fg-yellow, bold', 'W'); - $this->lastTestFailed = true; - } - - /** - * Incomplete test. - */ - public function addIncompleteTest(Test $test, \Throwable $t, float $time): void - { - $this->writeProgressWithColor('fg-yellow, bold', 'I'); - $this->lastTestFailed = true; - } - - /** - * Risky test. - */ - public function addRiskyTest(Test $test, \Throwable $t, float $time): void - { - $this->writeProgressWithColor('fg-yellow, bold', 'R'); - $this->lastTestFailed = true; - } - - /** - * Skipped test. - */ - public function addSkippedTest(Test $test, \Throwable $t, float $time): void - { - $this->writeProgressWithColor('fg-cyan, bold', 'S'); - $this->lastTestFailed = true; - } - - /** - * A testsuite started. - */ - public function startTestSuite(TestSuite $suite): void - { - if ($this->numTests == -1) { - $this->numTests = \count($suite); - $this->numTestsWidth = \strlen((string) $this->numTests); - $this->maxColumn = $this->numberOfColumns - \strlen(' / (XXX%)') - (2 * $this->numTestsWidth); - } - } - - /** - * A testsuite ended. - */ - public function endTestSuite(TestSuite $suite): void - { - } - - /** - * A test started. - */ - public function startTest(Test $test): void - { - if ($this->debug) { - $this->write( - \sprintf( - "Test '%s' started\n", - \PHPUnit\Util\Test::describeAsString($test) - ) - ); - } - } - - /** - * A test ended. - */ - public function endTest(Test $test, float $time): void - { - if ($this->debug) { - $this->write( - \sprintf( - "Test '%s' ended\n", - \PHPUnit\Util\Test::describeAsString($test) - ) - ); - } - - if (!$this->lastTestFailed) { - $this->writeProgress('.'); - } - - if ($test instanceof TestCase) { - $this->numAssertions += $test->getNumAssertions(); - } elseif ($test instanceof PhptTestCase) { - $this->numAssertions++; - } - - $this->lastTestFailed = false; - - if ($test instanceof TestCase && !$test->hasExpectationOnOutput()) { - $this->write($test->getActualOutput()); - } - } - - protected function printDefects(array $defects, string $type): void - { - $count = \count($defects); - - if ($count == 0) { - return; - } - - if ($this->defectListPrinted) { - $this->write("\n--\n\n"); - } - - $this->write( - \sprintf( - "There %s %d %s%s:\n", - ($count == 1) ? 'was' : 'were', - $count, - $type, - ($count == 1) ? '' : 's' - ) - ); - - $i = 1; - - if ($this->reverse) { - $defects = \array_reverse($defects); - } - - foreach ($defects as $defect) { - $this->printDefect($defect, $i++); - } - - $this->defectListPrinted = true; - } - - protected function printDefect(TestFailure $defect, int $count): void - { - $this->printDefectHeader($defect, $count); - $this->printDefectTrace($defect); - } - - protected function printDefectHeader(TestFailure $defect, int $count): void - { - $this->write( - \sprintf( - "\n%d) %s\n", - $count, - $defect->getTestName() - ) - ); - } - - protected function printDefectTrace(TestFailure $defect): void - { - $e = $defect->thrownException(); - $this->write((string) $e); - - while ($e = $e->getPrevious()) { - $this->write("\nCaused by\n" . $e); - } - } - - protected function printErrors(TestResult $result): void - { - $this->printDefects($result->errors(), 'error'); - } - - protected function printFailures(TestResult $result): void - { - $this->printDefects($result->failures(), 'failure'); - } - - protected function printWarnings(TestResult $result): void - { - $this->printDefects($result->warnings(), 'warning'); - } - - protected function printIncompletes(TestResult $result): void - { - $this->printDefects($result->notImplemented(), 'incomplete test'); - } - - protected function printRisky(TestResult $result): void - { - $this->printDefects($result->risky(), 'risky test'); - } - - protected function printSkipped(TestResult $result): void - { - $this->printDefects($result->skipped(), 'skipped test'); - } - - /** - * @throws \SebastianBergmann\Timer\RuntimeException - */ - protected function printHeader(): void - { - $this->write("\n\n" . Timer::resourceUsage() . "\n\n"); - } - - protected function printFooter(TestResult $result): void - { - if (\count($result) === 0) { - $this->writeWithColor( - 'fg-black, bg-yellow', - 'No tests executed!' - ); - - return; - } - - if ($result->wasSuccessful() && - $result->allHarmless() && - $result->allCompletelyImplemented() && - $result->noneSkipped()) { - $this->writeWithColor( - 'fg-black, bg-green', - \sprintf( - 'OK (%d test%s, %d assertion%s)', - \count($result), - (\count($result) == 1) ? '' : 's', - $this->numAssertions, - ($this->numAssertions == 1) ? '' : 's' - ) - ); - } else { - if ($result->wasSuccessful()) { - $color = 'fg-black, bg-yellow'; - - if ($this->verbose || !$result->allHarmless()) { - $this->write("\n"); - } - - $this->writeWithColor( - $color, - 'OK, but incomplete, skipped, or risky tests!' - ); - } else { - $this->write("\n"); - - if ($result->errorCount()) { - $color = 'fg-white, bg-red'; - - $this->writeWithColor( - $color, - 'ERRORS!' - ); - } elseif ($result->failureCount()) { - $color = 'fg-white, bg-red'; - - $this->writeWithColor( - $color, - 'FAILURES!' - ); - } elseif ($result->warningCount()) { - $color = 'fg-black, bg-yellow'; - - $this->writeWithColor( - $color, - 'WARNINGS!' - ); - } - } - - $this->writeCountString(\count($result), 'Tests', $color, true); - $this->writeCountString($this->numAssertions, 'Assertions', $color, true); - $this->writeCountString($result->errorCount(), 'Errors', $color); - $this->writeCountString($result->failureCount(), 'Failures', $color); - $this->writeCountString($result->warningCount(), 'Warnings', $color); - $this->writeCountString($result->skippedCount(), 'Skipped', $color); - $this->writeCountString($result->notImplementedCount(), 'Incomplete', $color); - $this->writeCountString($result->riskyCount(), 'Risky', $color); - $this->writeWithColor($color, '.'); - } - } - - protected function writeProgress(string $progress): void - { - if ($this->debug) { - return; - } - - $this->write($progress); - $this->column++; - $this->numTestsRun++; - - if ($this->column == $this->maxColumn || $this->numTestsRun == $this->numTests) { - if ($this->numTestsRun == $this->numTests) { - $this->write(\str_repeat(' ', $this->maxColumn - $this->column)); - } - - $this->write( - \sprintf( - ' %' . $this->numTestsWidth . 'd / %' . - $this->numTestsWidth . 'd (%3s%%)', - $this->numTestsRun, - $this->numTests, - \floor(($this->numTestsRun / $this->numTests) * 100) - ) - ); - - if ($this->column == $this->maxColumn) { - $this->writeNewLine(); - } - } - } - - protected function writeNewLine(): void - { - $this->column = 0; - $this->write("\n"); - } - - /** - * Formats a buffer with a specified ANSI color sequence if colors are - * enabled. - */ - protected function colorizeTextBox(string $color, string $buffer): string - { - if (!$this->colors) { - return $buffer; - } - - $lines = \preg_split('/\r\n|\r|\n/', $buffer); - $padding = \max(\array_map('\strlen', $lines)); - - $styledLines = []; - - foreach ($lines as $line) { - $styledLines[] = Color::colorize($color, \str_pad($line, $padding)); - } - - return \implode(\PHP_EOL, $styledLines); - } - - /** - * Writes a buffer out with a color sequence if colors are enabled. - */ - protected function writeWithColor(string $color, string $buffer, bool $lf = true): void - { - $this->write($this->colorizeTextBox($color, $buffer)); - - if ($lf) { - $this->write(\PHP_EOL); - } - } - - /** - * Writes progress with a color sequence if colors are enabled. - */ - protected function writeProgressWithColor(string $color, string $buffer): void - { - $buffer = $this->colorizeTextBox($color, $buffer); - $this->writeProgress($buffer); - } - - private function writeCountString(int $count, string $name, string $color, bool $always = false): void - { - static $first = true; - - if ($always || $count > 0) { - $this->writeWithColor( - $color, - \sprintf( - '%s%s: %d', - !$first ? ', ' : '', - $name, - $count - ), - false - ); - - $first = false; - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php deleted file mode 100644 index 8372d2c..0000000 --- a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ /dev/null @@ -1,1341 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestListener; -use PHPUnit\Framework\TestResult; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\AfterLastTestHook; -use PHPUnit\Runner\BaseTestRunner; -use PHPUnit\Runner\BeforeFirstTestHook; -use PHPUnit\Runner\DefaultTestResultCache; -use PHPUnit\Runner\Filter\ExcludeGroupFilterIterator; -use PHPUnit\Runner\Filter\Factory; -use PHPUnit\Runner\Filter\IncludeGroupFilterIterator; -use PHPUnit\Runner\Filter\NameFilterIterator; -use PHPUnit\Runner\Hook; -use PHPUnit\Runner\NullTestResultCache; -use PHPUnit\Runner\ResultCacheExtension; -use PHPUnit\Runner\StandardTestSuiteLoader; -use PHPUnit\Runner\TestHook; -use PHPUnit\Runner\TestListenerAdapter; -use PHPUnit\Runner\TestSuiteLoader; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\Runner\Version; -use PHPUnit\Util\Configuration; -use PHPUnit\Util\Filesystem; -use PHPUnit\Util\Log\JUnit; -use PHPUnit\Util\Log\TeamCity; -use PHPUnit\Util\Printer; -use PHPUnit\Util\TestDox\CliTestDoxPrinter; -use PHPUnit\Util\TestDox\HtmlResultPrinter; -use PHPUnit\Util\TestDox\TextResultPrinter; -use PHPUnit\Util\TestDox\XmlResultPrinter; -use PHPUnit\Util\XdebugFilterScriptGenerator; -use ReflectionClass; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Exception as CodeCoverageException; -use SebastianBergmann\CodeCoverage\Filter as CodeCoverageFilter; -use SebastianBergmann\CodeCoverage\Report\Clover as CloverReport; -use SebastianBergmann\CodeCoverage\Report\Crap4j as Crap4jReport; -use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlReport; -use SebastianBergmann\CodeCoverage\Report\PHP as PhpReport; -use SebastianBergmann\CodeCoverage\Report\Text as TextReport; -use SebastianBergmann\CodeCoverage\Report\Xml\Facade as XmlReport; -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Environment\Runtime; -use SebastianBergmann\Invoker\Invoker; -use SebastianBergmann\Timer\Timer; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestRunner extends BaseTestRunner -{ - public const SUCCESS_EXIT = 0; - - public const FAILURE_EXIT = 1; - - public const EXCEPTION_EXIT = 2; - - /** - * @var bool - */ - private static $versionStringPrinted = false; - - /** - * @var CodeCoverageFilter - */ - private $codeCoverageFilter; - - /** - * @var TestSuiteLoader - */ - private $loader; - - /** - * @var ResultPrinter - */ - private $printer; - - /** - * @var Runtime - */ - private $runtime; - - /** - * @var bool - */ - private $messagePrinted = false; - - /** - * @var Hook[] - */ - private $extensions = []; - - public function __construct(TestSuiteLoader $loader = null, CodeCoverageFilter $filter = null) - { - if ($filter === null) { - $filter = new CodeCoverageFilter; - } - - $this->codeCoverageFilter = $filter; - $this->loader = $loader; - $this->runtime = new Runtime; - } - - /** - * @throws \PHPUnit\Runner\Exception - * @throws Exception - */ - public function doRun(Test $suite, array $arguments = [], bool $exit = true): TestResult - { - if (isset($arguments['configuration'])) { - $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] = $arguments['configuration']; - } - - $this->handleConfiguration($arguments); - - if (\is_int($arguments['columns']) && $arguments['columns'] < 16) { - $arguments['columns'] = 16; - $tooFewColumnsRequested = true; - } - - if (isset($arguments['bootstrap'])) { - $GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap']; - } - - if ($suite instanceof TestCase || $suite instanceof TestSuite) { - if ($arguments['backupGlobals'] === true) { - $suite->setBackupGlobals(true); - } - - if ($arguments['backupStaticAttributes'] === true) { - $suite->setBackupStaticAttributes(true); - } - - if ($arguments['beStrictAboutChangesToGlobalState'] === true) { - $suite->setBeStrictAboutChangesToGlobalState(true); - } - } - - if ($arguments['executionOrder'] === TestSuiteSorter::ORDER_RANDOMIZED) { - \mt_srand($arguments['randomOrderSeed']); - } - - if ($arguments['cacheResult']) { - if (!isset($arguments['cacheResultFile'])) { - if (isset($arguments['configuration']) && $arguments['configuration'] instanceof Configuration) { - $cacheLocation = $arguments['configuration']->getFilename(); - } else { - $cacheLocation = $_SERVER['PHP_SELF']; - } - - $arguments['cacheResultFile'] = null; - - $cacheResultFile = \realpath($cacheLocation); - - if ($cacheResultFile !== false) { - $arguments['cacheResultFile'] = \dirname($cacheResultFile); - } - } - - $cache = new DefaultTestResultCache($arguments['cacheResultFile']); - - $this->addExtension(new ResultCacheExtension($cache)); - } - - if ($arguments['executionOrder'] !== TestSuiteSorter::ORDER_DEFAULT || $arguments['executionOrderDefects'] !== TestSuiteSorter::ORDER_DEFAULT || $arguments['resolveDependencies']) { - $cache = $cache ?? new NullTestResultCache; - - $cache->load(); - - $sorter = new TestSuiteSorter($cache); - - $sorter->reorderTestsInSuite($suite, $arguments['executionOrder'], $arguments['resolveDependencies'], $arguments['executionOrderDefects']); - $originalExecutionOrder = $sorter->getOriginalExecutionOrder(); - - unset($sorter); - } - - if (\is_int($arguments['repeat']) && $arguments['repeat'] > 0) { - $_suite = new TestSuite; - - /* @noinspection PhpUnusedLocalVariableInspection */ - foreach (\range(1, $arguments['repeat']) as $step) { - $_suite->addTest($suite); - } - - $suite = $_suite; - - unset($_suite); - } - - $result = $this->createTestResult(); - - $listener = new TestListenerAdapter; - $listenerNeeded = false; - - foreach ($this->extensions as $extension) { - if ($extension instanceof TestHook) { - $listener->add($extension); - - $listenerNeeded = true; - } - } - - if ($listenerNeeded) { - $result->addListener($listener); - } - - unset($listener, $listenerNeeded); - - if (!$arguments['convertDeprecationsToExceptions']) { - $result->convertDeprecationsToExceptions(false); - } - - if (!$arguments['convertErrorsToExceptions']) { - $result->convertErrorsToExceptions(false); - } - - if (!$arguments['convertNoticesToExceptions']) { - $result->convertNoticesToExceptions(false); - } - - if (!$arguments['convertWarningsToExceptions']) { - $result->convertWarningsToExceptions(false); - } - - if ($arguments['stopOnError']) { - $result->stopOnError(true); - } - - if ($arguments['stopOnFailure']) { - $result->stopOnFailure(true); - } - - if ($arguments['stopOnWarning']) { - $result->stopOnWarning(true); - } - - if ($arguments['stopOnIncomplete']) { - $result->stopOnIncomplete(true); - } - - if ($arguments['stopOnRisky']) { - $result->stopOnRisky(true); - } - - if ($arguments['stopOnSkipped']) { - $result->stopOnSkipped(true); - } - - if ($arguments['stopOnDefect']) { - $result->stopOnDefect(true); - } - - if ($arguments['registerMockObjectsFromTestArgumentsRecursively']) { - $result->setRegisterMockObjectsFromTestArgumentsRecursively(true); - } - - if ($this->printer === null) { - if (isset($arguments['printer'])) { - if ($arguments['printer'] instanceof Printer) { - $this->printer = $arguments['printer']; - } elseif (\is_string($arguments['printer']) && \class_exists($arguments['printer'], false)) { - try { - $class = new ReflectionClass($arguments['printer']); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($class->isSubclassOf(ResultPrinter::class)) { - $this->printer = $this->createPrinter($arguments['printer'], $arguments); - } - } - } else { - $this->printer = $this->createPrinter(ResultPrinter::class, $arguments); - } - } - - if (isset($originalExecutionOrder) && $this->printer instanceof CliTestDoxPrinter) { - \assert($this->printer instanceof CliTestDoxPrinter); - - $this->printer->setOriginalExecutionOrder($originalExecutionOrder); - $this->printer->setShowProgressAnimation(!$arguments['noInteraction']); - } - - $this->printer->write( - Version::getVersionString() . "\n" - ); - - self::$versionStringPrinted = true; - - if ($arguments['verbose']) { - $this->writeMessage('Runtime', $this->runtime->getNameWithVersionAndCodeCoverageDriver()); - - if (isset($arguments['configuration'])) { - $this->writeMessage( - 'Configuration', - $arguments['configuration']->getFilename() - ); - } - - foreach ($arguments['loadedExtensions'] as $extension) { - $this->writeMessage( - 'Extension', - $extension - ); - } - - foreach ($arguments['notLoadedExtensions'] as $extension) { - $this->writeMessage( - 'Extension', - $extension - ); - } - } - - if ($arguments['executionOrder'] === TestSuiteSorter::ORDER_RANDOMIZED) { - $this->writeMessage( - 'Random seed', - (string) $arguments['randomOrderSeed'] - ); - } - - if (isset($tooFewColumnsRequested)) { - $this->writeMessage('Error', 'Less than 16 columns requested, number of columns set to 16'); - } - - if ($this->runtime->discardsComments()) { - $this->writeMessage('Warning', 'opcache.save_comments=0 set; annotations will not work'); - } - - if (isset($arguments['configuration']) && $arguments['configuration']->hasValidationErrors()) { - $this->write( - "\n Warning - The configuration file did not pass validation!\n The following problems have been detected:\n" - ); - - foreach ($arguments['configuration']->getValidationErrors() as $line => $errors) { - $this->write(\sprintf("\n Line %d:\n", $line)); - - foreach ($errors as $msg) { - $this->write(\sprintf(" - %s\n", $msg)); - } - } - - $this->write("\n Test results may not be as expected.\n\n"); - } - - if (isset($arguments['conflictBetweenPrinterClassAndTestdox'])) { - $this->writeMessage('Warning', 'Directives printerClass and testdox are mutually exclusive'); - } - - foreach ($arguments['listeners'] as $listener) { - $result->addListener($listener); - } - - $result->addListener($this->printer); - - $codeCoverageReports = 0; - - if (!isset($arguments['noLogging'])) { - if (isset($arguments['testdoxHTMLFile'])) { - $result->addListener( - new HtmlResultPrinter( - $arguments['testdoxHTMLFile'], - $arguments['testdoxGroups'], - $arguments['testdoxExcludeGroups'] - ) - ); - } - - if (isset($arguments['testdoxTextFile'])) { - $result->addListener( - new TextResultPrinter( - $arguments['testdoxTextFile'], - $arguments['testdoxGroups'], - $arguments['testdoxExcludeGroups'] - ) - ); - } - - if (isset($arguments['testdoxXMLFile'])) { - $result->addListener( - new XmlResultPrinter( - $arguments['testdoxXMLFile'] - ) - ); - } - - if (isset($arguments['teamcityLogfile'])) { - $result->addListener( - new TeamCity($arguments['teamcityLogfile']) - ); - } - - if (isset($arguments['junitLogfile'])) { - $result->addListener( - new JUnit( - $arguments['junitLogfile'], - $arguments['reportUselessTests'] - ) - ); - } - - if (isset($arguments['coverageClover'])) { - $codeCoverageReports++; - } - - if (isset($arguments['coverageCrap4J'])) { - $codeCoverageReports++; - } - - if (isset($arguments['coverageHtml'])) { - $codeCoverageReports++; - } - - if (isset($arguments['coveragePHP'])) { - $codeCoverageReports++; - } - - if (isset($arguments['coverageText'])) { - $codeCoverageReports++; - } - - if (isset($arguments['coverageXml'])) { - $codeCoverageReports++; - } - } - - if (isset($arguments['noCoverage'])) { - $codeCoverageReports = 0; - } - - if ($codeCoverageReports > 0 && !$this->runtime->canCollectCodeCoverage()) { - $this->writeMessage('Error', 'No code coverage driver is available'); - - $codeCoverageReports = 0; - } - - if ($codeCoverageReports > 0 || isset($arguments['xdebugFilterFile'])) { - $whitelistFromConfigurationFile = false; - $whitelistFromOption = false; - - if (isset($arguments['whitelist'])) { - $this->codeCoverageFilter->addDirectoryToWhitelist($arguments['whitelist']); - - $whitelistFromOption = true; - } - - if (isset($arguments['configuration'])) { - $filterConfiguration = $arguments['configuration']->getFilterConfiguration(); - - if (!empty($filterConfiguration['whitelist'])) { - $whitelistFromConfigurationFile = true; - } - - if (!empty($filterConfiguration['whitelist'])) { - foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) { - $this->codeCoverageFilter->addDirectoryToWhitelist( - $dir['path'], - $dir['suffix'], - $dir['prefix'] - ); - } - - foreach ($filterConfiguration['whitelist']['include']['file'] as $file) { - $this->codeCoverageFilter->addFileToWhitelist($file); - } - - foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) { - $this->codeCoverageFilter->removeDirectoryFromWhitelist( - $dir['path'], - $dir['suffix'], - $dir['prefix'] - ); - } - - foreach ($filterConfiguration['whitelist']['exclude']['file'] as $file) { - $this->codeCoverageFilter->removeFileFromWhitelist($file); - } - } - } - } - - if ($codeCoverageReports > 0) { - $codeCoverage = new CodeCoverage( - null, - $this->codeCoverageFilter - ); - - $codeCoverage->setUnintentionallyCoveredSubclassesWhitelist( - [Comparator::class] - ); - - $codeCoverage->setCheckForUnintentionallyCoveredCode( - $arguments['strictCoverage'] - ); - - $codeCoverage->setCheckForMissingCoversAnnotation( - $arguments['strictCoverage'] - ); - - if (isset($arguments['forceCoversAnnotation'])) { - $codeCoverage->setForceCoversAnnotation( - $arguments['forceCoversAnnotation'] - ); - } - - if (isset($arguments['ignoreDeprecatedCodeUnitsFromCodeCoverage'])) { - $codeCoverage->setIgnoreDeprecatedCode( - $arguments['ignoreDeprecatedCodeUnitsFromCodeCoverage'] - ); - } - - if (isset($arguments['disableCodeCoverageIgnore'])) { - $codeCoverage->setDisableIgnoredLines(true); - } - - if (!empty($filterConfiguration['whitelist'])) { - $codeCoverage->setAddUncoveredFilesFromWhitelist( - $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'] - ); - - $codeCoverage->setProcessUncoveredFilesFromWhitelist( - $filterConfiguration['whitelist']['processUncoveredFilesFromWhitelist'] - ); - } - - if (!$this->codeCoverageFilter->hasWhitelist()) { - if (!$whitelistFromConfigurationFile && !$whitelistFromOption) { - $this->writeMessage('Error', 'No whitelist is configured, no code coverage will be generated.'); - } else { - $this->writeMessage('Error', 'Incorrect whitelist config, no code coverage will be generated.'); - } - - $codeCoverageReports = 0; - - unset($codeCoverage); - } - } - - if (isset($arguments['xdebugFilterFile'], $filterConfiguration)) { - $this->write("\n"); - - $script = (new XdebugFilterScriptGenerator)->generate($filterConfiguration['whitelist']); - - if ($arguments['xdebugFilterFile'] !== 'php://stdout' && $arguments['xdebugFilterFile'] !== 'php://stderr' && !Filesystem::createDirectory(\dirname($arguments['xdebugFilterFile']))) { - $this->write(\sprintf('Cannot write Xdebug filter script to %s ' . \PHP_EOL, $arguments['xdebugFilterFile'])); - - exit(self::EXCEPTION_EXIT); - } - - \file_put_contents($arguments['xdebugFilterFile'], $script); - - $this->write(\sprintf('Wrote Xdebug filter script to %s ' . \PHP_EOL, $arguments['xdebugFilterFile'])); - - exit(self::SUCCESS_EXIT); - } - - $this->printer->write("\n"); - - if (isset($codeCoverage)) { - $result->setCodeCoverage($codeCoverage); - - if ($codeCoverageReports > 1 && isset($arguments['cacheTokens'])) { - $codeCoverage->setCacheTokens($arguments['cacheTokens']); - } - } - - $result->beStrictAboutTestsThatDoNotTestAnything($arguments['reportUselessTests']); - $result->beStrictAboutOutputDuringTests($arguments['disallowTestOutput']); - $result->beStrictAboutTodoAnnotatedTests($arguments['disallowTodoAnnotatedTests']); - $result->beStrictAboutResourceUsageDuringSmallTests($arguments['beStrictAboutResourceUsageDuringSmallTests']); - - if ($arguments['enforceTimeLimit'] === true) { - if (!\class_exists(Invoker::class)) { - $this->writeMessage('Error', 'Package phpunit/php-invoker is required for enforcing time limits'); - } - - if (!\extension_loaded('pcntl') || \strpos(\ini_get('disable_functions'), 'pcntl') !== false) { - $this->writeMessage('Error', 'PHP extension pcntl is required for enforcing time limits'); - } - } - $result->enforceTimeLimit($arguments['enforceTimeLimit']); - $result->setDefaultTimeLimit($arguments['defaultTimeLimit']); - $result->setTimeoutForSmallTests($arguments['timeoutForSmallTests']); - $result->setTimeoutForMediumTests($arguments['timeoutForMediumTests']); - $result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']); - - if ($suite instanceof TestSuite) { - $this->processSuiteFilters($suite, $arguments); - $suite->setRunTestInSeparateProcess($arguments['processIsolation']); - } - - foreach ($this->extensions as $extension) { - if ($extension instanceof BeforeFirstTestHook) { - $extension->executeBeforeFirstTest(); - } - } - - $suite->run($result); - - foreach ($this->extensions as $extension) { - if ($extension instanceof AfterLastTestHook) { - $extension->executeAfterLastTest(); - } - } - - $result->flushListeners(); - - if ($this->printer instanceof ResultPrinter) { - $this->printer->printResult($result); - } - - if (isset($codeCoverage)) { - if (isset($arguments['coverageClover'])) { - $this->codeCoverageGenerationStart('Clover XML'); - - try { - $writer = new CloverReport; - $writer->process($codeCoverage, $arguments['coverageClover']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - - if (isset($arguments['coverageCrap4J'])) { - $this->codeCoverageGenerationStart('Crap4J XML'); - - try { - $writer = new Crap4jReport($arguments['crap4jThreshold']); - $writer->process($codeCoverage, $arguments['coverageCrap4J']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - - if (isset($arguments['coverageHtml'])) { - $this->codeCoverageGenerationStart('HTML'); - - try { - $writer = new HtmlReport( - $arguments['reportLowUpperBound'], - $arguments['reportHighLowerBound'], - \sprintf( - ' and PHPUnit %s', - Version::id() - ) - ); - - $writer->process($codeCoverage, $arguments['coverageHtml']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - - if (isset($arguments['coveragePHP'])) { - $this->codeCoverageGenerationStart('PHP'); - - try { - $writer = new PhpReport; - $writer->process($codeCoverage, $arguments['coveragePHP']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - - if (isset($arguments['coverageText'])) { - if ($arguments['coverageText'] === 'php://stdout') { - $outputStream = $this->printer; - $colors = $arguments['colors'] && $arguments['colors'] !== ResultPrinter::COLOR_NEVER; - } else { - $outputStream = new Printer($arguments['coverageText']); - $colors = false; - } - - $processor = new TextReport( - $arguments['reportLowUpperBound'], - $arguments['reportHighLowerBound'], - $arguments['coverageTextShowUncoveredFiles'], - $arguments['coverageTextShowOnlySummary'] - ); - - $outputStream->write( - $processor->process($codeCoverage, $colors) - ); - } - - if (isset($arguments['coverageXml'])) { - $this->codeCoverageGenerationStart('PHPUnit XML'); - - try { - $writer = new XmlReport(Version::id()); - $writer->process($codeCoverage, $arguments['coverageXml']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - } - - if ($exit) { - if ($result->wasSuccessfulIgnoringWarnings()) { - if ($arguments['failOnRisky'] && !$result->allHarmless()) { - exit(self::FAILURE_EXIT); - } - - if ($arguments['failOnWarning'] && $result->warningCount() > 0) { - exit(self::FAILURE_EXIT); - } - - exit(self::SUCCESS_EXIT); - } - - if ($result->errorCount() > 0) { - exit(self::EXCEPTION_EXIT); - } - - if ($result->failureCount() > 0) { - exit(self::FAILURE_EXIT); - } - } - - return $result; - } - - public function setPrinter(ResultPrinter $resultPrinter): void - { - $this->printer = $resultPrinter; - } - - /** - * Returns the loader to be used. - */ - public function getLoader(): TestSuiteLoader - { - if ($this->loader === null) { - $this->loader = new StandardTestSuiteLoader; - } - - return $this->loader; - } - - public function addExtension(Hook $extension): void - { - $this->extensions[] = $extension; - } - - /** - * Override to define how to handle a failed loading of - * a test suite. - */ - protected function runFailed(string $message): void - { - $this->write($message . \PHP_EOL); - - exit(self::FAILURE_EXIT); - } - - private function createTestResult(): TestResult - { - return new TestResult; - } - - private function write(string $buffer): void - { - if (\PHP_SAPI !== 'cli' && \PHP_SAPI !== 'phpdbg') { - $buffer = \htmlspecialchars($buffer); - } - - if ($this->printer !== null) { - $this->printer->write($buffer); - } else { - print $buffer; - } - } - - /** - * @throws Exception - */ - private function handleConfiguration(array &$arguments): void - { - if (isset($arguments['configuration']) && - !$arguments['configuration'] instanceof Configuration) { - $arguments['configuration'] = Configuration::getInstance( - $arguments['configuration'] - ); - } - - $arguments['debug'] = $arguments['debug'] ?? false; - $arguments['filter'] = $arguments['filter'] ?? false; - $arguments['listeners'] = $arguments['listeners'] ?? []; - - if (isset($arguments['configuration'])) { - $arguments['configuration']->handlePHPConfiguration(); - - $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration(); - - if (isset($phpunitConfiguration['backupGlobals']) && !isset($arguments['backupGlobals'])) { - $arguments['backupGlobals'] = $phpunitConfiguration['backupGlobals']; - } - - if (isset($phpunitConfiguration['backupStaticAttributes']) && !isset($arguments['backupStaticAttributes'])) { - $arguments['backupStaticAttributes'] = $phpunitConfiguration['backupStaticAttributes']; - } - - if (isset($phpunitConfiguration['beStrictAboutChangesToGlobalState']) && !isset($arguments['beStrictAboutChangesToGlobalState'])) { - $arguments['beStrictAboutChangesToGlobalState'] = $phpunitConfiguration['beStrictAboutChangesToGlobalState']; - } - - if (isset($phpunitConfiguration['bootstrap']) && !isset($arguments['bootstrap'])) { - $arguments['bootstrap'] = $phpunitConfiguration['bootstrap']; - } - - if (isset($phpunitConfiguration['cacheResult']) && !isset($arguments['cacheResult'])) { - $arguments['cacheResult'] = $phpunitConfiguration['cacheResult']; - } - - if (isset($phpunitConfiguration['cacheResultFile']) && !isset($arguments['cacheResultFile'])) { - $arguments['cacheResultFile'] = $phpunitConfiguration['cacheResultFile']; - } - - if (isset($phpunitConfiguration['cacheTokens']) && !isset($arguments['cacheTokens'])) { - $arguments['cacheTokens'] = $phpunitConfiguration['cacheTokens']; - } - - if (isset($phpunitConfiguration['cacheTokens']) && !isset($arguments['cacheTokens'])) { - $arguments['cacheTokens'] = $phpunitConfiguration['cacheTokens']; - } - - if (isset($phpunitConfiguration['colors']) && !isset($arguments['colors'])) { - $arguments['colors'] = $phpunitConfiguration['colors']; - } - - if (isset($phpunitConfiguration['convertDeprecationsToExceptions']) && !isset($arguments['convertDeprecationsToExceptions'])) { - $arguments['convertDeprecationsToExceptions'] = $phpunitConfiguration['convertDeprecationsToExceptions']; - } - - if (isset($phpunitConfiguration['convertErrorsToExceptions']) && !isset($arguments['convertErrorsToExceptions'])) { - $arguments['convertErrorsToExceptions'] = $phpunitConfiguration['convertErrorsToExceptions']; - } - - if (isset($phpunitConfiguration['convertNoticesToExceptions']) && !isset($arguments['convertNoticesToExceptions'])) { - $arguments['convertNoticesToExceptions'] = $phpunitConfiguration['convertNoticesToExceptions']; - } - - if (isset($phpunitConfiguration['convertWarningsToExceptions']) && !isset($arguments['convertWarningsToExceptions'])) { - $arguments['convertWarningsToExceptions'] = $phpunitConfiguration['convertWarningsToExceptions']; - } - - if (isset($phpunitConfiguration['processIsolation']) && !isset($arguments['processIsolation'])) { - $arguments['processIsolation'] = $phpunitConfiguration['processIsolation']; - } - - if (isset($phpunitConfiguration['stopOnDefect']) && !isset($arguments['stopOnDefect'])) { - $arguments['stopOnDefect'] = $phpunitConfiguration['stopOnDefect']; - } - - if (isset($phpunitConfiguration['stopOnError']) && !isset($arguments['stopOnError'])) { - $arguments['stopOnError'] = $phpunitConfiguration['stopOnError']; - } - - if (isset($phpunitConfiguration['stopOnFailure']) && !isset($arguments['stopOnFailure'])) { - $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure']; - } - - if (isset($phpunitConfiguration['stopOnWarning']) && !isset($arguments['stopOnWarning'])) { - $arguments['stopOnWarning'] = $phpunitConfiguration['stopOnWarning']; - } - - if (isset($phpunitConfiguration['stopOnIncomplete']) && !isset($arguments['stopOnIncomplete'])) { - $arguments['stopOnIncomplete'] = $phpunitConfiguration['stopOnIncomplete']; - } - - if (isset($phpunitConfiguration['stopOnRisky']) && !isset($arguments['stopOnRisky'])) { - $arguments['stopOnRisky'] = $phpunitConfiguration['stopOnRisky']; - } - - if (isset($phpunitConfiguration['stopOnSkipped']) && !isset($arguments['stopOnSkipped'])) { - $arguments['stopOnSkipped'] = $phpunitConfiguration['stopOnSkipped']; - } - - if (isset($phpunitConfiguration['failOnWarning']) && !isset($arguments['failOnWarning'])) { - $arguments['failOnWarning'] = $phpunitConfiguration['failOnWarning']; - } - - if (isset($phpunitConfiguration['failOnRisky']) && !isset($arguments['failOnRisky'])) { - $arguments['failOnRisky'] = $phpunitConfiguration['failOnRisky']; - } - - if (isset($phpunitConfiguration['timeoutForSmallTests']) && !isset($arguments['timeoutForSmallTests'])) { - $arguments['timeoutForSmallTests'] = $phpunitConfiguration['timeoutForSmallTests']; - } - - if (isset($phpunitConfiguration['timeoutForMediumTests']) && !isset($arguments['timeoutForMediumTests'])) { - $arguments['timeoutForMediumTests'] = $phpunitConfiguration['timeoutForMediumTests']; - } - - if (isset($phpunitConfiguration['timeoutForLargeTests']) && !isset($arguments['timeoutForLargeTests'])) { - $arguments['timeoutForLargeTests'] = $phpunitConfiguration['timeoutForLargeTests']; - } - - if (isset($phpunitConfiguration['reportUselessTests']) && !isset($arguments['reportUselessTests'])) { - $arguments['reportUselessTests'] = $phpunitConfiguration['reportUselessTests']; - } - - if (isset($phpunitConfiguration['strictCoverage']) && !isset($arguments['strictCoverage'])) { - $arguments['strictCoverage'] = $phpunitConfiguration['strictCoverage']; - } - - if (isset($phpunitConfiguration['ignoreDeprecatedCodeUnitsFromCodeCoverage']) && !isset($arguments['ignoreDeprecatedCodeUnitsFromCodeCoverage'])) { - $arguments['ignoreDeprecatedCodeUnitsFromCodeCoverage'] = $phpunitConfiguration['ignoreDeprecatedCodeUnitsFromCodeCoverage']; - } - - if (isset($phpunitConfiguration['disallowTestOutput']) && !isset($arguments['disallowTestOutput'])) { - $arguments['disallowTestOutput'] = $phpunitConfiguration['disallowTestOutput']; - } - - if (isset($phpunitConfiguration['defaultTimeLimit']) && !isset($arguments['defaultTimeLimit'])) { - $arguments['defaultTimeLimit'] = $phpunitConfiguration['defaultTimeLimit']; - } - - if (isset($phpunitConfiguration['enforceTimeLimit']) && !isset($arguments['enforceTimeLimit'])) { - $arguments['enforceTimeLimit'] = $phpunitConfiguration['enforceTimeLimit']; - } - - if (isset($phpunitConfiguration['disallowTodoAnnotatedTests']) && !isset($arguments['disallowTodoAnnotatedTests'])) { - $arguments['disallowTodoAnnotatedTests'] = $phpunitConfiguration['disallowTodoAnnotatedTests']; - } - - if (isset($phpunitConfiguration['beStrictAboutResourceUsageDuringSmallTests']) && !isset($arguments['beStrictAboutResourceUsageDuringSmallTests'])) { - $arguments['beStrictAboutResourceUsageDuringSmallTests'] = $phpunitConfiguration['beStrictAboutResourceUsageDuringSmallTests']; - } - - if (isset($phpunitConfiguration['verbose']) && !isset($arguments['verbose'])) { - $arguments['verbose'] = $phpunitConfiguration['verbose']; - } - - if (isset($phpunitConfiguration['reverseDefectList']) && !isset($arguments['reverseList'])) { - $arguments['reverseList'] = $phpunitConfiguration['reverseDefectList']; - } - - if (isset($phpunitConfiguration['forceCoversAnnotation']) && !isset($arguments['forceCoversAnnotation'])) { - $arguments['forceCoversAnnotation'] = $phpunitConfiguration['forceCoversAnnotation']; - } - - if (isset($phpunitConfiguration['disableCodeCoverageIgnore']) && !isset($arguments['disableCodeCoverageIgnore'])) { - $arguments['disableCodeCoverageIgnore'] = $phpunitConfiguration['disableCodeCoverageIgnore']; - } - - if (isset($phpunitConfiguration['registerMockObjectsFromTestArgumentsRecursively']) && !isset($arguments['registerMockObjectsFromTestArgumentsRecursively'])) { - $arguments['registerMockObjectsFromTestArgumentsRecursively'] = $phpunitConfiguration['registerMockObjectsFromTestArgumentsRecursively']; - } - - if (isset($phpunitConfiguration['executionOrder']) && !isset($arguments['executionOrder'])) { - $arguments['executionOrder'] = $phpunitConfiguration['executionOrder']; - } - - if (isset($phpunitConfiguration['executionOrderDefects']) && !isset($arguments['executionOrderDefects'])) { - $arguments['executionOrderDefects'] = $phpunitConfiguration['executionOrderDefects']; - } - - if (isset($phpunitConfiguration['resolveDependencies']) && !isset($arguments['resolveDependencies'])) { - $arguments['resolveDependencies'] = $phpunitConfiguration['resolveDependencies']; - } - - if (isset($phpunitConfiguration['noInteraction']) && !isset($arguments['noInteraction'])) { - $arguments['noInteraction'] = $phpunitConfiguration['noInteraction']; - } - - if (isset($phpunitConfiguration['conflictBetweenPrinterClassAndTestdox'])) { - $arguments['conflictBetweenPrinterClassAndTestdox'] = true; - } - - $groupCliArgs = []; - - if (!empty($arguments['groups'])) { - $groupCliArgs = $arguments['groups']; - } - - $groupConfiguration = $arguments['configuration']->getGroupConfiguration(); - - if (!empty($groupConfiguration['include']) && !isset($arguments['groups'])) { - $arguments['groups'] = $groupConfiguration['include']; - } - - if (!empty($groupConfiguration['exclude']) && !isset($arguments['excludeGroups'])) { - $arguments['excludeGroups'] = \array_diff($groupConfiguration['exclude'], $groupCliArgs); - } - - foreach ($arguments['configuration']->getExtensionConfiguration() as $extension) { - if ($extension['file'] !== '' && !\class_exists($extension['class'], false)) { - require_once $extension['file']; - } - - if (!\class_exists($extension['class'])) { - throw new Exception( - \sprintf( - 'Class "%s" does not exist', - $extension['class'] - ) - ); - } - - try { - $extensionClass = new ReflectionClass($extension['class']); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$extensionClass->implementsInterface(Hook::class)) { - throw new Exception( - \sprintf( - 'Class "%s" does not implement a PHPUnit\Runner\Hook interface', - $extension['class'] - ) - ); - } - - if (\count($extension['arguments']) === 0) { - $extensionObject = $extensionClass->newInstance(); - } else { - $extensionObject = $extensionClass->newInstanceArgs( - $extension['arguments'] - ); - } - - \assert($extensionObject instanceof Hook); - - $this->addExtension($extensionObject); - } - - foreach ($arguments['configuration']->getListenerConfiguration() as $listener) { - if ($listener['file'] !== '' && !\class_exists($listener['class'], false)) { - require_once $listener['file']; - } - - if (!\class_exists($listener['class'])) { - throw new Exception( - \sprintf( - 'Class "%s" does not exist', - $listener['class'] - ) - ); - } - - try { - $listenerClass = new ReflectionClass($listener['class']); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if (!$listenerClass->implementsInterface(TestListener::class)) { - throw new Exception( - \sprintf( - 'Class "%s" does not implement the PHPUnit\Framework\TestListener interface', - $listener['class'] - ) - ); - } - - if (\count($listener['arguments']) === 0) { - $listener = new $listener['class']; - } else { - $listener = $listenerClass->newInstanceArgs( - $listener['arguments'] - ); - } - - $arguments['listeners'][] = $listener; - } - - $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration(); - - if (isset($loggingConfiguration['coverage-clover']) && !isset($arguments['coverageClover'])) { - $arguments['coverageClover'] = $loggingConfiguration['coverage-clover']; - } - - if (isset($loggingConfiguration['coverage-crap4j']) && !isset($arguments['coverageCrap4J'])) { - $arguments['coverageCrap4J'] = $loggingConfiguration['coverage-crap4j']; - - if (isset($loggingConfiguration['crap4jThreshold']) && !isset($arguments['crap4jThreshold'])) { - $arguments['crap4jThreshold'] = $loggingConfiguration['crap4jThreshold']; - } - } - - if (isset($loggingConfiguration['coverage-html']) && !isset($arguments['coverageHtml'])) { - if (isset($loggingConfiguration['lowUpperBound']) && !isset($arguments['reportLowUpperBound'])) { - $arguments['reportLowUpperBound'] = $loggingConfiguration['lowUpperBound']; - } - - if (isset($loggingConfiguration['highLowerBound']) && !isset($arguments['reportHighLowerBound'])) { - $arguments['reportHighLowerBound'] = $loggingConfiguration['highLowerBound']; - } - - $arguments['coverageHtml'] = $loggingConfiguration['coverage-html']; - } - - if (isset($loggingConfiguration['coverage-php']) && !isset($arguments['coveragePHP'])) { - $arguments['coveragePHP'] = $loggingConfiguration['coverage-php']; - } - - if (isset($loggingConfiguration['coverage-text']) && !isset($arguments['coverageText'])) { - $arguments['coverageText'] = $loggingConfiguration['coverage-text']; - $arguments['coverageTextShowUncoveredFiles'] = $loggingConfiguration['coverageTextShowUncoveredFiles'] ?? false; - $arguments['coverageTextShowOnlySummary'] = $loggingConfiguration['coverageTextShowOnlySummary'] ?? false; - } - - if (isset($loggingConfiguration['coverage-xml']) && !isset($arguments['coverageXml'])) { - $arguments['coverageXml'] = $loggingConfiguration['coverage-xml']; - } - - if (isset($loggingConfiguration['plain'])) { - $arguments['listeners'][] = new ResultPrinter( - $loggingConfiguration['plain'], - true - ); - } - - if (isset($loggingConfiguration['teamcity']) && !isset($arguments['teamcityLogfile'])) { - $arguments['teamcityLogfile'] = $loggingConfiguration['teamcity']; - } - - if (isset($loggingConfiguration['junit']) && !isset($arguments['junitLogfile'])) { - $arguments['junitLogfile'] = $loggingConfiguration['junit']; - } - - if (isset($loggingConfiguration['testdox-html']) && !isset($arguments['testdoxHTMLFile'])) { - $arguments['testdoxHTMLFile'] = $loggingConfiguration['testdox-html']; - } - - if (isset($loggingConfiguration['testdox-text']) && !isset($arguments['testdoxTextFile'])) { - $arguments['testdoxTextFile'] = $loggingConfiguration['testdox-text']; - } - - if (isset($loggingConfiguration['testdox-xml']) && !isset($arguments['testdoxXMLFile'])) { - $arguments['testdoxXMLFile'] = $loggingConfiguration['testdox-xml']; - } - - $testdoxGroupConfiguration = $arguments['configuration']->getTestdoxGroupConfiguration(); - - if (isset($testdoxGroupConfiguration['include']) && - !isset($arguments['testdoxGroups'])) { - $arguments['testdoxGroups'] = $testdoxGroupConfiguration['include']; - } - - if (isset($testdoxGroupConfiguration['exclude']) && - !isset($arguments['testdoxExcludeGroups'])) { - $arguments['testdoxExcludeGroups'] = $testdoxGroupConfiguration['exclude']; - } - } - - $arguments['addUncoveredFilesFromWhitelist'] = $arguments['addUncoveredFilesFromWhitelist'] ?? true; - $arguments['backupGlobals'] = $arguments['backupGlobals'] ?? null; - $arguments['backupStaticAttributes'] = $arguments['backupStaticAttributes'] ?? null; - $arguments['beStrictAboutChangesToGlobalState'] = $arguments['beStrictAboutChangesToGlobalState'] ?? null; - $arguments['beStrictAboutResourceUsageDuringSmallTests'] = $arguments['beStrictAboutResourceUsageDuringSmallTests'] ?? false; - $arguments['cacheResult'] = $arguments['cacheResult'] ?? true; - $arguments['cacheTokens'] = $arguments['cacheTokens'] ?? false; - $arguments['colors'] = $arguments['colors'] ?? ResultPrinter::COLOR_DEFAULT; - $arguments['columns'] = $arguments['columns'] ?? 80; - $arguments['convertDeprecationsToExceptions'] = $arguments['convertDeprecationsToExceptions'] ?? true; - $arguments['convertErrorsToExceptions'] = $arguments['convertErrorsToExceptions'] ?? true; - $arguments['convertNoticesToExceptions'] = $arguments['convertNoticesToExceptions'] ?? true; - $arguments['convertWarningsToExceptions'] = $arguments['convertWarningsToExceptions'] ?? true; - $arguments['crap4jThreshold'] = $arguments['crap4jThreshold'] ?? 30; - $arguments['disallowTestOutput'] = $arguments['disallowTestOutput'] ?? false; - $arguments['disallowTodoAnnotatedTests'] = $arguments['disallowTodoAnnotatedTests'] ?? false; - $arguments['defaultTimeLimit'] = $arguments['defaultTimeLimit'] ?? 0; - $arguments['enforceTimeLimit'] = $arguments['enforceTimeLimit'] ?? false; - $arguments['excludeGroups'] = $arguments['excludeGroups'] ?? []; - $arguments['executionOrder'] = $arguments['executionOrder'] ?? TestSuiteSorter::ORDER_DEFAULT; - $arguments['executionOrderDefects'] = $arguments['executionOrderDefects'] ?? TestSuiteSorter::ORDER_DEFAULT; - $arguments['failOnRisky'] = $arguments['failOnRisky'] ?? false; - $arguments['failOnWarning'] = $arguments['failOnWarning'] ?? false; - $arguments['groups'] = $arguments['groups'] ?? []; - $arguments['noInteraction'] = $arguments['noInteraction'] ?? false; - $arguments['processIsolation'] = $arguments['processIsolation'] ?? false; - $arguments['processUncoveredFilesFromWhitelist'] = $arguments['processUncoveredFilesFromWhitelist'] ?? false; - $arguments['randomOrderSeed'] = $arguments['randomOrderSeed'] ?? \time(); - $arguments['registerMockObjectsFromTestArgumentsRecursively'] = $arguments['registerMockObjectsFromTestArgumentsRecursively'] ?? false; - $arguments['repeat'] = $arguments['repeat'] ?? false; - $arguments['reportHighLowerBound'] = $arguments['reportHighLowerBound'] ?? 90; - $arguments['reportLowUpperBound'] = $arguments['reportLowUpperBound'] ?? 50; - $arguments['reportUselessTests'] = $arguments['reportUselessTests'] ?? true; - $arguments['reverseList'] = $arguments['reverseList'] ?? false; - $arguments['resolveDependencies'] = $arguments['resolveDependencies'] ?? true; - $arguments['stopOnError'] = $arguments['stopOnError'] ?? false; - $arguments['stopOnFailure'] = $arguments['stopOnFailure'] ?? false; - $arguments['stopOnIncomplete'] = $arguments['stopOnIncomplete'] ?? false; - $arguments['stopOnRisky'] = $arguments['stopOnRisky'] ?? false; - $arguments['stopOnSkipped'] = $arguments['stopOnSkipped'] ?? false; - $arguments['stopOnWarning'] = $arguments['stopOnWarning'] ?? false; - $arguments['stopOnDefect'] = $arguments['stopOnDefect'] ?? false; - $arguments['strictCoverage'] = $arguments['strictCoverage'] ?? false; - $arguments['testdoxExcludeGroups'] = $arguments['testdoxExcludeGroups'] ?? []; - $arguments['testdoxGroups'] = $arguments['testdoxGroups'] ?? []; - $arguments['timeoutForLargeTests'] = $arguments['timeoutForLargeTests'] ?? 60; - $arguments['timeoutForMediumTests'] = $arguments['timeoutForMediumTests'] ?? 10; - $arguments['timeoutForSmallTests'] = $arguments['timeoutForSmallTests'] ?? 1; - $arguments['verbose'] = $arguments['verbose'] ?? false; - } - - private function processSuiteFilters(TestSuite $suite, array $arguments): void - { - if (!$arguments['filter'] && - empty($arguments['groups']) && - empty($arguments['excludeGroups'])) { - return; - } - - $filterFactory = new Factory; - - if (!empty($arguments['excludeGroups'])) { - $filterFactory->addFilter( - new ReflectionClass(ExcludeGroupFilterIterator::class), - $arguments['excludeGroups'] - ); - } - - if (!empty($arguments['groups'])) { - $filterFactory->addFilter( - new ReflectionClass(IncludeGroupFilterIterator::class), - $arguments['groups'] - ); - } - - if ($arguments['filter']) { - $filterFactory->addFilter( - new ReflectionClass(NameFilterIterator::class), - $arguments['filter'] - ); - } - - $suite->injectFilter($filterFactory); - } - - private function writeMessage(string $type, string $message): void - { - if (!$this->messagePrinted) { - $this->write("\n"); - } - - $this->write( - \sprintf( - "%-15s%s\n", - $type . ':', - $message - ) - ); - - $this->messagePrinted = true; - } - - private function createPrinter(string $class, array $arguments): Printer - { - return new $class( - (isset($arguments['stderr']) && $arguments['stderr'] === true) ? 'php://stderr' : null, - $arguments['verbose'], - $arguments['colors'], - $arguments['debug'], - $arguments['columns'], - $arguments['reverseList'] - ); - } - - private function codeCoverageGenerationStart(string $format): void - { - $this->printer->write( - \sprintf( - "\nGenerating code coverage report in %s format ... ", - $format - ) - ); - - Timer::start(); - } - - private function codeCoverageGenerationSucceeded(): void - { - $this->printer->write( - \sprintf( - "done [%s]\n", - Timer::secondsToTimeString(Timer::stop()) - ) - ); - } - - private function codeCoverageGenerationFailed(\Exception $e): void - { - $this->printer->write( - \sprintf( - "failed [%s]\n%s\n", - Timer::secondsToTimeString(Timer::stop()), - $e->getMessage() - ) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php b/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php deleted file mode 100644 index 3847199..0000000 --- a/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php +++ /dev/null @@ -1,575 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Annotation; - -use PharIo\Version\VersionConstraintParser; -use PHPUnit\Framework\InvalidDataProviderException; -use PHPUnit\Framework\SkippedTestError; -use PHPUnit\Framework\Warning; -use PHPUnit\Util\Exception; - -/** - * This is an abstraction around a PHPUnit-specific docBlock, - * allowing us to ask meaningful questions about a specific - * reflection symbol. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DocBlock -{ - /** - * @todo This constant should be private (it's public because of TestTest::testGetProvidedDataRegEx) - */ - public const REGEX_DATA_PROVIDER = '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/'; - - private const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[<>=!]{0,2})\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; - - private const REGEX_REQUIRES_VERSION_CONSTRAINT = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[\d\t \-.|~^]+)[ \t]*\r?$/m'; - - private const REGEX_REQUIRES_OS = '/@requires\s+(?POS(?:FAMILY)?)\s+(?P.+?)[ \t]*\r?$/m'; - - private const REGEX_REQUIRES_SETTING = '/@requires\s+(?Psetting)\s+(?P([^ ]+?))\s*(?P[\w\.-]+[\w\.]?)?[ \t]*\r?$/m'; - - private const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^\s<>=!]+))\s*(?P[<>=!]{0,2})\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; - - private const REGEX_TEST_WITH = '/@testWith\s+/'; - - private const REGEX_EXPECTED_EXCEPTION = '(@expectedException\s+([:.\w\\\\x7f-\xff]+)(?:[\t ]+(\S*))?(?:[\t ]+(\S*))?\s*$)m'; - - /** @var string */ - private $docComment; - - /** @var bool */ - private $isMethod; - - /** @var array> pre-parsed annotations indexed by name and occurrence index */ - private $symbolAnnotations; - - /** - * @var null|array - * - * @psalm-var null|(array{ - * __OFFSET: array&array{__FILE: string}, - * setting?: array, - * extension_versions?: array - * }&array< - * string, - * string|array{version: string, operator: string}|array{constraint: string}|array - * >) - */ - private $parsedRequirements; - - /** @var int */ - private $startLine; - - /** @var int */ - private $endLine; - - /** @var string */ - private $fileName; - - /** @var string */ - private $name; - - /** - * @var string - * - * @psalm-var class-string - */ - private $className; - - public static function ofClass(\ReflectionClass $class): self - { - $className = $class->getName(); - - return new self( - (string) $class->getDocComment(), - false, - self::extractAnnotationsFromReflector($class), - $class->getStartLine(), - $class->getEndLine(), - $class->getFileName(), - $className, - $className - ); - } - - /** - * @psalm-param class-string $classNameInHierarchy - */ - public static function ofMethod(\ReflectionMethod $method, string $classNameInHierarchy): self - { - return new self( - (string) $method->getDocComment(), - true, - self::extractAnnotationsFromReflector($method), - $method->getStartLine(), - $method->getEndLine(), - $method->getFileName(), - $method->getName(), - $classNameInHierarchy - ); - } - - /** - * Note: we do not preserve an instance of the reflection object, since it cannot be safely (de-)serialized. - * - * @param array> $symbolAnnotations - * - * @psalm-param class-string $className - */ - private function __construct(string $docComment, bool $isMethod, array $symbolAnnotations, int $startLine, int $endLine, string $fileName, string $name, string $className) - { - $this->docComment = $docComment; - $this->isMethod = $isMethod; - $this->symbolAnnotations = $symbolAnnotations; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->fileName = $fileName; - $this->name = $name; - $this->className = $className; - } - - /** - * @psalm-return array{ - * __OFFSET: array&array{__FILE: string}, - * setting?: array, - * extension_versions?: array - * }&array< - * string, - * string|array{version: string, operator: string}|array{constraint: string}|array - * > - * - * @throws Warning if the requirements version constraint is not well-formed - */ - public function requirements(): array - { - if ($this->parsedRequirements !== null) { - return $this->parsedRequirements; - } - - $offset = $this->startLine; - $requires = []; - $recordedSettings = []; - $extensionVersions = []; - $recordedOffsets = [ - '__FILE' => \realpath($this->fileName), - ]; - - // Split docblock into lines and rewind offset to start of docblock - $lines = \preg_split('/\r\n|\r|\n/', $this->docComment); - $offset -= \count($lines); - - foreach ($lines as $line) { - if (\preg_match(self::REGEX_REQUIRES_OS, $line, $matches)) { - $requires[$matches['name']] = $matches['value']; - $recordedOffsets[$matches['name']] = $offset; - } - - if (\preg_match(self::REGEX_REQUIRES_VERSION, $line, $matches)) { - $requires[$matches['name']] = [ - 'version' => $matches['version'], - 'operator' => $matches['operator'], - ]; - $recordedOffsets[$matches['name']] = $offset; - } - - if (\preg_match(self::REGEX_REQUIRES_VERSION_CONSTRAINT, $line, $matches)) { - if (!empty($requires[$matches['name']])) { - $offset++; - - continue; - } - - try { - $versionConstraintParser = new VersionConstraintParser; - - $requires[$matches['name'] . '_constraint'] = [ - 'constraint' => $versionConstraintParser->parse(\trim($matches['constraint'])), - ]; - $recordedOffsets[$matches['name'] . '_constraint'] = $offset; - } catch (\PharIo\Version\Exception $e) { - /* @TODO this catch is currently not valid, see https://github.com/phar-io/version/issues/16 */ - throw new Warning($e->getMessage(), $e->getCode(), $e); - } - } - - if (\preg_match(self::REGEX_REQUIRES_SETTING, $line, $matches)) { - $recordedSettings[$matches['setting']] = $matches['value']; - $recordedOffsets['__SETTING_' . $matches['setting']] = $offset; - } - - if (\preg_match(self::REGEX_REQUIRES, $line, $matches)) { - $name = $matches['name'] . 's'; - - if (!isset($requires[$name])) { - $requires[$name] = []; - } - - $requires[$name][] = $matches['value']; - $recordedOffsets[$matches['name'] . '_' . $matches['value']] = $offset; - - if ($name === 'extensions' && !empty($matches['version'])) { - $extensionVersions[$matches['value']] = [ - 'version' => $matches['version'], - 'operator' => $matches['operator'], - ]; - } - } - - $offset++; - } - - return $this->parsedRequirements = \array_merge( - $requires, - ['__OFFSET' => $recordedOffsets], - \array_filter([ - 'setting' => $recordedSettings, - 'extension_versions' => $extensionVersions, - ]) - ); - } - - /** - * @return array|bool - * - * @psalm-return false|array{ - * class: class-string, - * code: int|string|null, - * message: string, - * message_regex: string - * } - */ - public function expectedException() - { - $docComment = (string) \substr($this->docComment, 3, -2); - - if (1 !== \preg_match(self::REGEX_EXPECTED_EXCEPTION, $docComment, $matches)) { - return false; - } - - /** @psalm-var class-string $class */ - $class = $matches[1]; - $annotations = $this->symbolAnnotations(); - $code = null; - $message = ''; - $messageRegExp = ''; - - if (isset($matches[2])) { - $message = \trim($matches[2]); - } elseif (isset($annotations['expectedExceptionMessage'])) { - $message = $this->parseAnnotationContent($annotations['expectedExceptionMessage'][0]); - } - - if (isset($annotations['expectedExceptionMessageRegExp'])) { - $messageRegExp = $this->parseAnnotationContent($annotations['expectedExceptionMessageRegExp'][0]); - } - - if (isset($matches[3])) { - $code = $matches[3]; - } elseif (isset($annotations['expectedExceptionCode'])) { - $code = $this->parseAnnotationContent($annotations['expectedExceptionCode'][0]); - } - - if (\is_numeric($code)) { - $code = (int) $code; - } elseif (\is_string($code) && \defined($code)) { - $code = (int) \constant($code); - } - - return [ - 'class' => $class, - 'code' => $code, - 'message' => $message, - 'message_regex' => $messageRegExp, - ]; - } - - /** - * Returns the provided data for a method. - * - * @throws Exception - */ - public function getProvidedData(): ?array - { - /** @noinspection SuspiciousBinaryOperationInspection */ - $data = $this->getDataFromDataProviderAnnotation($this->docComment) ?? $this->getDataFromTestWithAnnotation($this->docComment); - - if ($data === null) { - return null; - } - - if ($data === []) { - throw new SkippedTestError; - } - - foreach ($data as $key => $value) { - if (!\is_array($value)) { - throw new Exception( - \sprintf( - 'Data set %s is invalid.', - \is_int($key) ? '#' . $key : '"' . $key . '"' - ) - ); - } - } - - return $data; - } - - /** - * @psalm-return array - */ - public function getInlineAnnotations(): array - { - $code = \file($this->fileName); - $lineNumber = $this->startLine; - $startLine = $this->startLine - 1; - $endLine = $this->endLine - 1; - $codeLines = \array_slice($code, $startLine, $endLine - $startLine + 1); - $annotations = []; - - foreach ($codeLines as $line) { - if (\preg_match('#/\*\*?\s*@(?P[A-Za-z_-]+)(?:[ \t]+(?P.*?))?[ \t]*\r?\*/$#m', $line, $matches)) { - $annotations[\strtolower($matches['name'])] = [ - 'line' => $lineNumber, - 'value' => $matches['value'], - ]; - } - - $lineNumber++; - } - - return $annotations; - } - - public function symbolAnnotations(): array - { - return $this->symbolAnnotations; - } - - public function isHookToBeExecutedBeforeClass(): bool - { - return $this->isMethod - && false !== \strpos($this->docComment, '@beforeClass'); - } - - public function isHookToBeExecutedAfterClass(): bool - { - return $this->isMethod - && false !== \strpos($this->docComment, '@afterClass'); - } - - public function isToBeExecutedBeforeTest(): bool - { - return 1 === \preg_match('/@before\b/', $this->docComment); - } - - public function isToBeExecutedAfterTest(): bool - { - return 1 === \preg_match('/@after\b/', $this->docComment); - } - - /** - * Parse annotation content to use constant/class constant values - * - * Constants are specified using a starting '@'. For example: @ClassName::CONST_NAME - * - * If the constant is not found the string is used as is to ensure maximum BC. - */ - private function parseAnnotationContent(string $message): string - { - if (\defined($message) && - (\strpos($message, '::') !== false && \substr_count($message, '::') + 1 === 2)) { - return \constant($message); - } - - return $message; - } - - private function getDataFromDataProviderAnnotation(string $docComment): ?array - { - $methodName = null; - $className = $this->className; - - if ($this->isMethod) { - $methodName = $this->name; - } - - if (!\preg_match_all(self::REGEX_DATA_PROVIDER, $docComment, $matches)) { - return null; - } - - $result = []; - - foreach ($matches[1] as $match) { - $dataProviderMethodNameNamespace = \explode('\\', $match); - $leaf = \explode('::', \array_pop($dataProviderMethodNameNamespace)); - $dataProviderMethodName = \array_pop($leaf); - - if (empty($dataProviderMethodNameNamespace)) { - $dataProviderMethodNameNamespace = ''; - } else { - $dataProviderMethodNameNamespace = \implode('\\', $dataProviderMethodNameNamespace) . '\\'; - } - - if (empty($leaf)) { - $dataProviderClassName = $className; - } else { - /** @psalm-var class-string $dataProviderClassName */ - $dataProviderClassName = $dataProviderMethodNameNamespace . \array_pop($leaf); - } - - try { - $dataProviderClass = new \ReflectionClass($dataProviderClassName); - - $dataProviderMethod = $dataProviderClass->getMethod( - $dataProviderMethodName - ); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - if ($dataProviderMethod->isStatic()) { - $object = null; - } else { - $object = $dataProviderClass->newInstance(); - } - - if ($dataProviderMethod->getNumberOfParameters() === 0) { - $data = $dataProviderMethod->invoke($object); - } else { - $data = $dataProviderMethod->invoke($object, $methodName); - } - - if ($data instanceof \Traversable) { - $origData = $data; - $data = []; - - foreach ($origData as $key => $value) { - if (\is_int($key)) { - $data[] = $value; - } elseif (\array_key_exists($key, $data)) { - throw new InvalidDataProviderException( - \sprintf( - 'The key "%s" has already been defined in the data provider "%s".', - $key, - $match - ) - ); - } else { - $data[$key] = $value; - } - } - } - - if (\is_array($data)) { - $result = \array_merge($result, $data); - } - } - - return $result; - } - - /** - * @throws Exception - */ - private function getDataFromTestWithAnnotation(string $docComment): ?array - { - $docComment = $this->cleanUpMultiLineAnnotation($docComment); - - if (!\preg_match(self::REGEX_TEST_WITH, $docComment, $matches, \PREG_OFFSET_CAPTURE)) { - return null; - } - - $offset = \strlen($matches[0][0]) + $matches[0][1]; - $annotationContent = \substr($docComment, $offset); - $data = []; - - foreach (\explode("\n", $annotationContent) as $candidateRow) { - $candidateRow = \trim($candidateRow); - - if ($candidateRow[0] !== '[') { - break; - } - - $dataSet = \json_decode($candidateRow, true); - - if (\json_last_error() !== \JSON_ERROR_NONE) { - throw new Exception( - 'The data set for the @testWith annotation cannot be parsed: ' . \json_last_error_msg() - ); - } - - $data[] = $dataSet; - } - - if (!$data) { - throw new Exception('The data set for the @testWith annotation cannot be parsed.'); - } - - return $data; - } - - private function cleanUpMultiLineAnnotation(string $docComment): string - { - //removing initial ' * ' for docComment - $docComment = \str_replace("\r\n", "\n", $docComment); - $docComment = \preg_replace('/' . '\n' . '\s*' . '\*' . '\s?' . '/', "\n", $docComment); - $docComment = (string) \substr($docComment, 0, -1); - - return \rtrim($docComment, "\n"); - } - - /** @return array> */ - private static function parseDocBlock(string $docBlock): array - { - // Strip away the docblock header and footer to ease parsing of one line annotations - $docBlock = (string) \substr($docBlock, 3, -2); - $annotations = []; - - if (\preg_match_all('/@(?P[A-Za-z_-]+)(?:[ \t]+(?P.*?))?[ \t]*\r?$/m', $docBlock, $matches)) { - $numMatches = \count($matches[0]); - - for ($i = 0; $i < $numMatches; ++$i) { - $annotations[$matches['name'][$i]][] = (string) $matches['value'][$i]; - } - } - - return $annotations; - } - - /** @param \ReflectionClass|\ReflectionFunctionAbstract $reflector */ - private static function extractAnnotationsFromReflector(\Reflector $reflector): array - { - $annotations = []; - - if ($reflector instanceof \ReflectionClass) { - $annotations = \array_merge( - $annotations, - ...\array_map( - function (\ReflectionClass $trait): array { - return self::parseDocBlock((string) $trait->getDocComment()); - }, - \array_values($reflector->getTraits()) - ) - ); - } - - return \array_merge( - $annotations, - self::parseDocBlock((string) $reflector->getDocComment()) - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php b/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php deleted file mode 100644 index 1ae8172..0000000 --- a/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Annotation; - -use PHPUnit\Util\Exception; - -/** - * Reflection information, and therefore DocBlock information, is static within - * a single PHP process. It is therefore okay to use a Singleton registry here. - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Registry -{ - /** @var null|self */ - private static $instance; - - /** @var array indexed by class name */ - private $classDocBlocks = []; - - /** @var array> indexed by class name and method name */ - private $methodDocBlocks = []; - - public static function getInstance(): self - { - return self::$instance ?? self::$instance = new self; - } - - private function __construct() - { - } - - /** - * @throws Exception - * @psalm-param class-string $class - */ - public function forClassName(string $class): DocBlock - { - if (\array_key_exists($class, $this->classDocBlocks)) { - return $this->classDocBlocks[$class]; - } - - try { - $reflection = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - return $this->classDocBlocks[$class] = DocBlock::ofClass($reflection); - } - - /** - * @throws Exception - * @psalm-param class-string $classInHierarchy - */ - public function forMethod(string $classInHierarchy, string $method): DocBlock - { - if (isset($this->methodDocBlocks[$classInHierarchy][$method])) { - return $this->methodDocBlocks[$classInHierarchy][$method]; - } - - try { - $reflection = new \ReflectionMethod($classInHierarchy, $method); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - return $this->methodDocBlocks[$classInHierarchy][$method] = DocBlock::ofMethod($reflection, $classInHierarchy); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Blacklist.php b/vendor/phpunit/phpunit/src/Util/Blacklist.php deleted file mode 100644 index f63c14d..0000000 --- a/vendor/phpunit/phpunit/src/Util/Blacklist.php +++ /dev/null @@ -1,214 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use Composer\Autoload\ClassLoader; -use DeepCopy\DeepCopy; -use Doctrine\Instantiator\Instantiator; -use PharIo\Manifest\Manifest; -use PharIo\Version\Version as PharIoVersion; -use PHP_Token; -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\Project; -use phpDocumentor\Reflection\Type; -use PHPUnit\Framework\TestCase; -use Prophecy\Prophet; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeUnitReverseLookup\Wizard; -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Diff\Diff; -use SebastianBergmann\Environment\Runtime; -use SebastianBergmann\Exporter\Exporter; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; -use SebastianBergmann\GlobalState\Snapshot; -use SebastianBergmann\Invoker\Invoker; -use SebastianBergmann\ObjectEnumerator\Enumerator; -use SebastianBergmann\RecursionContext\Context; -use SebastianBergmann\ResourceOperations\ResourceOperations; -use SebastianBergmann\Timer\Timer; -use SebastianBergmann\Type\TypeName; -use SebastianBergmann\Version; -use Text_Template; -use TheSeer\Tokenizer\Tokenizer; -use Webmozart\Assert\Assert; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Blacklist -{ - /** - * @var array - */ - public static $blacklistedClassNames = [ - // composer - ClassLoader::class => 1, - - // doctrine/instantiator - Instantiator::class => 1, - - // myclabs/deepcopy - DeepCopy::class => 1, - - // phar-io/manifest - Manifest::class => 1, - - // phar-io/version - PharIoVersion::class => 1, - - // phpdocumentor/reflection-common - Project::class => 1, - - // phpdocumentor/reflection-docblock - DocBlock::class => 1, - - // phpdocumentor/type-resolver - Type::class => 1, - - // phpspec/prophecy - Prophet::class => 1, - - // phpunit/phpunit - TestCase::class => 2, - - // phpunit/php-code-coverage - CodeCoverage::class => 1, - - // phpunit/php-file-iterator - FileIteratorFacade::class => 1, - - // phpunit/php-invoker - Invoker::class => 1, - - // phpunit/php-text-template - Text_Template::class => 1, - - // phpunit/php-timer - Timer::class => 1, - - // phpunit/php-token-stream - PHP_Token::class => 1, - - // sebastian/code-unit-reverse-lookup - Wizard::class => 1, - - // sebastian/comparator - Comparator::class => 1, - - // sebastian/diff - Diff::class => 1, - - // sebastian/environment - Runtime::class => 1, - - // sebastian/exporter - Exporter::class => 1, - - // sebastian/global-state - Snapshot::class => 1, - - // sebastian/object-enumerator - Enumerator::class => 1, - - // sebastian/recursion-context - Context::class => 1, - - // sebastian/resource-operations - ResourceOperations::class => 1, - - // sebastian/type - TypeName::class => 1, - - // sebastian/version - Version::class => 1, - - // theseer/tokenizer - Tokenizer::class => 1, - - // webmozart/assert - Assert::class => 1, - ]; - - /** - * @var string[] - */ - private static $directories; - - /** - * @throws Exception - * - * @return string[] - */ - public function getBlacklistedDirectories(): array - { - $this->initialize(); - - return self::$directories; - } - - /** - * @throws Exception - */ - public function isBlacklisted(string $file): bool - { - if (\defined('PHPUNIT_TESTSUITE')) { - return false; - } - - $this->initialize(); - - foreach (self::$directories as $directory) { - if (\strpos($file, $directory) === 0) { - return true; - } - } - - return false; - } - - /** - * @throws Exception - */ - private function initialize(): void - { - if (self::$directories === null) { - self::$directories = []; - - foreach (self::$blacklistedClassNames as $className => $parent) { - if (!\class_exists($className)) { - continue; - } - - try { - $directory = (new \ReflectionClass($className))->getFileName(); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - 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'; - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Color.php b/vendor/phpunit/phpunit/src/Util/Color.php deleted file mode 100644 index c0611d1..0000000 --- a/vendor/phpunit/phpunit/src/Util/Color.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Color -{ - /** - * @var array - */ - private const WHITESPACE_MAP = [ - ' ' => '·', - "\t" => '⇥', - ]; - - /** - * @var array - */ - private const WHITESPACE_EOL_MAP = [ - ' ' => '·', - "\t" => '⇥', - "\n" => '↵', - "\r" => '⟵', - ]; - - /** - * @var array - */ - private static $ansiCodes = [ - 'reset' => '0', - 'bold' => '1', - 'dim' => '2', - 'dim-reset' => '22', - 'underlined' => '4', - 'fg-default' => '39', - 'fg-black' => '30', - 'fg-red' => '31', - 'fg-green' => '32', - 'fg-yellow' => '33', - 'fg-blue' => '34', - 'fg-magenta' => '35', - 'fg-cyan' => '36', - 'fg-white' => '37', - 'bg-default' => '49', - 'bg-black' => '40', - 'bg-red' => '41', - 'bg-green' => '42', - 'bg-yellow' => '43', - 'bg-blue' => '44', - 'bg-magenta' => '45', - 'bg-cyan' => '46', - 'bg-white' => '47', - ]; - - public static function colorize(string $color, string $buffer): string - { - if (\trim($buffer) === '') { - return $buffer; - } - - $codes = \array_map('\trim', \explode(',', $color)); - $styles = []; - - foreach ($codes as $code) { - if (isset(self::$ansiCodes[$code])) { - $styles[] = self::$ansiCodes[$code] ?? ''; - } - } - - if (empty($styles)) { - return $buffer; - } - - return self::optimizeColor(\sprintf("\x1b[%sm", \implode(';', $styles)) . $buffer . "\x1b[0m"); - } - - public static function colorizePath(string $path, ?string $prevPath = null, bool $colorizeFilename = false): string - { - if ($prevPath === null) { - $prevPath = ''; - } - - $path = \explode(\DIRECTORY_SEPARATOR, $path); - $prevPath = \explode(\DIRECTORY_SEPARATOR, $prevPath); - - for ($i = 0; $i < \min(\count($path), \count($prevPath)); $i++) { - if ($path[$i] == $prevPath[$i]) { - $path[$i] = self::dim($path[$i]); - } - } - - if ($colorizeFilename) { - $last = \count($path) - 1; - $path[$last] = \preg_replace_callback( - '/([\-_\.]+|phpt$)/', - static function ($matches) { - return self::dim($matches[0]); - }, - $path[$last] - ); - } - - return self::optimizeColor(\implode(self::dim(\DIRECTORY_SEPARATOR), $path)); - } - - public static function dim(string $buffer): string - { - if (\trim($buffer) === '') { - return $buffer; - } - - return "\e[2m$buffer\e[22m"; - } - - public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string - { - $replaceMap = $visualizeEOL ? self::WHITESPACE_EOL_MAP : self::WHITESPACE_MAP; - - return \preg_replace_callback('/\s+/', static function ($matches) use ($replaceMap) { - return self::dim(\strtr($matches[0], $replaceMap)); - }, $buffer); - } - - private static function optimizeColor(string $buffer): string - { - $patterns = [ - "/\e\\[22m\e\\[2m/" => '', - "/\e\\[([^m]*)m\e\\[([1-9][0-9;]*)m/" => "\e[$1;$2m", - "/(\e\\[[^m]*m)+(\e\\[0m)/" => '$2', - ]; - - return \preg_replace(\array_keys($patterns), \array_values($patterns), $buffer); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Configuration.php b/vendor/phpunit/phpunit/src/Util/Configuration.php deleted file mode 100644 index 952640d..0000000 --- a/vendor/phpunit/phpunit/src/Util/Configuration.php +++ /dev/null @@ -1,1205 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use DOMElement; -use DOMXPath; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\TextUI\ResultPrinter; -use PHPUnit\Util\TestDox\CliTestDoxPrinter; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Configuration -{ - /** - * @var self[] - */ - private static $instances = []; - - /** - * @var \DOMDocument - */ - private $document; - - /** - * @var DOMXPath - */ - private $xpath; - - /** - * @var string - */ - private $filename; - - /** - * @var \LibXMLError[] - */ - private $errors = []; - - /** - * Returns a PHPUnit configuration object. - * - * @throws Exception - */ - public static function getInstance(string $filename): self - { - $realPath = \realpath($filename); - - if ($realPath === false) { - throw new Exception( - \sprintf( - 'Could not read "%s".', - $filename - ) - ); - } - - if (!isset(self::$instances[$realPath])) { - self::$instances[$realPath] = new self($realPath); - } - - return self::$instances[$realPath]; - } - - /** - * Loads a PHPUnit configuration file. - * - * @throws Exception - */ - private function __construct(string $filename) - { - $this->filename = $filename; - $this->document = Xml::loadFile($filename, false, true, true); - $this->xpath = new DOMXPath($this->document); - - $this->validateConfigurationAgainstSchema(); - } - - /** - * @codeCoverageIgnore - */ - private function __clone() - { - } - - public function hasValidationErrors(): bool - { - return \count($this->errors) > 0; - } - - public function getValidationErrors(): array - { - $result = []; - - foreach ($this->errors as $error) { - if (!isset($result[$error->line])) { - $result[$error->line] = []; - } - $result[$error->line][] = \trim($error->message); - } - - return $result; - } - - /** - * Returns the real path to the configuration file. - */ - public function getFilename(): string - { - return $this->filename; - } - - public function getExtensionConfiguration(): array - { - $result = []; - - foreach ($this->xpath->query('extensions/extension') as $extension) { - $result[] = $this->getElementConfigurationParameters($extension); - } - - return $result; - } - - /** - * Returns the configuration for SUT filtering. - */ - public function getFilterConfiguration(): array - { - $addUncoveredFilesFromWhitelist = true; - $processUncoveredFilesFromWhitelist = false; - $includeDirectory = []; - $includeFile = []; - $excludeDirectory = []; - $excludeFile = []; - - $tmp = $this->xpath->query('filter/whitelist'); - - if ($tmp->length === 1) { - if ($tmp->item(0)->hasAttribute('addUncoveredFilesFromWhitelist')) { - $addUncoveredFilesFromWhitelist = $this->getBoolean( - (string) $tmp->item(0)->getAttribute( - 'addUncoveredFilesFromWhitelist' - ), - true - ); - } - - if ($tmp->item(0)->hasAttribute('processUncoveredFilesFromWhitelist')) { - $processUncoveredFilesFromWhitelist = $this->getBoolean( - (string) $tmp->item(0)->getAttribute( - 'processUncoveredFilesFromWhitelist' - ), - false - ); - } - - $includeDirectory = $this->readFilterDirectories( - 'filter/whitelist/directory' - ); - - $includeFile = $this->readFilterFiles( - 'filter/whitelist/file' - ); - - $excludeDirectory = $this->readFilterDirectories( - 'filter/whitelist/exclude/directory' - ); - - $excludeFile = $this->readFilterFiles( - 'filter/whitelist/exclude/file' - ); - } - - return [ - 'whitelist' => [ - 'addUncoveredFilesFromWhitelist' => $addUncoveredFilesFromWhitelist, - 'processUncoveredFilesFromWhitelist' => $processUncoveredFilesFromWhitelist, - 'include' => [ - 'directory' => $includeDirectory, - 'file' => $includeFile, - ], - 'exclude' => [ - 'directory' => $excludeDirectory, - 'file' => $excludeFile, - ], - ], - ]; - } - - /** - * Returns the configuration for groups. - */ - public function getGroupConfiguration(): array - { - return $this->parseGroupConfiguration('groups'); - } - - /** - * Returns the configuration for testdox groups. - */ - public function getTestdoxGroupConfiguration(): array - { - return $this->parseGroupConfiguration('testdoxGroups'); - } - - /** - * Returns the configuration for listeners. - */ - public function getListenerConfiguration(): array - { - $result = []; - - foreach ($this->xpath->query('listeners/listener') as $listener) { - $result[] = $this->getElementConfigurationParameters($listener); - } - - return $result; - } - - /** - * Returns the logging configuration. - */ - public function getLoggingConfiguration(): array - { - $result = []; - - foreach ($this->xpath->query('logging/log') as $log) { - \assert($log instanceof DOMElement); - - $type = (string) $log->getAttribute('type'); - $target = (string) $log->getAttribute('target'); - - if (!$target) { - continue; - } - - $target = $this->toAbsolutePath($target); - - if ($type === 'coverage-html') { - if ($log->hasAttribute('lowUpperBound')) { - $result['lowUpperBound'] = $this->getInteger( - (string) $log->getAttribute('lowUpperBound'), - 50 - ); - } - - if ($log->hasAttribute('highLowerBound')) { - $result['highLowerBound'] = $this->getInteger( - (string) $log->getAttribute('highLowerBound'), - 90 - ); - } - } elseif ($type === 'coverage-crap4j') { - if ($log->hasAttribute('threshold')) { - $result['crap4jThreshold'] = $this->getInteger( - (string) $log->getAttribute('threshold'), - 30 - ); - } - } elseif ($type === 'coverage-text') { - if ($log->hasAttribute('showUncoveredFiles')) { - $result['coverageTextShowUncoveredFiles'] = $this->getBoolean( - (string) $log->getAttribute('showUncoveredFiles'), - false - ); - } - - if ($log->hasAttribute('showOnlySummary')) { - $result['coverageTextShowOnlySummary'] = $this->getBoolean( - (string) $log->getAttribute('showOnlySummary'), - false - ); - } - } - - $result[$type] = $target; - } - - return $result; - } - - /** - * Returns the PHP configuration. - */ - public function getPHPConfiguration(): array - { - $result = [ - 'include_path' => [], - 'ini' => [], - 'const' => [], - 'var' => [], - 'env' => [], - 'post' => [], - 'get' => [], - 'cookie' => [], - 'server' => [], - 'files' => [], - 'request' => [], - ]; - - foreach ($this->xpath->query('php/includePath') as $includePath) { - $path = (string) $includePath->textContent; - - if ($path) { - $result['include_path'][] = $this->toAbsolutePath($path); - } - } - - foreach ($this->xpath->query('php/ini') as $ini) { - \assert($ini instanceof DOMElement); - - $name = (string) $ini->getAttribute('name'); - $value = (string) $ini->getAttribute('value'); - - $result['ini'][$name]['value'] = $value; - } - - foreach ($this->xpath->query('php/const') as $const) { - \assert($const instanceof DOMElement); - - $name = (string) $const->getAttribute('name'); - $value = (string) $const->getAttribute('value'); - - $result['const'][$name]['value'] = $this->getBoolean($value, $value); - } - - foreach (['var', 'env', 'post', 'get', 'cookie', 'server', 'files', 'request'] as $array) { - foreach ($this->xpath->query('php/' . $array) as $var) { - \assert($var instanceof DOMElement); - - $name = (string) $var->getAttribute('name'); - $value = (string) $var->getAttribute('value'); - $verbatim = false; - - if ($var->hasAttribute('verbatim')) { - $verbatim = $this->getBoolean($var->getAttribute('verbatim'), false); - $result[$array][$name]['verbatim'] = $verbatim; - } - - if ($var->hasAttribute('force')) { - $force = $this->getBoolean($var->getAttribute('force'), false); - $result[$array][$name]['force'] = $force; - } - - if (!$verbatim) { - $value = $this->getBoolean($value, $value); - } - - $result[$array][$name]['value'] = $value; - } - } - - return $result; - } - - /** - * Handles the PHP configuration. - */ - public function handlePHPConfiguration(): void - { - $configuration = $this->getPHPConfiguration(); - - if (!empty($configuration['include_path'])) { - \ini_set( - 'include_path', - \implode(\PATH_SEPARATOR, $configuration['include_path']) . - \PATH_SEPARATOR . - \ini_get('include_path') - ); - } - - foreach ($configuration['ini'] as $name => $data) { - $value = $data['value']; - - if (\defined($value)) { - $value = (string) \constant($value); - } - - \ini_set($name, $value); - } - - foreach ($configuration['const'] as $name => $data) { - $value = $data['value']; - - if (!\defined($name)) { - \define($name, $value); - } - } - - foreach (['var', 'post', 'get', 'cookie', 'server', 'files', 'request'] as $array) { - /* - * @see https://github.com/sebastianbergmann/phpunit/issues/277 - */ - switch ($array) { - case 'var': - $target = &$GLOBALS; - - break; - - case 'server': - $target = &$_SERVER; - - break; - - default: - $target = &$GLOBALS['_' . \strtoupper($array)]; - - break; - } - - foreach ($configuration[$array] as $name => $data) { - $target[$name] = $data['value']; - } - } - - foreach ($configuration['env'] as $name => $data) { - $value = $data['value']; - $force = $data['force'] ?? false; - - if ($force || \getenv($name) === false) { - \putenv("{$name}={$value}"); - } - - $value = \getenv($name); - - if (!isset($_ENV[$name])) { - $_ENV[$name] = $value; - } - - if ($force) { - $_ENV[$name] = $value; - } - } - } - - /** - * Returns the PHPUnit configuration. - */ - public function getPHPUnitConfiguration(): array - { - $result = []; - $root = $this->document->documentElement; - - if ($root->hasAttribute('cacheTokens')) { - $result['cacheTokens'] = $this->getBoolean( - (string) $root->getAttribute('cacheTokens'), - false - ); - } - - if ($root->hasAttribute('columns')) { - $columns = (string) $root->getAttribute('columns'); - - if ($columns === 'max') { - $result['columns'] = 'max'; - } else { - $result['columns'] = $this->getInteger($columns, 80); - } - } - - if ($root->hasAttribute('colors')) { - /* only allow boolean for compatibility with previous versions - 'always' only allowed from command line */ - if ($this->getBoolean($root->getAttribute('colors'), false)) { - $result['colors'] = ResultPrinter::COLOR_AUTO; - } else { - $result['colors'] = ResultPrinter::COLOR_NEVER; - } - } - - /* - * @see https://github.com/sebastianbergmann/phpunit/issues/657 - */ - if ($root->hasAttribute('stderr')) { - $result['stderr'] = $this->getBoolean( - (string) $root->getAttribute('stderr'), - false - ); - } - - if ($root->hasAttribute('backupGlobals')) { - $result['backupGlobals'] = $this->getBoolean( - (string) $root->getAttribute('backupGlobals'), - false - ); - } - - if ($root->hasAttribute('backupStaticAttributes')) { - $result['backupStaticAttributes'] = $this->getBoolean( - (string) $root->getAttribute('backupStaticAttributes'), - false - ); - } - - if ($root->getAttribute('bootstrap')) { - $result['bootstrap'] = $this->toAbsolutePath( - (string) $root->getAttribute('bootstrap') - ); - } - - if ($root->hasAttribute('convertDeprecationsToExceptions')) { - $result['convertDeprecationsToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertDeprecationsToExceptions'), - true - ); - } - - if ($root->hasAttribute('convertErrorsToExceptions')) { - $result['convertErrorsToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertErrorsToExceptions'), - true - ); - } - - if ($root->hasAttribute('convertNoticesToExceptions')) { - $result['convertNoticesToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertNoticesToExceptions'), - true - ); - } - - if ($root->hasAttribute('convertWarningsToExceptions')) { - $result['convertWarningsToExceptions'] = $this->getBoolean( - (string) $root->getAttribute('convertWarningsToExceptions'), - true - ); - } - - if ($root->hasAttribute('forceCoversAnnotation')) { - $result['forceCoversAnnotation'] = $this->getBoolean( - (string) $root->getAttribute('forceCoversAnnotation'), - false - ); - } - - if ($root->hasAttribute('disableCodeCoverageIgnore')) { - $result['disableCodeCoverageIgnore'] = $this->getBoolean( - (string) $root->getAttribute('disableCodeCoverageIgnore'), - false - ); - } - - if ($root->hasAttribute('processIsolation')) { - $result['processIsolation'] = $this->getBoolean( - (string) $root->getAttribute('processIsolation'), - false - ); - } - - if ($root->hasAttribute('stopOnDefect')) { - $result['stopOnDefect'] = $this->getBoolean( - (string) $root->getAttribute('stopOnDefect'), - false - ); - } - - if ($root->hasAttribute('stopOnError')) { - $result['stopOnError'] = $this->getBoolean( - (string) $root->getAttribute('stopOnError'), - false - ); - } - - if ($root->hasAttribute('stopOnFailure')) { - $result['stopOnFailure'] = $this->getBoolean( - (string) $root->getAttribute('stopOnFailure'), - false - ); - } - - if ($root->hasAttribute('stopOnWarning')) { - $result['stopOnWarning'] = $this->getBoolean( - (string) $root->getAttribute('stopOnWarning'), - false - ); - } - - if ($root->hasAttribute('stopOnIncomplete')) { - $result['stopOnIncomplete'] = $this->getBoolean( - (string) $root->getAttribute('stopOnIncomplete'), - false - ); - } - - if ($root->hasAttribute('stopOnRisky')) { - $result['stopOnRisky'] = $this->getBoolean( - (string) $root->getAttribute('stopOnRisky'), - false - ); - } - - if ($root->hasAttribute('stopOnSkipped')) { - $result['stopOnSkipped'] = $this->getBoolean( - (string) $root->getAttribute('stopOnSkipped'), - false - ); - } - - if ($root->hasAttribute('failOnWarning')) { - $result['failOnWarning'] = $this->getBoolean( - (string) $root->getAttribute('failOnWarning'), - false - ); - } - - if ($root->hasAttribute('failOnRisky')) { - $result['failOnRisky'] = $this->getBoolean( - (string) $root->getAttribute('failOnRisky'), - false - ); - } - - if ($root->hasAttribute('testSuiteLoaderClass')) { - $result['testSuiteLoaderClass'] = (string) $root->getAttribute( - 'testSuiteLoaderClass' - ); - } - - if ($root->hasAttribute('defaultTestSuite')) { - $result['defaultTestSuite'] = (string) $root->getAttribute( - 'defaultTestSuite' - ); - } - - if ($root->getAttribute('testSuiteLoaderFile')) { - $result['testSuiteLoaderFile'] = $this->toAbsolutePath( - (string) $root->getAttribute('testSuiteLoaderFile') - ); - } - - if ($root->hasAttribute('printerClass')) { - $result['printerClass'] = (string) $root->getAttribute( - 'printerClass' - ); - } - - if ($root->getAttribute('printerFile')) { - $result['printerFile'] = $this->toAbsolutePath( - (string) $root->getAttribute('printerFile') - ); - } - - if ($root->hasAttribute('beStrictAboutChangesToGlobalState')) { - $result['beStrictAboutChangesToGlobalState'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutChangesToGlobalState'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutOutputDuringTests')) { - $result['disallowTestOutput'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutOutputDuringTests'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutResourceUsageDuringSmallTests')) { - $result['beStrictAboutResourceUsageDuringSmallTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutResourceUsageDuringSmallTests'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutTestsThatDoNotTestAnything')) { - $result['reportUselessTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTestsThatDoNotTestAnything'), - true - ); - } - - if ($root->hasAttribute('beStrictAboutTodoAnnotatedTests')) { - $result['disallowTodoAnnotatedTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTodoAnnotatedTests'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutCoversAnnotation')) { - $result['strictCoverage'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutCoversAnnotation'), - false - ); - } - - if ($root->hasAttribute('defaultTimeLimit')) { - $result['defaultTimeLimit'] = $this->getInteger( - (string) $root->getAttribute('defaultTimeLimit'), - 1 - ); - } - - if ($root->hasAttribute('enforceTimeLimit')) { - $result['enforceTimeLimit'] = $this->getBoolean( - (string) $root->getAttribute('enforceTimeLimit'), - false - ); - } - - if ($root->hasAttribute('ignoreDeprecatedCodeUnitsFromCodeCoverage')) { - $result['ignoreDeprecatedCodeUnitsFromCodeCoverage'] = $this->getBoolean( - (string) $root->getAttribute('ignoreDeprecatedCodeUnitsFromCodeCoverage'), - false - ); - } - - if ($root->hasAttribute('timeoutForSmallTests')) { - $result['timeoutForSmallTests'] = $this->getInteger( - (string) $root->getAttribute('timeoutForSmallTests'), - 1 - ); - } - - if ($root->hasAttribute('timeoutForMediumTests')) { - $result['timeoutForMediumTests'] = $this->getInteger( - (string) $root->getAttribute('timeoutForMediumTests'), - 10 - ); - } - - if ($root->hasAttribute('timeoutForLargeTests')) { - $result['timeoutForLargeTests'] = $this->getInteger( - (string) $root->getAttribute('timeoutForLargeTests'), - 60 - ); - } - - if ($root->hasAttribute('reverseDefectList')) { - $result['reverseDefectList'] = $this->getBoolean( - (string) $root->getAttribute('reverseDefectList'), - false - ); - } - - if ($root->hasAttribute('verbose')) { - $result['verbose'] = $this->getBoolean( - (string) $root->getAttribute('verbose'), - false - ); - } - - if ($root->hasAttribute('testdox')) { - $testdox = $this->getBoolean( - (string) $root->getAttribute('testdox'), - false - ); - - if ($testdox) { - if (isset($result['printerClass'])) { - $result['conflictBetweenPrinterClassAndTestdox'] = true; - } else { - $result['printerClass'] = CliTestDoxPrinter::class; - } - } - } - - if ($root->hasAttribute('registerMockObjectsFromTestArgumentsRecursively')) { - $result['registerMockObjectsFromTestArgumentsRecursively'] = $this->getBoolean( - (string) $root->getAttribute('registerMockObjectsFromTestArgumentsRecursively'), - false - ); - } - - if ($root->hasAttribute('extensionsDirectory')) { - $result['extensionsDirectory'] = $this->toAbsolutePath( - (string) $root->getAttribute( - 'extensionsDirectory' - ) - ); - } - - if ($root->hasAttribute('cacheResult')) { - $result['cacheResult'] = $this->getBoolean( - (string) $root->getAttribute('cacheResult'), - true - ); - } - - if ($root->hasAttribute('cacheResultFile')) { - $result['cacheResultFile'] = $this->toAbsolutePath( - (string) $root->getAttribute('cacheResultFile') - ); - } - - if ($root->hasAttribute('executionOrder')) { - foreach (\explode(',', $root->getAttribute('executionOrder')) as $order) { - switch ($order) { - case 'default': - $result['executionOrder'] = TestSuiteSorter::ORDER_DEFAULT; - $result['executionOrderDefects'] = TestSuiteSorter::ORDER_DEFAULT; - $result['resolveDependencies'] = false; - - break; - - case 'defects': - $result['executionOrderDefects'] = TestSuiteSorter::ORDER_DEFECTS_FIRST; - - break; - - case 'depends': - $result['resolveDependencies'] = true; - - break; - - case 'duration': - $result['executionOrder'] = TestSuiteSorter::ORDER_DURATION; - - break; - - case 'no-depends': - $result['resolveDependencies'] = false; - - break; - - case 'random': - $result['executionOrder'] = TestSuiteSorter::ORDER_RANDOMIZED; - - break; - - case 'reverse': - $result['executionOrder'] = TestSuiteSorter::ORDER_REVERSED; - - break; - - case 'size': - $result['executionOrder'] = TestSuiteSorter::ORDER_SIZE; - - break; - } - } - } - - if ($root->hasAttribute('resolveDependencies')) { - $result['resolveDependencies'] = $this->getBoolean( - (string) $root->getAttribute('resolveDependencies'), - false - ); - } - - if ($root->hasAttribute('noInteraction')) { - $result['noInteraction'] = $this->getBoolean( - (string) $root->getAttribute('noInteraction'), - false - ); - } - - return $result; - } - - /** - * Returns the test suite configuration. - * - * @throws Exception - */ - public function getTestSuiteConfiguration(string $testSuiteFilter = ''): TestSuite - { - $testSuiteNodes = $this->xpath->query('testsuites/testsuite'); - - if ($testSuiteNodes->length === 0) { - $testSuiteNodes = $this->xpath->query('testsuite'); - } - - if ($testSuiteNodes->length === 1) { - return $this->getTestSuite($testSuiteNodes->item(0), $testSuiteFilter); - } - - $suite = new TestSuite; - - foreach ($testSuiteNodes as $testSuiteNode) { - $suite->addTestSuite( - $this->getTestSuite($testSuiteNode, $testSuiteFilter) - ); - } - - return $suite; - } - - /** - * Returns the test suite names from the configuration. - */ - public function getTestSuiteNames(): array - { - $names = []; - - foreach ($this->xpath->query('*/testsuite') as $node) { - /* @var DOMElement $node */ - $names[] = $node->getAttribute('name'); - } - - return $names; - } - - private function validateConfigurationAgainstSchema(): void - { - $original = \libxml_use_internal_errors(true); - $xsdFilename = __DIR__ . '/../../phpunit.xsd'; - - if (\defined('__PHPUNIT_PHAR_ROOT__')) { - $xsdFilename = __PHPUNIT_PHAR_ROOT__ . '/phpunit.xsd'; - } - - $this->document->schemaValidate($xsdFilename); - $this->errors = \libxml_get_errors(); - \libxml_clear_errors(); - \libxml_use_internal_errors($original); - } - - /** - * Collects and returns the configuration arguments from the PHPUnit - * XML configuration - */ - private function getConfigurationArguments(\DOMNodeList $nodes): array - { - $arguments = []; - - if ($nodes->length === 0) { - return $arguments; - } - - foreach ($nodes as $node) { - if (!$node instanceof DOMElement) { - continue; - } - - if ($node->tagName !== 'arguments') { - continue; - } - - foreach ($node->childNodes as $argument) { - if (!$argument instanceof DOMElement) { - continue; - } - - if ($argument->tagName === 'file' || $argument->tagName === 'directory') { - $arguments[] = $this->toAbsolutePath((string) $argument->textContent); - } else { - $arguments[] = Xml::xmlToVariable($argument); - } - } - } - - return $arguments; - } - - /** - * @throws \PHPUnit\Framework\Exception - */ - private function getTestSuite(DOMElement $testSuiteNode, string $testSuiteFilter = ''): TestSuite - { - if ($testSuiteNode->hasAttribute('name')) { - $suite = new TestSuite( - (string) $testSuiteNode->getAttribute('name') - ); - } else { - $suite = new TestSuite; - } - - $exclude = []; - - foreach ($testSuiteNode->getElementsByTagName('exclude') as $excludeNode) { - $excludeFile = (string) $excludeNode->textContent; - - if ($excludeFile) { - $exclude[] = $this->toAbsolutePath($excludeFile); - } - } - - $fileIteratorFacade = new FileIteratorFacade; - $testSuiteFilter = $testSuiteFilter ? \explode(',', $testSuiteFilter) : []; - - foreach ($testSuiteNode->getElementsByTagName('directory') as $directoryNode) { - \assert($directoryNode instanceof DOMElement); - - if (!empty($testSuiteFilter) && !\in_array($directoryNode->parentNode->getAttribute('name'), $testSuiteFilter)) { - continue; - } - - $directory = (string) $directoryNode->textContent; - - if (empty($directory)) { - continue; - } - - if (!$this->satisfiesPhpVersion($directoryNode)) { - continue; - } - - $files = $fileIteratorFacade->getFilesAsArray( - $this->toAbsolutePath($directory), - $directoryNode->hasAttribute('suffix') ? (string) $directoryNode->getAttribute('suffix') : 'Test.php', - $directoryNode->hasAttribute('prefix') ? (string) $directoryNode->getAttribute('prefix') : '', - $exclude - ); - - $suite->addTestFiles($files); - } - - foreach ($testSuiteNode->getElementsByTagName('file') as $fileNode) { - \assert($fileNode instanceof DOMElement); - - if (!empty($testSuiteFilter) && !\in_array($fileNode->parentNode->getAttribute('name'), $testSuiteFilter)) { - continue; - } - - $file = (string) $fileNode->textContent; - - if (empty($file)) { - continue; - } - - $file = $fileIteratorFacade->getFilesAsArray( - $this->toAbsolutePath($file) - ); - - if (!isset($file[0])) { - continue; - } - - $file = $file[0]; - - if (!$this->satisfiesPhpVersion($fileNode)) { - continue; - } - - $suite->addTestFile($file); - } - - return $suite; - } - - private function satisfiesPhpVersion(DOMElement $node): bool - { - $phpVersion = \PHP_VERSION; - $phpVersionOperator = '>='; - - if ($node->hasAttribute('phpVersion')) { - $phpVersion = (string) $node->getAttribute('phpVersion'); - } - - if ($node->hasAttribute('phpVersionOperator')) { - $phpVersionOperator = (string) $node->getAttribute('phpVersionOperator'); - } - - return \version_compare(\PHP_VERSION, $phpVersion, $phpVersionOperator); - } - - /** - * if $value is 'false' or 'true', this returns the value that $value represents. - * Otherwise, returns $default, which may be a string in rare cases. - * See PHPUnit\Util\ConfigurationTest::testPHPConfigurationIsReadCorrectly - * - * @param bool|string $default - * - * @return bool|string - */ - private function getBoolean(string $value, $default) - { - if (\strtolower($value) === 'false') { - return false; - } - - if (\strtolower($value) === 'true') { - return true; - } - - return $default; - } - - private function getInteger(string $value, int $default): int - { - if (\is_numeric($value)) { - return (int) $value; - } - - return $default; - } - - private function readFilterDirectories(string $query): array - { - $directories = []; - - foreach ($this->xpath->query($query) as $directoryNode) { - \assert($directoryNode instanceof DOMElement); - - $directoryPath = (string) $directoryNode->textContent; - - if (!$directoryPath) { - continue; - } - - $directories[] = [ - 'path' => $this->toAbsolutePath($directoryPath), - 'prefix' => $directoryNode->hasAttribute('prefix') ? (string) $directoryNode->getAttribute('prefix') : '', - 'suffix' => $directoryNode->hasAttribute('suffix') ? (string) $directoryNode->getAttribute('suffix') : '.php', - 'group' => $directoryNode->hasAttribute('group') ? (string) $directoryNode->getAttribute('group') : 'DEFAULT', - ]; - } - - return $directories; - } - - /** - * @return string[] - */ - private function readFilterFiles(string $query): array - { - $files = []; - - foreach ($this->xpath->query($query) as $file) { - $filePath = (string) $file->textContent; - - if ($filePath) { - $files[] = $this->toAbsolutePath($filePath); - } - } - - return $files; - } - - private function toAbsolutePath(string $path, bool $useIncludePath = false): string - { - $path = \trim($path); - - if (\strpos($path, '/') === 0) { - return $path; - } - - // Matches the following on Windows: - // - \\NetworkComputer\Path - // - \\.\D: - // - \\.\c: - // - C:\Windows - // - C:\windows - // - C:/windows - // - c:/windows - if (\defined('PHP_WINDOWS_VERSION_BUILD') && - ($path[0] === '\\' || (\strlen($path) >= 3 && \preg_match('#^[A-Z]\:[/\\\]#i', \substr($path, 0, 3))))) { - return $path; - } - - if (\strpos($path, '://') !== false) { - return $path; - } - - $file = \dirname($this->filename) . \DIRECTORY_SEPARATOR . $path; - - if ($useIncludePath && !\file_exists($file)) { - $includePathFile = \stream_resolve_include_path($path); - - if ($includePathFile) { - $file = $includePathFile; - } - } - - return $file; - } - - private function parseGroupConfiguration(string $root): array - { - $groups = [ - 'include' => [], - 'exclude' => [], - ]; - - foreach ($this->xpath->query($root . '/include/group') as $group) { - $groups['include'][] = (string) $group->textContent; - } - - foreach ($this->xpath->query($root . '/exclude/group') as $group) { - $groups['exclude'][] = (string) $group->textContent; - } - - return $groups; - } - - private function getElementConfigurationParameters(DOMElement $element): array - { - $class = (string) $element->getAttribute('class'); - $file = ''; - $arguments = $this->getConfigurationArguments($element->childNodes); - - if ($element->getAttribute('file')) { - $file = $this->toAbsolutePath( - (string) $element->getAttribute('file'), - true - ); - } - - return [ - 'class' => $class, - 'file' => $file, - 'arguments' => $arguments, - ]; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php b/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php deleted file mode 100644 index f2727fa..0000000 --- a/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurationGenerator -{ - /** - * @var string - */ - private const TEMPLATE = << - - - - {tests_directory} - - - - - - {src_directory} - - - - -EOT; - - public function generateDefaultConfiguration(string $phpunitVersion, string $bootstrapScript, string $testsDirectory, string $srcDirectory): string - { - return \str_replace( - [ - '{phpunit_version}', - '{bootstrap_script}', - '{tests_directory}', - '{src_directory}', - ], - [ - $phpunitVersion, - $bootstrapScript, - $testsDirectory, - $srcDirectory, - ], - self::TEMPLATE - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php b/vendor/phpunit/phpunit/src/Util/ErrorHandler.php deleted file mode 100644 index 99e3ae2..0000000 --- a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * 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\Error\Deprecated; -use PHPUnit\Framework\Error\Error; -use PHPUnit\Framework\Error\Notice; -use PHPUnit\Framework\Error\Warning; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorHandler -{ - /** - * @var bool - */ - private $convertDeprecationsToExceptions; - - /** - * @var bool - */ - private $convertErrorsToExceptions; - - /** - * @var bool - */ - private $convertNoticesToExceptions; - - /** - * @var bool - */ - private $convertWarningsToExceptions; - - /** - * @var bool - */ - private $registered = false; - - public static function invokeIgnoringWarnings(callable $callable) - { - \set_error_handler( - static function ($errorNumber, $errorString) { - if ($errorNumber === \E_WARNING) { - return; - } - - return false; - } - ); - - $result = $callable(); - - \restore_error_handler(); - - return $result; - } - - public function __construct(bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions) - { - $this->convertDeprecationsToExceptions = $convertDeprecationsToExceptions; - $this->convertErrorsToExceptions = $convertErrorsToExceptions; - $this->convertNoticesToExceptions = $convertNoticesToExceptions; - $this->convertWarningsToExceptions = $convertWarningsToExceptions; - } - - public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool - { - /* - * Do not raise an exception when the error suppression operator (@) was used. - * - * @see https://github.com/sebastianbergmann/phpunit/issues/3739 - */ - if (!($errorNumber & \error_reporting())) { - return false; - } - - switch ($errorNumber) { - case \E_NOTICE: - case \E_USER_NOTICE: - case \E_STRICT: - if (!$this->convertNoticesToExceptions) { - return false; - } - - throw new Notice($errorString, $errorNumber, $errorFile, $errorLine); - - case \E_WARNING: - case \E_USER_WARNING: - if (!$this->convertWarningsToExceptions) { - return false; - } - - throw new Warning($errorString, $errorNumber, $errorFile, $errorLine); - - case \E_DEPRECATED: - case \E_USER_DEPRECATED: - if (!$this->convertDeprecationsToExceptions) { - return false; - } - - throw new Deprecated($errorString, $errorNumber, $errorFile, $errorLine); - - default: - if (!$this->convertErrorsToExceptions) { - return false; - } - - throw new Error($errorString, $errorNumber, $errorFile, $errorLine); - } - } - - public function register(): void - { - if ($this->registered) { - return; - } - - $oldErrorHandler = \set_error_handler($this); - - if ($oldErrorHandler !== null) { - \restore_error_handler(); - - return; - } - - $this->registered = true; - } - - public function unregister(): void - { - if (!$this->registered) { - return; - } - - \restore_error_handler(); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception.php b/vendor/phpunit/phpunit/src/Util/Exception.php deleted file mode 100644 index da452f4..0000000 --- a/vendor/phpunit/phpunit/src/Util/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends \RuntimeException implements \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Util/FileLoader.php b/vendor/phpunit/phpunit/src/Util/FileLoader.php deleted file mode 100644 index 2c5f7ca..0000000 --- a/vendor/phpunit/phpunit/src/Util/FileLoader.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * 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\Exception; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FileLoader -{ - /** - * Checks if a PHP sourcecode file is readable. The sourcecode file is loaded through the load() method. - * - * As a fallback, PHP looks in the directory of the file executing the stream_resolve_include_path function. - * We do not want to load the Test.php file here, so skip it if it found that. - * PHP prioritizes the include_path setting, so if the current directory is in there, it will first look in the - * current working directory. - * - * @throws Exception - */ - public static function checkAndLoad(string $filename): string - { - $includePathFilename = \stream_resolve_include_path($filename); - - if (!$includePathFilename) { - throw new Exception( - \sprintf('Cannot open file "%s".' . "\n", $filename) - ); - } - - $localFile = __DIR__ . \DIRECTORY_SEPARATOR . $filename; - - if ($includePathFilename === $localFile || !self::isReadable($includePathFilename)) { - throw new Exception( - \sprintf('Cannot open file "%s".' . "\n", $filename) - ); - } - - self::load($includePathFilename); - - return $includePathFilename; - } - - /** - * Loads a PHP sourcefile. - */ - public static function load(string $filename): void - { - $oldVariableNames = \array_keys(\get_defined_vars()); - - include_once $filename; - - $newVariables = \get_defined_vars(); - - foreach (\array_diff(\array_keys($newVariables), $oldVariableNames) as $variableName) { - if ($variableName !== 'oldVariableNames') { - $GLOBALS[$variableName] = $newVariables[$variableName]; - } - } - } - - /** - * @see https://github.com/sebastianbergmann/phpunit/pull/2751 - */ - private static function isReadable(string $filename): bool - { - return @\fopen($filename, 'r') !== false; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Filesystem.php b/vendor/phpunit/phpunit/src/Util/Filesystem.php deleted file mode 100644 index 8207a4f..0000000 --- a/vendor/phpunit/phpunit/src/Util/Filesystem.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Filesystem -{ - /** - * Maps class names to source file names: - * - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php - * - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php - */ - public static function classNameToFilename(string $className): string - { - return \str_replace( - ['_', '\\'], - \DIRECTORY_SEPARATOR, - $className - ) . '.php'; - } - - public static function createDirectory(string $directory): bool - { - return !(!\is_dir($directory) && !@\mkdir($directory, 0777, true) && !\is_dir($directory)); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php deleted file mode 100644 index b37708d..0000000 --- a/vendor/phpunit/phpunit/src/Util/Filter.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * 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\Exception; -use PHPUnit\Framework\SyntheticError; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Filter -{ - /** - * @throws Exception - */ - public static function getFilteredStacktrace(\Throwable $t): string - { - $prefix = false; - $script = \realpath($GLOBALS['_SERVER']['SCRIPT_NAME']); - - if (\defined('__PHPUNIT_PHAR_ROOT__')) { - $prefix = __PHPUNIT_PHAR_ROOT__; - } - - $filteredStacktrace = ''; - - if ($t instanceof SyntheticError) { - $eTrace = $t->getSyntheticTrace(); - $eFile = $t->getSyntheticFile(); - $eLine = $t->getSyntheticLine(); - } elseif ($t instanceof Exception) { - $eTrace = $t->getSerializableTrace(); - $eFile = $t->getFile(); - $eLine = $t->getLine(); - } else { - if ($t->getPrevious()) { - $t = $t->getPrevious(); - } - - $eTrace = $t->getTrace(); - $eFile = $t->getFile(); - $eLine = $t->getLine(); - } - - if (!self::frameExists($eTrace, $eFile, $eLine)) { - \array_unshift( - $eTrace, - ['file' => $eFile, 'line' => $eLine] - ); - } - - $blacklist = new Blacklist; - - foreach ($eTrace as $frame) { - if (isset($frame['file']) && \is_file($frame['file']) && - (empty($GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST']) || !\in_array($frame['file'], $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'])) && - !$blacklist->isBlacklisted($frame['file']) && - ($prefix === false || \strpos($frame['file'], $prefix) !== 0) && - $frame['file'] !== $script) { - $filteredStacktrace .= \sprintf( - "%s:%s\n", - $frame['file'], - $frame['line'] ?? '?' - ); - } - } - - return $filteredStacktrace; - } - - private static function frameExists(array $trace, string $file, int $line): bool - { - foreach ($trace as $frame) { - if (isset($frame['file']) && $frame['file'] === $file && - isset($frame['line']) && $frame['line'] === $line) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Getopt.php b/vendor/phpunit/phpunit/src/Util/Getopt.php deleted file mode 100644 index e361383..0000000 --- a/vendor/phpunit/phpunit/src/Util/Getopt.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * 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\Exception; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Getopt -{ - /** - * @throws Exception - */ - public static function getopt(array $args, string $short_options, array $long_options = null): array - { - if (empty($args)) { - return [[], []]; - } - - $opts = []; - $non_opts = []; - - if ($long_options) { - \sort($long_options); - } - - if (isset($args[0][0]) && $args[0][0] !== '-') { - \array_shift($args); - } - - \reset($args); - - $args = \array_map('trim', $args); - - /* @noinspection ComparisonOperandsOrderInspection */ - while (false !== $arg = \current($args)) { - $i = \key($args); - \next($args); - - if ($arg === '') { - continue; - } - - if ($arg === '--') { - $non_opts = \array_merge($non_opts, \array_slice($args, $i + 1)); - - break; - } - - if ($arg[0] !== '-' || (\strlen($arg) > 1 && $arg[1] === '-' && !$long_options)) { - $non_opts[] = $args[$i]; - - continue; - } - - if (\strlen($arg) > 1 && $arg[1] === '-') { - self::parseLongOption( - \substr($arg, 2), - $long_options, - $opts, - $args - ); - } else { - self::parseShortOption( - \substr($arg, 1), - $short_options, - $opts, - $args - ); - } - } - - return [$opts, $non_opts]; - } - - /** - * @throws Exception - */ - private static function parseShortOption(string $arg, string $short_options, array &$opts, array &$args): void - { - $argLen = \strlen($arg); - - for ($i = 0; $i < $argLen; $i++) { - $opt = $arg[$i]; - $opt_arg = null; - - if ($arg[$i] === ':' || ($spec = \strstr($short_options, $opt)) === false) { - throw new Exception( - "unrecognized option -- $opt" - ); - } - - if (\strlen($spec) > 1 && $spec[1] === ':') { - if ($i + 1 < $argLen) { - $opts[] = [$opt, \substr($arg, $i + 1)]; - - break; - } - - if (!(\strlen($spec) > 2 && $spec[2] === ':')) { - /* @noinspection ComparisonOperandsOrderInspection */ - if (false === $opt_arg = \current($args)) { - throw new Exception( - "option requires an argument -- $opt" - ); - } - - \next($args); - } - } - - $opts[] = [$opt, $opt_arg]; - } - } - - /** - * @throws Exception - */ - private static function parseLongOption(string $arg, array $long_options, array &$opts, array &$args): void - { - $count = \count($long_options); - $list = \explode('=', $arg); - $opt = $list[0]; - $opt_arg = null; - - if (\count($list) > 1) { - $opt_arg = $list[1]; - } - - $opt_len = \strlen($opt); - - foreach ($long_options as $i => $long_opt) { - $opt_start = \substr($long_opt, 0, $opt_len); - - if ($opt_start !== $opt) { - continue; - } - - $opt_rest = \substr($long_opt, $opt_len); - - if ($opt_rest !== '' && $i + 1 < $count && $opt[0] !== '=' && \strpos($long_options[$i + 1], $opt) === 0) { - throw new Exception( - "option --$opt is ambiguous" - ); - } - - if (\substr($long_opt, -1) === '=') { - /* @noinspection StrlenInEmptyStringCheckContextInspection */ - if (\substr($long_opt, -2) !== '==' && !\strlen((string) $opt_arg)) { - /* @noinspection ComparisonOperandsOrderInspection */ - if (false === $opt_arg = \current($args)) { - throw new Exception( - "option --$opt requires an argument" - ); - } - - \next($args); - } - } elseif ($opt_arg) { - throw new Exception( - "option --$opt doesn't allow an argument" - ); - } - - $full_option = '--' . \preg_replace('/={1,2}$/', '', $long_opt); - $opts[] = [$full_option, $opt_arg]; - - return; - } - - throw new Exception("unrecognized option --$opt"); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/GlobalState.php b/vendor/phpunit/phpunit/src/Util/GlobalState.php deleted file mode 100644 index 4a8dadb..0000000 --- a/vendor/phpunit/phpunit/src/Util/GlobalState.php +++ /dev/null @@ -1,179 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use Closure; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class GlobalState -{ - /** - * @var string[] - */ - private const SUPER_GLOBAL_ARRAYS = [ - '_ENV', - '_POST', - '_GET', - '_COOKIE', - '_SERVER', - '_FILES', - '_REQUEST', - ]; - - /** - * @throws Exception - */ - public static function getIncludedFilesAsString(): string - { - return static::processIncludedFilesAsString(\get_included_files()); - } - - /** - * @param string[] $files - * - * @throws Exception - */ - public static function processIncludedFilesAsString(array $files): string - { - $blacklist = new Blacklist; - $prefix = false; - $result = ''; - - if (\defined('__PHPUNIT_PHAR__')) { - $prefix = 'phar://' . __PHPUNIT_PHAR__ . '/'; - } - - for ($i = \count($files) - 1; $i > 0; $i--) { - $file = $files[$i]; - - if (!empty($GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST']) && - \in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'])) { - continue; - } - - if ($prefix !== false && \strpos($file, $prefix) === 0) { - continue; - } - - // Skip virtual file system protocols - if (\preg_match('/^(vfs|phpvfs[a-z0-9]+):/', $file)) { - continue; - } - - if (!$blacklist->isBlacklisted($file) && \is_file($file)) { - $result = 'require_once \'' . $file . "';\n" . $result; - } - } - - return $result; - } - - public static function getIniSettingsAsString(): string - { - $result = ''; - - foreach (\ini_get_all(null, false) as $key => $value) { - $result .= \sprintf( - '@ini_set(%s, %s);' . "\n", - self::exportVariable($key), - self::exportVariable((string) $value) - ); - } - - return $result; - } - - public static function getConstantsAsString(): string - { - $constants = \get_defined_constants(true); - $result = ''; - - if (isset($constants['user'])) { - foreach ($constants['user'] as $name => $value) { - $result .= \sprintf( - 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n", - $name, - $name, - self::exportVariable($value) - ); - } - } - - return $result; - } - - public static function getGlobalsAsString(): string - { - $result = ''; - - foreach (self::SUPER_GLOBAL_ARRAYS as $superGlobalArray) { - if (isset($GLOBALS[$superGlobalArray]) && \is_array($GLOBALS[$superGlobalArray])) { - foreach (\array_keys($GLOBALS[$superGlobalArray]) as $key) { - if ($GLOBALS[$superGlobalArray][$key] instanceof Closure) { - continue; - } - - $result .= \sprintf( - '$GLOBALS[\'%s\'][\'%s\'] = %s;' . "\n", - $superGlobalArray, - $key, - self::exportVariable($GLOBALS[$superGlobalArray][$key]) - ); - } - } - } - - $blacklist = self::SUPER_GLOBAL_ARRAYS; - $blacklist[] = 'GLOBALS'; - - foreach (\array_keys($GLOBALS) as $key) { - if (!$GLOBALS[$key] instanceof Closure && !\in_array($key, $blacklist, true)) { - $result .= \sprintf( - '$GLOBALS[\'%s\'] = %s;' . "\n", - $key, - self::exportVariable($GLOBALS[$key]) - ); - } - } - - return $result; - } - - private static function exportVariable($variable): string - { - if (\is_scalar($variable) || $variable === null || - (\is_array($variable) && self::arrayOnlyContainsScalars($variable))) { - return \var_export($variable, true); - } - - return 'unserialize(' . \var_export(\serialize($variable), true) . ')'; - } - - private static function arrayOnlyContainsScalars(array $array): bool - { - $result = true; - - foreach ($array as $element) { - if (\is_array($element)) { - $result = self::arrayOnlyContainsScalars($element); - } elseif (!\is_scalar($element) && $element !== null) { - $result = false; - } - - if (!$result) { - break; - } - } - - return $result; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Json.php b/vendor/phpunit/phpunit/src/Util/Json.php deleted file mode 100644 index 2bd6aa4..0000000 --- a/vendor/phpunit/phpunit/src/Util/Json.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * 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\Exception; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Json -{ - /** - * Prettify json string - * - * @throws \PHPUnit\Framework\Exception - */ - public static function prettify(string $json): string - { - $decodedJson = \json_decode($json, true); - - if (\json_last_error()) { - throw new Exception( - 'Cannot prettify invalid json' - ); - } - - return \json_encode($decodedJson, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES); - } - - /* - * To allow comparison of JSON strings, first process them into a consistent - * format so that they can be compared as strings. - * @return array ($error, $canonicalized_json) The $error parameter is used - * to indicate an error decoding the json. This is used to avoid ambiguity - * with JSON strings consisting entirely of 'null' or 'false'. - */ - public static function canonicalize(string $json): array - { - $decodedJson = \json_decode($json); - - if (\json_last_error()) { - return [true, null]; - } - - self::recursiveSort($decodedJson); - - $reencodedJson = \json_encode($decodedJson); - - return [false, $reencodedJson]; - } - - /* - * JSON object keys are unordered while PHP array keys are ordered. - * Sort all array keys to ensure both the expected and actual values have - * their keys in the same order. - */ - private static function recursiveSort(&$json): void - { - if (!\is_array($json)) { - // If the object is not empty, change it to an associative array - // so we can sort the keys (and we will still re-encode it - // correctly, since PHP encodes associative arrays as JSON objects.) - // But EMPTY objects MUST remain empty objects. (Otherwise we will - // re-encode it as a JSON array rather than a JSON object.) - // See #2919. - if (\is_object($json) && \count((array) $json) > 0) { - $json = (array) $json; - } else { - return; - } - } - - \ksort($json); - - foreach ($json as $key => &$value) { - self::recursiveSort($value); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php b/vendor/phpunit/phpunit/src/Util/Log/JUnit.php deleted file mode 100644 index f6ba6ed..0000000 --- a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php +++ /dev/null @@ -1,406 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Log; - -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\ExceptionWrapper; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestFailure; -use PHPUnit\Framework\TestListener; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Framework\Warning; -use PHPUnit\Util\Exception; -use PHPUnit\Util\Filter; -use PHPUnit\Util\Printer; -use PHPUnit\Util\Xml; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class JUnit extends Printer implements TestListener -{ - /** - * @var \DOMDocument - */ - private $document; - - /** - * @var \DOMElement - */ - private $root; - - /** - * @var bool - */ - private $reportRiskyTests = false; - - /** - * @var \DOMElement[] - */ - private $testSuites = []; - - /** - * @var int[] - */ - private $testSuiteTests = [0]; - - /** - * @var int[] - */ - private $testSuiteAssertions = [0]; - - /** - * @var int[] - */ - private $testSuiteErrors = [0]; - - /** - * @var int[] - */ - private $testSuiteFailures = [0]; - - /** - * @var int[] - */ - private $testSuiteSkipped = [0]; - - /** - * @var int[] - */ - private $testSuiteTimes = [0]; - - /** - * @var int - */ - private $testSuiteLevel = 0; - - /** - * @var \DOMElement - */ - private $currentTestCase; - - /** - * @param null|mixed $out - */ - public function __construct($out = null, bool $reportRiskyTests = false) - { - $this->document = new \DOMDocument('1.0', 'UTF-8'); - $this->document->formatOutput = true; - - $this->root = $this->document->createElement('testsuites'); - $this->document->appendChild($this->root); - - parent::__construct($out); - - $this->reportRiskyTests = $reportRiskyTests; - } - - /** - * Flush buffer and close output. - */ - public function flush(): void - { - $this->write($this->getXML()); - - parent::flush(); - } - - /** - * An error occurred. - */ - public function addError(Test $test, \Throwable $t, float $time): void - { - $this->doAddFault($test, $t, $time, 'error'); - $this->testSuiteErrors[$this->testSuiteLevel]++; - } - - /** - * A warning occurred. - */ - public function addWarning(Test $test, Warning $e, float $time): void - { - $this->doAddFault($test, $e, $time, 'warning'); - $this->testSuiteFailures[$this->testSuiteLevel]++; - } - - /** - * A failure occurred. - */ - public function addFailure(Test $test, AssertionFailedError $e, float $time): void - { - $this->doAddFault($test, $e, $time, 'failure'); - $this->testSuiteFailures[$this->testSuiteLevel]++; - } - - /** - * Incomplete test. - */ - public function addIncompleteTest(Test $test, \Throwable $t, float $time): void - { - $this->doAddSkipped(); - } - - /** - * Risky test. - */ - public function addRiskyTest(Test $test, \Throwable $t, float $time): void - { - if (!$this->reportRiskyTests || $this->currentTestCase === null) { - return; - } - - $error = $this->document->createElement( - 'error', - Xml::prepareString( - "Risky Test\n" . - Filter::getFilteredStacktrace($t) - ) - ); - - $error->setAttribute('type', \get_class($t)); - - $this->currentTestCase->appendChild($error); - - $this->testSuiteErrors[$this->testSuiteLevel]++; - } - - /** - * Skipped test. - */ - public function addSkippedTest(Test $test, \Throwable $t, float $time): void - { - $this->doAddSkipped(); - } - - /** - * A testsuite started. - */ - public function startTestSuite(TestSuite $suite): void - { - $testSuite = $this->document->createElement('testsuite'); - $testSuite->setAttribute('name', $suite->getName()); - - if (\class_exists($suite->getName(), false)) { - try { - $class = new \ReflectionClass($suite->getName()); - - $testSuite->setAttribute('file', $class->getFileName()); - } catch (\ReflectionException $e) { - } - } - - if ($this->testSuiteLevel > 0) { - $this->testSuites[$this->testSuiteLevel]->appendChild($testSuite); - } else { - $this->root->appendChild($testSuite); - } - - $this->testSuiteLevel++; - $this->testSuites[$this->testSuiteLevel] = $testSuite; - $this->testSuiteTests[$this->testSuiteLevel] = 0; - $this->testSuiteAssertions[$this->testSuiteLevel] = 0; - $this->testSuiteErrors[$this->testSuiteLevel] = 0; - $this->testSuiteFailures[$this->testSuiteLevel] = 0; - $this->testSuiteSkipped[$this->testSuiteLevel] = 0; - $this->testSuiteTimes[$this->testSuiteLevel] = 0; - } - - /** - * A testsuite ended. - */ - public function endTestSuite(TestSuite $suite): void - { - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'tests', - (string) $this->testSuiteTests[$this->testSuiteLevel] - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'assertions', - (string) $this->testSuiteAssertions[$this->testSuiteLevel] - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'errors', - (string) $this->testSuiteErrors[$this->testSuiteLevel] - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'failures', - (string) $this->testSuiteFailures[$this->testSuiteLevel] - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'skipped', - (string) $this->testSuiteSkipped[$this->testSuiteLevel] - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'time', - \sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel]) - ); - - if ($this->testSuiteLevel > 1) { - $this->testSuiteTests[$this->testSuiteLevel - 1] += $this->testSuiteTests[$this->testSuiteLevel]; - $this->testSuiteAssertions[$this->testSuiteLevel - 1] += $this->testSuiteAssertions[$this->testSuiteLevel]; - $this->testSuiteErrors[$this->testSuiteLevel - 1] += $this->testSuiteErrors[$this->testSuiteLevel]; - $this->testSuiteFailures[$this->testSuiteLevel - 1] += $this->testSuiteFailures[$this->testSuiteLevel]; - $this->testSuiteSkipped[$this->testSuiteLevel - 1] += $this->testSuiteSkipped[$this->testSuiteLevel]; - $this->testSuiteTimes[$this->testSuiteLevel - 1] += $this->testSuiteTimes[$this->testSuiteLevel]; - } - - $this->testSuiteLevel--; - } - - /** - * A test started. - */ - public function startTest(Test $test): void - { - $usesDataprovider = false; - - if (\method_exists($test, 'usesDataProvider')) { - $usesDataprovider = $test->usesDataProvider(); - } - - $testCase = $this->document->createElement('testcase'); - $testCase->setAttribute('name', $test->getName()); - - try { - $class = new \ReflectionClass($test); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $methodName = $test->getName(!$usesDataprovider); - - if ($class->hasMethod($methodName)) { - try { - $method = $class->getMethod($methodName); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $testCase->setAttribute('class', $class->getName()); - $testCase->setAttribute('classname', \str_replace('\\', '.', $class->getName())); - $testCase->setAttribute('file', $class->getFileName()); - $testCase->setAttribute('line', (string) $method->getStartLine()); - } - - $this->currentTestCase = $testCase; - } - - /** - * A test ended. - */ - public function endTest(Test $test, float $time): void - { - $numAssertions = 0; - - if (\method_exists($test, 'getNumAssertions')) { - $numAssertions = $test->getNumAssertions(); - } - - $this->testSuiteAssertions[$this->testSuiteLevel] += $numAssertions; - - $this->currentTestCase->setAttribute( - 'assertions', - (string) $numAssertions - ); - - $this->currentTestCase->setAttribute( - 'time', - \sprintf('%F', $time) - ); - - $this->testSuites[$this->testSuiteLevel]->appendChild( - $this->currentTestCase - ); - - $this->testSuiteTests[$this->testSuiteLevel]++; - $this->testSuiteTimes[$this->testSuiteLevel] += $time; - - $testOutput = ''; - - if (\method_exists($test, 'hasOutput') && \method_exists($test, 'getActualOutput')) { - $testOutput = $test->hasOutput() ? $test->getActualOutput() : ''; - } - - if (!empty($testOutput)) { - $systemOut = $this->document->createElement( - 'system-out', - Xml::prepareString($testOutput) - ); - - $this->currentTestCase->appendChild($systemOut); - } - - $this->currentTestCase = null; - } - - /** - * Returns the XML as a string. - */ - public function getXML(): string - { - return $this->document->saveXML(); - } - - private function doAddFault(Test $test, \Throwable $t, float $time, $type): void - { - if ($this->currentTestCase === null) { - return; - } - - if ($test instanceof SelfDescribing) { - $buffer = $test->toString() . "\n"; - } else { - $buffer = ''; - } - - $buffer .= TestFailure::exceptionToString($t) . "\n" . - Filter::getFilteredStacktrace($t); - - $fault = $this->document->createElement( - $type, - Xml::prepareString($buffer) - ); - - if ($t instanceof ExceptionWrapper) { - $fault->setAttribute('type', $t->getClassName()); - } else { - $fault->setAttribute('type', \get_class($t)); - } - - $this->currentTestCase->appendChild($fault); - } - - private function doAddSkipped(): void - { - if ($this->currentTestCase === null) { - return; - } - - $skipped = $this->document->createElement('skipped'); - - $this->currentTestCase->appendChild($skipped); - - $this->testSuiteSkipped[$this->testSuiteLevel]++; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php b/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php deleted file mode 100644 index 8520ca7..0000000 --- a/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php +++ /dev/null @@ -1,377 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Log; - -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\ExceptionWrapper; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestFailure; -use PHPUnit\Framework\TestResult; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Framework\Warning; -use PHPUnit\TextUI\ResultPrinter; -use PHPUnit\Util\Exception; -use PHPUnit\Util\Filter; -use ReflectionClass; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TeamCity extends ResultPrinter -{ - /** - * @var bool - */ - private $isSummaryTestCountPrinted = false; - - /** - * @var string - */ - private $startedTestName; - - /** - * @var false|int - */ - private $flowId; - - /** - * @throws \SebastianBergmann\Timer\RuntimeException - */ - public function printResult(TestResult $result): void - { - $this->printHeader(); - $this->printFooter($result); - } - - /** - * An error occurred. - */ - public function addError(Test $test, \Throwable $t, float $time): void - { - $this->printEvent( - 'testFailed', - [ - 'name' => $test->getName(), - 'message' => self::getMessage($t), - 'details' => self::getDetails($t), - 'duration' => self::toMilliseconds($time), - ] - ); - } - - /** - * A warning occurred. - */ - public function addWarning(Test $test, Warning $e, float $time): void - { - $this->printEvent( - 'testFailed', - [ - 'name' => $test->getName(), - 'message' => self::getMessage($e), - 'details' => self::getDetails($e), - 'duration' => self::toMilliseconds($time), - ] - ); - } - - /** - * A failure occurred. - */ - public function addFailure(Test $test, AssertionFailedError $e, float $time): void - { - $parameters = [ - 'name' => $test->getName(), - 'message' => self::getMessage($e), - 'details' => self::getDetails($e), - 'duration' => self::toMilliseconds($time), - ]; - - if ($e instanceof ExpectationFailedException) { - $comparisonFailure = $e->getComparisonFailure(); - - if ($comparisonFailure instanceof ComparisonFailure) { - $expectedString = $comparisonFailure->getExpectedAsString(); - - if ($expectedString === null || empty($expectedString)) { - $expectedString = self::getPrimitiveValueAsString($comparisonFailure->getExpected()); - } - - $actualString = $comparisonFailure->getActualAsString(); - - if ($actualString === null || empty($actualString)) { - $actualString = self::getPrimitiveValueAsString($comparisonFailure->getActual()); - } - - if ($actualString !== null && $expectedString !== null) { - $parameters['type'] = 'comparisonFailure'; - $parameters['actual'] = $actualString; - $parameters['expected'] = $expectedString; - } - } - } - - $this->printEvent('testFailed', $parameters); - } - - /** - * Incomplete test. - */ - public function addIncompleteTest(Test $test, \Throwable $t, float $time): void - { - $this->printIgnoredTest($test->getName(), $t, $time); - } - - /** - * Risky test. - */ - public function addRiskyTest(Test $test, \Throwable $t, float $time): void - { - $this->addError($test, $t, $time); - } - - /** - * Skipped test. - */ - public function addSkippedTest(Test $test, \Throwable $t, float $time): void - { - $testName = $test->getName(); - - if ($this->startedTestName !== $testName) { - $this->startTest($test); - $this->printIgnoredTest($testName, $t, $time); - $this->endTest($test, $time); - } else { - $this->printIgnoredTest($testName, $t, $time); - } - } - - public function printIgnoredTest($testName, \Throwable $t, float $time): void - { - $this->printEvent( - 'testIgnored', - [ - 'name' => $testName, - 'message' => self::getMessage($t), - 'details' => self::getDetails($t), - 'duration' => self::toMilliseconds($time), - ] - ); - } - - /** - * A testsuite started. - */ - public function startTestSuite(TestSuite $suite): void - { - if (\stripos(\ini_get('disable_functions'), 'getmypid') === false) { - $this->flowId = \getmypid(); - } else { - $this->flowId = false; - } - - if (!$this->isSummaryTestCountPrinted) { - $this->isSummaryTestCountPrinted = true; - - $this->printEvent( - 'testCount', - ['count' => \count($suite)] - ); - } - - $suiteName = $suite->getName(); - - if (empty($suiteName)) { - return; - } - - $parameters = ['name' => $suiteName]; - - if (\class_exists($suiteName, false)) { - $fileName = self::getFileName($suiteName); - $parameters['locationHint'] = "php_qn://$fileName::\\$suiteName"; - } else { - $split = \explode('::', $suiteName); - - if (\count($split) === 2 && \class_exists($split[0]) && \method_exists($split[0], $split[1])) { - $fileName = self::getFileName($split[0]); - $parameters['locationHint'] = "php_qn://$fileName::\\$suiteName"; - $parameters['name'] = $split[1]; - } - } - - $this->printEvent('testSuiteStarted', $parameters); - } - - /** - * A testsuite ended. - */ - public function endTestSuite(TestSuite $suite): void - { - $suiteName = $suite->getName(); - - if (empty($suiteName)) { - return; - } - - $parameters = ['name' => $suiteName]; - - if (!\class_exists($suiteName, false)) { - $split = \explode('::', $suiteName); - - if (\count($split) === 2 && \class_exists($split[0]) && \method_exists($split[0], $split[1])) { - $parameters['name'] = $split[1]; - } - } - - $this->printEvent('testSuiteFinished', $parameters); - } - - /** - * A test started. - */ - public function startTest(Test $test): void - { - $testName = $test->getName(); - $this->startedTestName = $testName; - $params = ['name' => $testName]; - - if ($test instanceof TestCase) { - $className = \get_class($test); - $fileName = self::getFileName($className); - $params['locationHint'] = "php_qn://$fileName::\\$className::$testName"; - } - - $this->printEvent('testStarted', $params); - } - - /** - * A test ended. - */ - public function endTest(Test $test, float $time): void - { - parent::endTest($test, $time); - - $this->printEvent( - 'testFinished', - [ - 'name' => $test->getName(), - 'duration' => self::toMilliseconds($time), - ] - ); - } - - protected function writeProgress(string $progress): void - { - } - - private function printEvent(string $eventName, array $params = []): void - { - $this->write("\n##teamcity[$eventName"); - - if ($this->flowId) { - $params['flowId'] = $this->flowId; - } - - foreach ($params as $key => $value) { - $escapedValue = self::escapeValue((string) $value); - $this->write(" $key='$escapedValue'"); - } - - $this->write("]\n"); - } - - private static function getMessage(\Throwable $t): string - { - $message = ''; - - if ($t instanceof ExceptionWrapper) { - if ($t->getClassName() !== '') { - $message .= $t->getClassName(); - } - - if ($message !== '' && $t->getMessage() !== '') { - $message .= ' : '; - } - } - - return $message . $t->getMessage(); - } - - private static function getDetails(\Throwable $t): string - { - $stackTrace = Filter::getFilteredStacktrace($t); - $previous = $t instanceof ExceptionWrapper ? $t->getPreviousWrapped() : $t->getPrevious(); - - while ($previous) { - $stackTrace .= "\nCaused by\n" . - TestFailure::exceptionToString($previous) . "\n" . - Filter::getFilteredStacktrace($previous); - - $previous = $previous instanceof ExceptionWrapper ? - $previous->getPreviousWrapped() : $previous->getPrevious(); - } - - return ' ' . \str_replace("\n", "\n ", $stackTrace); - } - - private static function getPrimitiveValueAsString($value): ?string - { - if ($value === null) { - return 'null'; - } - - if (\is_bool($value)) { - return $value ? 'true' : 'false'; - } - - if (\is_scalar($value)) { - return \print_r($value, true); - } - - return null; - } - - private static function escapeValue(string $text): string - { - return \str_replace( - ['|', "'", "\n", "\r", ']', '['], - ['||', "|'", '|n', '|r', '|]', '|['], - $text - ); - } - - /** - * @param string $className - */ - private static function getFileName($className): string - { - try { - return (new ReflectionClass($className))->getFileName(); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } - - /** - * @param float $time microseconds - */ - private static function toMilliseconds(float $time): int - { - return (int) \round($time * 1000); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php b/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php deleted file mode 100644 index 32837b2..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php +++ /dev/null @@ -1,390 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use __PHP_Incomplete_Class; -use ErrorException; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\SyntheticError; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestFailure; -use PHPUnit\Framework\TestResult; -use SebastianBergmann\Environment\Runtime; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class AbstractPhpProcess -{ - /** - * @var Runtime - */ - protected $runtime; - - /** - * @var bool - */ - protected $stderrRedirection = false; - - /** - * @var string - */ - protected $stdin = ''; - - /** - * @var string - */ - protected $args = ''; - - /** - * @var array - */ - protected $env = []; - - /** - * @var int - */ - protected $timeout = 0; - - public static function factory(): self - { - if (\DIRECTORY_SEPARATOR === '\\') { - return new WindowsPhpProcess; - } - - return new DefaultPhpProcess; - } - - public function __construct() - { - $this->runtime = new Runtime; - } - - /** - * Defines if should use STDERR redirection or not. - * - * Then $stderrRedirection is TRUE, STDERR is redirected to STDOUT. - */ - public function setUseStderrRedirection(bool $stderrRedirection): void - { - $this->stderrRedirection = $stderrRedirection; - } - - /** - * Returns TRUE if uses STDERR redirection or FALSE if not. - */ - public function useStderrRedirection(): bool - { - return $this->stderrRedirection; - } - - /** - * Sets the input string to be sent via STDIN - */ - public function setStdin(string $stdin): void - { - $this->stdin = $stdin; - } - - /** - * Returns the input string to be sent via STDIN - */ - public function getStdin(): string - { - return $this->stdin; - } - - /** - * Sets the string of arguments to pass to the php job - */ - public function setArgs(string $args): void - { - $this->args = $args; - } - - /** - * Returns the string of arguments to pass to the php job - */ - public function getArgs(): string - { - return $this->args; - } - - /** - * Sets the array of environment variables to start the child process with - * - * @param array $env - */ - public function setEnv(array $env): void - { - $this->env = $env; - } - - /** - * Returns the array of environment variables to start the child process with - */ - public function getEnv(): array - { - return $this->env; - } - - /** - * Sets the amount of seconds to wait before timing out - */ - public function setTimeout(int $timeout): void - { - $this->timeout = $timeout; - } - - /** - * Returns the amount of seconds to wait before timing out - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * Runs a single test in a separate PHP process. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function runTestJob(string $job, Test $test, TestResult $result): void - { - $result->startTest($test); - - $_result = $this->runJob($job); - - $this->processChildResult( - $test, - $result, - $_result['stdout'], - $_result['stderr'] - ); - } - - /** - * Returns the command based into the configurations. - */ - public function getCommand(array $settings, string $file = null): string - { - $command = $this->runtime->getBinary(); - - if ($this->runtime->hasPCOV()) { - $settings = \array_merge( - $settings, - $this->runtime->getCurrentSettings( - \array_keys(\ini_get_all('pcov')) - ) - ); - } elseif ($this->runtime->hasXdebug()) { - $settings = \array_merge( - $settings, - $this->runtime->getCurrentSettings( - \array_keys(\ini_get_all('xdebug')) - ) - ); - } - - $command .= $this->settingsToParameters($settings); - - if (\PHP_SAPI === 'phpdbg') { - $command .= ' -qrr'; - - if (!$file) { - $command .= 's='; - } - } - - if ($file) { - $command .= ' ' . \escapeshellarg($file); - } - - if ($this->args) { - if (!$file) { - $command .= ' --'; - } - $command .= ' ' . $this->args; - } - - if ($this->stderrRedirection) { - $command .= ' 2>&1'; - } - - return $command; - } - - /** - * Runs a single job (PHP code) using a separate PHP process. - */ - abstract public function runJob(string $job, array $settings = []): array; - - protected function settingsToParameters(array $settings): string - { - $buffer = ''; - - foreach ($settings as $setting) { - $buffer .= ' -d ' . \escapeshellarg($setting); - } - - return $buffer; - } - - /** - * Processes the TestResult object from an isolated process. - * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - private function processChildResult(Test $test, TestResult $result, string $stdout, string $stderr): void - { - $time = 0; - - if (!empty($stderr)) { - $result->addError( - $test, - new Exception(\trim($stderr)), - $time - ); - } else { - \set_error_handler( - /** - * @throws ErrorException - */ - static function ($errno, $errstr, $errfile, $errline): void { - throw new ErrorException($errstr, $errno, $errno, $errfile, $errline); - } - ); - - try { - if (\strpos($stdout, "#!/usr/bin/env php\n") === 0) { - $stdout = \substr($stdout, 19); - } - - $childResult = \unserialize(\str_replace("#!/usr/bin/env php\n", '', $stdout)); - \restore_error_handler(); - } catch (ErrorException $e) { - \restore_error_handler(); - $childResult = false; - - $result->addError( - $test, - new Exception(\trim($stdout), 0, $e), - $time - ); - } - - if ($childResult !== false) { - if (!empty($childResult['output'])) { - $output = $childResult['output']; - } - - /* @var TestCase $test */ - - $test->setResult($childResult['testResult']); - $test->addToAssertionCount($childResult['numAssertions']); - - $childResult = $childResult['result']; - \assert($childResult instanceof TestResult); - - if ($result->getCollectCodeCoverageInformation()) { - $result->getCodeCoverage()->merge( - $childResult->getCodeCoverage() - ); - } - - $time = $childResult->time(); - $notImplemented = $childResult->notImplemented(); - $risky = $childResult->risky(); - $skipped = $childResult->skipped(); - $errors = $childResult->errors(); - $warnings = $childResult->warnings(); - $failures = $childResult->failures(); - - if (!empty($notImplemented)) { - $result->addError( - $test, - $this->getException($notImplemented[0]), - $time - ); - } elseif (!empty($risky)) { - $result->addError( - $test, - $this->getException($risky[0]), - $time - ); - } elseif (!empty($skipped)) { - $result->addError( - $test, - $this->getException($skipped[0]), - $time - ); - } elseif (!empty($errors)) { - $result->addError( - $test, - $this->getException($errors[0]), - $time - ); - } elseif (!empty($warnings)) { - $result->addWarning( - $test, - $this->getException($warnings[0]), - $time - ); - } elseif (!empty($failures)) { - $result->addFailure( - $test, - $this->getException($failures[0]), - $time - ); - } - } - } - - $result->endTest($test, $time); - - if (!empty($output)) { - print $output; - } - } - - /** - * Gets the thrown exception from a PHPUnit\Framework\TestFailure. - * - * @see https://github.com/sebastianbergmann/phpunit/issues/74 - */ - private function getException(TestFailure $error): Exception - { - $exception = $error->thrownException(); - - if ($exception instanceof __PHP_Incomplete_Class) { - $exceptionArray = []; - - foreach ((array) $exception as $key => $value) { - $key = \substr($key, \strrpos($key, "\0") + 1); - $exceptionArray[$key] = $value; - } - - $exception = new SyntheticError( - \sprintf( - '%s: %s', - $exceptionArray['_PHP_Incomplete_Class_Name'], - $exceptionArray['message'] - ), - $exceptionArray['code'], - $exceptionArray['file'], - $exceptionArray['line'], - $exceptionArray['trace'] - ); - } - - return $exception; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php b/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php deleted file mode 100644 index d49ef3b..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php +++ /dev/null @@ -1,216 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use PHPUnit\Framework\Exception; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class DefaultPhpProcess extends AbstractPhpProcess -{ - /** - * @var string - */ - protected $tempFile; - - /** - * Runs a single job (PHP code) using a separate PHP process. - * - * @throws Exception - */ - public function runJob(string $job, array $settings = []): array - { - if ($this->stdin || $this->useTemporaryFile()) { - if (!($this->tempFile = \tempnam(\sys_get_temp_dir(), 'PHPUnit')) || - \file_put_contents($this->tempFile, $job) === false) { - throw new Exception( - 'Unable to write temporary file' - ); - } - - $job = $this->stdin; - } - - return $this->runProcess($job, $settings); - } - - /** - * Returns an array of file handles to be used in place of pipes - */ - protected function getHandles(): array - { - return []; - } - - /** - * Handles creating the child process and returning the STDOUT and STDERR - * - * @throws Exception - */ - protected function runProcess(string $job, array $settings): array - { - $handles = $this->getHandles(); - - $env = null; - - if ($this->env) { - $env = $_SERVER ?? []; - unset($env['argv'], $env['argc']); - $env = \array_merge($env, $this->env); - - foreach ($env as $envKey => $envVar) { - if (\is_array($envVar)) { - unset($env[$envKey]); - } - } - } - - $pipeSpec = [ - 0 => $handles[0] ?? ['pipe', 'r'], - 1 => $handles[1] ?? ['pipe', 'w'], - 2 => $handles[2] ?? ['pipe', 'w'], - ]; - - $process = \proc_open( - $this->getCommand($settings, $this->tempFile), - $pipeSpec, - $pipes, - null, - $env - ); - - if (!\is_resource($process)) { - throw new Exception( - 'Unable to spawn worker process' - ); - } - - if ($job) { - $this->process($pipes[0], $job); - } - - \fclose($pipes[0]); - - $stderr = $stdout = ''; - - if ($this->timeout) { - unset($pipes[0]); - - while (true) { - $r = $pipes; - $w = null; - $e = null; - - $n = @\stream_select($r, $w, $e, $this->timeout); - - if ($n === false) { - break; - } - - if ($n === 0) { - \proc_terminate($process, 9); - - throw new Exception( - \sprintf( - 'Job execution aborted after %d seconds', - $this->timeout - ) - ); - } - - if ($n > 0) { - foreach ($r as $pipe) { - $pipeOffset = 0; - - foreach ($pipes as $i => $origPipe) { - if ($pipe === $origPipe) { - $pipeOffset = $i; - - break; - } - } - - if (!$pipeOffset) { - break; - } - - $line = \fread($pipe, 8192); - - if ($line === '') { - \fclose($pipes[$pipeOffset]); - - unset($pipes[$pipeOffset]); - } elseif ($pipeOffset === 1) { - $stdout .= $line; - } else { - $stderr .= $line; - } - } - - if (empty($pipes)) { - break; - } - } - } - } else { - if (isset($pipes[1])) { - $stdout = \stream_get_contents($pipes[1]); - - \fclose($pipes[1]); - } - - if (isset($pipes[2])) { - $stderr = \stream_get_contents($pipes[2]); - - \fclose($pipes[2]); - } - } - - if (isset($handles[1])) { - \rewind($handles[1]); - - $stdout = \stream_get_contents($handles[1]); - - \fclose($handles[1]); - } - - if (isset($handles[2])) { - \rewind($handles[2]); - - $stderr = \stream_get_contents($handles[2]); - - \fclose($handles[2]); - } - - \proc_close($process); - - $this->cleanup(); - - return ['stdout' => $stdout, 'stderr' => $stderr]; - } - - protected function process($pipe, string $job): void - { - \fwrite($pipe, $job); - } - - protected function cleanup(): void - { - if ($this->tempFile) { - \unlink($this->tempFile); - } - } - - protected function useTemporaryFile(): bool - { - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl b/vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl deleted file mode 100644 index 14c3e7e..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl +++ /dev/null @@ -1,40 +0,0 @@ -start(__FILE__); -} - -register_shutdown_function(function() use ($coverage) { - $output = null; - if ($coverage) { - $output = $coverage->stop(); - } - file_put_contents('{coverageFile}', serialize($output)); -}); - -ob_end_clean(); - -require '{job}'; diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl deleted file mode 100644 index c25f63d..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl +++ /dev/null @@ -1,108 +0,0 @@ -setCodeCoverage( - new CodeCoverage( - null, - unserialize('{codeCoverageFilter}') - ) - ); - } - - $result->beStrictAboutTestsThatDoNotTestAnything({isStrictAboutTestsThatDoNotTestAnything}); - $result->beStrictAboutOutputDuringTests({isStrictAboutOutputDuringTests}); - $result->enforceTimeLimit({enforcesTimeLimit}); - $result->beStrictAboutTodoAnnotatedTests({isStrictAboutTodoAnnotatedTests}); - $result->beStrictAboutResourceUsageDuringSmallTests({isStrictAboutResourceUsageDuringSmallTests}); - - $test = new {className}('{name}', unserialize('{data}'), '{dataName}'); - $test->setDependencyInput(unserialize('{dependencyInput}')); - $test->setInIsolation(TRUE); - - ob_end_clean(); - $test->run($result); - $output = ''; - if (!$test->hasExpectationOnOutput()) { - $output = $test->getActualOutput(); - } - - ini_set('xdebug.scream', '0'); - @rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */ - if ($stdout = stream_get_contents(STDOUT)) { - $output = $stdout . $output; - $streamMetaData = stream_get_meta_data(STDOUT); - if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) { - @ftruncate(STDOUT, 0); - @rewind(STDOUT); - } - } - - print serialize( - [ - 'testResult' => $test->getResult(), - 'numAssertions' => $test->getNumAssertions(), - 'result' => $result, - 'output' => $output - ] - ); -} - -$configurationFilePath = '{configurationFilePath}'; - -if ('' !== $configurationFilePath) { - $configuration = PHPUnit\Util\Configuration::getInstance($configurationFilePath); - $configuration->handlePHPConfiguration(); - unset($configuration); -} - -function __phpunit_error_handler($errno, $errstr, $errfile, $errline) -{ - return true; -} - -set_error_handler('__phpunit_error_handler'); - -{constants} -{included_files} -{globals} - -restore_error_handler(); - -if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP'])) { - require_once $GLOBALS['__PHPUNIT_BOOTSTRAP']; - unset($GLOBALS['__PHPUNIT_BOOTSTRAP']); -} - -__phpunit_run_isolated_test(); diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl deleted file mode 100644 index 68357ee..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl +++ /dev/null @@ -1,111 +0,0 @@ -setCodeCoverage( - new CodeCoverage( - null, - unserialize('{codeCoverageFilter}') - ) - ); - } - - $result->beStrictAboutTestsThatDoNotTestAnything({isStrictAboutTestsThatDoNotTestAnything}); - $result->beStrictAboutOutputDuringTests({isStrictAboutOutputDuringTests}); - $result->enforceTimeLimit({enforcesTimeLimit}); - $result->beStrictAboutTodoAnnotatedTests({isStrictAboutTodoAnnotatedTests}); - $result->beStrictAboutResourceUsageDuringSmallTests({isStrictAboutResourceUsageDuringSmallTests}); - - $test = new {className}('{methodName}', unserialize('{data}'), '{dataName}'); - \assert($test instanceof TestCase); - - $test->setDependencyInput(unserialize('{dependencyInput}')); - $test->setInIsolation(true); - - ob_end_clean(); - $test->run($result); - $output = ''; - if (!$test->hasExpectationOnOutput()) { - $output = $test->getActualOutput(); - } - - ini_set('xdebug.scream', '0'); - @rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */ - if ($stdout = stream_get_contents(STDOUT)) { - $output = $stdout . $output; - $streamMetaData = stream_get_meta_data(STDOUT); - if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) { - @ftruncate(STDOUT, 0); - @rewind(STDOUT); - } - } - - print serialize( - [ - 'testResult' => $test->getResult(), - 'numAssertions' => $test->getNumAssertions(), - 'result' => $result, - 'output' => $output - ] - ); -} - -$configurationFilePath = '{configurationFilePath}'; - -if ('' !== $configurationFilePath) { - $configuration = PHPUnit\Util\Configuration::getInstance($configurationFilePath); - $configuration->handlePHPConfiguration(); - unset($configuration); -} - -function __phpunit_error_handler($errno, $errstr, $errfile, $errline) -{ - return true; -} - -set_error_handler('__phpunit_error_handler'); - -{constants} -{included_files} -{globals} - -restore_error_handler(); - -if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP'])) { - require_once $GLOBALS['__PHPUNIT_BOOTSTRAP']; - unset($GLOBALS['__PHPUNIT_BOOTSTRAP']); -} - -__phpunit_run_isolated_test(); diff --git a/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php b/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php deleted file mode 100644 index 844a372..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.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. - */ -namespace PHPUnit\Util\PHP; - -use PHPUnit\Framework\Exception; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://bugs.php.net/bug.php?id=51800 - */ -final class WindowsPhpProcess extends DefaultPhpProcess -{ - public function getCommand(array $settings, string $file = null): string - { - return '"' . parent::getCommand($settings, $file) . '"'; - } - - /** - * @throws Exception - */ - protected function getHandles(): array - { - if (false === $stdout_handle = \tmpfile()) { - throw new Exception( - 'A temporary file could not be created; verify that your TEMP environment variable is writable' - ); - } - - return [ - 1 => $stdout_handle, - ]; - } - - protected function useTemporaryFile(): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php b/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php deleted file mode 100644 index dac8382..0000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php +++ /dev/null @@ -1,10 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -eval('?>' . \file_get_contents('php://stdin')); diff --git a/vendor/phpunit/phpunit/src/Util/Printer.php b/vendor/phpunit/phpunit/src/Util/Printer.php deleted file mode 100644 index b9bfc05..0000000 --- a/vendor/phpunit/phpunit/src/Util/Printer.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * 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\Exception; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class Printer -{ - /** - * If true, flush output after every write. - * - * @var bool - */ - protected $autoFlush = false; - - /** - * @var resource - */ - protected $out; - - /** - * @var string - */ - protected $outTarget; - - /** - * Constructor. - * - * @param null|resource|string $out - * - * @throws Exception - */ - public function __construct($out = null) - { - if ($out !== null) { - if (\is_string($out)) { - if (\strpos($out, 'socket://') === 0) { - $out = \explode(':', \str_replace('socket://', '', $out)); - - if (\count($out) !== 2) { - throw new Exception; - } - - $this->out = \fsockopen($out[0], $out[1]); - } else { - if (\strpos($out, 'php://') === false && !Filesystem::createDirectory(\dirname($out))) { - throw new Exception(\sprintf('Directory "%s" was not created', \dirname($out))); - } - - $this->out = \fopen($out, 'wt'); - } - - $this->outTarget = $out; - } else { - $this->out = $out; - } - } - } - - /** - * Flush buffer and close output if it's not to a PHP stream - */ - public function flush(): void - { - if ($this->out && \strncmp($this->outTarget, 'php://', 6) !== 0) { - \fclose($this->out); - } - } - - /** - * Performs a safe, incremental flush. - * - * Do not confuse this function with the flush() function of this class, - * since the flush() function may close the file being written to, rendering - * the current object no longer usable. - */ - public function incrementalFlush(): void - { - if ($this->out) { - \fflush($this->out); - } else { - \flush(); - } - } - - public function write(string $buffer): void - { - if ($this->out) { - \fwrite($this->out, $buffer); - - if ($this->autoFlush) { - $this->incrementalFlush(); - } - } else { - if (\PHP_SAPI !== 'cli' && \PHP_SAPI !== 'phpdbg') { - $buffer = \htmlspecialchars($buffer, \ENT_SUBSTITUTE); - } - - print $buffer; - - if ($this->autoFlush) { - $this->incrementalFlush(); - } - } - } - - /** - * Check auto-flush mode. - */ - public function getAutoFlush(): bool - { - return $this->autoFlush; - } - - /** - * Set auto-flushing mode. - * - * If set, *incremental* flushes will be done after each write. This should - * not be confused with the different effects of this class' flush() method. - */ - public function setAutoFlush(bool $autoFlush): void - { - $this->autoFlush = $autoFlush; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/RegularExpression.php b/vendor/phpunit/phpunit/src/Util/RegularExpression.php deleted file mode 100644 index 97e33c9..0000000 --- a/vendor/phpunit/phpunit/src/Util/RegularExpression.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RegularExpression -{ - /** - * @return false|int - */ - public static function safeMatch(string $pattern, string $subject, ?array $matches = null, int $flags = 0, int $offset = 0) - { - return ErrorHandler::invokeIgnoringWarnings( - static function () use ($pattern, $subject, $matches, $flags, $offset) { - return \preg_match($pattern, $subject, $matches, $flags, $offset); - } - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php deleted file mode 100644 index cc066cc..0000000 --- a/vendor/phpunit/phpunit/src/Util/Test.php +++ /dev/null @@ -1,905 +0,0 @@ - - * - * 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\CodeCoverageException; -use PHPUnit\Framework\InvalidCoversTargetException; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; -use PHPUnit\Runner\Version; -use PHPUnit\Util\Annotation\Registry; -use SebastianBergmann\Environment\OperatingSystem; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Test -{ - /** - * @var int - */ - public const UNKNOWN = -1; - - /** - * @var int - */ - public const SMALL = 0; - - /** - * @var int - */ - public const MEDIUM = 1; - - /** - * @var int - */ - public const LARGE = 2; - - /** - * @var array - */ - private static $hookMethods = []; - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public static function describe(\PHPUnit\Framework\Test $test): array - { - if ($test instanceof TestCase) { - return [\get_class($test), $test->getName()]; - } - - if ($test instanceof SelfDescribing) { - return ['', $test->toString()]; - } - - return ['', \get_class($test)]; - } - - public static function describeAsString(\PHPUnit\Framework\Test $test): string - { - if ($test instanceof SelfDescribing) { - return $test->toString(); - } - - return \get_class($test); - } - - /** - * @throws CodeCoverageException - * - * @return array|bool - * @psalm-param class-string $className - */ - public static function getLinesToBeCovered(string $className, string $methodName) - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - if (!self::shouldCoversAnnotationBeUsed($annotations)) { - return false; - } - - return self::getLinesToBeCoveredOrUsed($className, $methodName, 'covers'); - } - - /** - * Returns lines of code specified with the @uses annotation. - * - * @throws CodeCoverageException - * @psalm-param class-string $className - */ - public static function getLinesToBeUsed(string $className, string $methodName): array - { - return self::getLinesToBeCoveredOrUsed($className, $methodName, 'uses'); - } - - public static function requiresCodeCoverageDataCollection(TestCase $test): bool - { - $annotations = $test->getAnnotations(); - - // If there is no @covers annotation but a @coversNothing annotation on - // the test method then code coverage data does not need to be collected - if (isset($annotations['method']['coversNothing'])) { - return false; - } - - // If there is at least one @covers annotation then - // code coverage data needs to be collected - if (isset($annotations['method']['covers'])) { - return true; - } - - // If there is no @covers annotation but a @coversNothing annotation - // then code coverage data does not need to be collected - if (isset($annotations['class']['coversNothing'])) { - return false; - } - - // If there is no @coversNothing annotation then - // code coverage data may be collected - return true; - } - - /** - * @throws Exception - * @psalm-param class-string $className - */ - public static function getRequirements(string $className, string $methodName): array - { - return self::mergeArraysRecursively( - Registry::getInstance()->forClassName($className)->requirements(), - Registry::getInstance()->forMethod($className, $methodName)->requirements() - ); - } - - /** - * Returns the missing requirements for a test. - * - * @throws Exception - * @throws Warning - * @psalm-param class-string $className - */ - public static function getMissingRequirements(string $className, string $methodName): array - { - $required = static::getRequirements($className, $methodName); - $missing = []; - $hint = null; - - if (!empty($required['PHP'])) { - $operator = empty($required['PHP']['operator']) ? '>=' : $required['PHP']['operator']; - - self::ensureOperatorIsValid($operator); - - if (!\version_compare(\PHP_VERSION, $required['PHP']['version'], $operator)) { - $missing[] = \sprintf('PHP %s %s is required.', $operator, $required['PHP']['version']); - $hint = $hint ?? 'PHP'; - } - } elseif (!empty($required['PHP_constraint'])) { - $version = new \PharIo\Version\Version(self::sanitizeVersionNumber(\PHP_VERSION)); - - if (!$required['PHP_constraint']['constraint']->complies($version)) { - $missing[] = \sprintf( - 'PHP version does not match the required constraint %s.', - $required['PHP_constraint']['constraint']->asString() - ); - - $hint = $hint ?? 'PHP_constraint'; - } - } - - if (!empty($required['PHPUnit'])) { - $phpunitVersion = Version::id(); - - $operator = empty($required['PHPUnit']['operator']) ? '>=' : $required['PHPUnit']['operator']; - - self::ensureOperatorIsValid($operator); - - if (!\version_compare($phpunitVersion, $required['PHPUnit']['version'], $operator)) { - $missing[] = \sprintf('PHPUnit %s %s is required.', $operator, $required['PHPUnit']['version']); - $hint = $hint ?? 'PHPUnit'; - } - } elseif (!empty($required['PHPUnit_constraint'])) { - $phpunitVersion = new \PharIo\Version\Version(self::sanitizeVersionNumber(Version::id())); - - if (!$required['PHPUnit_constraint']['constraint']->complies($phpunitVersion)) { - $missing[] = \sprintf( - 'PHPUnit version does not match the required constraint %s.', - $required['PHPUnit_constraint']['constraint']->asString() - ); - - $hint = $hint ?? 'PHPUnit_constraint'; - } - } - - if (!empty($required['OSFAMILY']) && $required['OSFAMILY'] !== (new OperatingSystem)->getFamily()) { - $missing[] = \sprintf('Operating system %s is required.', $required['OSFAMILY']); - $hint = $hint ?? 'OSFAMILY'; - } - - if (!empty($required['OS'])) { - $requiredOsPattern = \sprintf('/%s/i', \addcslashes($required['OS'], '/')); - - if (!\preg_match($requiredOsPattern, \PHP_OS)) { - $missing[] = \sprintf('Operating system matching %s is required.', $requiredOsPattern); - $hint = $hint ?? 'OS'; - } - } - - if (!empty($required['functions'])) { - foreach ($required['functions'] as $function) { - $pieces = \explode('::', $function); - - if (\count($pieces) === 2 && \class_exists($pieces[0]) && \method_exists($pieces[0], $pieces[1])) { - continue; - } - - if (\function_exists($function)) { - continue; - } - - $missing[] = \sprintf('Function %s is required.', $function); - $hint = $hint ?? 'function_' . $function; - } - } - - if (!empty($required['setting'])) { - foreach ($required['setting'] as $setting => $value) { - if (\ini_get($setting) !== $value) { - $missing[] = \sprintf('Setting "%s" must be "%s".', $setting, $value); - $hint = $hint ?? '__SETTING_' . $setting; - } - } - } - - if (!empty($required['extensions'])) { - foreach ($required['extensions'] as $extension) { - if (isset($required['extension_versions'][$extension])) { - continue; - } - - if (!\extension_loaded($extension)) { - $missing[] = \sprintf('Extension %s is required.', $extension); - $hint = $hint ?? 'extension_' . $extension; - } - } - } - - if (!empty($required['extension_versions'])) { - foreach ($required['extension_versions'] as $extension => $req) { - $actualVersion = \phpversion($extension); - - $operator = empty($req['operator']) ? '>=' : $req['operator']; - - self::ensureOperatorIsValid($operator); - - if ($actualVersion === false || !\version_compare($actualVersion, $req['version'], $operator)) { - $missing[] = \sprintf('Extension %s %s %s is required.', $extension, $operator, $req['version']); - $hint = $hint ?? 'extension_' . $extension; - } - } - } - - if ($hint && isset($required['__OFFSET'])) { - \array_unshift($missing, '__OFFSET_FILE=' . $required['__OFFSET']['__FILE']); - \array_unshift($missing, '__OFFSET_LINE=' . ($required['__OFFSET'][$hint] ?? 1)); - } - - return $missing; - } - - /** - * Returns the expected exception for a test. - * - * @return array|false - * - * @deprecated - * @codeCoverageIgnore - * @psalm-param class-string $className - */ - public static function getExpectedException(string $className, string $methodName) - { - return Registry::getInstance()->forMethod($className, $methodName)->expectedException(); - } - - /** - * Returns the provided data for a method. - * - * @throws Exception - * @psalm-param class-string $className - */ - public static function getProvidedData(string $className, string $methodName): ?array - { - return Registry::getInstance()->forMethod($className, $methodName)->getProvidedData(); - } - - /** - * @psalm-param class-string $className - */ - public static function parseTestMethodAnnotations(string $className, ?string $methodName = ''): array - { - $registry = Registry::getInstance(); - - if ($methodName !== null) { - try { - return [ - 'method' => $registry->forMethod($className, $methodName)->symbolAnnotations(), - 'class' => $registry->forClassName($className)->symbolAnnotations(), - ]; - } catch (Exception $methodNotFound) { - // ignored - } - } - - return [ - 'method' => null, - 'class' => $registry->forClassName($className)->symbolAnnotations(), - ]; - } - - /** - * @psalm-param class-string $className - */ - public static function getInlineAnnotations(string $className, string $methodName): array - { - return Registry::getInstance()->forMethod($className, $methodName)->getInlineAnnotations(); - } - - /** @psalm-param class-string $className */ - public static function getBackupSettings(string $className, string $methodName): array - { - return [ - 'backupGlobals' => self::getBooleanAnnotationSetting( - $className, - $methodName, - 'backupGlobals' - ), - 'backupStaticAttributes' => self::getBooleanAnnotationSetting( - $className, - $methodName, - 'backupStaticAttributes' - ), - ]; - } - - /** @psalm-param class-string $className */ - public static function getDependencies(string $className, string $methodName): array - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - $dependencies = $annotations['class']['depends'] ?? []; - - if (isset($annotations['method']['depends'])) { - $dependencies = \array_merge( - $dependencies, - $annotations['method']['depends'] - ); - } - - return \array_unique($dependencies); - } - - /** @psalm-param class-string $className */ - public static function getGroups(string $className, ?string $methodName = ''): array - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - $groups = []; - - if (isset($annotations['method']['author'])) { - $groups[] = $annotations['method']['author']; - } elseif (isset($annotations['class']['author'])) { - $groups[] = $annotations['class']['author']; - } - - if (isset($annotations['class']['group'])) { - $groups[] = $annotations['class']['group']; - } - - if (isset($annotations['method']['group'])) { - $groups[] = $annotations['method']['group']; - } - - if (isset($annotations['class']['ticket'])) { - $groups[] = $annotations['class']['ticket']; - } - - if (isset($annotations['method']['ticket'])) { - $groups[] = $annotations['method']['ticket']; - } - - foreach (['method', 'class'] as $element) { - foreach (['small', 'medium', 'large'] as $size) { - if (isset($annotations[$element][$size])) { - $groups[] = [$size]; - - break 2; - } - } - } - - return \array_unique(\array_merge([], ...$groups)); - } - - /** @psalm-param class-string $className */ - public static function getSize(string $className, ?string $methodName): int - { - $groups = \array_flip(self::getGroups($className, $methodName)); - - if (isset($groups['large'])) { - return self::LARGE; - } - - if (isset($groups['medium'])) { - return self::MEDIUM; - } - - if (isset($groups['small'])) { - return self::SMALL; - } - - return self::UNKNOWN; - } - - /** @psalm-param class-string $className */ - public static function getProcessIsolationSettings(string $className, string $methodName): bool - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - return isset($annotations['class']['runTestsInSeparateProcesses']) || isset($annotations['method']['runInSeparateProcess']); - } - - /** @psalm-param class-string $className */ - public static function getClassProcessIsolationSettings(string $className, string $methodName): bool - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - return isset($annotations['class']['runClassInSeparateProcess']); - } - - /** @psalm-param class-string $className */ - public static function getPreserveGlobalStateSettings(string $className, string $methodName): ?bool - { - return self::getBooleanAnnotationSetting( - $className, - $methodName, - 'preserveGlobalState' - ); - } - - /** @psalm-param class-string $className */ - public static function getHookMethods(string $className): array - { - if (!\class_exists($className, false)) { - return self::emptyHookMethodsArray(); - } - - if (!isset(self::$hookMethods[$className])) { - 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; - } - - $docBlock = Registry::getInstance()->forMethod($className, $method->getName()); - - if ($method->isStatic()) { - if ($docBlock->isHookToBeExecutedBeforeClass()) { - \array_unshift( - self::$hookMethods[$className]['beforeClass'], - $method->getName() - ); - } - - if ($docBlock->isHookToBeExecutedAfterClass()) { - self::$hookMethods[$className]['afterClass'][] = $method->getName(); - } - } - - if ($docBlock->isToBeExecutedBeforeTest()) { - \array_unshift( - self::$hookMethods[$className]['before'], - $method->getName() - ); - } - - if ($docBlock->isToBeExecutedAfterTest()) { - self::$hookMethods[$className]['after'][] = $method->getName(); - } - } - } catch (\ReflectionException $e) { - } - } - - return self::$hookMethods[$className]; - } - - public static function isTestMethod(\ReflectionMethod $method): bool - { - if (\strpos($method->getName(), 'test') === 0) { - return true; - } - - return \array_key_exists( - 'test', - Registry::getInstance()->forMethod( - $method->getDeclaringClass()->getName(), - $method->getName() - ) - ->symbolAnnotations() - ); - } - - /** - * @throws CodeCoverageException - * @psalm-param class-string $className - */ - private static function getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode): array - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - $classShortcut = null; - - if (!empty($annotations['class'][$mode . 'DefaultClass'])) { - if (\count($annotations['class'][$mode . 'DefaultClass']) > 1) { - throw new CodeCoverageException( - \sprintf( - 'More than one @%sClass annotation in class or interface "%s".', - $mode, - $className - ) - ); - } - - $classShortcut = $annotations['class'][$mode . 'DefaultClass'][0]; - } - - $list = $annotations['class'][$mode] ?? []; - - if (isset($annotations['method'][$mode])) { - $list = \array_merge($list, $annotations['method'][$mode]); - } - - $codeList = []; - - foreach (\array_unique($list) as $element) { - if ($classShortcut && \strncmp($element, '::', 2) === 0) { - $element = $classShortcut . $element; - } - - $element = \preg_replace('/[\s()]+$/', '', $element); - $element = \explode(' ', $element); - $element = $element[0]; - - if ($mode === 'covers' && \interface_exists($element)) { - throw new InvalidCoversTargetException( - \sprintf( - 'Trying to @cover interface "%s".', - $element - ) - ); - } - - $codeList[] = self::resolveElementToReflectionObjects($element); - } - - return self::resolveReflectionObjectsToLines(\array_merge([], ...$codeList)); - } - - private static function emptyHookMethodsArray(): array - { - return [ - 'beforeClass' => ['setUpBeforeClass'], - 'before' => ['setUp'], - 'after' => ['tearDown'], - 'afterClass' => ['tearDownAfterClass'], - ]; - } - - /** @psalm-param class-string $className */ - private static function getBooleanAnnotationSetting(string $className, ?string $methodName, string $settingName): ?bool - { - $annotations = self::parseTestMethodAnnotations( - $className, - $methodName - ); - - if (isset($annotations['method'][$settingName])) { - if ($annotations['method'][$settingName][0] === 'enabled') { - return true; - } - - if ($annotations['method'][$settingName][0] === 'disabled') { - return false; - } - } - - if (isset($annotations['class'][$settingName])) { - if ($annotations['class'][$settingName][0] === 'enabled') { - return true; - } - - if ($annotations['class'][$settingName][0] === 'disabled') { - return false; - } - } - - return null; - } - - /** - * @throws InvalidCoversTargetException - */ - private static function resolveElementToReflectionObjects(string $element): array - { - $codeToCoverList = []; - - if (\function_exists($element) && \strpos($element, '\\') !== false) { - try { - $codeToCoverList[] = new \ReflectionFunction($element); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } elseif (\strpos($element, '::') !== false) { - [$className, $methodName] = \explode('::', $element); - - if (isset($methodName[0]) && $methodName[0] === '<') { - $classes = [$className]; - - foreach ($classes as $className) { - if (!\class_exists($className) && - !\interface_exists($className) && - !\trait_exists($className)) { - throw new InvalidCoversTargetException( - \sprintf( - 'Trying to @cover or @use not existing class or ' . - 'interface "%s".', - $className - ) - ); - } - - try { - $methods = (new \ReflectionClass($className))->getMethods(); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - - $inverse = isset($methodName[1]) && $methodName[1] === '!'; - $visibility = 'isPublic'; - - if (\strpos($methodName, 'protected')) { - $visibility = 'isProtected'; - } elseif (\strpos($methodName, 'private')) { - $visibility = 'isPrivate'; - } - - foreach ($methods as $method) { - if ($inverse && !$method->$visibility()) { - $codeToCoverList[] = $method; - } elseif (!$inverse && $method->$visibility()) { - $codeToCoverList[] = $method; - } - } - } - } else { - $classes = [$className]; - - foreach ($classes as $className) { - if ($className === '' && \function_exists($methodName)) { - try { - $codeToCoverList[] = new \ReflectionFunction( - $methodName - ); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } else { - if (!((\class_exists($className) || \interface_exists($className) || \trait_exists($className)) && - \method_exists($className, $methodName))) { - throw new InvalidCoversTargetException( - \sprintf( - 'Trying to @cover or @use not existing method "%s::%s".', - $className, - $methodName - ) - ); - } - - try { - $codeToCoverList[] = new \ReflectionMethod( - $className, - $methodName - ); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } - } - } - } else { - $extended = false; - - if (\strpos($element, '') !== false) { - $element = \str_replace('', '', $element); - $extended = true; - } - - $classes = [$element]; - - if ($extended) { - $classes = \array_merge( - $classes, - \class_implements($element), - \class_parents($element) - ); - } - - foreach ($classes as $className) { - if (!\class_exists($className) && - !\interface_exists($className) && - !\trait_exists($className)) { - throw new InvalidCoversTargetException( - \sprintf( - 'Trying to @cover or @use not existing class or ' . - 'interface "%s".', - $className - ) - ); - } - - try { - $codeToCoverList[] = new \ReflectionClass($className); - } catch (\ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - } - } - - return $codeToCoverList; - } - - private static function resolveReflectionObjectsToLines(array $reflectors): array - { - $result = []; - - foreach ($reflectors as $reflector) { - if ($reflector instanceof \ReflectionClass) { - foreach ($reflector->getTraits() as $trait) { - $reflectors[] = $trait; - } - } - } - - foreach ($reflectors as $reflector) { - $filename = $reflector->getFileName(); - - if (!isset($result[$filename])) { - $result[$filename] = []; - } - - $result[$filename] = \array_merge( - $result[$filename], - \range($reflector->getStartLine(), $reflector->getEndLine()) - ); - } - - foreach ($result as $filename => $lineNumbers) { - $result[$filename] = \array_keys(\array_flip($lineNumbers)); - } - - return $result; - } - - /** - * Trims any extensions from version string that follows after - * the .[.] format - */ - private static function sanitizeVersionNumber(string $version) - { - return \preg_replace( - '/^(\d+\.\d+(?:.\d+)?).*$/', - '$1', - $version - ); - } - - private static function shouldCoversAnnotationBeUsed(array $annotations): bool - { - if (isset($annotations['method']['coversNothing'])) { - return false; - } - - if (isset($annotations['method']['covers'])) { - return true; - } - - if (isset($annotations['class']['coversNothing'])) { - return false; - } - - return true; - } - - /** - * Merge two arrays together. - * - * If an integer key exists in both arrays and preserveNumericKeys is false, the value - * from the second array will be appended to the first array. If both values are arrays, they - * are merged together, else the value of the second array overwrites the one of the first array. - * - * This implementation is copied from https://github.com/zendframework/zend-stdlib/blob/76b653c5e99b40eccf5966e3122c90615134ae46/src/ArrayUtils.php - * - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * - * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ - private static function mergeArraysRecursively(array $a, array $b): array - { - foreach ($b as $key => $value) { - if (\array_key_exists($key, $a)) { - if (\is_int($key)) { - $a[] = $value; - } elseif (\is_array($value) && \is_array($a[$key])) { - $a[$key] = self::mergeArraysRecursively($a[$key], $value); - } else { - $a[$key] = $value; - } - } else { - $a[$key] = $value; - } - } - - return $a; - } - - /* - * @throws Exception - */ - private static function ensureOperatorIsValid(string $operator): void - { - if (!\in_array($operator, ['<', 'lt', '<=', 'le', '>', 'gt', '>=', 'ge', '==', '=', 'eq', '!=', '<>', 'ne'])) { - throw new Exception( - \sprintf( - '"%s" is not a valid version_compare() operator', - $operator - ) - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php deleted file mode 100644 index ea55016..0000000 --- a/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php +++ /dev/null @@ -1,352 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\TestDox; - -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestResult; -use PHPUnit\Runner\BaseTestRunner; -use PHPUnit\Runner\PhptTestCase; -use PHPUnit\Util\Color; -use SebastianBergmann\Timer\Timer; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class CliTestDoxPrinter extends TestDoxPrinter -{ - /** - * The default Testdox left margin for messages is a vertical line - */ - private const PREFIX_SIMPLE = [ - 'default' => '│', - 'start' => '│', - 'message' => '│', - 'diff' => '│', - 'trace' => '│', - 'last' => '│', - ]; - - /** - * Colored Testdox use box-drawing for a more textured map of the message - */ - private const PREFIX_DECORATED = [ - 'default' => '│', - 'start' => '┐', - 'message' => '├', - 'diff' => '┊', - 'trace' => '╵', - 'last' => '┴', - ]; - - private const SPINNER_ICONS = [ - " \e[36m◐\e[0m running tests", - " \e[36m◓\e[0m running tests", - " \e[36m◑\e[0m running tests", - " \e[36m◒\e[0m running tests", - ]; - - private const STATUS_STYLES = [ - BaseTestRunner::STATUS_PASSED => [ - 'symbol' => '✔', - 'color' => 'fg-green', - ], - BaseTestRunner::STATUS_ERROR => [ - 'symbol' => '✘', - 'color' => 'fg-yellow', - 'message' => 'bg-yellow,fg-black', - ], - BaseTestRunner::STATUS_FAILURE => [ - 'symbol' => '✘', - 'color' => 'fg-red', - 'message' => 'bg-red,fg-white', - ], - BaseTestRunner::STATUS_SKIPPED => [ - 'symbol' => '↩', - 'color' => 'fg-cyan', - 'message' => 'fg-cyan', - ], - BaseTestRunner::STATUS_RISKY => [ - 'symbol' => '☢', - 'color' => 'fg-yellow', - 'message' => 'fg-yellow', - ], - BaseTestRunner::STATUS_INCOMPLETE => [ - 'symbol' => '∅', - 'color' => 'fg-yellow', - 'message' => 'fg-yellow', - ], - BaseTestRunner::STATUS_WARNING => [ - 'symbol' => '⚠', - 'color' => 'fg-yellow', - 'message' => 'fg-yellow', - ], - BaseTestRunner::STATUS_UNKNOWN => [ - 'symbol' => '?', - 'color' => 'fg-blue', - 'message' => 'fg-white,bg-blue', - ], - ]; - - /** - * @var int[] - */ - private $nonSuccessfulTestResults = []; - - /** - * @throws \SebastianBergmann\Timer\RuntimeException - */ - public function printResult(TestResult $result): void - { - $this->printHeader(); - - $this->printNonSuccessfulTestsSummary($result->count()); - - $this->printFooter($result); - } - - /** - * @throws \SebastianBergmann\Timer\RuntimeException - */ - protected function printHeader(): void - { - $this->write("\n" . Timer::resourceUsage() . "\n\n"); - } - - protected function formatClassName(Test $test): string - { - if ($test instanceof TestCase) { - return $this->prettifier->prettifyTestClass(\get_class($test)); - } - - return \get_class($test); - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function registerTestResult(Test $test, ?\Throwable $t, int $status, float $time, bool $verbose): void - { - if ($status !== BaseTestRunner::STATUS_PASSED) { - $this->nonSuccessfulTestResults[] = $this->testIndex; - } - - parent::registerTestResult($test, $t, $status, $time, $verbose); - } - - /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function formatTestName(Test $test): string - { - if ($test instanceof TestCase) { - return $this->prettifier->prettifyTestCase($test); - } - - return parent::formatTestName($test); - } - - protected function writeTestResult(array $prevResult, array $result): void - { - // spacer line for new suite headers and after verbose messages - if ($prevResult['testName'] !== '' && - (!empty($prevResult['message']) || $prevResult['className'] !== $result['className'])) { - $this->write(\PHP_EOL); - } - - // suite header - if ($prevResult['className'] !== $result['className']) { - $this->write($this->colorizeTextBox('underlined', $result['className']) . \PHP_EOL); - } - - // test result line - if ($this->colors && $result['className'] === PhptTestCase::class) { - $testName = Color::colorizePath($result['testName'], $prevResult['testName'], true); - } else { - $testName = $result['testMethod']; - } - - $style = self::STATUS_STYLES[$result['status']]; - $line = \sprintf( - ' %s %s%s' . \PHP_EOL, - $this->colorizeTextBox($style['color'], $style['symbol']), - $testName, - $this->verbose ? ' ' . $this->formatRuntime($result['time'], $style['color']) : '' - ); - - $this->write($line); - - // additional information when verbose - $this->write($result['message']); - } - - protected function formatThrowable(\Throwable $t, ?int $status = null): string - { - return \trim(\PHPUnit\Framework\TestFailure::exceptionToString($t)); - } - - protected function colorizeMessageAndDiff(string $style, string $buffer): array - { - $lines = $buffer ? \array_map('\rtrim', \explode(\PHP_EOL, $buffer)) : []; - $message = []; - $diff = []; - $insideDiff = false; - - foreach ($lines as $line) { - if ($line === '--- Expected') { - $insideDiff = true; - } - - if (!$insideDiff) { - $message[] = $line; - } else { - if (\strpos($line, '-') === 0) { - $line = Color::colorize('fg-red', Color::visualizeWhitespace($line, true)); - } elseif (\strpos($line, '+') === 0) { - $line = Color::colorize('fg-green', Color::visualizeWhitespace($line, true)); - } elseif ($line === '@@ @@') { - $line = Color::colorize('fg-cyan', $line); - } - $diff[] = $line; - } - } - $diff = \implode(\PHP_EOL, $diff); - - if (!empty($message)) { - $message = $this->colorizeTextBox($style, \implode(\PHP_EOL, $message)); - } - - return [$message, $diff]; - } - - protected function formatStacktrace(\Throwable $t): string - { - $trace = \PHPUnit\Util\Filter::getFilteredStacktrace($t); - - if (!$this->colors) { - return $trace; - } - - $lines = []; - $prevPath = ''; - - foreach (\explode(\PHP_EOL, $trace) as $line) { - if (\preg_match('/^(.*):(\d+)$/', $line, $matches)) { - $lines[] = Color::colorizePath($matches[1], $prevPath) . - Color::dim(':') . - Color::colorize('fg-blue', $matches[2]) . - "\n"; - $prevPath = $matches[1]; - } else { - $lines[] = $line; - $prevPath = ''; - } - } - - return \implode('', $lines); - } - - protected function formatTestResultMessage(\Throwable $t, array $result, ?string $prefix = null): string - { - $message = $this->formatThrowable($t, $result['status']); - $diff = ''; - - if (!($this->verbose || $result['verbose'])) { - return ''; - } - - if ($message && $this->colors) { - $style = self::STATUS_STYLES[$result['status']]['message'] ?? ''; - [$message, $diff] = $this->colorizeMessageAndDiff($style, $message); - } - - if ($prefix === null || !$this->colors) { - $prefix = self::PREFIX_SIMPLE; - } - - if ($this->colors) { - $color = self::STATUS_STYLES[$result['status']]['color'] ?? ''; - $prefix = \array_map(static function ($p) use ($color) { - return Color::colorize($color, $p); - }, self::PREFIX_DECORATED); - } - - $trace = $this->formatStacktrace($t); - $out = $this->prefixLines($prefix['start'], \PHP_EOL) . \PHP_EOL; - - if ($message) { - $out .= $this->prefixLines($prefix['message'], $message . \PHP_EOL) . \PHP_EOL; - } - - if ($diff) { - $out .= $this->prefixLines($prefix['diff'], $diff . \PHP_EOL) . \PHP_EOL; - } - - if ($trace) { - if ($message || $diff) { - $out .= $this->prefixLines($prefix['default'], \PHP_EOL) . \PHP_EOL; - } - $out .= $this->prefixLines($prefix['trace'], $trace . \PHP_EOL) . \PHP_EOL; - } - $out .= $this->prefixLines($prefix['last'], \PHP_EOL) . \PHP_EOL; - - return $out; - } - - protected function drawSpinner(): void - { - if ($this->colors) { - $id = $this->spinState % \count(self::SPINNER_ICONS); - $this->write(self::SPINNER_ICONS[$id]); - } - } - - protected function undrawSpinner(): void - { - if ($this->colors) { - $id = $this->spinState % \count(self::SPINNER_ICONS); - $this->write("\e[1K\e[" . \strlen(self::SPINNER_ICONS[$id]) . 'D'); - } - } - - private function formatRuntime(float $time, string $color = ''): string - { - if (!$this->colors) { - return \sprintf('[%.2f ms]', $time * 1000); - } - - if ($time > 1) { - $color = 'fg-magenta'; - } - - return Color::colorize($color, ' ' . (int) \ceil($time * 1000) . ' ' . Color::dim('ms')); - } - - private function printNonSuccessfulTestsSummary(int $numberOfExecutedTests): void - { - if (empty($this->nonSuccessfulTestResults)) { - return; - } - - if ((\count($this->nonSuccessfulTestResults) / $numberOfExecutedTests) >= 0.7) { - return; - } - - $this->write("Summary of non-successful tests:\n\n"); - - $prevResult = $this->getEmptyTestResult(); - - foreach ($this->nonSuccessfulTestResults as $testIndex) { - $result = $this->testResults[$testIndex]; - $this->writeTestResult($prevResult, $result); - $prevResult = $result; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php deleted file mode 100644 index 1beb8be..0000000 --- a/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\TestDox; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class HtmlResultPrinter extends ResultPrinter -{ - /** - * @var string - */ - private const PAGE_HEADER = << - - - - Test Documentation - - - -EOT; - - /** - * @var string - */ - private const CLASS_HEADER = <<%s -