Version Description
2021-02-11 =
Removed development dependencies from vendor directory
Update CLOUDFLARE_MIN_PHP_VERSION to match the plugin requirements
Download this release
Release Info
Developer | manatarms |
Plugin | Cloudflare |
Version | 4.1.0 |
Comparing to | |
See all releases |
Code changes from version 4.0.0 to 4.1.0
- cloudflare.php +2 -2
- composer.json +1 -1
- composer.lock +1 -1
- config.json +1 -1
- output.log +9 -30
- readme.txt +7 -2
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +0 -832
- vendor/composer/autoload_files.php +0 -3
- vendor/composer/autoload_namespaces.php +0 -1
- vendor/composer/autoload_psr4.php +0 -10
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -915
- vendor/composer/installed.json +20 -2150
- vendor/dealerdirect/phpcodesniffer-composer-installer/.remarkrc +0 -6
- vendor/dealerdirect/phpcodesniffer-composer-installer/.yamllint +0 -6
- vendor/dealerdirect/phpcodesniffer-composer-installer/CODE_OF_CONDUCT.md +0 -129
- vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md +0 -21
- vendor/dealerdirect/phpcodesniffer-composer-installer/README.md +0 -251
- vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json +0 -50
- vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php +0 -620
- vendor/doctrine/instantiator/.doctrine-project.json +0 -41
- vendor/doctrine/instantiator/.github/FUNDING.yml +0 -3
- vendor/doctrine/instantiator/.github/workflows/coding-standards.yml +0 -48
- vendor/doctrine/instantiator/.github/workflows/continuous-integration.yml +0 -91
- vendor/doctrine/instantiator/.github/workflows/phpbench.yml +0 -50
- vendor/doctrine/instantiator/.github/workflows/release-on-milestone-closed.yml +0 -45
- vendor/doctrine/instantiator/.github/workflows/static-analysis.yml +0 -47
- vendor/doctrine/instantiator/LICENSE +0 -19
- vendor/doctrine/instantiator/README.md +0 -38
- vendor/doctrine/instantiator/composer.json +0 -42
- vendor/doctrine/instantiator/docs/en/index.rst +0 -68
- vendor/doctrine/instantiator/docs/en/sidebar.rst +0 -4
- vendor/doctrine/instantiator/phpbench.json +0 -4
- vendor/doctrine/instantiator/phpcs.xml.dist +0 -50
- vendor/doctrine/instantiator/phpstan.neon.dist +0 -15
- vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +0 -12
- vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php +0 -41
- vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +0 -57
- vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +0 -232
- vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +0 -23
- vendor/johnkary/phpunit-speedtrap/.travis.yml +0 -41
- vendor/johnkary/phpunit-speedtrap/CHANGELOG.md +0 -48
- vendor/johnkary/phpunit-speedtrap/LICENSE +0 -20
- vendor/johnkary/phpunit-speedtrap/README.md +0 -183
- vendor/johnkary/phpunit-speedtrap/UPGRADE.md +0 -38
- vendor/johnkary/phpunit-speedtrap/composer.json +0 -37
- vendor/johnkary/phpunit-speedtrap/phpunit.xml.dist +0 -44
- vendor/johnkary/phpunit-speedtrap/src/SpeedTrapListener.php +0 -251
- vendor/johnkary/phpunit-speedtrap/tests/ExceptionalTest.php +0 -27
- vendor/johnkary/phpunit-speedtrap/tests/SomeSlowTest.php +0 -87
- vendor/myclabs/deep-copy/.github/FUNDING.yml +0 -12
- vendor/myclabs/deep-copy/LICENSE +0 -20
- vendor/myclabs/deep-copy/README.md +0 -375
- vendor/myclabs/deep-copy/composer.json +0 -38
- vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +0 -298
- vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php +0 -9
- vendor/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php +0 -9
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php +0 -33
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php +0 -28
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php +0 -22
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php +0 -18
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php +0 -16
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php +0 -39
- vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php +0 -24
- vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php +0 -22
- vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php +0 -14
- vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php +0 -39
- vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php +0 -32
- vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php +0 -52
- vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php +0 -78
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php +0 -33
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php +0 -30
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php +0 -17
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php +0 -36
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php +0 -10
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php +0 -51
- vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php +0 -13
- vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php +0 -29
- vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php +0 -20
- vendor/phar-io/manifest/CHANGELOG.md +0 -25
- vendor/phar-io/manifest/LICENSE +0 -31
- vendor/phar-io/manifest/README.md +0 -30
- vendor/phar-io/manifest/composer.json +0 -42
- vendor/phar-io/manifest/composer.lock +0 -70
- vendor/phar-io/manifest/src/ManifestDocumentMapper.php +0 -150
- vendor/phar-io/manifest/src/ManifestLoader.php +0 -44
- vendor/phar-io/manifest/src/ManifestSerializer.php +0 -168
- vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php +0 -13
- vendor/phar-io/manifest/src/exceptions/Exception.php +0 -13
- vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php +0 -14
- vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php +0 -13
- vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php +0 -13
- vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php +0 -5
- vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php +0 -45
- vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php +0 -5
- vendor/phar-io/manifest/src/exceptions/ManifestElementException.php +0 -5
- vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php +0 -5
- vendor/phar-io/manifest/src/values/Application.php +0 -16
- vendor/phar-io/manifest/src/values/ApplicationName.php +0 -37
- vendor/phar-io/manifest/src/values/Author.php +0 -39
- vendor/phar-io/manifest/src/values/AuthorCollection.php +0 -34
- vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php +0 -42
- vendor/phar-io/manifest/src/values/BundledComponent.php +0 -33
- vendor/phar-io/manifest/src/values/BundledComponentCollection.php +0 -34
- vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php +0 -42
- vendor/phar-io/manifest/src/values/CopyrightInformation.php +0 -31
- vendor/phar-io/manifest/src/values/Email.php +0 -31
- vendor/phar-io/manifest/src/values/Extension.php +0 -46
- vendor/phar-io/manifest/src/values/Library.php +0 -16
- vendor/phar-io/manifest/src/values/License.php +0 -31
- vendor/phar-io/manifest/src/values/Manifest.php +0 -92
- vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php +0 -23
- vendor/phar-io/manifest/src/values/PhpVersionRequirement.php +0 -25
- vendor/phar-io/manifest/src/values/Requirement.php +0 -13
- vendor/phar-io/manifest/src/values/RequirementCollection.php +0 -34
- vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php +0 -42
- vendor/phar-io/manifest/src/values/Type.php +0 -41
- vendor/phar-io/manifest/src/values/Url.php +0 -36
- vendor/phar-io/manifest/src/xml/AuthorElement.php +0 -20
- vendor/phar-io/manifest/src/xml/AuthorElementCollection.php +0 -18
- vendor/phar-io/manifest/src/xml/BundlesElement.php +0 -18
- vendor/phar-io/manifest/src/xml/ComponentElement.php +0 -20
- vendor/phar-io/manifest/src/xml/ComponentElementCollection.php +0 -18
- vendor/phar-io/manifest/src/xml/ContainsElement.php +0 -30
- vendor/phar-io/manifest/src/xml/CopyrightElement.php +0 -24
- vendor/phar-io/manifest/src/xml/ElementCollection.php +0 -60
- vendor/phar-io/manifest/src/xml/ExtElement.php +0 -16
- vendor/phar-io/manifest/src/xml/ExtElementCollection.php +0 -18
- vendor/phar-io/manifest/src/xml/ExtensionElement.php +0 -20
- vendor/phar-io/manifest/src/xml/LicenseElement.php +0 -20
- vendor/phar-io/manifest/src/xml/ManifestDocument.php +0 -103
- vendor/phar-io/manifest/src/xml/ManifestElement.php +0 -66
- vendor/phar-io/manifest/src/xml/PhpElement.php +0 -26
- vendor/phar-io/manifest/src/xml/RequiresElement.php +0 -18
- vendor/phar-io/version/CHANGELOG.md +0 -92
- vendor/phar-io/version/LICENSE +0 -31
- vendor/phar-io/version/README.md +0 -61
- vendor/phar-io/version/composer.json +0 -34
- vendor/phar-io/version/src/PreReleaseSuffix.php +0 -88
- vendor/phar-io/version/src/Version.php +0 -148
- vendor/phar-io/version/src/VersionConstraintParser.php +0 -112
- vendor/phar-io/version/src/VersionConstraintValue.php +0 -100
- vendor/phar-io/version/src/VersionNumber.php +0 -28
- vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php +0 -23
- vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php +0 -34
- vendor/phar-io/version/src/constraints/AnyVersionConstraint.php +0 -20
- vendor/phar-io/version/src/constraints/ExactVersionConstraint.php +0 -16
- vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php +0 -29
- vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php +0 -35
- vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php +0 -38
- vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php +0 -29
- vendor/phar-io/version/src/constraints/VersionConstraint.php +0 -16
- vendor/phar-io/version/src/exceptions/Exception.php +0 -15
- vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php +0 -5
- vendor/phar-io/version/src/exceptions/InvalidVersionException.php +0 -5
- vendor/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php +0 -13
- vendor/php-mock/php-mock-integration/.travis.yml +0 -25
- vendor/php-mock/php-mock-integration/LICENSE +0 -14
- vendor/php-mock/php-mock-integration/README.md +0 -22
- vendor/php-mock/php-mock-integration/classes/MockDelegateFunction.tpl +0 -27
- vendor/php-mock/php-mock-integration/classes/MockDelegateFunctionBuilder.php +0 -84
- vendor/php-mock/php-mock-integration/composer.json +0 -34
- vendor/php-mock/php-mock-integration/tests/MockDelegateFunctionBuilderTest.php +0 -128
- vendor/php-mock/php-mock-integration/tests/MockDelegateFunctionTest.php +0 -66
- vendor/php-mock/php-mock-integration/tests/TestCaseNoTypeHintTrait.php +0 -23
- vendor/php-mock/php-mock-integration/tests/TestCaseTypeHintTrait.php +0 -23
- vendor/php-mock/php-mock-integration/tests/autoload.php +0 -25
- vendor/php-mock/php-mock-phpunit/.travis.yml +0 -126
- vendor/php-mock/php-mock-phpunit/LICENSE +0 -14
- vendor/php-mock/php-mock-phpunit/README.md +0 -91
- vendor/php-mock/php-mock-phpunit/autoload.php +0 -96
- vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemoverNoReturnTypes.php +0 -74
- vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemoverReturnTypes.php +0 -81
- vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemoverReturnTypes84.php +0 -81
- vendor/php-mock/php-mock-phpunit/classes/MockDisablerPHPUnit6.php +0 -50
- vendor/php-mock/php-mock-phpunit/classes/MockDisablerPHPUnit7.php +0 -50
- vendor/php-mock/php-mock-phpunit/classes/MockObjectProxyNoReturnTypes.php +0 -91
- vendor/php-mock/php-mock-phpunit/classes/MockObjectProxyReturnTypes.php +0 -93
- vendor/php-mock/php-mock-phpunit/classes/MockObjectProxyReturnTypes84.php +0 -92
- vendor/php-mock/php-mock-phpunit/classes/PHPMock.php +0 -128
- vendor/php-mock/php-mock-phpunit/compatibility/BaseTestListener.php +0 -13
- vendor/php-mock/php-mock-phpunit/composer.json +0 -28
- vendor/php-mock/php-mock-phpunit/tests/MockDisablerTest.php +0 -35
- vendor/php-mock/php-mock-phpunit/tests/MockObjectProxyTest.php +0 -163
- vendor/php-mock/php-mock-phpunit/tests/PHPMockTest.php +0 -66
- vendor/php-mock/php-mock/.github/workflows/coding-standards.yml +0 -27
- vendor/php-mock/php-mock/.github/workflows/phpmd.yml +0 -27
- vendor/php-mock/php-mock/.github/workflows/phpunit.yml +0 -49
- vendor/php-mock/php-mock/.github/workflows/test-flight.yml +0 -30
- vendor/php-mock/php-mock/LICENSE +0 -14
- vendor/php-mock/php-mock/README.md +0 -262
- vendor/php-mock/php-mock/autoload.php +0 -9
- vendor/php-mock/php-mock/classes/Deactivatable.php +0 -19
- vendor/php-mock/php-mock/classes/Mock.php +0 -191
- vendor/php-mock/php-mock/classes/MockBuilder.php +0 -124
- vendor/php-mock/php-mock/classes/MockEnabledException.php +0 -25
- vendor/php-mock/php-mock/classes/MockRegistry.php +0 -93
- vendor/php-mock/php-mock/classes/environment/MockEnvironment.php +0 -74
- vendor/php-mock/php-mock/classes/environment/SleepEnvironmentBuilder.php +0 -135
- vendor/php-mock/php-mock/classes/functions/AbstractSleepFunction.php +0 -69
- vendor/php-mock/php-mock/classes/functions/FixedDateFunction.php +0 -57
- vendor/php-mock/php-mock/classes/functions/FixedMicrotimeFunction.php +0 -112
- vendor/php-mock/php-mock/classes/functions/FixedValueFunction.php +0 -56
- vendor/php-mock/php-mock/classes/functions/FunctionProvider.php +0 -22
- vendor/php-mock/php-mock/classes/functions/Incrementable.php +0 -22
- vendor/php-mock/php-mock/classes/functions/MicrotimeConverter.php +0 -46
- vendor/php-mock/php-mock/classes/functions/SleepFunction.php +0 -23
- vendor/php-mock/php-mock/classes/functions/UsleepFunction.php +0 -23
- vendor/php-mock/php-mock/classes/generator/MockFunctionGenerator.php +0 -111
- vendor/php-mock/php-mock/classes/generator/ParameterBuilder.php +0 -98
- vendor/php-mock/php-mock/classes/generator/function.tpl +0 -17
- vendor/php-mock/php-mock/classes/spy/Invocation.php +0 -85
- vendor/php-mock/php-mock/classes/spy/Spy.php +0 -82
- vendor/php-mock/php-mock/composer.json +0 -42
- vendor/php-mock/php-mock/tests/AbstractMockTest.php +0 -350
- vendor/php-mock/php-mock/tests/ExampleTest.php +0 -124
- vendor/php-mock/php-mock/tests/MockBuilderTest.php +0 -47
- vendor/php-mock/php-mock/tests/MockCaseInsensitivityTest.php +0 -89
- vendor/php-mock/php-mock/tests/MockDefiningOrderTest.php +0 -132
- vendor/php-mock/php-mock/tests/MockNamespaceTest.php +0 -96
- vendor/php-mock/php-mock/tests/MockTest.php +0 -88
- vendor/php-mock/php-mock/tests/TestCaseNoTypeHintTrait.php +0 -23
- vendor/php-mock/php-mock/tests/TestCaseTypeHintTrait.php +0 -23
- vendor/php-mock/php-mock/tests/autoload.php +0 -16
- vendor/php-mock/php-mock/tests/environment/MockEnvironmentTest.php +0 -91
- vendor/php-mock/php-mock/tests/environment/SleepEnvironmentBuilderTest.php +0 -126
- vendor/php-mock/php-mock/tests/functions/AbstractSleepFunctionTest.php +0 -72
- vendor/php-mock/php-mock/tests/functions/FixedDateFunctionTest.php +0 -29
- vendor/php-mock/php-mock/tests/functions/FixedMicrotimeFunctionTest.php +0 -145
- vendor/php-mock/php-mock/tests/functions/IncrementableTest.php +0 -82
- vendor/php-mock/php-mock/tests/functions/MicrotimeConverterTest.php +0 -65
- vendor/php-mock/php-mock/tests/generator/MockFunctionGeneratorTest.php +0 -52
- vendor/php-mock/php-mock/tests/generator/ParameterBuilderTest.php +0 -224
- vendor/php-mock/php-mock/tests/spy/SpyTest.php +0 -179
- vendor/phpcompatibility/php-compatibility/CHANGELOG.md +0 -1488
- vendor/phpcompatibility/php-compatibility/LICENSE +0 -165
- vendor/phpcompatibility/php-compatibility/PHPCSAliases.php +0 -73
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractComplexVersionSniff.php +0 -147
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractFunctionCallParameterSniff.php +0 -193
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractNewFeatureSniff.php +0 -115
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractRemovedFeatureSniff.php +0 -156
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/ComplexVersionInterface.php +0 -84
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/PHPCSHelper.php +0 -678
- vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniff.php +0 -1469
cloudflare.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cloudflare
|
4 |
Plugin URI: https://blog.cloudflare.com/new-wordpress-plugin/
|
5 |
Description: Cloudflare speeds up and protects your WordPress site.
|
6 |
-
Version: 4.
|
7 |
Requires PHP: 7.2
|
8 |
Author: Cloudflare, Inc.
|
9 |
License: BSD-3-Clause
|
@@ -26,7 +26,7 @@ if (!defined('ABSPATH')) {
|
|
26 |
exit;
|
27 |
}
|
28 |
|
29 |
-
define('CLOUDFLARE_MIN_PHP_VERSION', '
|
30 |
define('CLOUDFLARE_MIN_WP_VERSION', '3.4');
|
31 |
define('CLOUDFLARE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
32 |
|
3 |
Plugin Name: Cloudflare
|
4 |
Plugin URI: https://blog.cloudflare.com/new-wordpress-plugin/
|
5 |
Description: Cloudflare speeds up and protects your WordPress site.
|
6 |
+
Version: 4.1.0
|
7 |
Requires PHP: 7.2
|
8 |
Author: Cloudflare, Inc.
|
9 |
License: BSD-3-Clause
|
26 |
exit;
|
27 |
}
|
28 |
|
29 |
+
define('CLOUDFLARE_MIN_PHP_VERSION', '7.2');
|
30 |
define('CLOUDFLARE_MIN_WP_VERSION', '3.4');
|
31 |
define('CLOUDFLARE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
32 |
|
composer.json
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
"_comment": [
|
32 |
"php-compatibility-install comes from https://github.com/wimg/PHPCompatibility/issues/102#issuecomment-255778195"
|
33 |
],
|
34 |
-
"version": "4.
|
35 |
"config": {
|
36 |
"platform": {
|
37 |
"php": "7.2"
|
31 |
"_comment": [
|
32 |
"php-compatibility-install comes from https://github.com/wimg/PHPCompatibility/issues/102#issuecomment-255778195"
|
33 |
],
|
34 |
+
"version": "4.1.0",
|
35 |
"config": {
|
36 |
"platform": {
|
37 |
"php": "7.2"
|
composer.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "cloudflare/cf-ip-rewrite",
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "d8c0cab412ae81b7f5be9a98b273cc59",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "cloudflare/cf-ip-rewrite",
|
config.json
CHANGED
@@ -25,5 +25,5 @@
|
|
25 |
},
|
26 |
"locale": "en",
|
27 |
"integrationName": "wordpress",
|
28 |
-
"version": "4.
|
29 |
}
|
25 |
},
|
26 |
"locale": "en",
|
27 |
"integrationName": "wordpress",
|
28 |
+
"version": "4.1.0"
|
29 |
}
|
output.log
CHANGED
@@ -30,28 +30,26 @@ php-7.4-build2: Pulling from cloudflare/cloudflare-wordpress/php-actions_compose
|
|
30 |
4d1e94121e00: Waiting
|
31 |
320f26ee9b1c: Verifying Checksum
|
32 |
320f26ee9b1c: Download complete
|
33 |
-
30e209609427: Verifying Checksum
|
34 |
-
30e209609427: Download complete
|
35 |
801bfaa63ef2: Verifying Checksum
|
36 |
801bfaa63ef2: Download complete
|
|
|
|
|
|
|
37 |
4612e05a72cf: Verifying Checksum
|
38 |
4612e05a72cf: Download complete
|
39 |
-
801bfaa63ef2: Pull complete
|
40 |
-
79c03e12047a: Verifying Checksum
|
41 |
-
79c03e12047a: Download complete
|
42 |
30e209609427: Pull complete
|
|
|
|
|
|
|
43 |
9b2beae78beb: Verifying Checksum
|
44 |
9b2beae78beb: Download complete
|
45 |
-
320f26ee9b1c: Pull complete
|
46 |
5571c1cd7f43: Verifying Checksum
|
47 |
5571c1cd7f43: Download complete
|
48 |
-
4612e05a72cf: Pull complete
|
49 |
9b2beae78beb: Pull complete
|
50 |
-
51393fef6543: Verifying Checksum
|
51 |
-
51393fef6543: Download complete
|
52 |
79c03e12047a: Pull complete
|
53 |
-
65564f077fec: Verifying Checksum
|
54 |
65564f077fec: Download complete
|
|
|
|
|
55 |
4d1e94121e00: Verifying Checksum
|
56 |
4d1e94121e00: Download complete
|
57 |
51393fef6543: Pull complete
|
@@ -63,23 +61,4 @@ Status: Downloaded newer image for docker.pkg.github.com/cloudflare/cloudflare-w
|
|
63 |
docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
64 |
Docker tag: docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
65 |
No private keys supplied
|
66 |
-
Command: composer install --no-progress --no-interaction
|
67 |
-
Running php-build composer
|
68 |
-
WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json.
|
69 |
-
Configure a credential helper to remove this warning. See
|
70 |
-
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
|
71 |
-
|
72 |
-
Login Succeeded
|
73 |
-
Pulling docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
74 |
-
WARNING: ⚠️ Failed to pull manifest by the resolved digest. This registry does not
|
75 |
-
appear to conform to the distribution registry specification; falling back to
|
76 |
-
pull by tag. This fallback is DEPRECATED, and will be removed in a future
|
77 |
-
release. Please contact admins of https://docker.pkg.github.com. ⚠️
|
78 |
-
|
79 |
-
php-7.4-build2: Pulling from cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress
|
80 |
-
Digest: sha256:fe3e5fd68143f1f18e31c3809077c110c3be05484a88924a3088d3fcecde0289
|
81 |
-
Status: Image is up to date for docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
82 |
-
docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
83 |
-
Docker tag: docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
84 |
-
No private keys supplied
|
85 |
-
Command: composer run-script clean-crash-test --no-interaction
|
30 |
4d1e94121e00: Waiting
|
31 |
320f26ee9b1c: Verifying Checksum
|
32 |
320f26ee9b1c: Download complete
|
|
|
|
|
33 |
801bfaa63ef2: Verifying Checksum
|
34 |
801bfaa63ef2: Download complete
|
35 |
+
30e209609427: Verifying Checksum
|
36 |
+
30e209609427: Download complete
|
37 |
+
801bfaa63ef2: Pull complete
|
38 |
4612e05a72cf: Verifying Checksum
|
39 |
4612e05a72cf: Download complete
|
|
|
|
|
|
|
40 |
30e209609427: Pull complete
|
41 |
+
79c03e12047a: Download complete
|
42 |
+
320f26ee9b1c: Pull complete
|
43 |
+
4612e05a72cf: Pull complete
|
44 |
9b2beae78beb: Verifying Checksum
|
45 |
9b2beae78beb: Download complete
|
|
|
46 |
5571c1cd7f43: Verifying Checksum
|
47 |
5571c1cd7f43: Download complete
|
|
|
48 |
9b2beae78beb: Pull complete
|
|
|
|
|
49 |
79c03e12047a: Pull complete
|
|
|
50 |
65564f077fec: Download complete
|
51 |
+
51393fef6543: Verifying Checksum
|
52 |
+
51393fef6543: Download complete
|
53 |
4d1e94121e00: Verifying Checksum
|
54 |
4d1e94121e00: Download complete
|
55 |
51393fef6543: Pull complete
|
61 |
docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
62 |
Docker tag: docker.pkg.github.com/cloudflare/cloudflare-wordpress/php-actions_composer_cloudflare-wordpress:php-7.4-build2
|
63 |
No private keys supplied
|
64 |
+
Command: composer install --no-dev --no-progress --no-interaction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: icyapril, manatarms, thillcf, deuill, epatryk, jacobbednarz
|
3 |
Tags: cloudflare, seo, ssl, ddos, speed, security, cdn, performance, free
|
4 |
Requires at least: 3.4
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 4.
|
7 |
Requires PHP: 7.2
|
8 |
License: BSD-3-Clause
|
9 |
|
@@ -91,6 +91,11 @@ Yes, Cloudflare works with, and helps speed up your site even more, if you have
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
94 |
= 4.0.0 - 2021-02-09 =
|
95 |
|
96 |
* Drop support for PHP 5.6, 7.0 and 7.1
|
2 |
Contributors: icyapril, manatarms, thillcf, deuill, epatryk, jacobbednarz
|
3 |
Tags: cloudflare, seo, ssl, ddos, speed, security, cdn, performance, free
|
4 |
Requires at least: 3.4
|
5 |
+
Tested up to: 5.6
|
6 |
+
Stable tag: 4.1.0
|
7 |
Requires PHP: 7.2
|
8 |
License: BSD-3-Clause
|
9 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 4.1.0 - 2021-02-11 =
|
95 |
+
|
96 |
+
* Removed development dependencies from vendor directory
|
97 |
+
* Update CLOUDFLARE_MIN_PHP_VERSION to match the plugin requirements
|
98 |
+
|
99 |
= 4.0.0 - 2021-02-09 =
|
100 |
|
101 |
* Drop support for PHP 5.6, 7.0 and 7.1
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitc18900f6a542da4a0b530114484e7cc6::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -6,836 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
-
'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php',
|
10 |
-
'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php',
|
11 |
-
'Generic_Sniffs_Classes_DuplicateClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php',
|
12 |
-
'Generic_Sniffs_Classes_OpeningBraceSameLineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php',
|
13 |
-
'Generic_Sniffs_CodeAnalysis_EmptyStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',
|
14 |
-
'Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php',
|
15 |
-
'Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',
|
16 |
-
'Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php',
|
17 |
-
'Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',
|
18 |
-
'Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',
|
19 |
-
'Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',
|
20 |
-
'Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php',
|
21 |
-
'Generic_Sniffs_Commenting_DocCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php',
|
22 |
-
'Generic_Sniffs_Commenting_FixmeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php',
|
23 |
-
'Generic_Sniffs_Commenting_TodoSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php',
|
24 |
-
'Generic_Sniffs_ControlStructures_InlineControlStructureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php',
|
25 |
-
'Generic_Sniffs_Debug_CSSLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php',
|
26 |
-
'Generic_Sniffs_Debug_ClosureLinterSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php',
|
27 |
-
'Generic_Sniffs_Debug_ESLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ESLintSniff.php',
|
28 |
-
'Generic_Sniffs_Debug_JSHintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php',
|
29 |
-
'Generic_Sniffs_Files_ByteOrderMarkSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php',
|
30 |
-
'Generic_Sniffs_Files_EndFileNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php',
|
31 |
-
'Generic_Sniffs_Files_EndFileNoNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php',
|
32 |
-
'Generic_Sniffs_Files_InlineHTMLSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php',
|
33 |
-
'Generic_Sniffs_Files_LineEndingsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php',
|
34 |
-
'Generic_Sniffs_Files_LineLengthSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php',
|
35 |
-
'Generic_Sniffs_Files_LowercasedFilenameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php',
|
36 |
-
'Generic_Sniffs_Files_OneClassPerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php',
|
37 |
-
'Generic_Sniffs_Files_OneInterfacePerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php',
|
38 |
-
'Generic_Sniffs_Files_OneTraitPerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php',
|
39 |
-
'Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php',
|
40 |
-
'Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
|
41 |
-
'Generic_Sniffs_Formatting_NoSpaceAfterCastSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php',
|
42 |
-
'Generic_Sniffs_Formatting_SpaceAfterCastSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php',
|
43 |
-
'Generic_Sniffs_Formatting_SpaceAfterNotSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php',
|
44 |
-
'Generic_Sniffs_Functions_CallTimePassByReferenceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php',
|
45 |
-
'Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',
|
46 |
-
'Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php',
|
47 |
-
'Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php',
|
48 |
-
'Generic_Sniffs_Metrics_CyclomaticComplexitySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php',
|
49 |
-
'Generic_Sniffs_Metrics_NestingLevelSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php',
|
50 |
-
'Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php',
|
51 |
-
'Generic_Sniffs_NamingConventions_ConstructorNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php',
|
52 |
-
'Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',
|
53 |
-
'Generic_Sniffs_PHP_BacktickOperatorSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php',
|
54 |
-
'Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php',
|
55 |
-
'Generic_Sniffs_PHP_ClosingPHPTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php',
|
56 |
-
'Generic_Sniffs_PHP_DeprecatedFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php',
|
57 |
-
'Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php',
|
58 |
-
'Generic_Sniffs_PHP_DisallowShortOpenTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',
|
59 |
-
'Generic_Sniffs_PHP_ForbiddenFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',
|
60 |
-
'Generic_Sniffs_PHP_LowerCaseConstantSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php',
|
61 |
-
'Generic_Sniffs_PHP_LowerCaseKeywordSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php',
|
62 |
-
'Generic_Sniffs_PHP_NoSilencedErrorsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php',
|
63 |
-
'Generic_Sniffs_PHP_SAPIUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php',
|
64 |
-
'Generic_Sniffs_PHP_SyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php',
|
65 |
-
'Generic_Sniffs_PHP_UpperCaseConstantSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php',
|
66 |
-
'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php',
|
67 |
-
'Generic_Sniffs_VersionControl_SubversionPropertiesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php',
|
68 |
-
'Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php',
|
69 |
-
'Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php',
|
70 |
-
'Generic_Sniffs_WhiteSpace_ScopeIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php',
|
71 |
-
'MySource_Sniffs_CSS_BrowserSpecificStylesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php',
|
72 |
-
'MySource_Sniffs_Channels_DisallowSelfActionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php',
|
73 |
-
'MySource_Sniffs_Channels_IncludeOwnSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php',
|
74 |
-
'MySource_Sniffs_Channels_IncludeSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php',
|
75 |
-
'MySource_Sniffs_Channels_UnusedSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php',
|
76 |
-
'MySource_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php',
|
77 |
-
'MySource_Sniffs_Debug_DebugCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php',
|
78 |
-
'MySource_Sniffs_Debug_FirebugConsoleSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php',
|
79 |
-
'MySource_Sniffs_Objects_AssignThisSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php',
|
80 |
-
'MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php',
|
81 |
-
'MySource_Sniffs_Objects_DisallowNewWidgetSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php',
|
82 |
-
'MySource_Sniffs_PHP_AjaxNullComparisonSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php',
|
83 |
-
'MySource_Sniffs_PHP_EvalObjectFactorySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php',
|
84 |
-
'MySource_Sniffs_PHP_GetRequestDataSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php',
|
85 |
-
'MySource_Sniffs_PHP_ReturnFunctionValueSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php',
|
86 |
-
'MySource_Sniffs_Strings_JoinStringsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php',
|
87 |
-
'PEAR_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php',
|
88 |
-
'PEAR_Sniffs_Commenting_ClassCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php',
|
89 |
-
'PEAR_Sniffs_Commenting_FileCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php',
|
90 |
-
'PEAR_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php',
|
91 |
-
'PEAR_Sniffs_Commenting_InlineCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php',
|
92 |
-
'PEAR_Sniffs_ControlStructures_ControlSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
|
93 |
-
'PEAR_Sniffs_ControlStructures_MultiLineConditionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',
|
94 |
-
'PEAR_Sniffs_Files_IncludingFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php',
|
95 |
-
'PEAR_Sniffs_Formatting_MultiLineAssignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php',
|
96 |
-
'PEAR_Sniffs_Functions_FunctionCallSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',
|
97 |
-
'PEAR_Sniffs_Functions_FunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',
|
98 |
-
'PEAR_Sniffs_Functions_ValidDefaultValueSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',
|
99 |
-
'PEAR_Sniffs_NamingConventions_ValidClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',
|
100 |
-
'PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
|
101 |
-
'PEAR_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
102 |
-
'PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',
|
103 |
-
'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
|
104 |
-
'PEAR_Sniffs_WhiteSpace_ScopeIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',
|
105 |
-
'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
|
106 |
-
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
|
107 |
-
'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
|
108 |
-
'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php',
|
109 |
-
'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
|
110 |
-
'PHPUnit\\Framework\\Constraint\\ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
|
111 |
-
'PHPUnit\\Framework\\Constraint\\Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
|
112 |
-
'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
|
113 |
-
'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
|
114 |
-
'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
|
115 |
-
'PHPUnit\\Framework\\Constraint\\Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
|
116 |
-
'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
|
117 |
-
'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
|
118 |
-
'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
|
119 |
-
'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
|
120 |
-
'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
|
121 |
-
'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
|
122 |
-
'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php',
|
123 |
-
'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
|
124 |
-
'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
|
125 |
-
'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
|
126 |
-
'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
|
127 |
-
'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
|
128 |
-
'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
|
129 |
-
'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
|
130 |
-
'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
|
131 |
-
'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
|
132 |
-
'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
|
133 |
-
'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
|
134 |
-
'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
|
135 |
-
'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
|
136 |
-
'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
|
137 |
-
'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
|
138 |
-
'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
|
139 |
-
'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
|
140 |
-
'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
|
141 |
-
'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
|
142 |
-
'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
|
143 |
-
'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php',
|
144 |
-
'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php',
|
145 |
-
'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php',
|
146 |
-
'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php',
|
147 |
-
'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
|
148 |
-
'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php',
|
149 |
-
'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
|
150 |
-
'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
|
151 |
-
'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
|
152 |
-
'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php',
|
153 |
-
'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
|
154 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
|
155 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsEqual.php',
|
156 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsIdentical.php',
|
157 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
|
158 |
-
'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php',
|
159 |
-
'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
|
160 |
-
'PHPUnit\\Framework\\Error\\Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
|
161 |
-
'PHPUnit\\Framework\\Error\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Error.php',
|
162 |
-
'PHPUnit\\Framework\\Error\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php',
|
163 |
-
'PHPUnit\\Framework\\Error\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php',
|
164 |
-
'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Exception.php',
|
165 |
-
'PHPUnit\\Framework\\ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
|
166 |
-
'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php',
|
167 |
-
'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
|
168 |
-
'PHPUnit\\Framework\\IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
|
169 |
-
'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php',
|
170 |
-
'PHPUnit\\Framework\\InvalidArgumentException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php',
|
171 |
-
'PHPUnit\\Framework\\InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php',
|
172 |
-
'PHPUnit\\Framework\\InvalidDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php',
|
173 |
-
'PHPUnit\\Framework\\InvalidParameterGroupException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
|
174 |
-
'PHPUnit\\Framework\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php',
|
175 |
-
'PHPUnit\\Framework\\MockObject\\Api' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php',
|
176 |
-
'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
|
177 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
|
178 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
|
179 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php',
|
180 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\Match_' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Match_.php',
|
181 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
|
182 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
|
183 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
|
184 |
-
'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php',
|
185 |
-
'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php',
|
186 |
-
'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
|
187 |
-
'PHPUnit\\Framework\\MockObject\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
|
188 |
-
'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php',
|
189 |
-
'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php',
|
190 |
-
'PHPUnit\\Framework\\MockObject\\InvocationHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php',
|
191 |
-
'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
|
192 |
-
'PHPUnit\\Framework\\MockObject\\Method' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php',
|
193 |
-
'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php',
|
194 |
-
'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
|
195 |
-
'PHPUnit\\Framework\\MockObject\\MockClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php',
|
196 |
-
'PHPUnit\\Framework\\MockObject\\MockMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
|
197 |
-
'PHPUnit\\Framework\\MockObject\\MockMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
|
198 |
-
'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
|
199 |
-
'PHPUnit\\Framework\\MockObject\\MockTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
|
200 |
-
'PHPUnit\\Framework\\MockObject\\MockType' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
|
201 |
-
'PHPUnit\\Framework\\MockObject\\MockedCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php',
|
202 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php',
|
203 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php',
|
204 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php',
|
205 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php',
|
206 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php',
|
207 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php',
|
208 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php',
|
209 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php',
|
210 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php',
|
211 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php',
|
212 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php',
|
213 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php',
|
214 |
-
'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
|
215 |
-
'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
|
216 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
|
217 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
|
218 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
|
219 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
|
220 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
|
221 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
|
222 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
|
223 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
|
224 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php',
|
225 |
-
'PHPUnit\\Framework\\MockObject\\UnmockedCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php',
|
226 |
-
'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
|
227 |
-
'PHPUnit\\Framework\\NoChildTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
|
228 |
-
'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
|
229 |
-
'PHPUnit\\Framework\\PHPTAssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php',
|
230 |
-
'PHPUnit\\Framework\\RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php',
|
231 |
-
'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
|
232 |
-
'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php',
|
233 |
-
'PHPUnit\\Framework\\SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
|
234 |
-
'PHPUnit\\Framework\\SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php',
|
235 |
-
'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php',
|
236 |
-
'PHPUnit\\Framework\\SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php',
|
237 |
-
'PHPUnit\\Framework\\SyntheticSkippedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php',
|
238 |
-
'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php',
|
239 |
-
'PHPUnit\\Framework\\TestBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/TestBuilder.php',
|
240 |
-
'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php',
|
241 |
-
'PHPUnit\\Framework\\TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php',
|
242 |
-
'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php',
|
243 |
-
'PHPUnit\\Framework\\TestListenerDefaultImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
|
244 |
-
'PHPUnit\\Framework\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php',
|
245 |
-
'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php',
|
246 |
-
'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
|
247 |
-
'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php',
|
248 |
-
'PHPUnit\\Framework\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Warning.php',
|
249 |
-
'PHPUnit\\Framework\\WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
|
250 |
-
'PHPUnit\\Runner\\AfterIncompleteTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
|
251 |
-
'PHPUnit\\Runner\\AfterLastTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
|
252 |
-
'PHPUnit\\Runner\\AfterRiskyTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
|
253 |
-
'PHPUnit\\Runner\\AfterSkippedTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
|
254 |
-
'PHPUnit\\Runner\\AfterSuccessfulTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
|
255 |
-
'PHPUnit\\Runner\\AfterTestErrorHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
|
256 |
-
'PHPUnit\\Runner\\AfterTestFailureHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
|
257 |
-
'PHPUnit\\Runner\\AfterTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
|
258 |
-
'PHPUnit\\Runner\\AfterTestWarningHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
|
259 |
-
'PHPUnit\\Runner\\BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
|
260 |
-
'PHPUnit\\Runner\\BeforeFirstTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
|
261 |
-
'PHPUnit\\Runner\\BeforeTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
|
262 |
-
'PHPUnit\\Runner\\DefaultTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php',
|
263 |
-
'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php',
|
264 |
-
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
|
265 |
-
'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
|
266 |
-
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
|
267 |
-
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
|
268 |
-
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
|
269 |
-
'PHPUnit\\Runner\\Hook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
|
270 |
-
'PHPUnit\\Runner\\NullTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/NullTestResultCache.php',
|
271 |
-
'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
|
272 |
-
'PHPUnit\\Runner\\ResultCacheExtension' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
|
273 |
-
'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
|
274 |
-
'PHPUnit\\Runner\\TestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
|
275 |
-
'PHPUnit\\Runner\\TestListenerAdapter' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
|
276 |
-
'PHPUnit\\Runner\\TestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResultCache.php',
|
277 |
-
'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
|
278 |
-
'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
|
279 |
-
'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php',
|
280 |
-
'PHPUnit\\TextUI\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php',
|
281 |
-
'PHPUnit\\TextUI\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception.php',
|
282 |
-
'PHPUnit\\TextUI\\Help' => $vendorDir . '/phpunit/phpunit/src/TextUI/Help.php',
|
283 |
-
'PHPUnit\\TextUI\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
|
284 |
-
'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php',
|
285 |
-
'PHPUnit\\Util\\Annotation\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
|
286 |
-
'PHPUnit\\Util\\Annotation\\Registry' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
|
287 |
-
'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
|
288 |
-
'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php',
|
289 |
-
'PHPUnit\\Util\\Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php',
|
290 |
-
'PHPUnit\\Util\\ConfigurationGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
|
291 |
-
'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
292 |
-
'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception.php',
|
293 |
-
'PHPUnit\\Util\\FileLoader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php',
|
294 |
-
'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
|
295 |
-
'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
|
296 |
-
'PHPUnit\\Util\\Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php',
|
297 |
-
'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
|
298 |
-
'PHPUnit\\Util\\InvalidDataSetException' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidDataSetException.php',
|
299 |
-
'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php',
|
300 |
-
'PHPUnit\\Util\\Log\\JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php',
|
301 |
-
'PHPUnit\\Util\\Log\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
|
302 |
-
'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
|
303 |
-
'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
|
304 |
-
'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
|
305 |
-
'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php',
|
306 |
-
'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php',
|
307 |
-
'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php',
|
308 |
-
'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php',
|
309 |
-
'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
|
310 |
-
'PHPUnit\\Util\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
|
311 |
-
'PHPUnit\\Util\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
|
312 |
-
'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php',
|
313 |
-
'PHPUnit\\Util\\TestDox\\TextResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
|
314 |
-
'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
|
315 |
-
'PHPUnit\\Util\\TextTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
|
316 |
-
'PHPUnit\\Util\\Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php',
|
317 |
-
'PHPUnit\\Util\\VersionComparisonOperator' => $vendorDir . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php',
|
318 |
-
'PHPUnit\\Util\\XdebugFilterScriptGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
|
319 |
-
'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php',
|
320 |
-
'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
|
321 |
-
'PHP_CodeSniffer' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer.php',
|
322 |
-
'PHP_CodeSniffer_CLI' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/CLI.php',
|
323 |
-
'PHP_CodeSniffer_DocGenerators_Generator' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php',
|
324 |
-
'PHP_CodeSniffer_DocGenerators_HTML' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php',
|
325 |
-
'PHP_CodeSniffer_DocGenerators_Markdown' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php',
|
326 |
-
'PHP_CodeSniffer_DocGenerators_Text' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php',
|
327 |
-
'PHP_CodeSniffer_Exception' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Exception.php',
|
328 |
-
'PHP_CodeSniffer_File' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/File.php',
|
329 |
-
'PHP_CodeSniffer_Fixer' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Fixer.php',
|
330 |
-
'PHP_CodeSniffer_Report' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Report.php',
|
331 |
-
'PHP_CodeSniffer_Reporting' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reporting.php',
|
332 |
-
'PHP_CodeSniffer_Reports_Cbf' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php',
|
333 |
-
'PHP_CodeSniffer_Reports_Checkstyle' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php',
|
334 |
-
'PHP_CodeSniffer_Reports_Csv' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php',
|
335 |
-
'PHP_CodeSniffer_Reports_Diff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php',
|
336 |
-
'PHP_CodeSniffer_Reports_Emacs' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php',
|
337 |
-
'PHP_CodeSniffer_Reports_Full' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php',
|
338 |
-
'PHP_CodeSniffer_Reports_Gitblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php',
|
339 |
-
'PHP_CodeSniffer_Reports_Hgblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php',
|
340 |
-
'PHP_CodeSniffer_Reports_Info' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php',
|
341 |
-
'PHP_CodeSniffer_Reports_Json' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php',
|
342 |
-
'PHP_CodeSniffer_Reports_Junit' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php',
|
343 |
-
'PHP_CodeSniffer_Reports_Notifysend' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php',
|
344 |
-
'PHP_CodeSniffer_Reports_Source' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php',
|
345 |
-
'PHP_CodeSniffer_Reports_Summary' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php',
|
346 |
-
'PHP_CodeSniffer_Reports_Svnblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php',
|
347 |
-
'PHP_CodeSniffer_Reports_VersionControl' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php',
|
348 |
-
'PHP_CodeSniffer_Reports_Xml' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php',
|
349 |
-
'PHP_CodeSniffer_Sniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Sniff.php',
|
350 |
-
'PHP_CodeSniffer_Standards_AbstractPatternSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php',
|
351 |
-
'PHP_CodeSniffer_Standards_AbstractScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php',
|
352 |
-
'PHP_CodeSniffer_Standards_AbstractVariableSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php',
|
353 |
-
'PHP_CodeSniffer_Standards_IncorrectPatternException' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php',
|
354 |
-
'PHP_CodeSniffer_Tokenizers_CSS' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php',
|
355 |
-
'PHP_CodeSniffer_Tokenizers_Comment' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php',
|
356 |
-
'PHP_CodeSniffer_Tokenizers_JS' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php',
|
357 |
-
'PHP_CodeSniffer_Tokenizers_PHP' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php',
|
358 |
-
'PHP_CodeSniffer_Tokens' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokens.php',
|
359 |
-
'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
360 |
-
'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
361 |
-
'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
362 |
-
'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
363 |
-
'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
364 |
-
'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
365 |
-
'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
366 |
-
'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
367 |
-
'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
368 |
-
'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
369 |
-
'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
370 |
-
'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
371 |
-
'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
372 |
-
'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
373 |
-
'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
374 |
-
'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
375 |
-
'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
376 |
-
'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
377 |
-
'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
378 |
-
'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
379 |
-
'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
380 |
-
'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
381 |
-
'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
382 |
-
'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
383 |
-
'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
384 |
-
'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
385 |
-
'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
386 |
-
'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
387 |
-
'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
388 |
-
'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
389 |
-
'PHP_Token_COALESCE_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
390 |
-
'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
391 |
-
'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
392 |
-
'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
393 |
-
'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
394 |
-
'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
395 |
-
'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
396 |
-
'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
397 |
-
'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
398 |
-
'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
399 |
-
'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
400 |
-
'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
401 |
-
'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
402 |
-
'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
403 |
-
'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
404 |
-
'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
405 |
-
'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
406 |
-
'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
407 |
-
'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
408 |
-
'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
409 |
-
'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
410 |
-
'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
411 |
-
'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
412 |
-
'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
413 |
-
'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
414 |
-
'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
415 |
-
'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
416 |
-
'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
417 |
-
'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
418 |
-
'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
419 |
-
'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
420 |
-
'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
421 |
-
'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
422 |
-
'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
423 |
-
'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
424 |
-
'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
425 |
-
'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
426 |
-
'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
427 |
-
'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
428 |
-
'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
429 |
-
'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
430 |
-
'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
431 |
-
'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
432 |
-
'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
433 |
-
'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
434 |
-
'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
435 |
-
'PHP_Token_FN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
436 |
-
'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
437 |
-
'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
438 |
-
'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
439 |
-
'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
440 |
-
'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
441 |
-
'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
442 |
-
'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
443 |
-
'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
444 |
-
'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
445 |
-
'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
446 |
-
'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
447 |
-
'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
448 |
-
'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
449 |
-
'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
450 |
-
'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
451 |
-
'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
452 |
-
'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
453 |
-
'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
454 |
-
'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
455 |
-
'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
456 |
-
'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
457 |
-
'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
458 |
-
'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
459 |
-
'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
460 |
-
'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
461 |
-
'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
462 |
-
'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
463 |
-
'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
464 |
-
'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
465 |
-
'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
466 |
-
'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
467 |
-
'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
468 |
-
'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
469 |
-
'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
470 |
-
'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
471 |
-
'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
472 |
-
'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
473 |
-
'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
474 |
-
'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
475 |
-
'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
476 |
-
'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
477 |
-
'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
478 |
-
'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
479 |
-
'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
480 |
-
'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
481 |
-
'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
482 |
-
'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
483 |
-
'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
484 |
-
'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
485 |
-
'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
486 |
-
'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
487 |
-
'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
488 |
-
'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
489 |
-
'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
490 |
-
'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
491 |
-
'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
492 |
-
'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
493 |
-
'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
494 |
-
'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
495 |
-
'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
496 |
-
'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
497 |
-
'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
498 |
-
'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
499 |
-
'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
500 |
-
'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
501 |
-
'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
502 |
-
'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
503 |
-
'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
504 |
-
'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
505 |
-
'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
506 |
-
'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
507 |
-
'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
508 |
-
'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
509 |
-
'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
510 |
-
'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
511 |
-
'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
512 |
-
'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
513 |
-
'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
514 |
-
'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
515 |
-
'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php',
|
516 |
-
'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
|
517 |
-
'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
518 |
-
'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
519 |
-
'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
520 |
-
'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
521 |
-
'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
522 |
-
'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
523 |
-
'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
524 |
-
'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
525 |
-
'PHP_Token_USE_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
526 |
-
'PHP_Token_Util' => $vendorDir . '/phpunit/php-token-stream/src/Token/Util.php',
|
527 |
-
'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
528 |
-
'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
529 |
-
'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
530 |
-
'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
531 |
-
'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
532 |
-
'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
533 |
-
'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
534 |
-
'PSR1_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php',
|
535 |
-
'PSR1_Sniffs_Files_SideEffectsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php',
|
536 |
-
'PSR1_Sniffs_Methods_CamelCapsMethodNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php',
|
537 |
-
'PSR2_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php',
|
538 |
-
'PSR2_Sniffs_Classes_PropertyDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php',
|
539 |
-
'PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php',
|
540 |
-
'PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
|
541 |
-
'PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
|
542 |
-
'PSR2_Sniffs_Files_ClosingTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php',
|
543 |
-
'PSR2_Sniffs_Files_EndFileNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php',
|
544 |
-
'PSR2_Sniffs_Methods_FunctionCallSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php',
|
545 |
-
'PSR2_Sniffs_Methods_FunctionClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php',
|
546 |
-
'PSR2_Sniffs_Methods_MethodDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php',
|
547 |
-
'PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php',
|
548 |
-
'PSR2_Sniffs_Namespaces_UseDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php',
|
549 |
-
'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php',
|
550 |
-
'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php',
|
551 |
-
'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php',
|
552 |
-
'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php',
|
553 |
-
'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
|
554 |
-
'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php',
|
555 |
-
'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
|
556 |
-
'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php',
|
557 |
-
'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php',
|
558 |
-
'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
|
559 |
-
'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php',
|
560 |
-
'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php',
|
561 |
-
'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
|
562 |
-
'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php',
|
563 |
-
'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php',
|
564 |
-
'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php',
|
565 |
-
'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php',
|
566 |
-
'PharIo\\Manifest\\ElementCollectionException' => $vendorDir . '/phar-io/manifest/src/exceptions/ElementCollectionException.php',
|
567 |
-
'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php',
|
568 |
-
'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php',
|
569 |
-
'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php',
|
570 |
-
'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php',
|
571 |
-
'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php',
|
572 |
-
'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php',
|
573 |
-
'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
|
574 |
-
'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
|
575 |
-
'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
|
576 |
-
'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php',
|
577 |
-
'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php',
|
578 |
-
'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php',
|
579 |
-
'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php',
|
580 |
-
'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php',
|
581 |
-
'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
|
582 |
-
'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php',
|
583 |
-
'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php',
|
584 |
-
'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
|
585 |
-
'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php',
|
586 |
-
'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
|
587 |
-
'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php',
|
588 |
-
'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
|
589 |
-
'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php',
|
590 |
-
'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php',
|
591 |
-
'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
|
592 |
-
'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
|
593 |
-
'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php',
|
594 |
-
'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php',
|
595 |
-
'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
|
596 |
-
'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php',
|
597 |
-
'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php',
|
598 |
-
'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php',
|
599 |
-
'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
|
600 |
-
'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
|
601 |
-
'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
|
602 |
-
'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
|
603 |
-
'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php',
|
604 |
-
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
|
605 |
-
'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
|
606 |
-
'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php',
|
607 |
-
'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
|
608 |
-
'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php',
|
609 |
-
'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
|
610 |
-
'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
|
611 |
-
'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
|
612 |
-
'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php',
|
613 |
-
'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php',
|
614 |
-
'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
|
615 |
-
'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
|
616 |
-
'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
|
617 |
-
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
|
618 |
-
'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
|
619 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
|
620 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\PCOV' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PCOV.php',
|
621 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
|
622 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
|
623 |
-
'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php',
|
624 |
-
'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php',
|
625 |
-
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
|
626 |
-
'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
|
627 |
-
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
|
628 |
-
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
|
629 |
-
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
|
630 |
-
'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
|
631 |
-
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
|
632 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php',
|
633 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
|
634 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
|
635 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
|
636 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
|
637 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
|
638 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
|
639 |
-
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php',
|
640 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php',
|
641 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
|
642 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
|
643 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
|
644 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
|
645 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
|
646 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
|
647 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
|
648 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
|
649 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
|
650 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
|
651 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
|
652 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
|
653 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
|
654 |
-
'SebastianBergmann\\CodeCoverage\\RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
|
655 |
-
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
|
656 |
-
'SebastianBergmann\\CodeCoverage\\Util' => $vendorDir . '/phpunit/php-code-coverage/src/Util.php',
|
657 |
-
'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php',
|
658 |
-
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
|
659 |
-
'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php',
|
660 |
-
'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php',
|
661 |
-
'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php',
|
662 |
-
'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php',
|
663 |
-
'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php',
|
664 |
-
'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php',
|
665 |
-
'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php',
|
666 |
-
'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php',
|
667 |
-
'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php',
|
668 |
-
'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php',
|
669 |
-
'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php',
|
670 |
-
'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php',
|
671 |
-
'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php',
|
672 |
-
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php',
|
673 |
-
'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php',
|
674 |
-
'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php',
|
675 |
-
'SebastianBergmann\\Diff\\ConfigurationException' => $vendorDir . '/sebastian/diff/src/Exception/ConfigurationException.php',
|
676 |
-
'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php',
|
677 |
-
'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php',
|
678 |
-
'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php',
|
679 |
-
'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
|
680 |
-
'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php',
|
681 |
-
'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
|
682 |
-
'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
|
683 |
-
'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
|
684 |
-
'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
|
685 |
-
'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
|
686 |
-
'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
|
687 |
-
'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
|
688 |
-
'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php',
|
689 |
-
'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
|
690 |
-
'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php',
|
691 |
-
'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php',
|
692 |
-
'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
|
693 |
-
'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
|
694 |
-
'SebastianBergmann\\FileIterator\\Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
|
695 |
-
'SebastianBergmann\\FileIterator\\Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
|
696 |
-
'SebastianBergmann\\FileIterator\\Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
|
697 |
-
'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php',
|
698 |
-
'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
|
699 |
-
'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php',
|
700 |
-
'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php',
|
701 |
-
'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php',
|
702 |
-
'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php',
|
703 |
-
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php',
|
704 |
-
'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php',
|
705 |
-
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
|
706 |
-
'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php',
|
707 |
-
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php',
|
708 |
-
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php',
|
709 |
-
'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
|
710 |
-
'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
|
711 |
-
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
|
712 |
-
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
|
713 |
-
'SebastianBergmann\\Timer\\Exception' => $vendorDir . '/phpunit/php-timer/src/Exception.php',
|
714 |
-
'SebastianBergmann\\Timer\\RuntimeException' => $vendorDir . '/phpunit/php-timer/src/RuntimeException.php',
|
715 |
-
'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
|
716 |
-
'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/CallableType.php',
|
717 |
-
'SebastianBergmann\\Type\\Exception' => $vendorDir . '/sebastian/type/src/exception/Exception.php',
|
718 |
-
'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/GenericObjectType.php',
|
719 |
-
'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/IterableType.php',
|
720 |
-
'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/NullType.php',
|
721 |
-
'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/ObjectType.php',
|
722 |
-
'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php',
|
723 |
-
'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/SimpleType.php',
|
724 |
-
'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/Type.php',
|
725 |
-
'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php',
|
726 |
-
'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/UnknownType.php',
|
727 |
-
'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/VoidType.php',
|
728 |
-
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
|
729 |
-
'Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php',
|
730 |
-
'Squiz_Sniffs_Arrays_ArrayDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php',
|
731 |
-
'Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php',
|
732 |
-
'Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php',
|
733 |
-
'Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php',
|
734 |
-
'Squiz_Sniffs_CSS_ColonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php',
|
735 |
-
'Squiz_Sniffs_CSS_ColourDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php',
|
736 |
-
'Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php',
|
737 |
-
'Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php',
|
738 |
-
'Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php',
|
739 |
-
'Squiz_Sniffs_CSS_EmptyClassDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php',
|
740 |
-
'Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php',
|
741 |
-
'Squiz_Sniffs_CSS_ForbiddenStylesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php',
|
742 |
-
'Squiz_Sniffs_CSS_IndentationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php',
|
743 |
-
'Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php',
|
744 |
-
'Squiz_Sniffs_CSS_MissingColonSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php',
|
745 |
-
'Squiz_Sniffs_CSS_NamedColoursSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php',
|
746 |
-
'Squiz_Sniffs_CSS_OpacitySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php',
|
747 |
-
'Squiz_Sniffs_CSS_SemicolonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php',
|
748 |
-
'Squiz_Sniffs_CSS_ShorthandSizeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php',
|
749 |
-
'Squiz_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php',
|
750 |
-
'Squiz_Sniffs_Classes_ClassFileNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php',
|
751 |
-
'Squiz_Sniffs_Classes_DuplicatePropertySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php',
|
752 |
-
'Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php',
|
753 |
-
'Squiz_Sniffs_Classes_SelfMemberReferenceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php',
|
754 |
-
'Squiz_Sniffs_Classes_ValidClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php',
|
755 |
-
'Squiz_Sniffs_Commenting_BlockCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php',
|
756 |
-
'Squiz_Sniffs_Commenting_ClassCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php',
|
757 |
-
'Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php',
|
758 |
-
'Squiz_Sniffs_Commenting_DocCommentAlignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php',
|
759 |
-
'Squiz_Sniffs_Commenting_EmptyCatchCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php',
|
760 |
-
'Squiz_Sniffs_Commenting_FileCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php',
|
761 |
-
'Squiz_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
|
762 |
-
'Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php',
|
763 |
-
'Squiz_Sniffs_Commenting_InlineCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php',
|
764 |
-
'Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php',
|
765 |
-
'Squiz_Sniffs_Commenting_PostStatementCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php',
|
766 |
-
'Squiz_Sniffs_Commenting_VariableCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php',
|
767 |
-
'Squiz_Sniffs_ControlStructures_ControlSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php',
|
768 |
-
'Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
|
769 |
-
'Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php',
|
770 |
-
'Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php',
|
771 |
-
'Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php',
|
772 |
-
'Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php',
|
773 |
-
'Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
|
774 |
-
'Squiz_Sniffs_Debug_JSLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php',
|
775 |
-
'Squiz_Sniffs_Debug_JavaScriptLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php',
|
776 |
-
'Squiz_Sniffs_Files_FileExtensionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php',
|
777 |
-
'Squiz_Sniffs_Formatting_OperatorBracketSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php',
|
778 |
-
'Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php',
|
779 |
-
'Squiz_Sniffs_Functions_FunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php',
|
780 |
-
'Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php',
|
781 |
-
'Squiz_Sniffs_Functions_GlobalFunctionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php',
|
782 |
-
'Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php',
|
783 |
-
'Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php',
|
784 |
-
'Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
|
785 |
-
'Squiz_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
786 |
-
'Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php',
|
787 |
-
'Squiz_Sniffs_Objects_ObjectInstantiationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php',
|
788 |
-
'Squiz_Sniffs_Objects_ObjectMemberCommaSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php',
|
789 |
-
'Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',
|
790 |
-
'Squiz_Sniffs_Operators_IncrementDecrementUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',
|
791 |
-
'Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php',
|
792 |
-
'Squiz_Sniffs_PHP_CommentedOutCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php',
|
793 |
-
'Squiz_Sniffs_PHP_DisallowBooleanStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php',
|
794 |
-
'Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php',
|
795 |
-
'Squiz_Sniffs_PHP_DisallowInlineIfSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php',
|
796 |
-
'Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php',
|
797 |
-
'Squiz_Sniffs_PHP_DisallowObEndFlushSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php',
|
798 |
-
'Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php',
|
799 |
-
'Squiz_Sniffs_PHP_DiscouragedFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php',
|
800 |
-
'Squiz_Sniffs_PHP_EmbeddedPhpSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php',
|
801 |
-
'Squiz_Sniffs_PHP_EvalSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php',
|
802 |
-
'Squiz_Sniffs_PHP_ForbiddenFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php',
|
803 |
-
'Squiz_Sniffs_PHP_GlobalKeywordSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php',
|
804 |
-
'Squiz_Sniffs_PHP_HeredocSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php',
|
805 |
-
'Squiz_Sniffs_PHP_InnerFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php',
|
806 |
-
'Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php',
|
807 |
-
'Squiz_Sniffs_PHP_NonExecutableCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php',
|
808 |
-
'Squiz_Sniffs_Scope_MemberVarScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php',
|
809 |
-
'Squiz_Sniffs_Scope_MethodScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php',
|
810 |
-
'Squiz_Sniffs_Scope_StaticThisUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php',
|
811 |
-
'Squiz_Sniffs_Strings_ConcatenationSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php',
|
812 |
-
'Squiz_Sniffs_Strings_DoubleQuoteUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php',
|
813 |
-
'Squiz_Sniffs_Strings_EchoedStringsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php',
|
814 |
-
'Squiz_Sniffs_WhiteSpace_CastSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php',
|
815 |
-
'Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php',
|
816 |
-
'Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php',
|
817 |
-
'Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php',
|
818 |
-
'Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php',
|
819 |
-
'Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php',
|
820 |
-
'Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php',
|
821 |
-
'Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php',
|
822 |
-
'Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php',
|
823 |
-
'Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php',
|
824 |
-
'Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php',
|
825 |
-
'Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
|
826 |
-
'Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php',
|
827 |
-
'Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php',
|
828 |
-
'Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php',
|
829 |
-
'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
|
830 |
-
'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
|
831 |
-
'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
|
832 |
-
'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php',
|
833 |
-
'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php',
|
834 |
-
'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php',
|
835 |
-
'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
|
836 |
-
'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
|
837 |
-
'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
|
838 |
-
'Zend_Sniffs_Debug_CodeAnalyzerSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php',
|
839 |
-
'Zend_Sniffs_Files_ClosingTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php',
|
840 |
-
'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
841 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
);
|
vendor/composer/autoload_files.php
CHANGED
@@ -7,7 +7,4 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
10 |
-
'9e7a8ca9c2c682ec2704dd873a0e3618' => $vendorDir . '/php-mock/php-mock/autoload.php',
|
11 |
-
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
12 |
-
'125bba9b2a34259a2ab4c8f405781876' => $vendorDir . '/php-mock/php-mock-phpunit/autoload.php',
|
13 |
);
|
7 |
|
8 |
return array(
|
9 |
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
|
|
|
|
|
|
10 |
);
|
vendor/composer/autoload_namespaces.php
CHANGED
@@ -6,6 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
-
'SimplyAdmire\\ComposerPlugins' => array($vendorDir . '/simplyadmire/composer-plugins'),
|
10 |
'CloudFlare\\' => array($vendorDir . '/cloudflare/cf-ip-rewrite/src'),
|
11 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
'CloudFlare\\' => array($vendorDir . '/cloudflare/cf-ip-rewrite/src'),
|
10 |
);
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -6,18 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
-
'phpmock\\phpunit\\' => array($vendorDir . '/php-mock/php-mock-phpunit/classes'),
|
10 |
-
'phpmock\\integration\\' => array($vendorDir . '/php-mock/php-mock-integration/classes'),
|
11 |
-
'phpmock\\' => array($vendorDir . '/php-mock/php-mock/classes', $vendorDir . '/php-mock/php-mock/tests'),
|
12 |
-
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
|
13 |
-
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
|
14 |
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
15 |
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
|
16 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
17 |
-
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
|
18 |
-
'JohnKary\\PHPUnit\\Listener\\' => array($vendorDir . '/johnkary/phpunit-speedtrap/src'),
|
19 |
-
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
|
20 |
-
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
|
21 |
-
'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'),
|
22 |
'CF\\' => array($baseDir . '/src', $vendorDir . '/cloudflare/cloudflare-plugin-backend/src'),
|
23 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
|
|
|
|
|
|
9 |
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
10 |
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
|
11 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
|
|
|
|
|
|
|
|
|
|
12 |
'CF\\' => array($baseDir . '/src', $vendorDir . '/cloudflare/cloudflare-plugin-backend/src'),
|
13 |
);
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit6f7979399f910d16693a25d8ea59cb8f
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit6f7979399f910d16693a25d8ea59cb8f
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitc18900f6a542da4a0b530114484e7cc6
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitc18900f6a542da4a0b530114484e7cc6', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitc18900f6a542da4a0b530114484e7cc6', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitc18900f6a542da4a0b530114484e7cc6::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInitc18900f6a542da4a0b530114484e7cc6::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequirec18900f6a542da4a0b530114484e7cc6($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequirec18900f6a542da4a0b530114484e7cc6($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,27 +4,13 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
11 |
-
'9e7a8ca9c2c682ec2704dd873a0e3618' => __DIR__ . '/..' . '/php-mock/php-mock/autoload.php',
|
12 |
-
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
13 |
-
'125bba9b2a34259a2ab4c8f405781876' => __DIR__ . '/..' . '/php-mock/php-mock-phpunit/autoload.php',
|
14 |
);
|
15 |
|
16 |
public static $prefixLengthsPsr4 = array (
|
17 |
-
'p' =>
|
18 |
-
array (
|
19 |
-
'phpmock\\phpunit\\' => 16,
|
20 |
-
'phpmock\\integration\\' => 20,
|
21 |
-
'phpmock\\' => 8,
|
22 |
-
'phpDocumentor\\Reflection\\' => 25,
|
23 |
-
),
|
24 |
-
'W' =>
|
25 |
-
array (
|
26 |
-
'Webmozart\\Assert\\' => 17,
|
27 |
-
),
|
28 |
'S' =>
|
29 |
array (
|
30 |
'Symfony\\Polyfill\\Ctype\\' => 23,
|
@@ -33,17 +19,6 @@ class ComposerStaticInit6f7979399f910d16693a25d8ea59cb8f
|
|
33 |
'P' =>
|
34 |
array (
|
35 |
'Psr\\Log\\' => 8,
|
36 |
-
'Prophecy\\' => 9,
|
37 |
-
),
|
38 |
-
'J' =>
|
39 |
-
array (
|
40 |
-
'JohnKary\\PHPUnit\\Listener\\' => 26,
|
41 |
-
),
|
42 |
-
'D' =>
|
43 |
-
array (
|
44 |
-
'Doctrine\\Instantiator\\' => 22,
|
45 |
-
'DeepCopy\\' => 9,
|
46 |
-
'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 55,
|
47 |
),
|
48 |
'C' =>
|
49 |
array (
|
@@ -52,29 +27,6 @@ class ComposerStaticInit6f7979399f910d16693a25d8ea59cb8f
|
|
52 |
);
|
53 |
|
54 |
public static $prefixDirsPsr4 = array (
|
55 |
-
'phpmock\\phpunit\\' =>
|
56 |
-
array (
|
57 |
-
0 => __DIR__ . '/..' . '/php-mock/php-mock-phpunit/classes',
|
58 |
-
),
|
59 |
-
'phpmock\\integration\\' =>
|
60 |
-
array (
|
61 |
-
0 => __DIR__ . '/..' . '/php-mock/php-mock-integration/classes',
|
62 |
-
),
|
63 |
-
'phpmock\\' =>
|
64 |
-
array (
|
65 |
-
0 => __DIR__ . '/..' . '/php-mock/php-mock/classes',
|
66 |
-
1 => __DIR__ . '/..' . '/php-mock/php-mock/tests',
|
67 |
-
),
|
68 |
-
'phpDocumentor\\Reflection\\' =>
|
69 |
-
array (
|
70 |
-
0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src',
|
71 |
-
1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
|
72 |
-
2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
|
73 |
-
),
|
74 |
-
'Webmozart\\Assert\\' =>
|
75 |
-
array (
|
76 |
-
0 => __DIR__ . '/..' . '/webmozart/assert/src',
|
77 |
-
),
|
78 |
'Symfony\\Polyfill\\Ctype\\' =>
|
79 |
array (
|
80 |
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
@@ -87,26 +39,6 @@ class ComposerStaticInit6f7979399f910d16693a25d8ea59cb8f
|
|
87 |
array (
|
88 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
89 |
),
|
90 |
-
'Prophecy\\' =>
|
91 |
-
array (
|
92 |
-
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
|
93 |
-
),
|
94 |
-
'JohnKary\\PHPUnit\\Listener\\' =>
|
95 |
-
array (
|
96 |
-
0 => __DIR__ . '/..' . '/johnkary/phpunit-speedtrap/src',
|
97 |
-
),
|
98 |
-
'Doctrine\\Instantiator\\' =>
|
99 |
-
array (
|
100 |
-
0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
|
101 |
-
),
|
102 |
-
'DeepCopy\\' =>
|
103 |
-
array (
|
104 |
-
0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
|
105 |
-
),
|
106 |
-
'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' =>
|
107 |
-
array (
|
108 |
-
0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src',
|
109 |
-
),
|
110 |
'CF\\' =>
|
111 |
array (
|
112 |
0 => __DIR__ . '/../..' . '/src',
|
@@ -115,13 +47,6 @@ class ComposerStaticInit6f7979399f910d16693a25d8ea59cb8f
|
|
115 |
);
|
116 |
|
117 |
public static $prefixesPsr0 = array (
|
118 |
-
'S' =>
|
119 |
-
array (
|
120 |
-
'SimplyAdmire\\ComposerPlugins' =>
|
121 |
-
array (
|
122 |
-
0 => __DIR__ . '/..' . '/simplyadmire/composer-plugins',
|
123 |
-
),
|
124 |
-
),
|
125 |
'C' =>
|
126 |
array (
|
127 |
'CloudFlare\\' =>
|
@@ -131,848 +56,12 @@ class ComposerStaticInit6f7979399f910d16693a25d8ea59cb8f
|
|
131 |
),
|
132 |
);
|
133 |
|
134 |
-
public static $classMap = array (
|
135 |
-
'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php',
|
136 |
-
'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php',
|
137 |
-
'Generic_Sniffs_Classes_DuplicateClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php',
|
138 |
-
'Generic_Sniffs_Classes_OpeningBraceSameLineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php',
|
139 |
-
'Generic_Sniffs_CodeAnalysis_EmptyStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',
|
140 |
-
'Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php',
|
141 |
-
'Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',
|
142 |
-
'Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php',
|
143 |
-
'Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',
|
144 |
-
'Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',
|
145 |
-
'Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',
|
146 |
-
'Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php',
|
147 |
-
'Generic_Sniffs_Commenting_DocCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php',
|
148 |
-
'Generic_Sniffs_Commenting_FixmeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php',
|
149 |
-
'Generic_Sniffs_Commenting_TodoSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php',
|
150 |
-
'Generic_Sniffs_ControlStructures_InlineControlStructureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php',
|
151 |
-
'Generic_Sniffs_Debug_CSSLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php',
|
152 |
-
'Generic_Sniffs_Debug_ClosureLinterSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php',
|
153 |
-
'Generic_Sniffs_Debug_ESLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ESLintSniff.php',
|
154 |
-
'Generic_Sniffs_Debug_JSHintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php',
|
155 |
-
'Generic_Sniffs_Files_ByteOrderMarkSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php',
|
156 |
-
'Generic_Sniffs_Files_EndFileNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php',
|
157 |
-
'Generic_Sniffs_Files_EndFileNoNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php',
|
158 |
-
'Generic_Sniffs_Files_InlineHTMLSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php',
|
159 |
-
'Generic_Sniffs_Files_LineEndingsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php',
|
160 |
-
'Generic_Sniffs_Files_LineLengthSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php',
|
161 |
-
'Generic_Sniffs_Files_LowercasedFilenameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php',
|
162 |
-
'Generic_Sniffs_Files_OneClassPerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php',
|
163 |
-
'Generic_Sniffs_Files_OneInterfacePerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php',
|
164 |
-
'Generic_Sniffs_Files_OneTraitPerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php',
|
165 |
-
'Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php',
|
166 |
-
'Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
|
167 |
-
'Generic_Sniffs_Formatting_NoSpaceAfterCastSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php',
|
168 |
-
'Generic_Sniffs_Formatting_SpaceAfterCastSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php',
|
169 |
-
'Generic_Sniffs_Formatting_SpaceAfterNotSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php',
|
170 |
-
'Generic_Sniffs_Functions_CallTimePassByReferenceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php',
|
171 |
-
'Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',
|
172 |
-
'Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php',
|
173 |
-
'Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php',
|
174 |
-
'Generic_Sniffs_Metrics_CyclomaticComplexitySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php',
|
175 |
-
'Generic_Sniffs_Metrics_NestingLevelSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php',
|
176 |
-
'Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php',
|
177 |
-
'Generic_Sniffs_NamingConventions_ConstructorNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php',
|
178 |
-
'Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',
|
179 |
-
'Generic_Sniffs_PHP_BacktickOperatorSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php',
|
180 |
-
'Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php',
|
181 |
-
'Generic_Sniffs_PHP_ClosingPHPTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php',
|
182 |
-
'Generic_Sniffs_PHP_DeprecatedFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php',
|
183 |
-
'Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php',
|
184 |
-
'Generic_Sniffs_PHP_DisallowShortOpenTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',
|
185 |
-
'Generic_Sniffs_PHP_ForbiddenFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',
|
186 |
-
'Generic_Sniffs_PHP_LowerCaseConstantSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php',
|
187 |
-
'Generic_Sniffs_PHP_LowerCaseKeywordSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php',
|
188 |
-
'Generic_Sniffs_PHP_NoSilencedErrorsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php',
|
189 |
-
'Generic_Sniffs_PHP_SAPIUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php',
|
190 |
-
'Generic_Sniffs_PHP_SyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php',
|
191 |
-
'Generic_Sniffs_PHP_UpperCaseConstantSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php',
|
192 |
-
'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php',
|
193 |
-
'Generic_Sniffs_VersionControl_SubversionPropertiesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php',
|
194 |
-
'Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php',
|
195 |
-
'Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php',
|
196 |
-
'Generic_Sniffs_WhiteSpace_ScopeIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php',
|
197 |
-
'MySource_Sniffs_CSS_BrowserSpecificStylesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php',
|
198 |
-
'MySource_Sniffs_Channels_DisallowSelfActionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php',
|
199 |
-
'MySource_Sniffs_Channels_IncludeOwnSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php',
|
200 |
-
'MySource_Sniffs_Channels_IncludeSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php',
|
201 |
-
'MySource_Sniffs_Channels_UnusedSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php',
|
202 |
-
'MySource_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php',
|
203 |
-
'MySource_Sniffs_Debug_DebugCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php',
|
204 |
-
'MySource_Sniffs_Debug_FirebugConsoleSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php',
|
205 |
-
'MySource_Sniffs_Objects_AssignThisSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php',
|
206 |
-
'MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php',
|
207 |
-
'MySource_Sniffs_Objects_DisallowNewWidgetSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php',
|
208 |
-
'MySource_Sniffs_PHP_AjaxNullComparisonSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php',
|
209 |
-
'MySource_Sniffs_PHP_EvalObjectFactorySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php',
|
210 |
-
'MySource_Sniffs_PHP_GetRequestDataSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php',
|
211 |
-
'MySource_Sniffs_PHP_ReturnFunctionValueSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php',
|
212 |
-
'MySource_Sniffs_Strings_JoinStringsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php',
|
213 |
-
'PEAR_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php',
|
214 |
-
'PEAR_Sniffs_Commenting_ClassCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php',
|
215 |
-
'PEAR_Sniffs_Commenting_FileCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php',
|
216 |
-
'PEAR_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php',
|
217 |
-
'PEAR_Sniffs_Commenting_InlineCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php',
|
218 |
-
'PEAR_Sniffs_ControlStructures_ControlSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
|
219 |
-
'PEAR_Sniffs_ControlStructures_MultiLineConditionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',
|
220 |
-
'PEAR_Sniffs_Files_IncludingFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php',
|
221 |
-
'PEAR_Sniffs_Formatting_MultiLineAssignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php',
|
222 |
-
'PEAR_Sniffs_Functions_FunctionCallSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',
|
223 |
-
'PEAR_Sniffs_Functions_FunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',
|
224 |
-
'PEAR_Sniffs_Functions_ValidDefaultValueSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',
|
225 |
-
'PEAR_Sniffs_NamingConventions_ValidClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',
|
226 |
-
'PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
|
227 |
-
'PEAR_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
228 |
-
'PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',
|
229 |
-
'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
|
230 |
-
'PEAR_Sniffs_WhiteSpace_ScopeIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',
|
231 |
-
'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
|
232 |
-
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
|
233 |
-
'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
|
234 |
-
'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php',
|
235 |
-
'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
|
236 |
-
'PHPUnit\\Framework\\Constraint\\ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
|
237 |
-
'PHPUnit\\Framework\\Constraint\\Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
|
238 |
-
'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
|
239 |
-
'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
|
240 |
-
'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
|
241 |
-
'PHPUnit\\Framework\\Constraint\\Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
|
242 |
-
'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
|
243 |
-
'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
|
244 |
-
'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
|
245 |
-
'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
|
246 |
-
'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
|
247 |
-
'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
|
248 |
-
'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php',
|
249 |
-
'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
|
250 |
-
'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
|
251 |
-
'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
|
252 |
-
'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
|
253 |
-
'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
|
254 |
-
'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
|
255 |
-
'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
|
256 |
-
'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
|
257 |
-
'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
|
258 |
-
'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
|
259 |
-
'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
|
260 |
-
'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
|
261 |
-
'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
|
262 |
-
'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
|
263 |
-
'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
|
264 |
-
'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
|
265 |
-
'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
|
266 |
-
'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
|
267 |
-
'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
|
268 |
-
'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
|
269 |
-
'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php',
|
270 |
-
'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php',
|
271 |
-
'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php',
|
272 |
-
'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php',
|
273 |
-
'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
|
274 |
-
'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php',
|
275 |
-
'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
|
276 |
-
'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
|
277 |
-
'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
|
278 |
-
'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php',
|
279 |
-
'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
|
280 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
|
281 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsEqual.php',
|
282 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsIdentical.php',
|
283 |
-
'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
|
284 |
-
'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php',
|
285 |
-
'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
|
286 |
-
'PHPUnit\\Framework\\Error\\Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
|
287 |
-
'PHPUnit\\Framework\\Error\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Error.php',
|
288 |
-
'PHPUnit\\Framework\\Error\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php',
|
289 |
-
'PHPUnit\\Framework\\Error\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php',
|
290 |
-
'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Exception.php',
|
291 |
-
'PHPUnit\\Framework\\ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
|
292 |
-
'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php',
|
293 |
-
'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
|
294 |
-
'PHPUnit\\Framework\\IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
|
295 |
-
'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php',
|
296 |
-
'PHPUnit\\Framework\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php',
|
297 |
-
'PHPUnit\\Framework\\InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php',
|
298 |
-
'PHPUnit\\Framework\\InvalidDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php',
|
299 |
-
'PHPUnit\\Framework\\InvalidParameterGroupException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
|
300 |
-
'PHPUnit\\Framework\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php',
|
301 |
-
'PHPUnit\\Framework\\MockObject\\Api' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php',
|
302 |
-
'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
|
303 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
|
304 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
|
305 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php',
|
306 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\Match_' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Match_.php',
|
307 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
|
308 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
|
309 |
-
'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
|
310 |
-
'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php',
|
311 |
-
'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php',
|
312 |
-
'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
|
313 |
-
'PHPUnit\\Framework\\MockObject\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
|
314 |
-
'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php',
|
315 |
-
'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php',
|
316 |
-
'PHPUnit\\Framework\\MockObject\\InvocationHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php',
|
317 |
-
'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
|
318 |
-
'PHPUnit\\Framework\\MockObject\\Method' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php',
|
319 |
-
'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php',
|
320 |
-
'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
|
321 |
-
'PHPUnit\\Framework\\MockObject\\MockClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php',
|
322 |
-
'PHPUnit\\Framework\\MockObject\\MockMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
|
323 |
-
'PHPUnit\\Framework\\MockObject\\MockMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
|
324 |
-
'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
|
325 |
-
'PHPUnit\\Framework\\MockObject\\MockTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
|
326 |
-
'PHPUnit\\Framework\\MockObject\\MockType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
|
327 |
-
'PHPUnit\\Framework\\MockObject\\MockedCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/MockedCloneMethod.php',
|
328 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php',
|
329 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php',
|
330 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php',
|
331 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php',
|
332 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php',
|
333 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php',
|
334 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php',
|
335 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php',
|
336 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php',
|
337 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php',
|
338 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php',
|
339 |
-
'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php',
|
340 |
-
'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
|
341 |
-
'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
|
342 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
|
343 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
|
344 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
|
345 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
|
346 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
|
347 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
|
348 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
|
349 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
|
350 |
-
'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php',
|
351 |
-
'PHPUnit\\Framework\\MockObject\\UnmockedCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/UnmockedCloneMethod.php',
|
352 |
-
'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
|
353 |
-
'PHPUnit\\Framework\\NoChildTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
|
354 |
-
'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
|
355 |
-
'PHPUnit\\Framework\\PHPTAssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php',
|
356 |
-
'PHPUnit\\Framework\\RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php',
|
357 |
-
'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
|
358 |
-
'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php',
|
359 |
-
'PHPUnit\\Framework\\SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
|
360 |
-
'PHPUnit\\Framework\\SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php',
|
361 |
-
'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php',
|
362 |
-
'PHPUnit\\Framework\\SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php',
|
363 |
-
'PHPUnit\\Framework\\SyntheticSkippedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php',
|
364 |
-
'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php',
|
365 |
-
'PHPUnit\\Framework\\TestBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestBuilder.php',
|
366 |
-
'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php',
|
367 |
-
'PHPUnit\\Framework\\TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php',
|
368 |
-
'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php',
|
369 |
-
'PHPUnit\\Framework\\TestListenerDefaultImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
|
370 |
-
'PHPUnit\\Framework\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php',
|
371 |
-
'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php',
|
372 |
-
'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
|
373 |
-
'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php',
|
374 |
-
'PHPUnit\\Framework\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Warning.php',
|
375 |
-
'PHPUnit\\Framework\\WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
|
376 |
-
'PHPUnit\\Runner\\AfterIncompleteTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
|
377 |
-
'PHPUnit\\Runner\\AfterLastTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
|
378 |
-
'PHPUnit\\Runner\\AfterRiskyTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
|
379 |
-
'PHPUnit\\Runner\\AfterSkippedTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
|
380 |
-
'PHPUnit\\Runner\\AfterSuccessfulTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
|
381 |
-
'PHPUnit\\Runner\\AfterTestErrorHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
|
382 |
-
'PHPUnit\\Runner\\AfterTestFailureHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
|
383 |
-
'PHPUnit\\Runner\\AfterTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
|
384 |
-
'PHPUnit\\Runner\\AfterTestWarningHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
|
385 |
-
'PHPUnit\\Runner\\BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
|
386 |
-
'PHPUnit\\Runner\\BeforeFirstTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
|
387 |
-
'PHPUnit\\Runner\\BeforeTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
|
388 |
-
'PHPUnit\\Runner\\DefaultTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php',
|
389 |
-
'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php',
|
390 |
-
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
|
391 |
-
'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
|
392 |
-
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
|
393 |
-
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
|
394 |
-
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
|
395 |
-
'PHPUnit\\Runner\\Hook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
|
396 |
-
'PHPUnit\\Runner\\NullTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/NullTestResultCache.php',
|
397 |
-
'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
|
398 |
-
'PHPUnit\\Runner\\ResultCacheExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
|
399 |
-
'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
|
400 |
-
'PHPUnit\\Runner\\TestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
|
401 |
-
'PHPUnit\\Runner\\TestListenerAdapter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
|
402 |
-
'PHPUnit\\Runner\\TestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResultCache.php',
|
403 |
-
'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
|
404 |
-
'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
|
405 |
-
'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php',
|
406 |
-
'PHPUnit\\TextUI\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php',
|
407 |
-
'PHPUnit\\TextUI\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception.php',
|
408 |
-
'PHPUnit\\TextUI\\Help' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Help.php',
|
409 |
-
'PHPUnit\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
|
410 |
-
'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php',
|
411 |
-
'PHPUnit\\Util\\Annotation\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
|
412 |
-
'PHPUnit\\Util\\Annotation\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
|
413 |
-
'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
|
414 |
-
'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php',
|
415 |
-
'PHPUnit\\Util\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php',
|
416 |
-
'PHPUnit\\Util\\ConfigurationGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
|
417 |
-
'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
418 |
-
'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception.php',
|
419 |
-
'PHPUnit\\Util\\FileLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php',
|
420 |
-
'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
|
421 |
-
'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
|
422 |
-
'PHPUnit\\Util\\Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php',
|
423 |
-
'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
|
424 |
-
'PHPUnit\\Util\\InvalidDataSetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidDataSetException.php',
|
425 |
-
'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php',
|
426 |
-
'PHPUnit\\Util\\Log\\JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php',
|
427 |
-
'PHPUnit\\Util\\Log\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
|
428 |
-
'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
|
429 |
-
'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
|
430 |
-
'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
|
431 |
-
'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php',
|
432 |
-
'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php',
|
433 |
-
'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php',
|
434 |
-
'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php',
|
435 |
-
'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
|
436 |
-
'PHPUnit\\Util\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
|
437 |
-
'PHPUnit\\Util\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
|
438 |
-
'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php',
|
439 |
-
'PHPUnit\\Util\\TestDox\\TextResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
|
440 |
-
'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
|
441 |
-
'PHPUnit\\Util\\TextTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
|
442 |
-
'PHPUnit\\Util\\Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php',
|
443 |
-
'PHPUnit\\Util\\VersionComparisonOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php',
|
444 |
-
'PHPUnit\\Util\\XdebugFilterScriptGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
|
445 |
-
'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php',
|
446 |
-
'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
|
447 |
-
'PHP_CodeSniffer' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer.php',
|
448 |
-
'PHP_CodeSniffer_CLI' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/CLI.php',
|
449 |
-
'PHP_CodeSniffer_DocGenerators_Generator' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php',
|
450 |
-
'PHP_CodeSniffer_DocGenerators_HTML' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php',
|
451 |
-
'PHP_CodeSniffer_DocGenerators_Markdown' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php',
|
452 |
-
'PHP_CodeSniffer_DocGenerators_Text' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php',
|
453 |
-
'PHP_CodeSniffer_Exception' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Exception.php',
|
454 |
-
'PHP_CodeSniffer_File' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/File.php',
|
455 |
-
'PHP_CodeSniffer_Fixer' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Fixer.php',
|
456 |
-
'PHP_CodeSniffer_Report' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Report.php',
|
457 |
-
'PHP_CodeSniffer_Reporting' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reporting.php',
|
458 |
-
'PHP_CodeSniffer_Reports_Cbf' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php',
|
459 |
-
'PHP_CodeSniffer_Reports_Checkstyle' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php',
|
460 |
-
'PHP_CodeSniffer_Reports_Csv' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php',
|
461 |
-
'PHP_CodeSniffer_Reports_Diff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php',
|
462 |
-
'PHP_CodeSniffer_Reports_Emacs' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php',
|
463 |
-
'PHP_CodeSniffer_Reports_Full' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php',
|
464 |
-
'PHP_CodeSniffer_Reports_Gitblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php',
|
465 |
-
'PHP_CodeSniffer_Reports_Hgblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php',
|
466 |
-
'PHP_CodeSniffer_Reports_Info' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php',
|
467 |
-
'PHP_CodeSniffer_Reports_Json' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php',
|
468 |
-
'PHP_CodeSniffer_Reports_Junit' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php',
|
469 |
-
'PHP_CodeSniffer_Reports_Notifysend' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php',
|
470 |
-
'PHP_CodeSniffer_Reports_Source' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php',
|
471 |
-
'PHP_CodeSniffer_Reports_Summary' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php',
|
472 |
-
'PHP_CodeSniffer_Reports_Svnblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php',
|
473 |
-
'PHP_CodeSniffer_Reports_VersionControl' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php',
|
474 |
-
'PHP_CodeSniffer_Reports_Xml' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php',
|
475 |
-
'PHP_CodeSniffer_Sniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Sniff.php',
|
476 |
-
'PHP_CodeSniffer_Standards_AbstractPatternSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php',
|
477 |
-
'PHP_CodeSniffer_Standards_AbstractScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php',
|
478 |
-
'PHP_CodeSniffer_Standards_AbstractVariableSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php',
|
479 |
-
'PHP_CodeSniffer_Standards_IncorrectPatternException' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php',
|
480 |
-
'PHP_CodeSniffer_Tokenizers_CSS' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php',
|
481 |
-
'PHP_CodeSniffer_Tokenizers_Comment' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php',
|
482 |
-
'PHP_CodeSniffer_Tokenizers_JS' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php',
|
483 |
-
'PHP_CodeSniffer_Tokenizers_PHP' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php',
|
484 |
-
'PHP_CodeSniffer_Tokens' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokens.php',
|
485 |
-
'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
486 |
-
'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
487 |
-
'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
488 |
-
'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
489 |
-
'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
490 |
-
'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
491 |
-
'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
492 |
-
'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
493 |
-
'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
494 |
-
'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
495 |
-
'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
496 |
-
'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
497 |
-
'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
498 |
-
'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
499 |
-
'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
500 |
-
'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
501 |
-
'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
502 |
-
'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
503 |
-
'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
504 |
-
'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
505 |
-
'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
506 |
-
'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
507 |
-
'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
508 |
-
'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
509 |
-
'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
510 |
-
'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
511 |
-
'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
512 |
-
'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
513 |
-
'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
514 |
-
'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
515 |
-
'PHP_Token_COALESCE_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
516 |
-
'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
517 |
-
'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
518 |
-
'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
519 |
-
'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
520 |
-
'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
521 |
-
'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
522 |
-
'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
523 |
-
'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
524 |
-
'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
525 |
-
'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
526 |
-
'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
527 |
-
'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
528 |
-
'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
529 |
-
'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
530 |
-
'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
531 |
-
'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
532 |
-
'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
533 |
-
'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
534 |
-
'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
535 |
-
'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
536 |
-
'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
537 |
-
'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
538 |
-
'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
539 |
-
'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
540 |
-
'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
541 |
-
'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
542 |
-
'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
543 |
-
'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
544 |
-
'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
545 |
-
'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
546 |
-
'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
547 |
-
'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
548 |
-
'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
549 |
-
'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
550 |
-
'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
551 |
-
'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
552 |
-
'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
553 |
-
'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
554 |
-
'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
555 |
-
'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
556 |
-
'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
557 |
-
'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
558 |
-
'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
559 |
-
'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
560 |
-
'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
561 |
-
'PHP_Token_FN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
562 |
-
'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
563 |
-
'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
564 |
-
'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
565 |
-
'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
566 |
-
'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
567 |
-
'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
568 |
-
'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
569 |
-
'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
570 |
-
'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
571 |
-
'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
572 |
-
'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
573 |
-
'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
574 |
-
'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
575 |
-
'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
576 |
-
'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
577 |
-
'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
578 |
-
'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
579 |
-
'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
580 |
-
'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
581 |
-
'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
582 |
-
'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
583 |
-
'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
584 |
-
'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
585 |
-
'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
586 |
-
'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
587 |
-
'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
588 |
-
'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
589 |
-
'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
590 |
-
'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
591 |
-
'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
592 |
-
'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
593 |
-
'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
594 |
-
'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
595 |
-
'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
596 |
-
'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
597 |
-
'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
598 |
-
'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
599 |
-
'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
600 |
-
'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
601 |
-
'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
602 |
-
'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
603 |
-
'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
604 |
-
'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
605 |
-
'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
606 |
-
'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
607 |
-
'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
608 |
-
'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
609 |
-
'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
610 |
-
'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
611 |
-
'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
612 |
-
'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
613 |
-
'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
614 |
-
'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
615 |
-
'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
616 |
-
'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
617 |
-
'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
618 |
-
'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
619 |
-
'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
620 |
-
'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
621 |
-
'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
622 |
-
'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
623 |
-
'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
624 |
-
'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
625 |
-
'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
626 |
-
'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
627 |
-
'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
628 |
-
'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
629 |
-
'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
630 |
-
'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
631 |
-
'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
632 |
-
'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
633 |
-
'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
634 |
-
'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
635 |
-
'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
636 |
-
'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
637 |
-
'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
638 |
-
'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
639 |
-
'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
640 |
-
'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
641 |
-
'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php',
|
642 |
-
'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
|
643 |
-
'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
644 |
-
'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
645 |
-
'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
646 |
-
'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
647 |
-
'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
648 |
-
'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
649 |
-
'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
650 |
-
'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
651 |
-
'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
652 |
-
'PHP_Token_Util' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Util.php',
|
653 |
-
'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
654 |
-
'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
655 |
-
'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
656 |
-
'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
657 |
-
'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
658 |
-
'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
659 |
-
'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
660 |
-
'PSR1_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php',
|
661 |
-
'PSR1_Sniffs_Files_SideEffectsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php',
|
662 |
-
'PSR1_Sniffs_Methods_CamelCapsMethodNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php',
|
663 |
-
'PSR2_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php',
|
664 |
-
'PSR2_Sniffs_Classes_PropertyDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php',
|
665 |
-
'PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php',
|
666 |
-
'PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
|
667 |
-
'PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
|
668 |
-
'PSR2_Sniffs_Files_ClosingTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php',
|
669 |
-
'PSR2_Sniffs_Files_EndFileNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php',
|
670 |
-
'PSR2_Sniffs_Methods_FunctionCallSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php',
|
671 |
-
'PSR2_Sniffs_Methods_FunctionClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php',
|
672 |
-
'PSR2_Sniffs_Methods_MethodDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php',
|
673 |
-
'PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php',
|
674 |
-
'PSR2_Sniffs_Namespaces_UseDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php',
|
675 |
-
'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php',
|
676 |
-
'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php',
|
677 |
-
'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php',
|
678 |
-
'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php',
|
679 |
-
'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
|
680 |
-
'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php',
|
681 |
-
'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
|
682 |
-
'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php',
|
683 |
-
'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php',
|
684 |
-
'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
|
685 |
-
'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php',
|
686 |
-
'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php',
|
687 |
-
'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
|
688 |
-
'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php',
|
689 |
-
'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php',
|
690 |
-
'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php',
|
691 |
-
'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php',
|
692 |
-
'PharIo\\Manifest\\ElementCollectionException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ElementCollectionException.php',
|
693 |
-
'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php',
|
694 |
-
'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php',
|
695 |
-
'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php',
|
696 |
-
'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php',
|
697 |
-
'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php',
|
698 |
-
'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php',
|
699 |
-
'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
|
700 |
-
'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
|
701 |
-
'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
|
702 |
-
'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php',
|
703 |
-
'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php',
|
704 |
-
'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php',
|
705 |
-
'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php',
|
706 |
-
'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php',
|
707 |
-
'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
|
708 |
-
'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php',
|
709 |
-
'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php',
|
710 |
-
'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
|
711 |
-
'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php',
|
712 |
-
'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
|
713 |
-
'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php',
|
714 |
-
'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
|
715 |
-
'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php',
|
716 |
-
'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php',
|
717 |
-
'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
|
718 |
-
'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
|
719 |
-
'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php',
|
720 |
-
'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php',
|
721 |
-
'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
|
722 |
-
'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php',
|
723 |
-
'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php',
|
724 |
-
'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php',
|
725 |
-
'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
|
726 |
-
'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
|
727 |
-
'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
|
728 |
-
'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
|
729 |
-
'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php',
|
730 |
-
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
|
731 |
-
'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
|
732 |
-
'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php',
|
733 |
-
'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
|
734 |
-
'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php',
|
735 |
-
'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
|
736 |
-
'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
|
737 |
-
'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
|
738 |
-
'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php',
|
739 |
-
'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php',
|
740 |
-
'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
|
741 |
-
'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
|
742 |
-
'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
|
743 |
-
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
|
744 |
-
'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
|
745 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
|
746 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\PCOV' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PCOV.php',
|
747 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
|
748 |
-
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
|
749 |
-
'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php',
|
750 |
-
'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php',
|
751 |
-
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
|
752 |
-
'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
|
753 |
-
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
|
754 |
-
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
|
755 |
-
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
|
756 |
-
'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
|
757 |
-
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
|
758 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php',
|
759 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
|
760 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
|
761 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
|
762 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
|
763 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
|
764 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
|
765 |
-
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php',
|
766 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php',
|
767 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
|
768 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
|
769 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
|
770 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
|
771 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
|
772 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
|
773 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
|
774 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
|
775 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
|
776 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
|
777 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
|
778 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
|
779 |
-
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
|
780 |
-
'SebastianBergmann\\CodeCoverage\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
|
781 |
-
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
|
782 |
-
'SebastianBergmann\\CodeCoverage\\Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util.php',
|
783 |
-
'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php',
|
784 |
-
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
|
785 |
-
'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php',
|
786 |
-
'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php',
|
787 |
-
'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php',
|
788 |
-
'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php',
|
789 |
-
'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php',
|
790 |
-
'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php',
|
791 |
-
'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php',
|
792 |
-
'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php',
|
793 |
-
'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php',
|
794 |
-
'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php',
|
795 |
-
'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php',
|
796 |
-
'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php',
|
797 |
-
'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php',
|
798 |
-
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php',
|
799 |
-
'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php',
|
800 |
-
'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php',
|
801 |
-
'SebastianBergmann\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/ConfigurationException.php',
|
802 |
-
'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php',
|
803 |
-
'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php',
|
804 |
-
'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php',
|
805 |
-
'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
|
806 |
-
'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php',
|
807 |
-
'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
|
808 |
-
'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
|
809 |
-
'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
|
810 |
-
'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
|
811 |
-
'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
|
812 |
-
'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
|
813 |
-
'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
|
814 |
-
'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php',
|
815 |
-
'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
|
816 |
-
'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php',
|
817 |
-
'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php',
|
818 |
-
'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
|
819 |
-
'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
|
820 |
-
'SebastianBergmann\\FileIterator\\Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
|
821 |
-
'SebastianBergmann\\FileIterator\\Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
|
822 |
-
'SebastianBergmann\\FileIterator\\Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
|
823 |
-
'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php',
|
824 |
-
'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
|
825 |
-
'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php',
|
826 |
-
'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php',
|
827 |
-
'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php',
|
828 |
-
'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php',
|
829 |
-
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php',
|
830 |
-
'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php',
|
831 |
-
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
|
832 |
-
'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php',
|
833 |
-
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php',
|
834 |
-
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php',
|
835 |
-
'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
|
836 |
-
'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
|
837 |
-
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
|
838 |
-
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
|
839 |
-
'SebastianBergmann\\Timer\\Exception' => __DIR__ . '/..' . '/phpunit/php-timer/src/Exception.php',
|
840 |
-
'SebastianBergmann\\Timer\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-timer/src/RuntimeException.php',
|
841 |
-
'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
|
842 |
-
'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/CallableType.php',
|
843 |
-
'SebastianBergmann\\Type\\Exception' => __DIR__ . '/..' . '/sebastian/type/src/exception/Exception.php',
|
844 |
-
'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/GenericObjectType.php',
|
845 |
-
'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/IterableType.php',
|
846 |
-
'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/NullType.php',
|
847 |
-
'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/ObjectType.php',
|
848 |
-
'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php',
|
849 |
-
'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/SimpleType.php',
|
850 |
-
'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/Type.php',
|
851 |
-
'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php',
|
852 |
-
'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/UnknownType.php',
|
853 |
-
'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/VoidType.php',
|
854 |
-
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
|
855 |
-
'Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php',
|
856 |
-
'Squiz_Sniffs_Arrays_ArrayDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php',
|
857 |
-
'Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php',
|
858 |
-
'Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php',
|
859 |
-
'Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php',
|
860 |
-
'Squiz_Sniffs_CSS_ColonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php',
|
861 |
-
'Squiz_Sniffs_CSS_ColourDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php',
|
862 |
-
'Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php',
|
863 |
-
'Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php',
|
864 |
-
'Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php',
|
865 |
-
'Squiz_Sniffs_CSS_EmptyClassDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php',
|
866 |
-
'Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php',
|
867 |
-
'Squiz_Sniffs_CSS_ForbiddenStylesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php',
|
868 |
-
'Squiz_Sniffs_CSS_IndentationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php',
|
869 |
-
'Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php',
|
870 |
-
'Squiz_Sniffs_CSS_MissingColonSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php',
|
871 |
-
'Squiz_Sniffs_CSS_NamedColoursSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php',
|
872 |
-
'Squiz_Sniffs_CSS_OpacitySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php',
|
873 |
-
'Squiz_Sniffs_CSS_SemicolonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php',
|
874 |
-
'Squiz_Sniffs_CSS_ShorthandSizeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php',
|
875 |
-
'Squiz_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php',
|
876 |
-
'Squiz_Sniffs_Classes_ClassFileNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php',
|
877 |
-
'Squiz_Sniffs_Classes_DuplicatePropertySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php',
|
878 |
-
'Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php',
|
879 |
-
'Squiz_Sniffs_Classes_SelfMemberReferenceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php',
|
880 |
-
'Squiz_Sniffs_Classes_ValidClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php',
|
881 |
-
'Squiz_Sniffs_Commenting_BlockCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php',
|
882 |
-
'Squiz_Sniffs_Commenting_ClassCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php',
|
883 |
-
'Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php',
|
884 |
-
'Squiz_Sniffs_Commenting_DocCommentAlignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php',
|
885 |
-
'Squiz_Sniffs_Commenting_EmptyCatchCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php',
|
886 |
-
'Squiz_Sniffs_Commenting_FileCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php',
|
887 |
-
'Squiz_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
|
888 |
-
'Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php',
|
889 |
-
'Squiz_Sniffs_Commenting_InlineCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php',
|
890 |
-
'Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php',
|
891 |
-
'Squiz_Sniffs_Commenting_PostStatementCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php',
|
892 |
-
'Squiz_Sniffs_Commenting_VariableCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php',
|
893 |
-
'Squiz_Sniffs_ControlStructures_ControlSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php',
|
894 |
-
'Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
|
895 |
-
'Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php',
|
896 |
-
'Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php',
|
897 |
-
'Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php',
|
898 |
-
'Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php',
|
899 |
-
'Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
|
900 |
-
'Squiz_Sniffs_Debug_JSLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php',
|
901 |
-
'Squiz_Sniffs_Debug_JavaScriptLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php',
|
902 |
-
'Squiz_Sniffs_Files_FileExtensionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php',
|
903 |
-
'Squiz_Sniffs_Formatting_OperatorBracketSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php',
|
904 |
-
'Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php',
|
905 |
-
'Squiz_Sniffs_Functions_FunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php',
|
906 |
-
'Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php',
|
907 |
-
'Squiz_Sniffs_Functions_GlobalFunctionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php',
|
908 |
-
'Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php',
|
909 |
-
'Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php',
|
910 |
-
'Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
|
911 |
-
'Squiz_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
912 |
-
'Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php',
|
913 |
-
'Squiz_Sniffs_Objects_ObjectInstantiationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php',
|
914 |
-
'Squiz_Sniffs_Objects_ObjectMemberCommaSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php',
|
915 |
-
'Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',
|
916 |
-
'Squiz_Sniffs_Operators_IncrementDecrementUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',
|
917 |
-
'Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php',
|
918 |
-
'Squiz_Sniffs_PHP_CommentedOutCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php',
|
919 |
-
'Squiz_Sniffs_PHP_DisallowBooleanStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php',
|
920 |
-
'Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php',
|
921 |
-
'Squiz_Sniffs_PHP_DisallowInlineIfSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php',
|
922 |
-
'Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php',
|
923 |
-
'Squiz_Sniffs_PHP_DisallowObEndFlushSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php',
|
924 |
-
'Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php',
|
925 |
-
'Squiz_Sniffs_PHP_DiscouragedFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php',
|
926 |
-
'Squiz_Sniffs_PHP_EmbeddedPhpSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php',
|
927 |
-
'Squiz_Sniffs_PHP_EvalSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php',
|
928 |
-
'Squiz_Sniffs_PHP_ForbiddenFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php',
|
929 |
-
'Squiz_Sniffs_PHP_GlobalKeywordSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php',
|
930 |
-
'Squiz_Sniffs_PHP_HeredocSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php',
|
931 |
-
'Squiz_Sniffs_PHP_InnerFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php',
|
932 |
-
'Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php',
|
933 |
-
'Squiz_Sniffs_PHP_NonExecutableCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php',
|
934 |
-
'Squiz_Sniffs_Scope_MemberVarScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php',
|
935 |
-
'Squiz_Sniffs_Scope_MethodScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php',
|
936 |
-
'Squiz_Sniffs_Scope_StaticThisUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php',
|
937 |
-
'Squiz_Sniffs_Strings_ConcatenationSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php',
|
938 |
-
'Squiz_Sniffs_Strings_DoubleQuoteUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php',
|
939 |
-
'Squiz_Sniffs_Strings_EchoedStringsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php',
|
940 |
-
'Squiz_Sniffs_WhiteSpace_CastSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php',
|
941 |
-
'Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php',
|
942 |
-
'Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php',
|
943 |
-
'Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php',
|
944 |
-
'Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php',
|
945 |
-
'Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php',
|
946 |
-
'Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php',
|
947 |
-
'Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php',
|
948 |
-
'Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php',
|
949 |
-
'Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php',
|
950 |
-
'Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php',
|
951 |
-
'Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
|
952 |
-
'Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php',
|
953 |
-
'Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php',
|
954 |
-
'Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php',
|
955 |
-
'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
|
956 |
-
'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
|
957 |
-
'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
|
958 |
-
'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php',
|
959 |
-
'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php',
|
960 |
-
'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php',
|
961 |
-
'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
|
962 |
-
'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
|
963 |
-
'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
|
964 |
-
'Zend_Sniffs_Debug_CodeAnalyzerSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php',
|
965 |
-
'Zend_Sniffs_Files_ClosingTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php',
|
966 |
-
'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
967 |
-
);
|
968 |
-
|
969 |
public static function getInitializer(ClassLoader $loader)
|
970 |
{
|
971 |
return \Closure::bind(function () use ($loader) {
|
972 |
-
$loader->prefixLengthsPsr4 =
|
973 |
-
$loader->prefixDirsPsr4 =
|
974 |
-
$loader->prefixesPsr0 =
|
975 |
-
$loader->classMap = ComposerStaticInit6f7979399f910d16693a25d8ea59cb8f::$classMap;
|
976 |
|
977 |
}, null, ClassLoader::class);
|
978 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitc18900f6a542da4a0b530114484e7cc6
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
|
|
|
|
|
|
11 |
);
|
12 |
|
13 |
public static $prefixLengthsPsr4 = array (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
'S' =>
|
15 |
array (
|
16 |
'Symfony\\Polyfill\\Ctype\\' => 23,
|
19 |
'P' =>
|
20 |
array (
|
21 |
'Psr\\Log\\' => 8,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
),
|
23 |
'C' =>
|
24 |
array (
|
27 |
);
|
28 |
|
29 |
public static $prefixDirsPsr4 = array (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
'Symfony\\Polyfill\\Ctype\\' =>
|
31 |
array (
|
32 |
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
39 |
array (
|
40 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
41 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
'CF\\' =>
|
43 |
array (
|
44 |
0 => __DIR__ . '/../..' . '/src',
|
47 |
);
|
48 |
|
49 |
public static $prefixesPsr0 = array (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
'C' =>
|
51 |
array (
|
52 |
'CloudFlare\\' =>
|
56 |
),
|
57 |
);
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
public static function getInitializer(ClassLoader $loader)
|
60 |
{
|
61 |
return \Closure::bind(function () use ($loader) {
|
62 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitc18900f6a542da4a0b530114484e7cc6::$prefixLengthsPsr4;
|
63 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitc18900f6a542da4a0b530114484e7cc6::$prefixDirsPsr4;
|
64 |
+
$loader->prefixesPsr0 = ComposerStaticInitc18900f6a542da4a0b530114484e7cc6::$prefixesPsr0;
|
|
|
65 |
|
66 |
}, null, ClassLoader::class);
|
67 |
}
|
vendor/composer/installed.json
CHANGED
@@ -84,2083 +84,52 @@
|
|
84 |
"description": "A PHP backend for Cloudflare plugins."
|
85 |
},
|
86 |
{
|
87 |
-
"name": "
|
88 |
-
"version": "
|
89 |
-
"version_normalized": "
|
90 |
-
"source": {
|
91 |
-
"type": "git",
|
92 |
-
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
|
93 |
-
"reference": "fe390591e0241955f22eb9ba327d137e501c771c"
|
94 |
-
},
|
95 |
-
"dist": {
|
96 |
-
"type": "zip",
|
97 |
-
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c",
|
98 |
-
"reference": "fe390591e0241955f22eb9ba327d137e501c771c",
|
99 |
-
"shasum": ""
|
100 |
-
},
|
101 |
-
"require": {
|
102 |
-
"composer-plugin-api": "^1.0 || ^2.0",
|
103 |
-
"php": ">=5.3",
|
104 |
-
"squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
|
105 |
-
},
|
106 |
-
"require-dev": {
|
107 |
-
"composer/composer": "*",
|
108 |
-
"phpcompatibility/php-compatibility": "^9.0",
|
109 |
-
"sensiolabs/security-checker": "^4.1.0"
|
110 |
-
},
|
111 |
-
"time": "2020-12-07T18:04:37+00:00",
|
112 |
-
"type": "composer-plugin",
|
113 |
-
"extra": {
|
114 |
-
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
115 |
-
},
|
116 |
-
"installation-source": "dist",
|
117 |
-
"autoload": {
|
118 |
-
"psr-4": {
|
119 |
-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
120 |
-
}
|
121 |
-
},
|
122 |
-
"notification-url": "https://packagist.org/downloads/",
|
123 |
-
"license": [
|
124 |
-
"MIT"
|
125 |
-
],
|
126 |
-
"authors": [
|
127 |
-
{
|
128 |
-
"name": "Franck Nijhof",
|
129 |
-
"email": "franck.nijhof@dealerdirect.com",
|
130 |
-
"homepage": "http://www.frenck.nl",
|
131 |
-
"role": "Developer / IT Manager"
|
132 |
-
}
|
133 |
-
],
|
134 |
-
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
135 |
-
"homepage": "http://www.dealerdirect.com",
|
136 |
-
"keywords": [
|
137 |
-
"PHPCodeSniffer",
|
138 |
-
"PHP_CodeSniffer",
|
139 |
-
"code quality",
|
140 |
-
"codesniffer",
|
141 |
-
"composer",
|
142 |
-
"installer",
|
143 |
-
"phpcs",
|
144 |
-
"plugin",
|
145 |
-
"qa",
|
146 |
-
"quality",
|
147 |
-
"standard",
|
148 |
-
"standards",
|
149 |
-
"style guide",
|
150 |
-
"stylecheck",
|
151 |
-
"tests"
|
152 |
-
]
|
153 |
-
},
|
154 |
-
{
|
155 |
-
"name": "doctrine/instantiator",
|
156 |
-
"version": "1.4.0",
|
157 |
-
"version_normalized": "1.4.0.0",
|
158 |
-
"source": {
|
159 |
-
"type": "git",
|
160 |
-
"url": "https://github.com/doctrine/instantiator.git",
|
161 |
-
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
|
162 |
-
},
|
163 |
-
"dist": {
|
164 |
-
"type": "zip",
|
165 |
-
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
|
166 |
-
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
|
167 |
-
"shasum": ""
|
168 |
-
},
|
169 |
-
"require": {
|
170 |
-
"php": "^7.1 || ^8.0"
|
171 |
-
},
|
172 |
-
"require-dev": {
|
173 |
-
"doctrine/coding-standard": "^8.0",
|
174 |
-
"ext-pdo": "*",
|
175 |
-
"ext-phar": "*",
|
176 |
-
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
|
177 |
-
"phpstan/phpstan": "^0.12",
|
178 |
-
"phpstan/phpstan-phpunit": "^0.12",
|
179 |
-
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
180 |
-
},
|
181 |
-
"time": "2020-11-10T18:47:58+00:00",
|
182 |
-
"type": "library",
|
183 |
-
"installation-source": "dist",
|
184 |
-
"autoload": {
|
185 |
-
"psr-4": {
|
186 |
-
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
187 |
-
}
|
188 |
-
},
|
189 |
-
"notification-url": "https://packagist.org/downloads/",
|
190 |
-
"license": [
|
191 |
-
"MIT"
|
192 |
-
],
|
193 |
-
"authors": [
|
194 |
-
{
|
195 |
-
"name": "Marco Pivetta",
|
196 |
-
"email": "ocramius@gmail.com",
|
197 |
-
"homepage": "https://ocramius.github.io/"
|
198 |
-
}
|
199 |
-
],
|
200 |
-
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
201 |
-
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
|
202 |
-
"keywords": [
|
203 |
-
"constructor",
|
204 |
-
"instantiate"
|
205 |
-
],
|
206 |
-
"funding": [
|
207 |
-
{
|
208 |
-
"url": "https://www.doctrine-project.org/sponsorship.html",
|
209 |
-
"type": "custom"
|
210 |
-
},
|
211 |
-
{
|
212 |
-
"url": "https://www.patreon.com/phpdoctrine",
|
213 |
-
"type": "patreon"
|
214 |
-
},
|
215 |
-
{
|
216 |
-
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
|
217 |
-
"type": "tidelift"
|
218 |
-
}
|
219 |
-
]
|
220 |
-
},
|
221 |
-
{
|
222 |
-
"name": "johnkary/phpunit-speedtrap",
|
223 |
-
"version": "v3.3.0",
|
224 |
-
"version_normalized": "3.3.0.0",
|
225 |
-
"source": {
|
226 |
-
"type": "git",
|
227 |
-
"url": "https://github.com/johnkary/phpunit-speedtrap.git",
|
228 |
-
"reference": "9ba81d42676da31366c85d3ff8c10a8352d02030"
|
229 |
-
},
|
230 |
-
"dist": {
|
231 |
-
"type": "zip",
|
232 |
-
"url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/9ba81d42676da31366c85d3ff8c10a8352d02030",
|
233 |
-
"reference": "9ba81d42676da31366c85d3ff8c10a8352d02030",
|
234 |
-
"shasum": ""
|
235 |
-
},
|
236 |
-
"require": {
|
237 |
-
"php": ">=7.1",
|
238 |
-
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
239 |
-
},
|
240 |
-
"time": "2020-12-18T16:20:16+00:00",
|
241 |
-
"type": "library",
|
242 |
-
"extra": {
|
243 |
-
"branch-alias": {
|
244 |
-
"dev-master": "4.0-dev"
|
245 |
-
}
|
246 |
-
},
|
247 |
-
"installation-source": "dist",
|
248 |
-
"autoload": {
|
249 |
-
"psr-4": {
|
250 |
-
"JohnKary\\PHPUnit\\Listener\\": "src/"
|
251 |
-
}
|
252 |
-
},
|
253 |
-
"notification-url": "https://packagist.org/downloads/",
|
254 |
-
"license": [
|
255 |
-
"MIT"
|
256 |
-
],
|
257 |
-
"authors": [
|
258 |
-
{
|
259 |
-
"name": "John Kary",
|
260 |
-
"email": "john@johnkary.net"
|
261 |
-
}
|
262 |
-
],
|
263 |
-
"description": "Find and report on slow tests in your PHPUnit test suite",
|
264 |
-
"homepage": "https://github.com/johnkary/phpunit-speedtrap",
|
265 |
-
"keywords": [
|
266 |
-
"phpunit",
|
267 |
-
"profile",
|
268 |
-
"slow"
|
269 |
-
]
|
270 |
-
},
|
271 |
-
{
|
272 |
-
"name": "myclabs/deep-copy",
|
273 |
-
"version": "1.10.2",
|
274 |
-
"version_normalized": "1.10.2.0",
|
275 |
-
"source": {
|
276 |
-
"type": "git",
|
277 |
-
"url": "https://github.com/myclabs/DeepCopy.git",
|
278 |
-
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
|
279 |
-
},
|
280 |
-
"dist": {
|
281 |
-
"type": "zip",
|
282 |
-
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
|
283 |
-
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
|
284 |
-
"shasum": ""
|
285 |
-
},
|
286 |
-
"require": {
|
287 |
-
"php": "^7.1 || ^8.0"
|
288 |
-
},
|
289 |
-
"replace": {
|
290 |
-
"myclabs/deep-copy": "self.version"
|
291 |
-
},
|
292 |
-
"require-dev": {
|
293 |
-
"doctrine/collections": "^1.0",
|
294 |
-
"doctrine/common": "^2.6",
|
295 |
-
"phpunit/phpunit": "^7.1"
|
296 |
-
},
|
297 |
-
"time": "2020-11-13T09:40:50+00:00",
|
298 |
-
"type": "library",
|
299 |
-
"installation-source": "dist",
|
300 |
-
"autoload": {
|
301 |
-
"psr-4": {
|
302 |
-
"DeepCopy\\": "src/DeepCopy/"
|
303 |
-
},
|
304 |
-
"files": [
|
305 |
-
"src/DeepCopy/deep_copy.php"
|
306 |
-
]
|
307 |
-
},
|
308 |
-
"notification-url": "https://packagist.org/downloads/",
|
309 |
-
"license": [
|
310 |
-
"MIT"
|
311 |
-
],
|
312 |
-
"description": "Create deep copies (clones) of your objects",
|
313 |
-
"keywords": [
|
314 |
-
"clone",
|
315 |
-
"copy",
|
316 |
-
"duplicate",
|
317 |
-
"object",
|
318 |
-
"object graph"
|
319 |
-
],
|
320 |
-
"funding": [
|
321 |
-
{
|
322 |
-
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
|
323 |
-
"type": "tidelift"
|
324 |
-
}
|
325 |
-
]
|
326 |
-
},
|
327 |
-
{
|
328 |
-
"name": "phar-io/manifest",
|
329 |
-
"version": "2.0.1",
|
330 |
-
"version_normalized": "2.0.1.0",
|
331 |
-
"source": {
|
332 |
-
"type": "git",
|
333 |
-
"url": "https://github.com/phar-io/manifest.git",
|
334 |
-
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
|
335 |
-
},
|
336 |
-
"dist": {
|
337 |
-
"type": "zip",
|
338 |
-
"url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
|
339 |
-
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
|
340 |
-
"shasum": ""
|
341 |
-
},
|
342 |
-
"require": {
|
343 |
-
"ext-dom": "*",
|
344 |
-
"ext-phar": "*",
|
345 |
-
"ext-xmlwriter": "*",
|
346 |
-
"phar-io/version": "^3.0.1",
|
347 |
-
"php": "^7.2 || ^8.0"
|
348 |
-
},
|
349 |
-
"time": "2020-06-27T14:33:11+00:00",
|
350 |
-
"type": "library",
|
351 |
-
"extra": {
|
352 |
-
"branch-alias": {
|
353 |
-
"dev-master": "2.0.x-dev"
|
354 |
-
}
|
355 |
-
},
|
356 |
-
"installation-source": "dist",
|
357 |
-
"autoload": {
|
358 |
-
"classmap": [
|
359 |
-
"src/"
|
360 |
-
]
|
361 |
-
},
|
362 |
-
"notification-url": "https://packagist.org/downloads/",
|
363 |
-
"license": [
|
364 |
-
"BSD-3-Clause"
|
365 |
-
],
|
366 |
-
"authors": [
|
367 |
-
{
|
368 |
-
"name": "Arne Blankerts",
|
369 |
-
"email": "arne@blankerts.de",
|
370 |
-
"role": "Developer"
|
371 |
-
},
|
372 |
-
{
|
373 |
-
"name": "Sebastian Heuer",
|
374 |
-
"email": "sebastian@phpeople.de",
|
375 |
-
"role": "Developer"
|
376 |
-
},
|
377 |
-
{
|
378 |
-
"name": "Sebastian Bergmann",
|
379 |
-
"email": "sebastian@phpunit.de",
|
380 |
-
"role": "Developer"
|
381 |
-
}
|
382 |
-
],
|
383 |
-
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)"
|
384 |
-
},
|
385 |
-
{
|
386 |
-
"name": "phar-io/version",
|
387 |
-
"version": "3.0.4",
|
388 |
-
"version_normalized": "3.0.4.0",
|
389 |
-
"source": {
|
390 |
-
"type": "git",
|
391 |
-
"url": "https://github.com/phar-io/version.git",
|
392 |
-
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451"
|
393 |
-
},
|
394 |
-
"dist": {
|
395 |
-
"type": "zip",
|
396 |
-
"url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451",
|
397 |
-
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451",
|
398 |
-
"shasum": ""
|
399 |
-
},
|
400 |
-
"require": {
|
401 |
-
"php": "^7.2 || ^8.0"
|
402 |
-
},
|
403 |
-
"time": "2020-12-13T23:18:30+00:00",
|
404 |
-
"type": "library",
|
405 |
-
"installation-source": "dist",
|
406 |
-
"autoload": {
|
407 |
-
"classmap": [
|
408 |
-
"src/"
|
409 |
-
]
|
410 |
-
},
|
411 |
-
"notification-url": "https://packagist.org/downloads/",
|
412 |
-
"license": [
|
413 |
-
"BSD-3-Clause"
|
414 |
-
],
|
415 |
-
"authors": [
|
416 |
-
{
|
417 |
-
"name": "Arne Blankerts",
|
418 |
-
"email": "arne@blankerts.de",
|
419 |
-
"role": "Developer"
|
420 |
-
},
|
421 |
-
{
|
422 |
-
"name": "Sebastian Heuer",
|
423 |
-
"email": "sebastian@phpeople.de",
|
424 |
-
"role": "Developer"
|
425 |
-
},
|
426 |
-
{
|
427 |
-
"name": "Sebastian Bergmann",
|
428 |
-
"email": "sebastian@phpunit.de",
|
429 |
-
"role": "Developer"
|
430 |
-
}
|
431 |
-
],
|
432 |
-
"description": "Library for handling version information and constraints"
|
433 |
-
},
|
434 |
-
{
|
435 |
-
"name": "php-mock/php-mock",
|
436 |
-
"version": "2.3.0",
|
437 |
-
"version_normalized": "2.3.0.0",
|
438 |
-
"source": {
|
439 |
-
"type": "git",
|
440 |
-
"url": "https://github.com/php-mock/php-mock.git",
|
441 |
-
"reference": "a3142f257153b71c09bf9146ecf73430b3818b7c"
|
442 |
-
},
|
443 |
-
"dist": {
|
444 |
-
"type": "zip",
|
445 |
-
"url": "https://api.github.com/repos/php-mock/php-mock/zipball/a3142f257153b71c09bf9146ecf73430b3818b7c",
|
446 |
-
"reference": "a3142f257153b71c09bf9146ecf73430b3818b7c",
|
447 |
-
"shasum": ""
|
448 |
-
},
|
449 |
-
"require": {
|
450 |
-
"php": "^5.6 || ^7.0 || ^8.0",
|
451 |
-
"phpunit/php-text-template": "^1 || ^2"
|
452 |
-
},
|
453 |
-
"replace": {
|
454 |
-
"malkusch/php-mock": "*"
|
455 |
-
},
|
456 |
-
"require-dev": {
|
457 |
-
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.0 || ^9.0",
|
458 |
-
"squizlabs/php_codesniffer": "^3.5"
|
459 |
-
},
|
460 |
-
"suggest": {
|
461 |
-
"php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock."
|
462 |
-
},
|
463 |
-
"time": "2020-12-11T19:20:04+00:00",
|
464 |
-
"type": "library",
|
465 |
-
"installation-source": "dist",
|
466 |
-
"autoload": {
|
467 |
-
"files": [
|
468 |
-
"autoload.php"
|
469 |
-
],
|
470 |
-
"psr-4": {
|
471 |
-
"phpmock\\": [
|
472 |
-
"classes/",
|
473 |
-
"tests/"
|
474 |
-
]
|
475 |
-
}
|
476 |
-
},
|
477 |
-
"notification-url": "https://packagist.org/downloads/",
|
478 |
-
"license": [
|
479 |
-
"WTFPL"
|
480 |
-
],
|
481 |
-
"authors": [
|
482 |
-
{
|
483 |
-
"name": "Markus Malkusch",
|
484 |
-
"email": "markus@malkusch.de",
|
485 |
-
"homepage": "http://markus.malkusch.de",
|
486 |
-
"role": "Developer"
|
487 |
-
}
|
488 |
-
],
|
489 |
-
"description": "PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.",
|
490 |
-
"homepage": "https://github.com/php-mock/php-mock",
|
491 |
-
"keywords": [
|
492 |
-
"BDD",
|
493 |
-
"TDD",
|
494 |
-
"function",
|
495 |
-
"mock",
|
496 |
-
"stub",
|
497 |
-
"test",
|
498 |
-
"test double"
|
499 |
-
],
|
500 |
-
"funding": [
|
501 |
-
{
|
502 |
-
"url": "https://github.com/michalbundyra",
|
503 |
-
"type": "github"
|
504 |
-
}
|
505 |
-
]
|
506 |
-
},
|
507 |
-
{
|
508 |
-
"name": "php-mock/php-mock-integration",
|
509 |
-
"version": "2.1.0",
|
510 |
-
"version_normalized": "2.1.0.0",
|
511 |
-
"source": {
|
512 |
-
"type": "git",
|
513 |
-
"url": "https://github.com/php-mock/php-mock-integration.git",
|
514 |
-
"reference": "003d585841e435958a02e9b986953907b8b7609b"
|
515 |
-
},
|
516 |
-
"dist": {
|
517 |
-
"type": "zip",
|
518 |
-
"url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/003d585841e435958a02e9b986953907b8b7609b",
|
519 |
-
"reference": "003d585841e435958a02e9b986953907b8b7609b",
|
520 |
-
"shasum": ""
|
521 |
-
},
|
522 |
-
"require": {
|
523 |
-
"php": ">=5.6",
|
524 |
-
"php-mock/php-mock": "^2.2",
|
525 |
-
"phpunit/php-text-template": "^1 || ^2"
|
526 |
-
},
|
527 |
-
"require-dev": {
|
528 |
-
"phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9"
|
529 |
-
},
|
530 |
-
"time": "2020-02-08T14:40:25+00:00",
|
531 |
-
"type": "library",
|
532 |
-
"installation-source": "dist",
|
533 |
-
"autoload": {
|
534 |
-
"psr-4": {
|
535 |
-
"phpmock\\integration\\": "classes/"
|
536 |
-
}
|
537 |
-
},
|
538 |
-
"notification-url": "https://packagist.org/downloads/",
|
539 |
-
"license": [
|
540 |
-
"WTFPL"
|
541 |
-
],
|
542 |
-
"authors": [
|
543 |
-
{
|
544 |
-
"name": "Markus Malkusch",
|
545 |
-
"email": "markus@malkusch.de",
|
546 |
-
"homepage": "http://markus.malkusch.de",
|
547 |
-
"role": "Developer"
|
548 |
-
}
|
549 |
-
],
|
550 |
-
"description": "Integration package for PHP-Mock",
|
551 |
-
"homepage": "https://github.com/php-mock/php-mock-integration",
|
552 |
-
"keywords": [
|
553 |
-
"BDD",
|
554 |
-
"TDD",
|
555 |
-
"function",
|
556 |
-
"mock",
|
557 |
-
"stub",
|
558 |
-
"test",
|
559 |
-
"test double"
|
560 |
-
]
|
561 |
-
},
|
562 |
-
{
|
563 |
-
"name": "php-mock/php-mock-phpunit",
|
564 |
-
"version": "2.6.0",
|
565 |
-
"version_normalized": "2.6.0.0",
|
566 |
-
"source": {
|
567 |
-
"type": "git",
|
568 |
-
"url": "https://github.com/php-mock/php-mock-phpunit.git",
|
569 |
-
"reference": "2877a0e58f12e91b64bf36ccd080a209dcbf6c30"
|
570 |
-
},
|
571 |
-
"dist": {
|
572 |
-
"type": "zip",
|
573 |
-
"url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/2877a0e58f12e91b64bf36ccd080a209dcbf6c30",
|
574 |
-
"reference": "2877a0e58f12e91b64bf36ccd080a209dcbf6c30",
|
575 |
-
"shasum": ""
|
576 |
-
},
|
577 |
-
"require": {
|
578 |
-
"php": ">=7",
|
579 |
-
"php-mock/php-mock-integration": "^2.1",
|
580 |
-
"phpunit/phpunit": "^6 || ^7 || ^8 || ^9"
|
581 |
-
},
|
582 |
-
"time": "2020-02-08T15:44:47+00:00",
|
583 |
-
"type": "library",
|
584 |
-
"installation-source": "dist",
|
585 |
-
"autoload": {
|
586 |
-
"files": [
|
587 |
-
"autoload.php"
|
588 |
-
],
|
589 |
-
"psr-4": {
|
590 |
-
"phpmock\\phpunit\\": "classes/"
|
591 |
-
}
|
592 |
-
},
|
593 |
-
"notification-url": "https://packagist.org/downloads/",
|
594 |
-
"license": [
|
595 |
-
"WTFPL"
|
596 |
-
],
|
597 |
-
"authors": [
|
598 |
-
{
|
599 |
-
"name": "Markus Malkusch",
|
600 |
-
"email": "markus@malkusch.de",
|
601 |
-
"homepage": "http://markus.malkusch.de",
|
602 |
-
"role": "Developer"
|
603 |
-
}
|
604 |
-
],
|
605 |
-
"description": "Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.",
|
606 |
-
"homepage": "https://github.com/php-mock/php-mock-phpunit",
|
607 |
-
"keywords": [
|
608 |
-
"BDD",
|
609 |
-
"TDD",
|
610 |
-
"function",
|
611 |
-
"mock",
|
612 |
-
"phpunit",
|
613 |
-
"stub",
|
614 |
-
"test",
|
615 |
-
"test double"
|
616 |
-
]
|
617 |
-
},
|
618 |
-
{
|
619 |
-
"name": "phpcompatibility/php-compatibility",
|
620 |
-
"version": "9.3.5",
|
621 |
-
"version_normalized": "9.3.5.0",
|
622 |
-
"source": {
|
623 |
-
"type": "git",
|
624 |
-
"url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
|
625 |
-
"reference": "9fb324479acf6f39452e0655d2429cc0d3914243"
|
626 |
-
},
|
627 |
-
"dist": {
|
628 |
-
"type": "zip",
|
629 |
-
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243",
|
630 |
-
"reference": "9fb324479acf6f39452e0655d2429cc0d3914243",
|
631 |
-
"shasum": ""
|
632 |
-
},
|
633 |
-
"require": {
|
634 |
-
"php": ">=5.3",
|
635 |
-
"squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
|
636 |
-
},
|
637 |
-
"conflict": {
|
638 |
-
"squizlabs/php_codesniffer": "2.6.2"
|
639 |
-
},
|
640 |
-
"require-dev": {
|
641 |
-
"phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
|
642 |
-
},
|
643 |
-
"suggest": {
|
644 |
-
"dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
|
645 |
-
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
|
646 |
-
},
|
647 |
-
"time": "2019-12-27T09:44:58+00:00",
|
648 |
-
"type": "phpcodesniffer-standard",
|
649 |
-
"installation-source": "dist",
|
650 |
-
"notification-url": "https://packagist.org/downloads/",
|
651 |
-
"license": [
|
652 |
-
"LGPL-3.0-or-later"
|
653 |
-
],
|
654 |
-
"authors": [
|
655 |
-
{
|
656 |
-
"name": "Wim Godden",
|
657 |
-
"homepage": "https://github.com/wimg",
|
658 |
-
"role": "lead"
|
659 |
-
},
|
660 |
-
{
|
661 |
-
"name": "Juliette Reinders Folmer",
|
662 |
-
"homepage": "https://github.com/jrfnl",
|
663 |
-
"role": "lead"
|
664 |
-
},
|
665 |
-
{
|
666 |
-
"name": "Contributors",
|
667 |
-
"homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
|
668 |
-
}
|
669 |
-
],
|
670 |
-
"description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
|
671 |
-
"homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
|
672 |
-
"keywords": [
|
673 |
-
"compatibility",
|
674 |
-
"phpcs",
|
675 |
-
"standards"
|
676 |
-
]
|
677 |
-
},
|
678 |
-
{
|
679 |
-
"name": "phpdocumentor/reflection-common",
|
680 |
-
"version": "1.0.1",
|
681 |
-
"version_normalized": "1.0.1.0",
|
682 |
-
"source": {
|
683 |
-
"type": "git",
|
684 |
-
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
685 |
-
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
|
686 |
-
},
|
687 |
-
"dist": {
|
688 |
-
"type": "zip",
|
689 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
690 |
-
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
691 |
-
"shasum": ""
|
692 |
-
},
|
693 |
-
"require": {
|
694 |
-
"php": ">=5.5"
|
695 |
-
},
|
696 |
-
"require-dev": {
|
697 |
-
"phpunit/phpunit": "^4.6"
|
698 |
-
},
|
699 |
-
"time": "2017-09-11T18:02:19+00:00",
|
700 |
-
"type": "library",
|
701 |
-
"extra": {
|
702 |
-
"branch-alias": {
|
703 |
-
"dev-master": "1.0.x-dev"
|
704 |
-
}
|
705 |
-
},
|
706 |
-
"installation-source": "dist",
|
707 |
-
"autoload": {
|
708 |
-
"psr-4": {
|
709 |
-
"phpDocumentor\\Reflection\\": [
|
710 |
-
"src"
|
711 |
-
]
|
712 |
-
}
|
713 |
-
},
|
714 |
-
"notification-url": "https://packagist.org/downloads/",
|
715 |
-
"license": [
|
716 |
-
"MIT"
|
717 |
-
],
|
718 |
-
"authors": [
|
719 |
-
{
|
720 |
-
"name": "Jaap van Otterdijk",
|
721 |
-
"email": "opensource@ijaap.nl"
|
722 |
-
}
|
723 |
-
],
|
724 |
-
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
|
725 |
-
"homepage": "http://www.phpdoc.org",
|
726 |
-
"keywords": [
|
727 |
-
"FQSEN",
|
728 |
-
"phpDocumentor",
|
729 |
-
"phpdoc",
|
730 |
-
"reflection",
|
731 |
-
"static analysis"
|
732 |
-
]
|
733 |
-
},
|
734 |
-
{
|
735 |
-
"name": "phpdocumentor/reflection-docblock",
|
736 |
-
"version": "3.3.2",
|
737 |
-
"version_normalized": "3.3.2.0",
|
738 |
-
"source": {
|
739 |
-
"type": "git",
|
740 |
-
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
741 |
-
"reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
|
742 |
-
},
|
743 |
-
"dist": {
|
744 |
-
"type": "zip",
|
745 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
|
746 |
-
"reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
|
747 |
-
"shasum": ""
|
748 |
-
},
|
749 |
-
"require": {
|
750 |
-
"php": "^5.6 || ^7.0",
|
751 |
-
"phpdocumentor/reflection-common": "^1.0.0",
|
752 |
-
"phpdocumentor/type-resolver": "^0.4.0",
|
753 |
-
"webmozart/assert": "^1.0"
|
754 |
-
},
|
755 |
-
"require-dev": {
|
756 |
-
"mockery/mockery": "^0.9.4",
|
757 |
-
"phpunit/phpunit": "^4.4"
|
758 |
-
},
|
759 |
-
"time": "2017-11-10T14:09:06+00:00",
|
760 |
-
"type": "library",
|
761 |
-
"installation-source": "dist",
|
762 |
-
"autoload": {
|
763 |
-
"psr-4": {
|
764 |
-
"phpDocumentor\\Reflection\\": [
|
765 |
-
"src/"
|
766 |
-
]
|
767 |
-
}
|
768 |
-
},
|
769 |
-
"notification-url": "https://packagist.org/downloads/",
|
770 |
-
"license": [
|
771 |
-
"MIT"
|
772 |
-
],
|
773 |
-
"authors": [
|
774 |
-
{
|
775 |
-
"name": "Mike van Riel",
|
776 |
-
"email": "me@mikevanriel.com"
|
777 |
-
}
|
778 |
-
],
|
779 |
-
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock."
|
780 |
-
},
|
781 |
-
{
|
782 |
-
"name": "phpdocumentor/type-resolver",
|
783 |
-
"version": "0.4.0",
|
784 |
-
"version_normalized": "0.4.0.0",
|
785 |
-
"source": {
|
786 |
-
"type": "git",
|
787 |
-
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
788 |
-
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
|
789 |
-
},
|
790 |
-
"dist": {
|
791 |
-
"type": "zip",
|
792 |
-
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
|
793 |
-
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
|
794 |
-
"shasum": ""
|
795 |
-
},
|
796 |
-
"require": {
|
797 |
-
"php": "^5.5 || ^7.0",
|
798 |
-
"phpdocumentor/reflection-common": "^1.0"
|
799 |
-
},
|
800 |
-
"require-dev": {
|
801 |
-
"mockery/mockery": "^0.9.4",
|
802 |
-
"phpunit/phpunit": "^5.2||^4.8.24"
|
803 |
-
},
|
804 |
-
"time": "2017-07-14T14:27:02+00:00",
|
805 |
-
"type": "library",
|
806 |
-
"extra": {
|
807 |
-
"branch-alias": {
|
808 |
-
"dev-master": "1.0.x-dev"
|
809 |
-
}
|
810 |
-
},
|
811 |
-
"installation-source": "dist",
|
812 |
-
"autoload": {
|
813 |
-
"psr-4": {
|
814 |
-
"phpDocumentor\\Reflection\\": [
|
815 |
-
"src/"
|
816 |
-
]
|
817 |
-
}
|
818 |
-
},
|
819 |
-
"notification-url": "https://packagist.org/downloads/",
|
820 |
-
"license": [
|
821 |
-
"MIT"
|
822 |
-
],
|
823 |
-
"authors": [
|
824 |
-
{
|
825 |
-
"name": "Mike van Riel",
|
826 |
-
"email": "me@mikevanriel.com"
|
827 |
-
}
|
828 |
-
]
|
829 |
-
},
|
830 |
-
{
|
831 |
-
"name": "phpspec/prophecy",
|
832 |
-
"version": "v1.10.3",
|
833 |
-
"version_normalized": "1.10.3.0",
|
834 |
-
"source": {
|
835 |
-
"type": "git",
|
836 |
-
"url": "https://github.com/phpspec/prophecy.git",
|
837 |
-
"reference": "451c3cd1418cf640de218914901e51b064abb093"
|
838 |
-
},
|
839 |
-
"dist": {
|
840 |
-
"type": "zip",
|
841 |
-
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
|
842 |
-
"reference": "451c3cd1418cf640de218914901e51b064abb093",
|
843 |
-
"shasum": ""
|
844 |
-
},
|
845 |
-
"require": {
|
846 |
-
"doctrine/instantiator": "^1.0.2",
|
847 |
-
"php": "^5.3|^7.0",
|
848 |
-
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
|
849 |
-
"sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
|
850 |
-
"sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
|
851 |
-
},
|
852 |
-
"require-dev": {
|
853 |
-
"phpspec/phpspec": "^2.5 || ^3.2",
|
854 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
|
855 |
-
},
|
856 |
-
"time": "2020-03-05T15:02:03+00:00",
|
857 |
-
"type": "library",
|
858 |
-
"extra": {
|
859 |
-
"branch-alias": {
|
860 |
-
"dev-master": "1.10.x-dev"
|
861 |
-
}
|
862 |
-
},
|
863 |
-
"installation-source": "dist",
|
864 |
-
"autoload": {
|
865 |
-
"psr-4": {
|
866 |
-
"Prophecy\\": "src/Prophecy"
|
867 |
-
}
|
868 |
-
},
|
869 |
-
"notification-url": "https://packagist.org/downloads/",
|
870 |
-
"license": [
|
871 |
-
"MIT"
|
872 |
-
],
|
873 |
-
"authors": [
|
874 |
-
{
|
875 |
-
"name": "Konstantin Kudryashov",
|
876 |
-
"email": "ever.zet@gmail.com",
|
877 |
-
"homepage": "http://everzet.com"
|
878 |
-
},
|
879 |
-
{
|
880 |
-
"name": "Marcello Duarte",
|
881 |
-
"email": "marcello.duarte@gmail.com"
|
882 |
-
}
|
883 |
-
],
|
884 |
-
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
885 |
-
"homepage": "https://github.com/phpspec/prophecy",
|
886 |
-
"keywords": [
|
887 |
-
"Double",
|
888 |
-
"Dummy",
|
889 |
-
"fake",
|
890 |
-
"mock",
|
891 |
-
"spy",
|
892 |
-
"stub"
|
893 |
-
]
|
894 |
-
},
|
895 |
-
{
|
896 |
-
"name": "phpunit/php-code-coverage",
|
897 |
-
"version": "7.0.14",
|
898 |
-
"version_normalized": "7.0.14.0",
|
899 |
-
"source": {
|
900 |
-
"type": "git",
|
901 |
-
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
902 |
-
"reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c"
|
903 |
-
},
|
904 |
-
"dist": {
|
905 |
-
"type": "zip",
|
906 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c",
|
907 |
-
"reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c",
|
908 |
-
"shasum": ""
|
909 |
-
},
|
910 |
-
"require": {
|
911 |
-
"ext-dom": "*",
|
912 |
-
"ext-xmlwriter": "*",
|
913 |
-
"php": ">=7.2",
|
914 |
-
"phpunit/php-file-iterator": "^2.0.2",
|
915 |
-
"phpunit/php-text-template": "^1.2.1",
|
916 |
-
"phpunit/php-token-stream": "^3.1.1 || ^4.0",
|
917 |
-
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
918 |
-
"sebastian/environment": "^4.2.2",
|
919 |
-
"sebastian/version": "^2.0.1",
|
920 |
-
"theseer/tokenizer": "^1.1.3"
|
921 |
-
},
|
922 |
-
"require-dev": {
|
923 |
-
"phpunit/phpunit": "^8.2.2"
|
924 |
-
},
|
925 |
-
"suggest": {
|
926 |
-
"ext-xdebug": "^2.7.2"
|
927 |
-
},
|
928 |
-
"time": "2020-12-02T13:39:03+00:00",
|
929 |
-
"type": "library",
|
930 |
-
"extra": {
|
931 |
-
"branch-alias": {
|
932 |
-
"dev-master": "7.0-dev"
|
933 |
-
}
|
934 |
-
},
|
935 |
-
"installation-source": "dist",
|
936 |
-
"autoload": {
|
937 |
-
"classmap": [
|
938 |
-
"src/"
|
939 |
-
]
|
940 |
-
},
|
941 |
-
"notification-url": "https://packagist.org/downloads/",
|
942 |
-
"license": [
|
943 |
-
"BSD-3-Clause"
|
944 |
-
],
|
945 |
-
"authors": [
|
946 |
-
{
|
947 |
-
"name": "Sebastian Bergmann",
|
948 |
-
"email": "sebastian@phpunit.de",
|
949 |
-
"role": "lead"
|
950 |
-
}
|
951 |
-
],
|
952 |
-
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
953 |
-
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
954 |
-
"keywords": [
|
955 |
-
"coverage",
|
956 |
-
"testing",
|
957 |
-
"xunit"
|
958 |
-
],
|
959 |
-
"funding": [
|
960 |
-
{
|
961 |
-
"url": "https://github.com/sebastianbergmann",
|
962 |
-
"type": "github"
|
963 |
-
}
|
964 |
-
]
|
965 |
-
},
|
966 |
-
{
|
967 |
-
"name": "phpunit/php-file-iterator",
|
968 |
-
"version": "2.0.3",
|
969 |
-
"version_normalized": "2.0.3.0",
|
970 |
-
"source": {
|
971 |
-
"type": "git",
|
972 |
-
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
973 |
-
"reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357"
|
974 |
-
},
|
975 |
-
"dist": {
|
976 |
-
"type": "zip",
|
977 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357",
|
978 |
-
"reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357",
|
979 |
-
"shasum": ""
|
980 |
-
},
|
981 |
-
"require": {
|
982 |
-
"php": ">=7.1"
|
983 |
-
},
|
984 |
-
"require-dev": {
|
985 |
-
"phpunit/phpunit": "^8.5"
|
986 |
-
},
|
987 |
-
"time": "2020-11-30T08:25:21+00:00",
|
988 |
-
"type": "library",
|
989 |
-
"extra": {
|
990 |
-
"branch-alias": {
|
991 |
-
"dev-master": "2.0.x-dev"
|
992 |
-
}
|
993 |
-
},
|
994 |
-
"installation-source": "dist",
|
995 |
-
"autoload": {
|
996 |
-
"classmap": [
|
997 |
-
"src/"
|
998 |
-
]
|
999 |
-
},
|
1000 |
-
"notification-url": "https://packagist.org/downloads/",
|
1001 |
-
"license": [
|
1002 |
-
"BSD-3-Clause"
|
1003 |
-
],
|
1004 |
-
"authors": [
|
1005 |
-
{
|
1006 |
-
"name": "Sebastian Bergmann",
|
1007 |
-
"email": "sebastian@phpunit.de",
|
1008 |
-
"role": "lead"
|
1009 |
-
}
|
1010 |
-
],
|
1011 |
-
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
1012 |
-
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
1013 |
-
"keywords": [
|
1014 |
-
"filesystem",
|
1015 |
-
"iterator"
|
1016 |
-
],
|
1017 |
-
"funding": [
|
1018 |
-
{
|
1019 |
-
"url": "https://github.com/sebastianbergmann",
|
1020 |
-
"type": "github"
|
1021 |
-
}
|
1022 |
-
]
|
1023 |
-
},
|
1024 |
-
{
|
1025 |
-
"name": "phpunit/php-text-template",
|
1026 |
-
"version": "1.2.1",
|
1027 |
-
"version_normalized": "1.2.1.0",
|
1028 |
-
"source": {
|
1029 |
-
"type": "git",
|
1030 |
-
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
1031 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
1032 |
-
},
|
1033 |
-
"dist": {
|
1034 |
-
"type": "zip",
|
1035 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
1036 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
1037 |
-
"shasum": ""
|
1038 |
-
},
|
1039 |
-
"require": {
|
1040 |
-
"php": ">=5.3.3"
|
1041 |
-
},
|
1042 |
-
"time": "2015-06-21T13:50:34+00:00",
|
1043 |
-
"type": "library",
|
1044 |
-
"installation-source": "dist",
|
1045 |
-
"autoload": {
|
1046 |
-
"classmap": [
|
1047 |
-
"src/"
|
1048 |
-
]
|
1049 |
-
},
|
1050 |
-
"notification-url": "https://packagist.org/downloads/",
|
1051 |
-
"license": [
|
1052 |
-
"BSD-3-Clause"
|
1053 |
-
],
|
1054 |
-
"authors": [
|
1055 |
-
{
|
1056 |
-
"name": "Sebastian Bergmann",
|
1057 |
-
"email": "sebastian@phpunit.de",
|
1058 |
-
"role": "lead"
|
1059 |
-
}
|
1060 |
-
],
|
1061 |
-
"description": "Simple template engine.",
|
1062 |
-
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
1063 |
-
"keywords": [
|
1064 |
-
"template"
|
1065 |
-
]
|
1066 |
-
},
|
1067 |
-
{
|
1068 |
-
"name": "phpunit/php-timer",
|
1069 |
-
"version": "2.1.3",
|
1070 |
-
"version_normalized": "2.1.3.0",
|
1071 |
-
"source": {
|
1072 |
-
"type": "git",
|
1073 |
-
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
1074 |
-
"reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662"
|
1075 |
-
},
|
1076 |
-
"dist": {
|
1077 |
-
"type": "zip",
|
1078 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662",
|
1079 |
-
"reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662",
|
1080 |
-
"shasum": ""
|
1081 |
-
},
|
1082 |
-
"require": {
|
1083 |
-
"php": ">=7.1"
|
1084 |
-
},
|
1085 |
-
"require-dev": {
|
1086 |
-
"phpunit/phpunit": "^8.5"
|
1087 |
-
},
|
1088 |
-
"time": "2020-11-30T08:20:02+00:00",
|
1089 |
-
"type": "library",
|
1090 |
-
"extra": {
|
1091 |
-
"branch-alias": {
|
1092 |
-
"dev-master": "2.1-dev"
|
1093 |
-
}
|
1094 |
-
},
|
1095 |
-
"installation-source": "dist",
|
1096 |
-
"autoload": {
|
1097 |
-
"classmap": [
|
1098 |
-
"src/"
|
1099 |
-
]
|
1100 |
-
},
|
1101 |
-
"notification-url": "https://packagist.org/downloads/",
|
1102 |
-
"license": [
|
1103 |
-
"BSD-3-Clause"
|
1104 |
-
],
|
1105 |
-
"authors": [
|
1106 |
-
{
|
1107 |
-
"name": "Sebastian Bergmann",
|
1108 |
-
"email": "sebastian@phpunit.de",
|
1109 |
-
"role": "lead"
|
1110 |
-
}
|
1111 |
-
],
|
1112 |
-
"description": "Utility class for timing",
|
1113 |
-
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
1114 |
-
"keywords": [
|
1115 |
-
"timer"
|
1116 |
-
],
|
1117 |
-
"funding": [
|
1118 |
-
{
|
1119 |
-
"url": "https://github.com/sebastianbergmann",
|
1120 |
-
"type": "github"
|
1121 |
-
}
|
1122 |
-
]
|
1123 |
-
},
|
1124 |
-
{
|
1125 |
-
"name": "phpunit/php-token-stream",
|
1126 |
-
"version": "3.1.2",
|
1127 |
-
"version_normalized": "3.1.2.0",
|
1128 |
-
"source": {
|
1129 |
-
"type": "git",
|
1130 |
-
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
1131 |
-
"reference": "472b687829041c24b25f475e14c2f38a09edf1c2"
|
1132 |
-
},
|
1133 |
-
"dist": {
|
1134 |
-
"type": "zip",
|
1135 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2",
|
1136 |
-
"reference": "472b687829041c24b25f475e14c2f38a09edf1c2",
|
1137 |
-
"shasum": ""
|
1138 |
-
},
|
1139 |
-
"require": {
|
1140 |
-
"ext-tokenizer": "*",
|
1141 |
-
"php": ">=7.1"
|
1142 |
-
},
|
1143 |
-
"require-dev": {
|
1144 |
-
"phpunit/phpunit": "^7.0"
|
1145 |
-
},
|
1146 |
-
"time": "2020-11-30T08:38:46+00:00",
|
1147 |
-
"type": "library",
|
1148 |
-
"extra": {
|
1149 |
-
"branch-alias": {
|
1150 |
-
"dev-master": "3.1-dev"
|
1151 |
-
}
|
1152 |
-
},
|
1153 |
-
"installation-source": "dist",
|
1154 |
-
"autoload": {
|
1155 |
-
"classmap": [
|
1156 |
-
"src/"
|
1157 |
-
]
|
1158 |
-
},
|
1159 |
-
"notification-url": "https://packagist.org/downloads/",
|
1160 |
-
"license": [
|
1161 |
-
"BSD-3-Clause"
|
1162 |
-
],
|
1163 |
-
"authors": [
|
1164 |
-
{
|
1165 |
-
"name": "Sebastian Bergmann",
|
1166 |
-
"email": "sebastian@phpunit.de"
|
1167 |
-
}
|
1168 |
-
],
|
1169 |
-
"description": "Wrapper around PHP's tokenizer extension.",
|
1170 |
-
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
1171 |
-
"keywords": [
|
1172 |
-
"tokenizer"
|
1173 |
-
],
|
1174 |
-
"funding": [
|
1175 |
-
{
|
1176 |
-
"url": "https://github.com/sebastianbergmann",
|
1177 |
-
"type": "github"
|
1178 |
-
}
|
1179 |
-
],
|
1180 |
-
"abandoned": true
|
1181 |
-
},
|
1182 |
-
{
|
1183 |
-
"name": "phpunit/phpunit",
|
1184 |
-
"version": "8.5.14",
|
1185 |
-
"version_normalized": "8.5.14.0",
|
1186 |
-
"source": {
|
1187 |
-
"type": "git",
|
1188 |
-
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
1189 |
-
"reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3"
|
1190 |
-
},
|
1191 |
-
"dist": {
|
1192 |
-
"type": "zip",
|
1193 |
-
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c25f79895d27b6ecd5abfa63de1606b786a461a3",
|
1194 |
-
"reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3",
|
1195 |
-
"shasum": ""
|
1196 |
-
},
|
1197 |
-
"require": {
|
1198 |
-
"doctrine/instantiator": "^1.3.1",
|
1199 |
-
"ext-dom": "*",
|
1200 |
-
"ext-json": "*",
|
1201 |
-
"ext-libxml": "*",
|
1202 |
-
"ext-mbstring": "*",
|
1203 |
-
"ext-xml": "*",
|
1204 |
-
"ext-xmlwriter": "*",
|
1205 |
-
"myclabs/deep-copy": "^1.10.0",
|
1206 |
-
"phar-io/manifest": "^2.0.1",
|
1207 |
-
"phar-io/version": "^3.0.2",
|
1208 |
-
"php": ">=7.2",
|
1209 |
-
"phpspec/prophecy": "^1.10.3",
|
1210 |
-
"phpunit/php-code-coverage": "^7.0.12",
|
1211 |
-
"phpunit/php-file-iterator": "^2.0.2",
|
1212 |
-
"phpunit/php-text-template": "^1.2.1",
|
1213 |
-
"phpunit/php-timer": "^2.1.2",
|
1214 |
-
"sebastian/comparator": "^3.0.2",
|
1215 |
-
"sebastian/diff": "^3.0.2",
|
1216 |
-
"sebastian/environment": "^4.2.3",
|
1217 |
-
"sebastian/exporter": "^3.1.2",
|
1218 |
-
"sebastian/global-state": "^3.0.0",
|
1219 |
-
"sebastian/object-enumerator": "^3.0.3",
|
1220 |
-
"sebastian/resource-operations": "^2.0.1",
|
1221 |
-
"sebastian/type": "^1.1.3",
|
1222 |
-
"sebastian/version": "^2.0.1"
|
1223 |
-
},
|
1224 |
-
"require-dev": {
|
1225 |
-
"ext-pdo": "*"
|
1226 |
-
},
|
1227 |
-
"suggest": {
|
1228 |
-
"ext-soap": "*",
|
1229 |
-
"ext-xdebug": "*",
|
1230 |
-
"phpunit/php-invoker": "^2.0.0"
|
1231 |
-
},
|
1232 |
-
"time": "2021-01-17T07:37:30+00:00",
|
1233 |
-
"bin": [
|
1234 |
-
"phpunit"
|
1235 |
-
],
|
1236 |
-
"type": "library",
|
1237 |
-
"extra": {
|
1238 |
-
"branch-alias": {
|
1239 |
-
"dev-master": "8.5-dev"
|
1240 |
-
}
|
1241 |
-
},
|
1242 |
-
"installation-source": "dist",
|
1243 |
-
"autoload": {
|
1244 |
-
"classmap": [
|
1245 |
-
"src/"
|
1246 |
-
]
|
1247 |
-
},
|
1248 |
-
"notification-url": "https://packagist.org/downloads/",
|
1249 |
-
"license": [
|
1250 |
-
"BSD-3-Clause"
|
1251 |
-
],
|
1252 |
-
"authors": [
|
1253 |
-
{
|
1254 |
-
"name": "Sebastian Bergmann",
|
1255 |
-
"email": "sebastian@phpunit.de",
|
1256 |
-
"role": "lead"
|
1257 |
-
}
|
1258 |
-
],
|
1259 |
-
"description": "The PHP Unit Testing framework.",
|
1260 |
-
"homepage": "https://phpunit.de/",
|
1261 |
-
"keywords": [
|
1262 |
-
"phpunit",
|
1263 |
-
"testing",
|
1264 |
-
"xunit"
|
1265 |
-
],
|
1266 |
-
"funding": [
|
1267 |
-
{
|
1268 |
-
"url": "https://phpunit.de/donate.html",
|
1269 |
-
"type": "custom"
|
1270 |
-
},
|
1271 |
-
{
|
1272 |
-
"url": "https://github.com/sebastianbergmann",
|
1273 |
-
"type": "github"
|
1274 |
-
}
|
1275 |
-
]
|
1276 |
-
},
|
1277 |
-
{
|
1278 |
-
"name": "psr/log",
|
1279 |
-
"version": "1.1.3",
|
1280 |
-
"version_normalized": "1.1.3.0",
|
1281 |
-
"source": {
|
1282 |
-
"type": "git",
|
1283 |
-
"url": "https://github.com/php-fig/log.git",
|
1284 |
-
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
1285 |
-
},
|
1286 |
-
"dist": {
|
1287 |
-
"type": "zip",
|
1288 |
-
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
1289 |
-
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
1290 |
-
"shasum": ""
|
1291 |
-
},
|
1292 |
-
"require": {
|
1293 |
-
"php": ">=5.3.0"
|
1294 |
-
},
|
1295 |
-
"time": "2020-03-23T09:12:05+00:00",
|
1296 |
-
"type": "library",
|
1297 |
-
"extra": {
|
1298 |
-
"branch-alias": {
|
1299 |
-
"dev-master": "1.1.x-dev"
|
1300 |
-
}
|
1301 |
-
},
|
1302 |
-
"installation-source": "dist",
|
1303 |
-
"autoload": {
|
1304 |
-
"psr-4": {
|
1305 |
-
"Psr\\Log\\": "Psr/Log/"
|
1306 |
-
}
|
1307 |
-
},
|
1308 |
-
"notification-url": "https://packagist.org/downloads/",
|
1309 |
-
"license": [
|
1310 |
-
"MIT"
|
1311 |
-
],
|
1312 |
-
"authors": [
|
1313 |
-
{
|
1314 |
-
"name": "PHP-FIG",
|
1315 |
-
"homepage": "http://www.php-fig.org/"
|
1316 |
-
}
|
1317 |
-
],
|
1318 |
-
"description": "Common interface for logging libraries",
|
1319 |
-
"homepage": "https://github.com/php-fig/log",
|
1320 |
-
"keywords": [
|
1321 |
-
"log",
|
1322 |
-
"psr",
|
1323 |
-
"psr-3"
|
1324 |
-
]
|
1325 |
-
},
|
1326 |
-
{
|
1327 |
-
"name": "sebastian/code-unit-reverse-lookup",
|
1328 |
-
"version": "1.0.2",
|
1329 |
-
"version_normalized": "1.0.2.0",
|
1330 |
-
"source": {
|
1331 |
-
"type": "git",
|
1332 |
-
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
|
1333 |
-
"reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
|
1334 |
-
},
|
1335 |
-
"dist": {
|
1336 |
-
"type": "zip",
|
1337 |
-
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
|
1338 |
-
"reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
|
1339 |
-
"shasum": ""
|
1340 |
-
},
|
1341 |
-
"require": {
|
1342 |
-
"php": ">=5.6"
|
1343 |
-
},
|
1344 |
-
"require-dev": {
|
1345 |
-
"phpunit/phpunit": "^8.5"
|
1346 |
-
},
|
1347 |
-
"time": "2020-11-30T08:15:22+00:00",
|
1348 |
-
"type": "library",
|
1349 |
-
"extra": {
|
1350 |
-
"branch-alias": {
|
1351 |
-
"dev-master": "1.0.x-dev"
|
1352 |
-
}
|
1353 |
-
},
|
1354 |
-
"installation-source": "dist",
|
1355 |
-
"autoload": {
|
1356 |
-
"classmap": [
|
1357 |
-
"src/"
|
1358 |
-
]
|
1359 |
-
},
|
1360 |
-
"notification-url": "https://packagist.org/downloads/",
|
1361 |
-
"license": [
|
1362 |
-
"BSD-3-Clause"
|
1363 |
-
],
|
1364 |
-
"authors": [
|
1365 |
-
{
|
1366 |
-
"name": "Sebastian Bergmann",
|
1367 |
-
"email": "sebastian@phpunit.de"
|
1368 |
-
}
|
1369 |
-
],
|
1370 |
-
"description": "Looks up which function or method a line of code belongs to",
|
1371 |
-
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
|
1372 |
-
"funding": [
|
1373 |
-
{
|
1374 |
-
"url": "https://github.com/sebastianbergmann",
|
1375 |
-
"type": "github"
|
1376 |
-
}
|
1377 |
-
]
|
1378 |
-
},
|
1379 |
-
{
|
1380 |
-
"name": "sebastian/comparator",
|
1381 |
-
"version": "3.0.3",
|
1382 |
-
"version_normalized": "3.0.3.0",
|
1383 |
-
"source": {
|
1384 |
-
"type": "git",
|
1385 |
-
"url": "https://github.com/sebastianbergmann/comparator.git",
|
1386 |
-
"reference": "1071dfcef776a57013124ff35e1fc41ccd294758"
|
1387 |
-
},
|
1388 |
-
"dist": {
|
1389 |
-
"type": "zip",
|
1390 |
-
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758",
|
1391 |
-
"reference": "1071dfcef776a57013124ff35e1fc41ccd294758",
|
1392 |
-
"shasum": ""
|
1393 |
-
},
|
1394 |
-
"require": {
|
1395 |
-
"php": ">=7.1",
|
1396 |
-
"sebastian/diff": "^3.0",
|
1397 |
-
"sebastian/exporter": "^3.1"
|
1398 |
-
},
|
1399 |
-
"require-dev": {
|
1400 |
-
"phpunit/phpunit": "^8.5"
|
1401 |
-
},
|
1402 |
-
"time": "2020-11-30T08:04:30+00:00",
|
1403 |
-
"type": "library",
|
1404 |
-
"extra": {
|
1405 |
-
"branch-alias": {
|
1406 |
-
"dev-master": "3.0-dev"
|
1407 |
-
}
|
1408 |
-
},
|
1409 |
-
"installation-source": "dist",
|
1410 |
-
"autoload": {
|
1411 |
-
"classmap": [
|
1412 |
-
"src/"
|
1413 |
-
]
|
1414 |
-
},
|
1415 |
-
"notification-url": "https://packagist.org/downloads/",
|
1416 |
-
"license": [
|
1417 |
-
"BSD-3-Clause"
|
1418 |
-
],
|
1419 |
-
"authors": [
|
1420 |
-
{
|
1421 |
-
"name": "Sebastian Bergmann",
|
1422 |
-
"email": "sebastian@phpunit.de"
|
1423 |
-
},
|
1424 |
-
{
|
1425 |
-
"name": "Jeff Welch",
|
1426 |
-
"email": "whatthejeff@gmail.com"
|
1427 |
-
},
|
1428 |
-
{
|
1429 |
-
"name": "Volker Dusch",
|
1430 |
-
"email": "github@wallbash.com"
|
1431 |
-
},
|
1432 |
-
{
|
1433 |
-
"name": "Bernhard Schussek",
|
1434 |
-
"email": "bschussek@2bepublished.at"
|
1435 |
-
}
|
1436 |
-
],
|
1437 |
-
"description": "Provides the functionality to compare PHP values for equality",
|
1438 |
-
"homepage": "https://github.com/sebastianbergmann/comparator",
|
1439 |
-
"keywords": [
|
1440 |
-
"comparator",
|
1441 |
-
"compare",
|
1442 |
-
"equality"
|
1443 |
-
],
|
1444 |
-
"funding": [
|
1445 |
-
{
|
1446 |
-
"url": "https://github.com/sebastianbergmann",
|
1447 |
-
"type": "github"
|
1448 |
-
}
|
1449 |
-
]
|
1450 |
-
},
|
1451 |
-
{
|
1452 |
-
"name": "sebastian/diff",
|
1453 |
-
"version": "3.0.3",
|
1454 |
-
"version_normalized": "3.0.3.0",
|
1455 |
-
"source": {
|
1456 |
-
"type": "git",
|
1457 |
-
"url": "https://github.com/sebastianbergmann/diff.git",
|
1458 |
-
"reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211"
|
1459 |
-
},
|
1460 |
-
"dist": {
|
1461 |
-
"type": "zip",
|
1462 |
-
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
|
1463 |
-
"reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
|
1464 |
-
"shasum": ""
|
1465 |
-
},
|
1466 |
-
"require": {
|
1467 |
-
"php": ">=7.1"
|
1468 |
-
},
|
1469 |
-
"require-dev": {
|
1470 |
-
"phpunit/phpunit": "^7.5 || ^8.0",
|
1471 |
-
"symfony/process": "^2 || ^3.3 || ^4"
|
1472 |
-
},
|
1473 |
-
"time": "2020-11-30T07:59:04+00:00",
|
1474 |
-
"type": "library",
|
1475 |
-
"extra": {
|
1476 |
-
"branch-alias": {
|
1477 |
-
"dev-master": "3.0-dev"
|
1478 |
-
}
|
1479 |
-
},
|
1480 |
-
"installation-source": "dist",
|
1481 |
-
"autoload": {
|
1482 |
-
"classmap": [
|
1483 |
-
"src/"
|
1484 |
-
]
|
1485 |
-
},
|
1486 |
-
"notification-url": "https://packagist.org/downloads/",
|
1487 |
-
"license": [
|
1488 |
-
"BSD-3-Clause"
|
1489 |
-
],
|
1490 |
-
"authors": [
|
1491 |
-
{
|
1492 |
-
"name": "Sebastian Bergmann",
|
1493 |
-
"email": "sebastian@phpunit.de"
|
1494 |
-
},
|
1495 |
-
{
|
1496 |
-
"name": "Kore Nordmann",
|
1497 |
-
"email": "mail@kore-nordmann.de"
|
1498 |
-
}
|
1499 |
-
],
|
1500 |
-
"description": "Diff implementation",
|
1501 |
-
"homepage": "https://github.com/sebastianbergmann/diff",
|
1502 |
-
"keywords": [
|
1503 |
-
"diff",
|
1504 |
-
"udiff",
|
1505 |
-
"unidiff",
|
1506 |
-
"unified diff"
|
1507 |
-
],
|
1508 |
-
"funding": [
|
1509 |
-
{
|
1510 |
-
"url": "https://github.com/sebastianbergmann",
|
1511 |
-
"type": "github"
|
1512 |
-
}
|
1513 |
-
]
|
1514 |
-
},
|
1515 |
-
{
|
1516 |
-
"name": "sebastian/environment",
|
1517 |
-
"version": "4.2.4",
|
1518 |
-
"version_normalized": "4.2.4.0",
|
1519 |
-
"source": {
|
1520 |
-
"type": "git",
|
1521 |
-
"url": "https://github.com/sebastianbergmann/environment.git",
|
1522 |
-
"reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0"
|
1523 |
-
},
|
1524 |
-
"dist": {
|
1525 |
-
"type": "zip",
|
1526 |
-
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
|
1527 |
-
"reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
|
1528 |
-
"shasum": ""
|
1529 |
-
},
|
1530 |
-
"require": {
|
1531 |
-
"php": ">=7.1"
|
1532 |
-
},
|
1533 |
-
"require-dev": {
|
1534 |
-
"phpunit/phpunit": "^7.5"
|
1535 |
-
},
|
1536 |
-
"suggest": {
|
1537 |
-
"ext-posix": "*"
|
1538 |
-
},
|
1539 |
-
"time": "2020-11-30T07:53:42+00:00",
|
1540 |
-
"type": "library",
|
1541 |
-
"extra": {
|
1542 |
-
"branch-alias": {
|
1543 |
-
"dev-master": "4.2-dev"
|
1544 |
-
}
|
1545 |
-
},
|
1546 |
-
"installation-source": "dist",
|
1547 |
-
"autoload": {
|
1548 |
-
"classmap": [
|
1549 |
-
"src/"
|
1550 |
-
]
|
1551 |
-
},
|
1552 |
-
"notification-url": "https://packagist.org/downloads/",
|
1553 |
-
"license": [
|
1554 |
-
"BSD-3-Clause"
|
1555 |
-
],
|
1556 |
-
"authors": [
|
1557 |
-
{
|
1558 |
-
"name": "Sebastian Bergmann",
|
1559 |
-
"email": "sebastian@phpunit.de"
|
1560 |
-
}
|
1561 |
-
],
|
1562 |
-
"description": "Provides functionality to handle HHVM/PHP environments",
|
1563 |
-
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
1564 |
-
"keywords": [
|
1565 |
-
"Xdebug",
|
1566 |
-
"environment",
|
1567 |
-
"hhvm"
|
1568 |
-
],
|
1569 |
-
"funding": [
|
1570 |
-
{
|
1571 |
-
"url": "https://github.com/sebastianbergmann",
|
1572 |
-
"type": "github"
|
1573 |
-
}
|
1574 |
-
]
|
1575 |
-
},
|
1576 |
-
{
|
1577 |
-
"name": "sebastian/exporter",
|
1578 |
-
"version": "3.1.3",
|
1579 |
-
"version_normalized": "3.1.3.0",
|
1580 |
-
"source": {
|
1581 |
-
"type": "git",
|
1582 |
-
"url": "https://github.com/sebastianbergmann/exporter.git",
|
1583 |
-
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e"
|
1584 |
-
},
|
1585 |
-
"dist": {
|
1586 |
-
"type": "zip",
|
1587 |
-
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e",
|
1588 |
-
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e",
|
1589 |
-
"shasum": ""
|
1590 |
-
},
|
1591 |
-
"require": {
|
1592 |
-
"php": ">=7.0",
|
1593 |
-
"sebastian/recursion-context": "^3.0"
|
1594 |
-
},
|
1595 |
-
"require-dev": {
|
1596 |
-
"ext-mbstring": "*",
|
1597 |
-
"phpunit/phpunit": "^6.0"
|
1598 |
-
},
|
1599 |
-
"time": "2020-11-30T07:47:53+00:00",
|
1600 |
-
"type": "library",
|
1601 |
-
"extra": {
|
1602 |
-
"branch-alias": {
|
1603 |
-
"dev-master": "3.1.x-dev"
|
1604 |
-
}
|
1605 |
-
},
|
1606 |
-
"installation-source": "dist",
|
1607 |
-
"autoload": {
|
1608 |
-
"classmap": [
|
1609 |
-
"src/"
|
1610 |
-
]
|
1611 |
-
},
|
1612 |
-
"notification-url": "https://packagist.org/downloads/",
|
1613 |
-
"license": [
|
1614 |
-
"BSD-3-Clause"
|
1615 |
-
],
|
1616 |
-
"authors": [
|
1617 |
-
{
|
1618 |
-
"name": "Sebastian Bergmann",
|
1619 |
-
"email": "sebastian@phpunit.de"
|
1620 |
-
},
|
1621 |
-
{
|
1622 |
-
"name": "Jeff Welch",
|
1623 |
-
"email": "whatthejeff@gmail.com"
|
1624 |
-
},
|
1625 |
-
{
|
1626 |
-
"name": "Volker Dusch",
|
1627 |
-
"email": "github@wallbash.com"
|
1628 |
-
},
|
1629 |
-
{
|
1630 |
-
"name": "Adam Harvey",
|
1631 |
-
"email": "aharvey@php.net"
|
1632 |
-
},
|
1633 |
-
{
|
1634 |
-
"name": "Bernhard Schussek",
|
1635 |
-
"email": "bschussek@gmail.com"
|
1636 |
-
}
|
1637 |
-
],
|
1638 |
-
"description": "Provides the functionality to export PHP variables for visualization",
|
1639 |
-
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
1640 |
-
"keywords": [
|
1641 |
-
"export",
|
1642 |
-
"exporter"
|
1643 |
-
],
|
1644 |
-
"funding": [
|
1645 |
-
{
|
1646 |
-
"url": "https://github.com/sebastianbergmann",
|
1647 |
-
"type": "github"
|
1648 |
-
}
|
1649 |
-
]
|
1650 |
-
},
|
1651 |
-
{
|
1652 |
-
"name": "sebastian/global-state",
|
1653 |
-
"version": "3.0.1",
|
1654 |
-
"version_normalized": "3.0.1.0",
|
1655 |
-
"source": {
|
1656 |
-
"type": "git",
|
1657 |
-
"url": "https://github.com/sebastianbergmann/global-state.git",
|
1658 |
-
"reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b"
|
1659 |
-
},
|
1660 |
-
"dist": {
|
1661 |
-
"type": "zip",
|
1662 |
-
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b",
|
1663 |
-
"reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b",
|
1664 |
-
"shasum": ""
|
1665 |
-
},
|
1666 |
-
"require": {
|
1667 |
-
"php": ">=7.2",
|
1668 |
-
"sebastian/object-reflector": "^1.1.1",
|
1669 |
-
"sebastian/recursion-context": "^3.0"
|
1670 |
-
},
|
1671 |
-
"require-dev": {
|
1672 |
-
"ext-dom": "*",
|
1673 |
-
"phpunit/phpunit": "^8.0"
|
1674 |
-
},
|
1675 |
-
"suggest": {
|
1676 |
-
"ext-uopz": "*"
|
1677 |
-
},
|
1678 |
-
"time": "2020-11-30T07:43:24+00:00",
|
1679 |
-
"type": "library",
|
1680 |
-
"extra": {
|
1681 |
-
"branch-alias": {
|
1682 |
-
"dev-master": "3.0-dev"
|
1683 |
-
}
|
1684 |
-
},
|
1685 |
-
"installation-source": "dist",
|
1686 |
-
"autoload": {
|
1687 |
-
"classmap": [
|
1688 |
-
"src/"
|
1689 |
-
]
|
1690 |
-
},
|
1691 |
-
"notification-url": "https://packagist.org/downloads/",
|
1692 |
-
"license": [
|
1693 |
-
"BSD-3-Clause"
|
1694 |
-
],
|
1695 |
-
"authors": [
|
1696 |
-
{
|
1697 |
-
"name": "Sebastian Bergmann",
|
1698 |
-
"email": "sebastian@phpunit.de"
|
1699 |
-
}
|
1700 |
-
],
|
1701 |
-
"description": "Snapshotting of global state",
|
1702 |
-
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
1703 |
-
"keywords": [
|
1704 |
-
"global state"
|
1705 |
-
],
|
1706 |
-
"funding": [
|
1707 |
-
{
|
1708 |
-
"url": "https://github.com/sebastianbergmann",
|
1709 |
-
"type": "github"
|
1710 |
-
}
|
1711 |
-
]
|
1712 |
-
},
|
1713 |
-
{
|
1714 |
-
"name": "sebastian/object-enumerator",
|
1715 |
-
"version": "3.0.4",
|
1716 |
-
"version_normalized": "3.0.4.0",
|
1717 |
-
"source": {
|
1718 |
-
"type": "git",
|
1719 |
-
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
|
1720 |
-
"reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
|
1721 |
-
},
|
1722 |
-
"dist": {
|
1723 |
-
"type": "zip",
|
1724 |
-
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
|
1725 |
-
"reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
|
1726 |
-
"shasum": ""
|
1727 |
-
},
|
1728 |
-
"require": {
|
1729 |
-
"php": ">=7.0",
|
1730 |
-
"sebastian/object-reflector": "^1.1.1",
|
1731 |
-
"sebastian/recursion-context": "^3.0"
|
1732 |
-
},
|
1733 |
-
"require-dev": {
|
1734 |
-
"phpunit/phpunit": "^6.0"
|
1735 |
-
},
|
1736 |
-
"time": "2020-11-30T07:40:27+00:00",
|
1737 |
-
"type": "library",
|
1738 |
-
"extra": {
|
1739 |
-
"branch-alias": {
|
1740 |
-
"dev-master": "3.0.x-dev"
|
1741 |
-
}
|
1742 |
-
},
|
1743 |
-
"installation-source": "dist",
|
1744 |
-
"autoload": {
|
1745 |
-
"classmap": [
|
1746 |
-
"src/"
|
1747 |
-
]
|
1748 |
-
},
|
1749 |
-
"notification-url": "https://packagist.org/downloads/",
|
1750 |
-
"license": [
|
1751 |
-
"BSD-3-Clause"
|
1752 |
-
],
|
1753 |
-
"authors": [
|
1754 |
-
{
|
1755 |
-
"name": "Sebastian Bergmann",
|
1756 |
-
"email": "sebastian@phpunit.de"
|
1757 |
-
}
|
1758 |
-
],
|
1759 |
-
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
|
1760 |
-
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
|
1761 |
-
"funding": [
|
1762 |
-
{
|
1763 |
-
"url": "https://github.com/sebastianbergmann",
|
1764 |
-
"type": "github"
|
1765 |
-
}
|
1766 |
-
]
|
1767 |
-
},
|
1768 |
-
{
|
1769 |
-
"name": "sebastian/object-reflector",
|
1770 |
-
"version": "1.1.2",
|
1771 |
-
"version_normalized": "1.1.2.0",
|
1772 |
-
"source": {
|
1773 |
-
"type": "git",
|
1774 |
-
"url": "https://github.com/sebastianbergmann/object-reflector.git",
|
1775 |
-
"reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
|
1776 |
-
},
|
1777 |
-
"dist": {
|
1778 |
-
"type": "zip",
|
1779 |
-
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
|
1780 |
-
"reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
|
1781 |
-
"shasum": ""
|
1782 |
-
},
|
1783 |
-
"require": {
|
1784 |
-
"php": ">=7.0"
|
1785 |
-
},
|
1786 |
-
"require-dev": {
|
1787 |
-
"phpunit/phpunit": "^6.0"
|
1788 |
-
},
|
1789 |
-
"time": "2020-11-30T07:37:18+00:00",
|
1790 |
-
"type": "library",
|
1791 |
-
"extra": {
|
1792 |
-
"branch-alias": {
|
1793 |
-
"dev-master": "1.1-dev"
|
1794 |
-
}
|
1795 |
-
},
|
1796 |
-
"installation-source": "dist",
|
1797 |
-
"autoload": {
|
1798 |
-
"classmap": [
|
1799 |
-
"src/"
|
1800 |
-
]
|
1801 |
-
},
|
1802 |
-
"notification-url": "https://packagist.org/downloads/",
|
1803 |
-
"license": [
|
1804 |
-
"BSD-3-Clause"
|
1805 |
-
],
|
1806 |
-
"authors": [
|
1807 |
-
{
|
1808 |
-
"name": "Sebastian Bergmann",
|
1809 |
-
"email": "sebastian@phpunit.de"
|
1810 |
-
}
|
1811 |
-
],
|
1812 |
-
"description": "Allows reflection of object attributes, including inherited and non-public ones",
|
1813 |
-
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
|
1814 |
-
"funding": [
|
1815 |
-
{
|
1816 |
-
"url": "https://github.com/sebastianbergmann",
|
1817 |
-
"type": "github"
|
1818 |
-
}
|
1819 |
-
]
|
1820 |
-
},
|
1821 |
-
{
|
1822 |
-
"name": "sebastian/recursion-context",
|
1823 |
-
"version": "3.0.1",
|
1824 |
-
"version_normalized": "3.0.1.0",
|
1825 |
-
"source": {
|
1826 |
-
"type": "git",
|
1827 |
-
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
1828 |
-
"reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
|
1829 |
-
},
|
1830 |
-
"dist": {
|
1831 |
-
"type": "zip",
|
1832 |
-
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb",
|
1833 |
-
"reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
|
1834 |
-
"shasum": ""
|
1835 |
-
},
|
1836 |
-
"require": {
|
1837 |
-
"php": ">=7.0"
|
1838 |
-
},
|
1839 |
-
"require-dev": {
|
1840 |
-
"phpunit/phpunit": "^6.0"
|
1841 |
-
},
|
1842 |
-
"time": "2020-11-30T07:34:24+00:00",
|
1843 |
-
"type": "library",
|
1844 |
-
"extra": {
|
1845 |
-
"branch-alias": {
|
1846 |
-
"dev-master": "3.0.x-dev"
|
1847 |
-
}
|
1848 |
-
},
|
1849 |
-
"installation-source": "dist",
|
1850 |
-
"autoload": {
|
1851 |
-
"classmap": [
|
1852 |
-
"src/"
|
1853 |
-
]
|
1854 |
-
},
|
1855 |
-
"notification-url": "https://packagist.org/downloads/",
|
1856 |
-
"license": [
|
1857 |
-
"BSD-3-Clause"
|
1858 |
-
],
|
1859 |
-
"authors": [
|
1860 |
-
{
|
1861 |
-
"name": "Sebastian Bergmann",
|
1862 |
-
"email": "sebastian@phpunit.de"
|
1863 |
-
},
|
1864 |
-
{
|
1865 |
-
"name": "Jeff Welch",
|
1866 |
-
"email": "whatthejeff@gmail.com"
|
1867 |
-
},
|
1868 |
-
{
|
1869 |
-
"name": "Adam Harvey",
|
1870 |
-
"email": "aharvey@php.net"
|
1871 |
-
}
|
1872 |
-
],
|
1873 |
-
"description": "Provides functionality to recursively process PHP variables",
|
1874 |
-
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
1875 |
-
"funding": [
|
1876 |
-
{
|
1877 |
-
"url": "https://github.com/sebastianbergmann",
|
1878 |
-
"type": "github"
|
1879 |
-
}
|
1880 |
-
]
|
1881 |
-
},
|
1882 |
-
{
|
1883 |
-
"name": "sebastian/resource-operations",
|
1884 |
-
"version": "2.0.2",
|
1885 |
-
"version_normalized": "2.0.2.0",
|
1886 |
-
"source": {
|
1887 |
-
"type": "git",
|
1888 |
-
"url": "https://github.com/sebastianbergmann/resource-operations.git",
|
1889 |
-
"reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3"
|
1890 |
-
},
|
1891 |
-
"dist": {
|
1892 |
-
"type": "zip",
|
1893 |
-
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3",
|
1894 |
-
"reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3",
|
1895 |
-
"shasum": ""
|
1896 |
-
},
|
1897 |
-
"require": {
|
1898 |
-
"php": ">=7.1"
|
1899 |
-
},
|
1900 |
-
"time": "2020-11-30T07:30:19+00:00",
|
1901 |
-
"type": "library",
|
1902 |
-
"extra": {
|
1903 |
-
"branch-alias": {
|
1904 |
-
"dev-master": "2.0-dev"
|
1905 |
-
}
|
1906 |
-
},
|
1907 |
-
"installation-source": "dist",
|
1908 |
-
"autoload": {
|
1909 |
-
"classmap": [
|
1910 |
-
"src/"
|
1911 |
-
]
|
1912 |
-
},
|
1913 |
-
"notification-url": "https://packagist.org/downloads/",
|
1914 |
-
"license": [
|
1915 |
-
"BSD-3-Clause"
|
1916 |
-
],
|
1917 |
-
"authors": [
|
1918 |
-
{
|
1919 |
-
"name": "Sebastian Bergmann",
|
1920 |
-
"email": "sebastian@phpunit.de"
|
1921 |
-
}
|
1922 |
-
],
|
1923 |
-
"description": "Provides a list of PHP built-in functions that operate on resources",
|
1924 |
-
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
|
1925 |
-
"funding": [
|
1926 |
-
{
|
1927 |
-
"url": "https://github.com/sebastianbergmann",
|
1928 |
-
"type": "github"
|
1929 |
-
}
|
1930 |
-
]
|
1931 |
-
},
|
1932 |
-
{
|
1933 |
-
"name": "sebastian/type",
|
1934 |
-
"version": "1.1.4",
|
1935 |
-
"version_normalized": "1.1.4.0",
|
1936 |
-
"source": {
|
1937 |
-
"type": "git",
|
1938 |
-
"url": "https://github.com/sebastianbergmann/type.git",
|
1939 |
-
"reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4"
|
1940 |
-
},
|
1941 |
-
"dist": {
|
1942 |
-
"type": "zip",
|
1943 |
-
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4",
|
1944 |
-
"reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4",
|
1945 |
-
"shasum": ""
|
1946 |
-
},
|
1947 |
-
"require": {
|
1948 |
-
"php": ">=7.2"
|
1949 |
-
},
|
1950 |
-
"require-dev": {
|
1951 |
-
"phpunit/phpunit": "^8.2"
|
1952 |
-
},
|
1953 |
-
"time": "2020-11-30T07:25:11+00:00",
|
1954 |
-
"type": "library",
|
1955 |
-
"extra": {
|
1956 |
-
"branch-alias": {
|
1957 |
-
"dev-master": "1.1-dev"
|
1958 |
-
}
|
1959 |
-
},
|
1960 |
-
"installation-source": "dist",
|
1961 |
-
"autoload": {
|
1962 |
-
"classmap": [
|
1963 |
-
"src/"
|
1964 |
-
]
|
1965 |
-
},
|
1966 |
-
"notification-url": "https://packagist.org/downloads/",
|
1967 |
-
"license": [
|
1968 |
-
"BSD-3-Clause"
|
1969 |
-
],
|
1970 |
-
"authors": [
|
1971 |
-
{
|
1972 |
-
"name": "Sebastian Bergmann",
|
1973 |
-
"email": "sebastian@phpunit.de",
|
1974 |
-
"role": "lead"
|
1975 |
-
}
|
1976 |
-
],
|
1977 |
-
"description": "Collection of value objects that represent the types of the PHP type system",
|
1978 |
-
"homepage": "https://github.com/sebastianbergmann/type",
|
1979 |
-
"funding": [
|
1980 |
-
{
|
1981 |
-
"url": "https://github.com/sebastianbergmann",
|
1982 |
-
"type": "github"
|
1983 |
-
}
|
1984 |
-
]
|
1985 |
-
},
|
1986 |
-
{
|
1987 |
-
"name": "sebastian/version",
|
1988 |
-
"version": "2.0.1",
|
1989 |
-
"version_normalized": "2.0.1.0",
|
1990 |
"source": {
|
1991 |
"type": "git",
|
1992 |
-
"url": "https://github.com/
|
1993 |
-
"reference": "
|
1994 |
},
|
1995 |
"dist": {
|
1996 |
"type": "zip",
|
1997 |
-
"url": "https://api.github.com/repos/
|
1998 |
-
"reference": "
|
1999 |
"shasum": ""
|
2000 |
},
|
2001 |
"require": {
|
2002 |
-
"php": ">=5.
|
2003 |
},
|
2004 |
-
"time": "
|
2005 |
"type": "library",
|
2006 |
"extra": {
|
2007 |
"branch-alias": {
|
2008 |
-
"dev-master": "
|
2009 |
}
|
2010 |
},
|
2011 |
"installation-source": "dist",
|
2012 |
"autoload": {
|
2013 |
-
"
|
2014 |
-
"
|
2015 |
-
]
|
2016 |
-
},
|
2017 |
-
"notification-url": "https://packagist.org/downloads/",
|
2018 |
-
"license": [
|
2019 |
-
"BSD-3-Clause"
|
2020 |
-
],
|
2021 |
-
"authors": [
|
2022 |
-
{
|
2023 |
-
"name": "Sebastian Bergmann",
|
2024 |
-
"email": "sebastian@phpunit.de",
|
2025 |
-
"role": "lead"
|
2026 |
-
}
|
2027 |
-
],
|
2028 |
-
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
2029 |
-
"homepage": "https://github.com/sebastianbergmann/version"
|
2030 |
-
},
|
2031 |
-
{
|
2032 |
-
"name": "simplyadmire/composer-plugins",
|
2033 |
-
"version": "dev-master",
|
2034 |
-
"version_normalized": "9999999-dev",
|
2035 |
-
"source": {
|
2036 |
-
"type": "git",
|
2037 |
-
"url": "https://github.com/SimplyAdmire/ComposerPlugins.git",
|
2038 |
-
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19"
|
2039 |
-
},
|
2040 |
-
"dist": {
|
2041 |
-
"type": "zip",
|
2042 |
-
"url": "https://api.github.com/repos/SimplyAdmire/ComposerPlugins/zipball/d8380f670694c1c2330b22591ca74adc82cffe19",
|
2043 |
-
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19",
|
2044 |
-
"shasum": ""
|
2045 |
-
},
|
2046 |
-
"require": {
|
2047 |
-
"composer-plugin-api": "^1.0",
|
2048 |
-
"squizlabs/php_codesniffer": "*"
|
2049 |
-
},
|
2050 |
-
"time": "2016-05-12T11:58:38+00:00",
|
2051 |
-
"type": "composer-plugin",
|
2052 |
-
"extra": {
|
2053 |
-
"class": [
|
2054 |
-
"SimplyAdmire\\ComposerPlugins\\PhpCodesnifferStandardInstallerPlugin"
|
2055 |
-
]
|
2056 |
-
},
|
2057 |
-
"installation-source": "source",
|
2058 |
-
"autoload": {
|
2059 |
-
"psr-0": {
|
2060 |
-
"SimplyAdmire\\ComposerPlugins": ""
|
2061 |
-
}
|
2062 |
-
},
|
2063 |
-
"notification-url": "https://packagist.org/downloads/",
|
2064 |
-
"license": [
|
2065 |
-
"LGPL-3.0+"
|
2066 |
-
],
|
2067 |
-
"authors": [
|
2068 |
-
{
|
2069 |
-
"name": "Rens Admiraal",
|
2070 |
-
"email": "rens@simplyadmire.com",
|
2071 |
-
"role": "lead"
|
2072 |
-
}
|
2073 |
-
],
|
2074 |
-
"description": "Composer plugin for installing PHP_CodeSniffer standards",
|
2075 |
-
"keywords": [
|
2076 |
-
"PHP_CodeSniffer",
|
2077 |
-
"TYPO3 CMS",
|
2078 |
-
"TYPO3 Flow",
|
2079 |
-
"TYPO3 Neos",
|
2080 |
-
"phpcs",
|
2081 |
-
"standards",
|
2082 |
-
"typo3"
|
2083 |
-
],
|
2084 |
-
"abandoned": true
|
2085 |
-
},
|
2086 |
-
{
|
2087 |
-
"name": "squizlabs/php_codesniffer",
|
2088 |
-
"version": "2.9.2",
|
2089 |
-
"version_normalized": "2.9.2.0",
|
2090 |
-
"source": {
|
2091 |
-
"type": "git",
|
2092 |
-
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
2093 |
-
"reference": "2acf168de78487db620ab4bc524135a13cfe6745"
|
2094 |
-
},
|
2095 |
-
"dist": {
|
2096 |
-
"type": "zip",
|
2097 |
-
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745",
|
2098 |
-
"reference": "2acf168de78487db620ab4bc524135a13cfe6745",
|
2099 |
-
"shasum": ""
|
2100 |
-
},
|
2101 |
-
"require": {
|
2102 |
-
"ext-simplexml": "*",
|
2103 |
-
"ext-tokenizer": "*",
|
2104 |
-
"ext-xmlwriter": "*",
|
2105 |
-
"php": ">=5.1.2"
|
2106 |
-
},
|
2107 |
-
"require-dev": {
|
2108 |
-
"phpunit/phpunit": "~4.0"
|
2109 |
-
},
|
2110 |
-
"time": "2018-11-07T22:31:41+00:00",
|
2111 |
-
"bin": [
|
2112 |
-
"scripts/phpcs",
|
2113 |
-
"scripts/phpcbf"
|
2114 |
-
],
|
2115 |
-
"type": "library",
|
2116 |
-
"extra": {
|
2117 |
-
"branch-alias": {
|
2118 |
-
"dev-master": "2.x-dev"
|
2119 |
}
|
2120 |
},
|
2121 |
-
"installation-source": "dist",
|
2122 |
-
"autoload": {
|
2123 |
-
"classmap": [
|
2124 |
-
"CodeSniffer.php",
|
2125 |
-
"CodeSniffer/CLI.php",
|
2126 |
-
"CodeSniffer/Exception.php",
|
2127 |
-
"CodeSniffer/File.php",
|
2128 |
-
"CodeSniffer/Fixer.php",
|
2129 |
-
"CodeSniffer/Report.php",
|
2130 |
-
"CodeSniffer/Reporting.php",
|
2131 |
-
"CodeSniffer/Sniff.php",
|
2132 |
-
"CodeSniffer/Tokens.php",
|
2133 |
-
"CodeSniffer/Reports/",
|
2134 |
-
"CodeSniffer/Tokenizers/",
|
2135 |
-
"CodeSniffer/DocGenerators/",
|
2136 |
-
"CodeSniffer/Standards/AbstractPatternSniff.php",
|
2137 |
-
"CodeSniffer/Standards/AbstractScopeSniff.php",
|
2138 |
-
"CodeSniffer/Standards/AbstractVariableSniff.php",
|
2139 |
-
"CodeSniffer/Standards/IncorrectPatternException.php",
|
2140 |
-
"CodeSniffer/Standards/Generic/Sniffs/",
|
2141 |
-
"CodeSniffer/Standards/MySource/Sniffs/",
|
2142 |
-
"CodeSniffer/Standards/PEAR/Sniffs/",
|
2143 |
-
"CodeSniffer/Standards/PSR1/Sniffs/",
|
2144 |
-
"CodeSniffer/Standards/PSR2/Sniffs/",
|
2145 |
-
"CodeSniffer/Standards/Squiz/Sniffs/",
|
2146 |
-
"CodeSniffer/Standards/Zend/Sniffs/"
|
2147 |
-
]
|
2148 |
-
},
|
2149 |
"notification-url": "https://packagist.org/downloads/",
|
2150 |
"license": [
|
2151 |
-
"
|
2152 |
],
|
2153 |
"authors": [
|
2154 |
{
|
2155 |
-
"name": "
|
2156 |
-
"
|
2157 |
}
|
2158 |
],
|
2159 |
-
"description": "
|
2160 |
-
"homepage": "
|
2161 |
"keywords": [
|
2162 |
-
"
|
2163 |
-
"
|
|
|
2164 |
]
|
2165 |
},
|
2166 |
{
|
@@ -2292,104 +261,5 @@
|
|
2292 |
],
|
2293 |
"description": "Symfony Yaml Component",
|
2294 |
"homepage": "https://symfony.com"
|
2295 |
-
},
|
2296 |
-
{
|
2297 |
-
"name": "theseer/tokenizer",
|
2298 |
-
"version": "1.2.0",
|
2299 |
-
"version_normalized": "1.2.0.0",
|
2300 |
-
"source": {
|
2301 |
-
"type": "git",
|
2302 |
-
"url": "https://github.com/theseer/tokenizer.git",
|
2303 |
-
"reference": "75a63c33a8577608444246075ea0af0d052e452a"
|
2304 |
-
},
|
2305 |
-
"dist": {
|
2306 |
-
"type": "zip",
|
2307 |
-
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
|
2308 |
-
"reference": "75a63c33a8577608444246075ea0af0d052e452a",
|
2309 |
-
"shasum": ""
|
2310 |
-
},
|
2311 |
-
"require": {
|
2312 |
-
"ext-dom": "*",
|
2313 |
-
"ext-tokenizer": "*",
|
2314 |
-
"ext-xmlwriter": "*",
|
2315 |
-
"php": "^7.2 || ^8.0"
|
2316 |
-
},
|
2317 |
-
"time": "2020-07-12T23:59:07+00:00",
|
2318 |
-
"type": "library",
|
2319 |
-
"installation-source": "dist",
|
2320 |
-
"autoload": {
|
2321 |
-
"classmap": [
|
2322 |
-
"src/"
|
2323 |
-
]
|
2324 |
-
},
|
2325 |
-
"notification-url": "https://packagist.org/downloads/",
|
2326 |
-
"license": [
|
2327 |
-
"BSD-3-Clause"
|
2328 |
-
],
|
2329 |
-
"authors": [
|
2330 |
-
{
|
2331 |
-
"name": "Arne Blankerts",
|
2332 |
-
"email": "arne@blankerts.de",
|
2333 |
-
"role": "Developer"
|
2334 |
-
}
|
2335 |
-
],
|
2336 |
-
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
2337 |
-
"funding": [
|
2338 |
-
{
|
2339 |
-
"url": "https://github.com/theseer",
|
2340 |
-
"type": "github"
|
2341 |
-
}
|
2342 |
-
]
|
2343 |
-
},
|
2344 |
-
{
|
2345 |
-
"name": "webmozart/assert",
|
2346 |
-
"version": "1.9.1",
|
2347 |
-
"version_normalized": "1.9.1.0",
|
2348 |
-
"source": {
|
2349 |
-
"type": "git",
|
2350 |
-
"url": "https://github.com/webmozarts/assert.git",
|
2351 |
-
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
|
2352 |
-
},
|
2353 |
-
"dist": {
|
2354 |
-
"type": "zip",
|
2355 |
-
"url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
|
2356 |
-
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
|
2357 |
-
"shasum": ""
|
2358 |
-
},
|
2359 |
-
"require": {
|
2360 |
-
"php": "^5.3.3 || ^7.0 || ^8.0",
|
2361 |
-
"symfony/polyfill-ctype": "^1.8"
|
2362 |
-
},
|
2363 |
-
"conflict": {
|
2364 |
-
"phpstan/phpstan": "<0.12.20",
|
2365 |
-
"vimeo/psalm": "<3.9.1"
|
2366 |
-
},
|
2367 |
-
"require-dev": {
|
2368 |
-
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
2369 |
-
},
|
2370 |
-
"time": "2020-07-08T17:02:28+00:00",
|
2371 |
-
"type": "library",
|
2372 |
-
"installation-source": "dist",
|
2373 |
-
"autoload": {
|
2374 |
-
"psr-4": {
|
2375 |
-
"Webmozart\\Assert\\": "src/"
|
2376 |
-
}
|
2377 |
-
},
|
2378 |
-
"notification-url": "https://packagist.org/downloads/",
|
2379 |
-
"license": [
|
2380 |
-
"MIT"
|
2381 |
-
],
|
2382 |
-
"authors": [
|
2383 |
-
{
|
2384 |
-
"name": "Bernhard Schussek",
|
2385 |
-
"email": "bschussek@gmail.com"
|
2386 |
-
}
|
2387 |
-
],
|
2388 |
-
"description": "Assertions to validate method input/output with nice error messages.",
|
2389 |
-
"keywords": [
|
2390 |
-
"assert",
|
2391 |
-
"check",
|
2392 |
-
"validate"
|
2393 |
-
]
|
2394 |
}
|
2395 |
]
|
84 |
"description": "A PHP backend for Cloudflare plugins."
|
85 |
},
|
86 |
{
|
87 |
+
"name": "psr/log",
|
88 |
+
"version": "1.1.3",
|
89 |
+
"version_normalized": "1.1.3.0",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
"source": {
|
91 |
"type": "git",
|
92 |
+
"url": "https://github.com/php-fig/log.git",
|
93 |
+
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
94 |
},
|
95 |
"dist": {
|
96 |
"type": "zip",
|
97 |
+
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
98 |
+
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
99 |
"shasum": ""
|
100 |
},
|
101 |
"require": {
|
102 |
+
"php": ">=5.3.0"
|
103 |
},
|
104 |
+
"time": "2020-03-23T09:12:05+00:00",
|
105 |
"type": "library",
|
106 |
"extra": {
|
107 |
"branch-alias": {
|
108 |
+
"dev-master": "1.1.x-dev"
|
109 |
}
|
110 |
},
|
111 |
"installation-source": "dist",
|
112 |
"autoload": {
|
113 |
+
"psr-4": {
|
114 |
+
"Psr\\Log\\": "Psr/Log/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
"notification-url": "https://packagist.org/downloads/",
|
118 |
"license": [
|
119 |
+
"MIT"
|
120 |
],
|
121 |
"authors": [
|
122 |
{
|
123 |
+
"name": "PHP-FIG",
|
124 |
+
"homepage": "http://www.php-fig.org/"
|
125 |
}
|
126 |
],
|
127 |
+
"description": "Common interface for logging libraries",
|
128 |
+
"homepage": "https://github.com/php-fig/log",
|
129 |
"keywords": [
|
130 |
+
"log",
|
131 |
+
"psr",
|
132 |
+
"psr-3"
|
133 |
]
|
134 |
},
|
135 |
{
|
261 |
],
|
262 |
"description": "Symfony Yaml Component",
|
263 |
"homepage": "https://symfony.com"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
}
|
265 |
]
|
vendor/dealerdirect/phpcodesniffer-composer-installer/.remarkrc
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"plugins": [
|
3 |
-
"remark-preset-lint-recommended",
|
4 |
-
["remark-lint-list-item-indent", "space"]
|
5 |
-
]
|
6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dealerdirect/phpcodesniffer-composer-installer/.yamllint
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
---
|
2 |
-
extends: default
|
3 |
-
rules:
|
4 |
-
line-length:
|
5 |
-
level: warning
|
6 |
-
max: 120
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dealerdirect/phpcodesniffer-composer-installer/CODE_OF_CONDUCT.md
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
|
2 |
-
# Contributor Covenant Code of Conduct
|
3 |
-
|
4 |
-
## Our Pledge
|
5 |
-
|
6 |
-
We as members, contributors, and leaders pledge to make participation in our
|
7 |
-
community a harassment-free experience for everyone, regardless of age, body
|
8 |
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
9 |
-
identity and expression, level of experience, education, socio-economic status,
|
10 |
-
nationality, personal appearance, race, religion, or sexual identity
|
11 |
-
and orientation.
|
12 |
-
|
13 |
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
14 |
-
diverse, inclusive, and healthy community.
|
15 |
-
|
16 |
-
## Our Standards
|
17 |
-
|
18 |
-
Examples of behavior that contributes to a positive environment for our
|
19 |
-
community include:
|
20 |
-
|
21 |
-
* Demonstrating empathy and kindness toward other people
|
22 |
-
* Being respectful of differing opinions, viewpoints, and experiences
|
23 |
-
* Giving and gracefully accepting constructive feedback
|
24 |
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
25 |
-
and learning from the experience
|
26 |
-
* Focusing on what is best not just for us as individuals, but for the
|
27 |
-
overall community
|
28 |
-
|
29 |
-
Examples of unacceptable behavior include:
|
30 |
-
|
31 |
-
* The use of sexualized language or imagery, and sexual attention or
|
32 |
-
advances of any kind
|
33 |
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
34 |
-
* Public or private harassment
|
35 |
-
* Publishing others' private information, such as a physical or email
|
36 |
-
address, without their explicit permission
|
37 |
-
* Other conduct which could reasonably be considered inappropriate in a
|
38 |
-
professional setting
|
39 |
-
|
40 |
-
## Enforcement Responsibilities
|
41 |
-
|
42 |
-
Community leaders are responsible for clarifying and enforcing our standards of
|
43 |
-
acceptable behavior and will take appropriate and fair corrective action in
|
44 |
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
45 |
-
or harmful.
|
46 |
-
|
47 |
-
Community leaders have the right and responsibility to remove, edit, or reject
|
48 |
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
49 |
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
50 |
-
decisions when appropriate.
|
51 |
-
|
52 |
-
## Scope
|
53 |
-
|
54 |
-
This Code of Conduct applies within all community spaces, and also applies when
|
55 |
-
an individual is officially representing the community in public spaces.
|
56 |
-
Examples of representing our community include using an official e-mail address,
|
57 |
-
posting via an official social media account, or acting as an appointed
|
58 |
-
representative at an online or offline event.
|
59 |
-
|
60 |
-
## Enforcement
|
61 |
-
|
62 |
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
63 |
-
reported to the community leaders responsible for enforcement at
|
64 |
-
<potherca@gmail.com>.
|
65 |
-
All complaints will be reviewed and investigated promptly and fairly.
|
66 |
-
|
67 |
-
All community leaders are obligated to respect the privacy and security of the
|
68 |
-
reporter of any incident.
|
69 |
-
|
70 |
-
## Enforcement Guidelines
|
71 |
-
|
72 |
-
Community leaders will follow these Community Impact Guidelines in determining
|
73 |
-
the consequences for any action they deem in violation of this Code of Conduct:
|
74 |
-
|
75 |
-
### 1. Correction
|
76 |
-
|
77 |
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
78 |
-
unprofessional or unwelcome in the community.
|
79 |
-
|
80 |
-
**Consequence**: A private, written warning from community leaders, providing
|
81 |
-
clarity around the nature of the violation and an explanation of why the
|
82 |
-
behavior was inappropriate. A public apology may be requested.
|
83 |
-
|
84 |
-
### 2. Warning
|
85 |
-
|
86 |
-
**Community Impact**: A violation through a single incident or series
|
87 |
-
of actions.
|
88 |
-
|
89 |
-
**Consequence**: A warning with consequences for continued behavior. No
|
90 |
-
interaction with the people involved, including unsolicited interaction with
|
91 |
-
those enforcing the Code of Conduct, for a specified period of time. This
|
92 |
-
includes avoiding interactions in community spaces as well as external channels
|
93 |
-
like social media. Violating these terms may lead to a temporary or
|
94 |
-
permanent ban.
|
95 |
-
|
96 |
-
### 3. Temporary Ban
|
97 |
-
|
98 |
-
**Community Impact**: A serious violation of community standards, including
|
99 |
-
sustained inappropriate behavior.
|
100 |
-
|
101 |
-
**Consequence**: A temporary ban from any sort of interaction or public
|
102 |
-
communication with the community for a specified period of time. No public or
|
103 |
-
private interaction with the people involved, including unsolicited interaction
|
104 |
-
with those enforcing the Code of Conduct, is allowed during this period.
|
105 |
-
Violating these terms may lead to a permanent ban.
|
106 |
-
|
107 |
-
### 4. Permanent Ban
|
108 |
-
|
109 |
-
**Community Impact**: Demonstrating a pattern of violation of community
|
110 |
-
standards, including sustained inappropriate behavior, harassment of an
|
111 |
-
individual, or aggression toward or disparagement of classes of individuals.
|
112 |
-
|
113 |
-
**Consequence**: A permanent ban from any sort of public interaction within
|
114 |
-
the community.
|
115 |
-
|
116 |
-
## Attribution
|
117 |
-
|
118 |
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
119 |
-
version 2.0, available at
|
120 |
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
121 |
-
|
122 |
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
123 |
-
enforcement ladder](https://github.com/mozilla/diversity).
|
124 |
-
|
125 |
-
[homepage]: https://www.contributor-covenant.org
|
126 |
-
|
127 |
-
For answers to common questions about this code of conduct, see the FAQ at
|
128 |
-
https://www.contributor-covenant.org/faq. Translations are available at
|
129 |
-
https://www.contributor-covenant.org/translations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
MIT License
|
2 |
-
|
3 |
-
Copyright (c) 2016-2020 Dealerdirect B.V.
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
-
of this software and associated documentation files (the "Software"), to deal
|
7 |
-
in the Software without restriction, including without limitation the rights
|
8 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
-
copies of the Software, and to permit persons to whom the Software is
|
10 |
-
furnished to do so, subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dealerdirect/phpcodesniffer-composer-installer/README.md
DELETED
@@ -1,251 +0,0 @@
|
|
1 |
-
# PHP_CodeSniffer Standards Composer Installer Plugin
|
2 |
-
|
3 |
-
![Project Stage][project-stage-shield]
|
4 |
-
![Last Commit][last-updated-shield]
|
5 |
-
![Awesome][awesome-shield]
|
6 |
-
[![License][license-shield]](LICENSE.md)
|
7 |
-
|
8 |
-
[![Travis][travis-shield]][travis]
|
9 |
-
[![Scrutinizer][scrutinizer-shield]][scrutinizer]
|
10 |
-
[![Latest Version on Packagist][packagist-version-shield]][packagist-version]
|
11 |
-
[![Packagist][packagist-shield]][packagist]
|
12 |
-
|
13 |
-
[![Contributor Covenant][code-of-conduct-shield]][code-of-conduct]
|
14 |
-
|
15 |
-
This composer installer plugin allows for easy installation of [PHP_CodeSniffer][codesniffer] coding standards (rulesets).
|
16 |
-
|
17 |
-
No more symbolic linking of directories, checking out repositories on specific locations or changing
|
18 |
-
the `phpcs` configuration.
|
19 |
-
|
20 |
-
_Note: This plugin is compatible with both version 2.x and 3.x of_ [PHP_CodeSniffer][codesniffer]
|
21 |
-
|
22 |
-
## Usage
|
23 |
-
|
24 |
-
Installation can be done with [Composer][composer], by requiring this package as a development dependency:
|
25 |
-
|
26 |
-
```bash
|
27 |
-
composer require --dev dealerdirect/phpcodesniffer-composer-installer
|
28 |
-
```
|
29 |
-
|
30 |
-
That's it.
|
31 |
-
|
32 |
-
### How it works
|
33 |
-
|
34 |
-
Basically, this plugin executes the following steps:
|
35 |
-
|
36 |
-
- This plugin searches for `phpcodesniffer-standard` packages in all of your currently installed Composer packages.
|
37 |
-
- Matching packages and the project itself are scanned for PHP_CodeSniffer rulesets.
|
38 |
-
- The plugin will call PHP_CodeSniffer and configure the `installed_paths` option.
|
39 |
-
|
40 |
-
### Example project
|
41 |
-
|
42 |
-
The following is an example Composer project and has included
|
43 |
-
multiple `phpcodesniffer-standard` packages.
|
44 |
-
|
45 |
-
```json
|
46 |
-
{
|
47 |
-
"name": "dealerdirect/example-project",
|
48 |
-
"description": "Just an example project",
|
49 |
-
"type": "project",
|
50 |
-
"require": {},
|
51 |
-
"require-dev": {
|
52 |
-
"dealerdirect/phpcodesniffer-composer-installer": "*",
|
53 |
-
"object-calisthenics/phpcs-calisthenics-rules": "*",
|
54 |
-
"phpcompatibility/php-compatibility": "*",
|
55 |
-
"wp-coding-standards/wpcs": "*"
|
56 |
-
}
|
57 |
-
}
|
58 |
-
```
|
59 |
-
|
60 |
-
After running `composer install` PHP_CodeSniffer just works:
|
61 |
-
|
62 |
-
```bash
|
63 |
-
$ ./vendor/bin/phpcs -i
|
64 |
-
The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz, Zend, PHPCompatibility, WordPress,
|
65 |
-
WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress-VIP
|
66 |
-
```
|
67 |
-
|
68 |
-
### Calling the plugin directly
|
69 |
-
|
70 |
-
In some circumstances, it is desirable to call this plugin's functionality
|
71 |
-
directly. For instance, during development or in [CI][definition-ci] environments.
|
72 |
-
|
73 |
-
As the plugin requires Composer to work, direct calls need to be wired through a
|
74 |
-
project's `composer.json`.
|
75 |
-
|
76 |
-
This is done by adding a call to the `Plugin::run` function in the `script`
|
77 |
-
section of the `composer.json`:
|
78 |
-
|
79 |
-
```json
|
80 |
-
{
|
81 |
-
"scripts": {
|
82 |
-
"install-codestandards": [
|
83 |
-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
84 |
-
]
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
```
|
89 |
-
|
90 |
-
The command can then be called using `composer run-script install-codestandards` or
|
91 |
-
referenced from other script configurations, as follows:
|
92 |
-
|
93 |
-
```json
|
94 |
-
{
|
95 |
-
"scripts": {
|
96 |
-
"install-codestandards": [
|
97 |
-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
98 |
-
],
|
99 |
-
"post-install-cmd": [
|
100 |
-
"@install-codestandards"
|
101 |
-
]
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
```
|
106 |
-
|
107 |
-
For more details about Composer scripts, please refer to [the section on scripts
|
108 |
-
in the Composer manual][composer-manual-scripts].
|
109 |
-
|
110 |
-
### Changing the Coding Standards search depth
|
111 |
-
|
112 |
-
By default, this plugin searches up for Coding Standards up to three directories
|
113 |
-
deep. In most cases, this should be sufficient. However, this plugin allows
|
114 |
-
you to customize the search depth setting if needed.
|
115 |
-
|
116 |
-
```json
|
117 |
-
{
|
118 |
-
"extra": {
|
119 |
-
"phpcodesniffer-search-depth": 5
|
120 |
-
}
|
121 |
-
}
|
122 |
-
```
|
123 |
-
|
124 |
-
### Caveats
|
125 |
-
|
126 |
-
When this plugin is installed globally, composer will load the _global_ plugin rather
|
127 |
-
than the one from the local repository. Despite [this behavior being documented
|
128 |
-
in the composer manual][using-composer-plugins], it could potentially confuse
|
129 |
-
as another version of the plugin could be run and not the one specified by the project.
|
130 |
-
|
131 |
-
## Developing Coding Standards
|
132 |
-
|
133 |
-
Coding standard can be developed normally, as documented by [PHP_CodeSniffer][codesniffer], in the [Coding Standard Tutorial][tutorial].
|
134 |
-
|
135 |
-
Create a composer package of your coding standard by adding a `composer.json` file.
|
136 |
-
|
137 |
-
```json
|
138 |
-
{
|
139 |
-
"name" : "acme/phpcodesniffer-our-standards",
|
140 |
-
"description" : "Package contains all coding standards of the Acme company",
|
141 |
-
"require" : {
|
142 |
-
"php" : ">=5.4.0,<8.0.0-dev",
|
143 |
-
"squizlabs/php_codesniffer" : "^3.0"
|
144 |
-
},
|
145 |
-
"type" : "phpcodesniffer-standard"
|
146 |
-
}
|
147 |
-
```
|
148 |
-
|
149 |
-
Requirements:
|
150 |
-
* The repository may contain one or more standards.
|
151 |
-
* Each standard can have a separate directory no deeper than 3 levels from the repository root.
|
152 |
-
* The package `type` must be `phpcodesniffer-standard`. Without this, the plugin will not trigger.
|
153 |
-
|
154 |
-
### Requiring the plugin from within your coding standard
|
155 |
-
|
156 |
-
If your coding standard itself depends on additional external PHPCS standards, this plugin can
|
157 |
-
make life easier on your end-users by taking care of the installation of all standards - yours
|
158 |
-
and your dependencies - for them.
|
159 |
-
|
160 |
-
This can help reduce the number of support questions about setting the `installed_paths`, as well
|
161 |
-
as simplify your standard's installation instructions.
|
162 |
-
|
163 |
-
For this to work, make sure your external standard adds this plugin to the `composer.json` config
|
164 |
-
via `require`, **not** `require-dev`.
|
165 |
-
|
166 |
-
> :warning: Your end-user may already `require-dev` this plugin and/or other external standards used
|
167 |
-
> by your end-users may require this plugin as well.
|
168 |
-
>
|
169 |
-
> To prevent your end-users getting into "_dependency hell_", make sure to make the version requirement
|
170 |
-
> for this plugin flexible.
|
171 |
-
>
|
172 |
-
> As, for now, this plugin is still regarded as "unstable" (version < 1.0), remember that Composer
|
173 |
-
> treats unstable minors as majors and will not be able to resolve one config requiring this plugin
|
174 |
-
> at version `^0.5`, while another requires it at version `^0.6`.
|
175 |
-
> Either allow multiple minors or use `*` as the version requirement.
|
176 |
-
>
|
177 |
-
> Some examples of flexible requirements which can be used:
|
178 |
-
> ```bash
|
179 |
-
> composer require dealerdirect/phpcodesniffer-composer-installer:"*"
|
180 |
-
> composer require dealerdirect/phpcodesniffer-composer-installer:"0.*"
|
181 |
-
> composer require dealerdirect/phpcodesniffer-composer-installer:"^0.4 || ^0.5 || ^0.6"
|
182 |
-
> ```
|
183 |
-
|
184 |
-
## Changelog
|
185 |
-
|
186 |
-
This repository does not contain a `CHANGELOG.md` file, however, we do publish a changelog on each release
|
187 |
-
using the [GitHub releases][changelog] functionality.
|
188 |
-
|
189 |
-
## Contributing
|
190 |
-
|
191 |
-
This is an active open-source project. We are always open to people who want to
|
192 |
-
use the code or contribute to it.
|
193 |
-
|
194 |
-
We've set up a separate document for our [contribution guidelines][contributing-guidelines].
|
195 |
-
|
196 |
-
Thank you for being involved! :heart_eyes:
|
197 |
-
|
198 |
-
## Authors & contributors
|
199 |
-
|
200 |
-
The original idea and setup of this repository is by [Franck Nijhof][frenck], employee @ Dealerdirect.
|
201 |
-
|
202 |
-
For a full list of all author and/or contributors, check [the contributors page][contributors].
|
203 |
-
|
204 |
-
## License
|
205 |
-
|
206 |
-
The MIT License (MIT)
|
207 |
-
|
208 |
-
Copyright (c) 2016-2020 Dealerdirect B.V.
|
209 |
-
|
210 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
211 |
-
of this software and associated documentation files (the "Software"), to deal
|
212 |
-
in the Software without restriction, including without limitation the rights
|
213 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
214 |
-
copies of the Software, and to permit persons to whom the Software is
|
215 |
-
furnished to do so, subject to the following conditions:
|
216 |
-
|
217 |
-
The above copyright notice and this permission notice shall be included in
|
218 |
-
all copies or substantial portions of the Software.
|
219 |
-
|
220 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
221 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
222 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
223 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
224 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
225 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
226 |
-
THE SOFTWARE.
|
227 |
-
|
228 |
-
[awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg
|
229 |
-
[changelog]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases
|
230 |
-
[code-of-conduct-shield]: https://img.shields.io/badge/Contributor%20Covenant-v2.0-ff69b4.svg
|
231 |
-
[code-of-conduct]: CODE_OF_CONDUCT.md
|
232 |
-
[codesniffer]: https://github.com/squizlabs/PHP_CodeSniffer
|
233 |
-
[composer-manual-scripts]: https://getcomposer.org/doc/articles/scripts.md
|
234 |
-
[composer]: https://getcomposer.org/
|
235 |
-
[contributing-guidelines]: CONTRIBUTING.md
|
236 |
-
[contributors]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors
|
237 |
-
[definition-ci]: https://en.wikipedia.org/wiki/Continuous_integration
|
238 |
-
[frenck]: https://github.com/frenck
|
239 |
-
[last-updated-shield]: https://img.shields.io/github/last-commit/Dealerdirect/phpcodesniffer-composer-installer.svg
|
240 |
-
[license-shield]: https://img.shields.io/github/license/dealerdirect/phpcodesniffer-composer-installer.svg
|
241 |
-
[packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/phpcodesniffer-composer-installer.svg
|
242 |
-
[packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/phpcodesniffer-composer-installer.svg
|
243 |
-
[packagist-version]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
|
244 |
-
[packagist]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
|
245 |
-
[project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg
|
246 |
-
[scrutinizer-shield]: https://img.shields.io/scrutinizer/g/dealerdirect/phpcodesniffer-composer-installer.svg
|
247 |
-
[scrutinizer]: https://scrutinizer-ci.com/g/dealerdirect/phpcodesniffer-composer-installer/
|
248 |
-
[travis-shield]: https://img.shields.io/travis/Dealerdirect/phpcodesniffer-composer-installer.svg
|
249 |
-
[travis]: https://travis-ci.org/Dealerdirect/phpcodesniffer-composer-installer
|
250 |
-
[tutorial]: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial
|
251 |
-
[using-composer-plugins]: https://getcomposer.org/doc/articles/plugins.md#using-plugins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
3 |
-
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
4 |
-
"type": "composer-plugin",
|
5 |
-
"keywords": [
|
6 |
-
"composer", "installer", "plugin",
|
7 |
-
"phpcs", "codesniffer", "phpcodesniffer", "php_codesniffer",
|
8 |
-
"standard", "standards", "style guide", "stylecheck",
|
9 |
-
"qa", "quality", "code quality", "tests"
|
10 |
-
],
|
11 |
-
"homepage": "http://www.dealerdirect.com",
|
12 |
-
"license": "MIT",
|
13 |
-
"authors": [
|
14 |
-
{
|
15 |
-
"name": "Franck Nijhof",
|
16 |
-
"email": "franck.nijhof@dealerdirect.com",
|
17 |
-
"homepage": "http://www.frenck.nl",
|
18 |
-
"role": "Developer / IT Manager"
|
19 |
-
}
|
20 |
-
],
|
21 |
-
"support": {
|
22 |
-
"issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
|
23 |
-
"source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
|
24 |
-
},
|
25 |
-
"require": {
|
26 |
-
"php": ">=5.3",
|
27 |
-
"composer-plugin-api": "^1.0 || ^2.0",
|
28 |
-
"squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
|
29 |
-
},
|
30 |
-
"require-dev": {
|
31 |
-
"composer/composer": "*",
|
32 |
-
"sensiolabs/security-checker": "^4.1.0",
|
33 |
-
"phpcompatibility/php-compatibility": "^9.0"
|
34 |
-
},
|
35 |
-
"minimum-stability": "dev",
|
36 |
-
"prefer-stable": true,
|
37 |
-
"autoload": {
|
38 |
-
"psr-4": {
|
39 |
-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
40 |
-
}
|
41 |
-
},
|
42 |
-
"extra": {
|
43 |
-
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
44 |
-
},
|
45 |
-
"scripts": {
|
46 |
-
"install-codestandards": [
|
47 |
-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
48 |
-
]
|
49 |
-
}
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php
DELETED
@@ -1,620 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This file is part of the Dealerdirect PHP_CodeSniffer Standards
|
5 |
-
* Composer Installer Plugin package.
|
6 |
-
*
|
7 |
-
* @copyright 2016-2020 Dealerdirect B.V.
|
8 |
-
* @license MIT
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer;
|
12 |
-
|
13 |
-
use Composer\Composer;
|
14 |
-
use Composer\EventDispatcher\EventSubscriberInterface;
|
15 |
-
use Composer\IO\IOInterface;
|
16 |
-
use Composer\Package\AliasPackage;
|
17 |
-
use Composer\Package\PackageInterface;
|
18 |
-
use Composer\Package\RootPackageInterface;
|
19 |
-
use Composer\Plugin\PluginInterface;
|
20 |
-
use Composer\Script\Event;
|
21 |
-
use Composer\Script\ScriptEvents;
|
22 |
-
use Composer\Util\Filesystem;
|
23 |
-
use Composer\Util\ProcessExecutor;
|
24 |
-
use Symfony\Component\Finder\Finder;
|
25 |
-
use Symfony\Component\Process\Exception\LogicException;
|
26 |
-
use Symfony\Component\Process\Exception\ProcessFailedException;
|
27 |
-
use Symfony\Component\Process\Exception\RuntimeException;
|
28 |
-
use Symfony\Component\Process\PhpExecutableFinder;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* PHP_CodeSniffer standard installation manager.
|
32 |
-
*
|
33 |
-
* @author Franck Nijhof <franck.nijhof@dealerdirect.com>
|
34 |
-
*/
|
35 |
-
class Plugin implements PluginInterface, EventSubscriberInterface
|
36 |
-
{
|
37 |
-
|
38 |
-
const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth';
|
39 |
-
|
40 |
-
const MESSAGE_ERROR_WRONG_MAX_DEPTH =
|
41 |
-
'The value of "%s" (in the composer.json "extra".section) must be an integer larger then %d, %s given.';
|
42 |
-
const MESSAGE_NOT_INSTALLED = 'PHPCodeSniffer is not installed';
|
43 |
-
const MESSAGE_NOTHING_TO_INSTALL = 'Nothing to install or update';
|
44 |
-
const MESSAGE_PLUGIN_UNINSTALLED = 'PHPCodeSniffer Composer Installer is uninstalled';
|
45 |
-
const MESSAGE_RUNNING_INSTALLER = 'Running PHPCodeSniffer Composer Installer';
|
46 |
-
|
47 |
-
const PACKAGE_NAME = 'squizlabs/php_codesniffer';
|
48 |
-
const PACKAGE_TYPE = 'phpcodesniffer-standard';
|
49 |
-
|
50 |
-
const PHPCS_CONFIG_REGEX = '`%s:[^\r\n]+`';
|
51 |
-
const PHPCS_CONFIG_KEY = 'installed_paths';
|
52 |
-
|
53 |
-
const PLUGIN_NAME = 'dealerdirect/phpcodesniffer-composer-installer';
|
54 |
-
|
55 |
-
/**
|
56 |
-
* @var Composer
|
57 |
-
*/
|
58 |
-
private $composer;
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @var string
|
62 |
-
*/
|
63 |
-
private $cwd;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* @var Filesystem
|
67 |
-
*/
|
68 |
-
private $filesystem;
|
69 |
-
|
70 |
-
/**
|
71 |
-
* @var array
|
72 |
-
*/
|
73 |
-
private $installedPaths;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* @var IOInterface
|
77 |
-
*/
|
78 |
-
private $io;
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @var ProcessExecutor
|
82 |
-
*/
|
83 |
-
private $processExecutor;
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Triggers the plugin's main functionality.
|
87 |
-
*
|
88 |
-
* Makes it possible to run the plugin as a custom command.
|
89 |
-
*
|
90 |
-
* @param Event $event
|
91 |
-
*
|
92 |
-
* @throws \InvalidArgumentException
|
93 |
-
* @throws \RuntimeException
|
94 |
-
* @throws LogicException
|
95 |
-
* @throws ProcessFailedException
|
96 |
-
* @throws RuntimeException
|
97 |
-
*/
|
98 |
-
public static function run(Event $event)
|
99 |
-
{
|
100 |
-
$io = $event->getIO();
|
101 |
-
$composer = $event->getComposer();
|
102 |
-
|
103 |
-
$instance = new static();
|
104 |
-
|
105 |
-
$instance->io = $io;
|
106 |
-
$instance->composer = $composer;
|
107 |
-
$instance->init();
|
108 |
-
$instance->onDependenciesChangedEvent();
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* {@inheritDoc}
|
113 |
-
*
|
114 |
-
* @throws \RuntimeException
|
115 |
-
* @throws LogicException
|
116 |
-
* @throws ProcessFailedException
|
117 |
-
* @throws RuntimeException
|
118 |
-
*/
|
119 |
-
public function activate(Composer $composer, IOInterface $io)
|
120 |
-
{
|
121 |
-
$this->composer = $composer;
|
122 |
-
$this->io = $io;
|
123 |
-
|
124 |
-
$this->init();
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* {@inheritDoc}
|
129 |
-
*/
|
130 |
-
public function deactivate(Composer $composer, IOInterface $io)
|
131 |
-
{
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* {@inheritDoc}
|
136 |
-
*/
|
137 |
-
public function uninstall(Composer $composer, IOInterface $io)
|
138 |
-
{
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Prepares the plugin so it's main functionality can be run.
|
143 |
-
*
|
144 |
-
* @throws \RuntimeException
|
145 |
-
* @throws LogicException
|
146 |
-
* @throws ProcessFailedException
|
147 |
-
* @throws RuntimeException
|
148 |
-
*/
|
149 |
-
private function init()
|
150 |
-
{
|
151 |
-
$this->cwd = getcwd();
|
152 |
-
$this->installedPaths = array();
|
153 |
-
|
154 |
-
$this->processExecutor = new ProcessExecutor($this->io);
|
155 |
-
$this->filesystem = new Filesystem($this->processExecutor);
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* {@inheritDoc}
|
160 |
-
*/
|
161 |
-
public static function getSubscribedEvents()
|
162 |
-
{
|
163 |
-
return array(
|
164 |
-
ScriptEvents::POST_INSTALL_CMD => array(
|
165 |
-
array('onDependenciesChangedEvent', 0),
|
166 |
-
),
|
167 |
-
ScriptEvents::POST_UPDATE_CMD => array(
|
168 |
-
array('onDependenciesChangedEvent', 0),
|
169 |
-
),
|
170 |
-
);
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Entry point for post install and post update events.
|
175 |
-
*
|
176 |
-
* @throws \InvalidArgumentException
|
177 |
-
* @throws LogicException
|
178 |
-
* @throws ProcessFailedException
|
179 |
-
* @throws RuntimeException
|
180 |
-
*/
|
181 |
-
public function onDependenciesChangedEvent()
|
182 |
-
{
|
183 |
-
$io = $this->io;
|
184 |
-
$isVerbose = $io->isVerbose();
|
185 |
-
$exitCode = 0;
|
186 |
-
|
187 |
-
if ($isVerbose) {
|
188 |
-
$io->write(sprintf('<info>%s</info>', self::MESSAGE_RUNNING_INSTALLER));
|
189 |
-
}
|
190 |
-
|
191 |
-
if ($this->isPHPCodeSnifferInstalled() === true) {
|
192 |
-
$this->loadInstalledPaths();
|
193 |
-
$installPathCleaned = $this->cleanInstalledPaths();
|
194 |
-
$installPathUpdated = $this->updateInstalledPaths();
|
195 |
-
|
196 |
-
if ($installPathCleaned === true || $installPathUpdated === true) {
|
197 |
-
$exitCode = $this->saveInstalledPaths();
|
198 |
-
} elseif ($isVerbose) {
|
199 |
-
$io->write(sprintf('<info>%s</info>', self::MESSAGE_NOTHING_TO_INSTALL));
|
200 |
-
}
|
201 |
-
} else {
|
202 |
-
$pluginPackage = $this
|
203 |
-
->composer
|
204 |
-
->getRepositoryManager()
|
205 |
-
->getLocalRepository()
|
206 |
-
->findPackages(self::PLUGIN_NAME)
|
207 |
-
;
|
208 |
-
|
209 |
-
$isPluginUninstalled = count($pluginPackage) === 0;
|
210 |
-
|
211 |
-
if ($isPluginUninstalled) {
|
212 |
-
if ($isVerbose) {
|
213 |
-
$io->write(sprintf('<info>%s</info>', self::MESSAGE_PLUGIN_UNINSTALLED));
|
214 |
-
}
|
215 |
-
} else {
|
216 |
-
$exitCode = 1;
|
217 |
-
if ($isVerbose) {
|
218 |
-
$io->write(sprintf('<error>%s</error>', self::MESSAGE_NOT_INSTALLED));
|
219 |
-
}
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
return $exitCode;
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Load all paths from PHP_CodeSniffer into an array.
|
228 |
-
*
|
229 |
-
* @throws LogicException
|
230 |
-
* @throws ProcessFailedException
|
231 |
-
* @throws RuntimeException
|
232 |
-
*/
|
233 |
-
private function loadInstalledPaths()
|
234 |
-
{
|
235 |
-
if ($this->isPHPCodeSnifferInstalled() === true) {
|
236 |
-
$this->processExecutor->execute(
|
237 |
-
sprintf(
|
238 |
-
'phpcs --config-show %s',
|
239 |
-
self::PHPCS_CONFIG_KEY
|
240 |
-
),
|
241 |
-
$output,
|
242 |
-
$this->composer->getConfig()->get('bin-dir')
|
243 |
-
);
|
244 |
-
|
245 |
-
$regex = sprintf(self::PHPCS_CONFIG_REGEX, self::PHPCS_CONFIG_KEY);
|
246 |
-
if (preg_match($regex, $output, $match) === 1) {
|
247 |
-
$phpcsInstalledPaths = str_replace(self::PHPCS_CONFIG_KEY . ': ', '', $match[0]);
|
248 |
-
$phpcsInstalledPaths = trim($phpcsInstalledPaths);
|
249 |
-
|
250 |
-
if ($phpcsInstalledPaths !== '') {
|
251 |
-
$this->installedPaths = explode(',', $phpcsInstalledPaths);
|
252 |
-
}
|
253 |
-
}
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Save all coding standard paths back into PHP_CodeSniffer
|
259 |
-
*
|
260 |
-
* @throws LogicException
|
261 |
-
* @throws ProcessFailedException
|
262 |
-
* @throws RuntimeException
|
263 |
-
*
|
264 |
-
* @return int Exit code. 0 for success, 1 or higher for failure.
|
265 |
-
*/
|
266 |
-
private function saveInstalledPaths()
|
267 |
-
{
|
268 |
-
// Check if we found installed paths to set.
|
269 |
-
if (count($this->installedPaths) !== 0) {
|
270 |
-
sort($this->installedPaths);
|
271 |
-
$paths = implode(',', $this->installedPaths);
|
272 |
-
$arguments = array('--config-set', self::PHPCS_CONFIG_KEY, $paths);
|
273 |
-
$configMessage = sprintf(
|
274 |
-
'PHP CodeSniffer Config <info>%s</info> <comment>set to</comment> <info>%s</info>',
|
275 |
-
self::PHPCS_CONFIG_KEY,
|
276 |
-
$paths
|
277 |
-
);
|
278 |
-
} else {
|
279 |
-
// Delete the installed paths if none were found.
|
280 |
-
$arguments = array('--config-delete', self::PHPCS_CONFIG_KEY);
|
281 |
-
$configMessage = sprintf(
|
282 |
-
'PHP CodeSniffer Config <info>%s</info> <comment>delete</comment>',
|
283 |
-
self::PHPCS_CONFIG_KEY
|
284 |
-
);
|
285 |
-
}
|
286 |
-
|
287 |
-
// Prepare message in case of failure
|
288 |
-
$failMessage = sprintf(
|
289 |
-
'Failed to set PHP CodeSniffer <info>%s</info> Config',
|
290 |
-
self::PHPCS_CONFIG_KEY
|
291 |
-
);
|
292 |
-
|
293 |
-
// Determine the path to the main PHPCS file.
|
294 |
-
$phpcsPath = $this->getPHPCodeSnifferInstallPath();
|
295 |
-
if (file_exists($phpcsPath . '/bin/phpcs') === true) {
|
296 |
-
// PHPCS 3.x.
|
297 |
-
$phpcsExecutable = './bin/phpcs';
|
298 |
-
} else {
|
299 |
-
// PHPCS 2.x.
|
300 |
-
$phpcsExecutable = './scripts/phpcs';
|
301 |
-
}
|
302 |
-
|
303 |
-
// Okay, lets rock!
|
304 |
-
$command = vsprintf(
|
305 |
-
'%s %s %s',
|
306 |
-
array(
|
307 |
-
'php executable' => $this->getPhpExecCommand(),
|
308 |
-
'phpcs executable' => $phpcsExecutable,
|
309 |
-
'arguments' => implode(' ', $arguments)
|
310 |
-
)
|
311 |
-
);
|
312 |
-
|
313 |
-
$exitCode = $this->processExecutor->execute($command, $configResult, $phpcsPath);
|
314 |
-
if ($exitCode === 0) {
|
315 |
-
$exitCode = $this->verifySaveSuccess();
|
316 |
-
}
|
317 |
-
|
318 |
-
if ($exitCode === 0) {
|
319 |
-
$this->io->write($configMessage);
|
320 |
-
} else {
|
321 |
-
$this->io->write($failMessage);
|
322 |
-
}
|
323 |
-
|
324 |
-
if ($this->io->isVerbose() && !empty($configResult)) {
|
325 |
-
$this->io->write(sprintf('<info>%s</info>', $configResult));
|
326 |
-
}
|
327 |
-
|
328 |
-
return $exitCode;
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Verify that the paths which were expected to be saved, have been.
|
333 |
-
*
|
334 |
-
* @return int Exit code. 0 for success, 1 for failure.
|
335 |
-
*/
|
336 |
-
private function verifySaveSuccess()
|
337 |
-
{
|
338 |
-
$exitCode = 1;
|
339 |
-
$expectedPaths = $this->installedPaths;
|
340 |
-
|
341 |
-
// Request the currently set installed paths after the save.
|
342 |
-
$this->loadInstalledPaths();
|
343 |
-
|
344 |
-
$registeredPaths = array_intersect($this->installedPaths, $expectedPaths);
|
345 |
-
$registeredCount = count($registeredPaths);
|
346 |
-
$expectedCount = count($expectedPaths);
|
347 |
-
|
348 |
-
if ($expectedCount === $registeredCount) {
|
349 |
-
$exitCode = 0;
|
350 |
-
}
|
351 |
-
|
352 |
-
if ($exitCode === 1 && $this->io->isVerbose()) {
|
353 |
-
$verificationMessage = sprintf(
|
354 |
-
"Paths to external standards found by the plugin: <info>%s</info>\n"
|
355 |
-
. 'Actual paths registered with PHPCS: <info>%s</info>',
|
356 |
-
implode(', ', $expectedPaths),
|
357 |
-
implode(', ', $this->installedPaths)
|
358 |
-
);
|
359 |
-
$this->io->write($verificationMessage);
|
360 |
-
}
|
361 |
-
|
362 |
-
return $exitCode;
|
363 |
-
}
|
364 |
-
|
365 |
-
/**
|
366 |
-
* Get the path to the current PHP version being used.
|
367 |
-
*
|
368 |
-
* Duplicate of the same in the EventDispatcher class in Composer itself.
|
369 |
-
*/
|
370 |
-
protected function getPhpExecCommand()
|
371 |
-
{
|
372 |
-
$finder = new PhpExecutableFinder();
|
373 |
-
|
374 |
-
$phpPath = $finder->find(false);
|
375 |
-
|
376 |
-
if ($phpPath === false) {
|
377 |
-
throw new \RuntimeException('Failed to locate PHP binary to execute ' . $phpPath);
|
378 |
-
}
|
379 |
-
|
380 |
-
$phpArgs = $finder->findArguments();
|
381 |
-
$phpArgs = $phpArgs
|
382 |
-
? ' ' . implode(' ', $phpArgs)
|
383 |
-
: ''
|
384 |
-
;
|
385 |
-
|
386 |
-
$command = ProcessExecutor::escape($phpPath) .
|
387 |
-
$phpArgs .
|
388 |
-
' -d allow_url_fopen=' . ProcessExecutor::escape(ini_get('allow_url_fopen')) .
|
389 |
-
' -d disable_functions=' . ProcessExecutor::escape(ini_get('disable_functions')) .
|
390 |
-
' -d memory_limit=' . ProcessExecutor::escape(ini_get('memory_limit'))
|
391 |
-
;
|
392 |
-
|
393 |
-
return $command;
|
394 |
-
}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* Iterate trough all known paths and check if they are still valid.
|
398 |
-
*
|
399 |
-
* If path does not exists, is not an directory or isn't readable, the path
|
400 |
-
* is removed from the list.
|
401 |
-
*
|
402 |
-
* @return bool True if changes where made, false otherwise
|
403 |
-
*/
|
404 |
-
private function cleanInstalledPaths()
|
405 |
-
{
|
406 |
-
$changes = false;
|
407 |
-
foreach ($this->installedPaths as $key => $path) {
|
408 |
-
// This might be a relative path as well
|
409 |
-
$alternativePath = realpath($this->getPHPCodeSnifferInstallPath() . DIRECTORY_SEPARATOR . $path);
|
410 |
-
|
411 |
-
if (
|
412 |
-
(is_dir($path) === false || is_readable($path) === false) &&
|
413 |
-
(is_dir($alternativePath) === false || is_readable($alternativePath) === false)
|
414 |
-
) {
|
415 |
-
unset($this->installedPaths[$key]);
|
416 |
-
$changes = true;
|
417 |
-
}
|
418 |
-
}
|
419 |
-
return $changes;
|
420 |
-
}
|
421 |
-
|
422 |
-
/**
|
423 |
-
* Check all installed packages (including the root package) against
|
424 |
-
* the installed paths from PHP_CodeSniffer and add the missing ones.
|
425 |
-
*
|
426 |
-
* @return bool True if changes where made, false otherwise
|
427 |
-
*
|
428 |
-
* @throws \InvalidArgumentException
|
429 |
-
* @throws \RuntimeException
|
430 |
-
*/
|
431 |
-
private function updateInstalledPaths()
|
432 |
-
{
|
433 |
-
$changes = false;
|
434 |
-
|
435 |
-
$searchPaths = array($this->cwd);
|
436 |
-
$codingStandardPackages = $this->getPHPCodingStandardPackages();
|
437 |
-
foreach ($codingStandardPackages as $package) {
|
438 |
-
$installPath = $this->composer->getInstallationManager()->getInstallPath($package);
|
439 |
-
if ($this->filesystem->isAbsolutePath($installPath) === false) {
|
440 |
-
$installPath = $this->filesystem->normalizePath(
|
441 |
-
$this->cwd . DIRECTORY_SEPARATOR . $installPath
|
442 |
-
);
|
443 |
-
}
|
444 |
-
$searchPaths[] = $installPath;
|
445 |
-
}
|
446 |
-
|
447 |
-
$finder = new Finder();
|
448 |
-
$finder->files()
|
449 |
-
->depth('<= ' . $this->getMaxDepth())
|
450 |
-
->depth('>= ' . $this->getMinDepth())
|
451 |
-
->ignoreUnreadableDirs()
|
452 |
-
->ignoreVCS(true)
|
453 |
-
->in($searchPaths)
|
454 |
-
->name('ruleset.xml');
|
455 |
-
|
456 |
-
// Process each found possible ruleset.
|
457 |
-
foreach ($finder as $ruleset) {
|
458 |
-
$standardsPath = $ruleset->getPath();
|
459 |
-
|
460 |
-
// Pick the directory above the directory containing the standard, unless this is the project root.
|
461 |
-
if ($standardsPath !== $this->cwd) {
|
462 |
-
$standardsPath = dirname($standardsPath);
|
463 |
-
}
|
464 |
-
|
465 |
-
// Use relative paths for local project repositories.
|
466 |
-
if ($this->isRunningGlobally() === false) {
|
467 |
-
$standardsPath = $this->filesystem->findShortestPath(
|
468 |
-
$this->getPHPCodeSnifferInstallPath(),
|
469 |
-
$standardsPath,
|
470 |
-
true
|
471 |
-
);
|
472 |
-
}
|
473 |
-
|
474 |
-
// De-duplicate and add when directory is not configured.
|
475 |
-
if (in_array($standardsPath, $this->installedPaths, true) === false) {
|
476 |
-
$this->installedPaths[] = $standardsPath;
|
477 |
-
$changes = true;
|
478 |
-
}
|
479 |
-
}
|
480 |
-
|
481 |
-
return $changes;
|
482 |
-
}
|
483 |
-
|
484 |
-
/**
|
485 |
-
* Iterates through Composers' local repository looking for valid Coding
|
486 |
-
* Standard packages.
|
487 |
-
*
|
488 |
-
* If the package is the RootPackage (the one the plugin is installed into),
|
489 |
-
* the package is ignored for now since it needs a different install path logic.
|
490 |
-
*
|
491 |
-
* @return array Composer packages containing coding standard(s)
|
492 |
-
*/
|
493 |
-
private function getPHPCodingStandardPackages()
|
494 |
-
{
|
495 |
-
$codingStandardPackages = array_filter(
|
496 |
-
$this->composer->getRepositoryManager()->getLocalRepository()->getPackages(),
|
497 |
-
function (PackageInterface $package) {
|
498 |
-
if ($package instanceof AliasPackage) {
|
499 |
-
return false;
|
500 |
-
}
|
501 |
-
return $package->getType() === Plugin::PACKAGE_TYPE;
|
502 |
-
}
|
503 |
-
);
|
504 |
-
|
505 |
-
if (
|
506 |
-
! $this->composer->getPackage() instanceof RootPackageInterface
|
507 |
-
&& $this->composer->getPackage()->getType() === self::PACKAGE_TYPE
|
508 |
-
) {
|
509 |
-
$codingStandardPackages[] = $this->composer->getPackage();
|
510 |
-
}
|
511 |
-
|
512 |
-
return $codingStandardPackages;
|
513 |
-
}
|
514 |
-
|
515 |
-
/**
|
516 |
-
* Searches for the installed PHP_CodeSniffer Composer package
|
517 |
-
*
|
518 |
-
* @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against
|
519 |
-
*
|
520 |
-
* @return PackageInterface|null
|
521 |
-
*/
|
522 |
-
private function getPHPCodeSnifferPackage($versionConstraint = null)
|
523 |
-
{
|
524 |
-
$packages = $this
|
525 |
-
->composer
|
526 |
-
->getRepositoryManager()
|
527 |
-
->getLocalRepository()
|
528 |
-
->findPackages(self::PACKAGE_NAME, $versionConstraint);
|
529 |
-
|
530 |
-
return array_shift($packages);
|
531 |
-
}
|
532 |
-
|
533 |
-
/**
|
534 |
-
* Returns the path to the PHP_CodeSniffer package installation location
|
535 |
-
*
|
536 |
-
* @return string
|
537 |
-
*/
|
538 |
-
private function getPHPCodeSnifferInstallPath()
|
539 |
-
{
|
540 |
-
return $this->composer->getInstallationManager()->getInstallPath($this->getPHPCodeSnifferPackage());
|
541 |
-
}
|
542 |
-
|
543 |
-
/**
|
544 |
-
* Simple check if PHP_CodeSniffer is installed.
|
545 |
-
*
|
546 |
-
* @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against
|
547 |
-
*
|
548 |
-
* @return bool Whether PHP_CodeSniffer is installed
|
549 |
-
*/
|
550 |
-
private function isPHPCodeSnifferInstalled($versionConstraint = null)
|
551 |
-
{
|
552 |
-
return ($this->getPHPCodeSnifferPackage($versionConstraint) !== null);
|
553 |
-
}
|
554 |
-
|
555 |
-
/**
|
556 |
-
* Test if composer is running "global"
|
557 |
-
* This check kinda dirty, but it is the "Composer Way"
|
558 |
-
*
|
559 |
-
* @return bool Whether Composer is running "globally"
|
560 |
-
*
|
561 |
-
* @throws \RuntimeException
|
562 |
-
*/
|
563 |
-
private function isRunningGlobally()
|
564 |
-
{
|
565 |
-
return ($this->composer->getConfig()->get('home') === $this->cwd);
|
566 |
-
}
|
567 |
-
|
568 |
-
/**
|
569 |
-
* Determines the maximum search depth when searching for Coding Standards.
|
570 |
-
*
|
571 |
-
* @return int
|
572 |
-
*
|
573 |
-
* @throws \InvalidArgumentException
|
574 |
-
*/
|
575 |
-
private function getMaxDepth()
|
576 |
-
{
|
577 |
-
$maxDepth = 3;
|
578 |
-
|
579 |
-
$extra = $this->composer->getPackage()->getExtra();
|
580 |
-
|
581 |
-
if (array_key_exists(self::KEY_MAX_DEPTH, $extra)) {
|
582 |
-
$maxDepth = $extra[self::KEY_MAX_DEPTH];
|
583 |
-
$minDepth = $this->getMinDepth();
|
584 |
-
|
585 |
-
if (
|
586 |
-
(string) (int) $maxDepth !== (string) $maxDepth /* Must be an integer or cleanly castable to one */
|
587 |
-
|| $maxDepth <= $minDepth /* Larger than the minimum */
|
588 |
-
|| is_float($maxDepth) === true /* Within the boundaries of integer */
|
589 |
-
) {
|
590 |
-
$message = vsprintf(
|
591 |
-
self::MESSAGE_ERROR_WRONG_MAX_DEPTH,
|
592 |
-
array(
|
593 |
-
'key' => self::KEY_MAX_DEPTH,
|
594 |
-
'min' => $minDepth,
|
595 |
-
'given' => var_export($maxDepth, true),
|
596 |
-
)
|
597 |
-
);
|
598 |
-
|
599 |
-
throw new \InvalidArgumentException($message);
|
600 |
-
}
|
601 |
-
}
|
602 |
-
|
603 |
-
return (int) $maxDepth;
|
604 |
-
}
|
605 |
-
|
606 |
-
/**
|
607 |
-
* Returns the minimal search depth for Coding Standard packages.
|
608 |
-
*
|
609 |
-
* Usually this is 0, unless PHP_CodeSniffer >= 3 is used.
|
610 |
-
*
|
611 |
-
* @return int
|
612 |
-
*/
|
613 |
-
private function getMinDepth()
|
614 |
-
{
|
615 |
-
if ($this->isPHPCodeSnifferInstalled('>= 3.0.0') !== true) {
|
616 |
-
return 1;
|
617 |
-
}
|
618 |
-
return 0;
|
619 |
-
}
|
620 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/.doctrine-project.json
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"active": true,
|
3 |
-
"name": "Instantiator",
|
4 |
-
"slug": "instantiator",
|
5 |
-
"docsSlug": "doctrine-instantiator",
|
6 |
-
"codePath": "/src",
|
7 |
-
"versions": [
|
8 |
-
{
|
9 |
-
"name": "1.4",
|
10 |
-
"branchName": "master",
|
11 |
-
"slug": "latest",
|
12 |
-
"upcoming": true
|
13 |
-
},
|
14 |
-
{
|
15 |
-
"name": "1.3",
|
16 |
-
"branchName": "1.3.x",
|
17 |
-
"slug": "1.3",
|
18 |
-
"aliases": [
|
19 |
-
"current",
|
20 |
-
"stable"
|
21 |
-
],
|
22 |
-
"maintained": true,
|
23 |
-
"current": true
|
24 |
-
},
|
25 |
-
{
|
26 |
-
"name": "1.2",
|
27 |
-
"branchName": "1.2.x",
|
28 |
-
"slug": "1.2"
|
29 |
-
},
|
30 |
-
{
|
31 |
-
"name": "1.1",
|
32 |
-
"branchName": "1.1.x",
|
33 |
-
"slug": "1.1"
|
34 |
-
},
|
35 |
-
{
|
36 |
-
"name": "1.0",
|
37 |
-
"branchName": "1.0.x",
|
38 |
-
"slug": "1.0"
|
39 |
-
}
|
40 |
-
]
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/.github/FUNDING.yml
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
patreon: phpdoctrine
|
2 |
-
tidelift: packagist/doctrine%2Finstantiator
|
3 |
-
custom: https://www.doctrine-project.org/sponsorship.html
|
|
|
|
|
|
vendor/doctrine/instantiator/.github/workflows/coding-standards.yml
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
|
2 |
-
name: "Coding Standards"
|
3 |
-
|
4 |
-
on:
|
5 |
-
pull_request:
|
6 |
-
branches:
|
7 |
-
- "*.x"
|
8 |
-
push:
|
9 |
-
branches:
|
10 |
-
- "*.x"
|
11 |
-
|
12 |
-
env:
|
13 |
-
COMPOSER_ROOT_VERSION: "1.4"
|
14 |
-
|
15 |
-
jobs:
|
16 |
-
coding-standards:
|
17 |
-
name: "Coding Standards"
|
18 |
-
runs-on: "ubuntu-20.04"
|
19 |
-
|
20 |
-
strategy:
|
21 |
-
matrix:
|
22 |
-
php-version:
|
23 |
-
- "7.4"
|
24 |
-
|
25 |
-
steps:
|
26 |
-
- name: "Checkout"
|
27 |
-
uses: "actions/checkout@v2"
|
28 |
-
|
29 |
-
- name: "Install PHP"
|
30 |
-
uses: "shivammathur/setup-php@v2"
|
31 |
-
with:
|
32 |
-
coverage: "none"
|
33 |
-
php-version: "${{ matrix.php-version }}"
|
34 |
-
tools: "cs2pr"
|
35 |
-
|
36 |
-
- name: "Cache dependencies installed with Composer"
|
37 |
-
uses: "actions/cache@v2"
|
38 |
-
with:
|
39 |
-
path: "~/.composer/cache"
|
40 |
-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
41 |
-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
42 |
-
|
43 |
-
- name: "Install dependencies with Composer"
|
44 |
-
run: "composer install --no-interaction --no-progress"
|
45 |
-
|
46 |
-
# https://github.com/doctrine/.github/issues/3
|
47 |
-
- name: "Run PHP_CodeSniffer"
|
48 |
-
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/.github/workflows/continuous-integration.yml
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
|
2 |
-
name: "Continuous Integration"
|
3 |
-
|
4 |
-
on:
|
5 |
-
pull_request:
|
6 |
-
branches:
|
7 |
-
- "*.x"
|
8 |
-
push:
|
9 |
-
branches:
|
10 |
-
- "*.x"
|
11 |
-
|
12 |
-
env:
|
13 |
-
fail-fast: true
|
14 |
-
COMPOSER_ROOT_VERSION: "1.4"
|
15 |
-
|
16 |
-
jobs:
|
17 |
-
phpunit:
|
18 |
-
name: "PHPUnit with SQLite"
|
19 |
-
runs-on: "ubuntu-20.04"
|
20 |
-
|
21 |
-
strategy:
|
22 |
-
matrix:
|
23 |
-
php-version:
|
24 |
-
- "7.1"
|
25 |
-
- "7.2"
|
26 |
-
- "7.3"
|
27 |
-
- "7.4"
|
28 |
-
- "8.0"
|
29 |
-
|
30 |
-
steps:
|
31 |
-
- name: "Checkout"
|
32 |
-
uses: "actions/checkout@v2"
|
33 |
-
with:
|
34 |
-
fetch-depth: 2
|
35 |
-
|
36 |
-
- name: "Install PHP with XDebug"
|
37 |
-
uses: "shivammathur/setup-php@v2"
|
38 |
-
if: "${{ matrix.php-version == '7.1' }}"
|
39 |
-
with:
|
40 |
-
php-version: "${{ matrix.php-version }}"
|
41 |
-
coverage: "xdebug"
|
42 |
-
ini-values: "zend.assertions=1"
|
43 |
-
|
44 |
-
- name: "Install PHP with PCOV"
|
45 |
-
uses: "shivammathur/setup-php@v2"
|
46 |
-
if: "${{ matrix.php-version != '7.1' }}"
|
47 |
-
with:
|
48 |
-
php-version: "${{ matrix.php-version }}"
|
49 |
-
coverage: "pcov"
|
50 |
-
ini-values: "zend.assertions=1"
|
51 |
-
|
52 |
-
- name: "Cache dependencies installed with composer"
|
53 |
-
uses: "actions/cache@v2"
|
54 |
-
with:
|
55 |
-
path: "~/.composer/cache"
|
56 |
-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
57 |
-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
58 |
-
|
59 |
-
- name: "Install dependencies with composer"
|
60 |
-
run: "composer update --no-interaction --no-progress"
|
61 |
-
|
62 |
-
- name: "Run PHPUnit"
|
63 |
-
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
|
64 |
-
|
65 |
-
- name: "Upload coverage file"
|
66 |
-
uses: "actions/upload-artifact@v2"
|
67 |
-
with:
|
68 |
-
name: "phpunit-${{ matrix.php-version }}.coverage"
|
69 |
-
path: "coverage.xml"
|
70 |
-
|
71 |
-
upload_coverage:
|
72 |
-
name: "Upload coverage to Codecov"
|
73 |
-
runs-on: "ubuntu-20.04"
|
74 |
-
needs:
|
75 |
-
- "phpunit"
|
76 |
-
|
77 |
-
steps:
|
78 |
-
- name: "Checkout"
|
79 |
-
uses: "actions/checkout@v2"
|
80 |
-
with:
|
81 |
-
fetch-depth: 2
|
82 |
-
|
83 |
-
- name: "Download coverage files"
|
84 |
-
uses: "actions/download-artifact@v2"
|
85 |
-
with:
|
86 |
-
path: "reports"
|
87 |
-
|
88 |
-
- name: "Upload to Codecov"
|
89 |
-
uses: "codecov/codecov-action@v1"
|
90 |
-
with:
|
91 |
-
directory: reports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/.github/workflows/phpbench.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
|
2 |
-
name: "Performance benchmark"
|
3 |
-
|
4 |
-
on:
|
5 |
-
pull_request:
|
6 |
-
branches:
|
7 |
-
- "*.x"
|
8 |
-
push:
|
9 |
-
branches:
|
10 |
-
- "*.x"
|
11 |
-
|
12 |
-
env:
|
13 |
-
fail-fast: true
|
14 |
-
COMPOSER_ROOT_VERSION: "1.4"
|
15 |
-
|
16 |
-
jobs:
|
17 |
-
phpbench:
|
18 |
-
name: "PHPBench"
|
19 |
-
runs-on: "ubuntu-20.04"
|
20 |
-
|
21 |
-
strategy:
|
22 |
-
matrix:
|
23 |
-
php-version:
|
24 |
-
- "7.4"
|
25 |
-
|
26 |
-
steps:
|
27 |
-
- name: "Checkout"
|
28 |
-
uses: "actions/checkout@v2"
|
29 |
-
with:
|
30 |
-
fetch-depth: 2
|
31 |
-
|
32 |
-
- name: "Install PHP"
|
33 |
-
uses: "shivammathur/setup-php@v2"
|
34 |
-
with:
|
35 |
-
php-version: "${{ matrix.php-version }}"
|
36 |
-
coverage: "pcov"
|
37 |
-
ini-values: "zend.assertions=1"
|
38 |
-
|
39 |
-
- name: "Cache dependencies installed with composer"
|
40 |
-
uses: "actions/cache@v2"
|
41 |
-
with:
|
42 |
-
path: "~/.composer/cache"
|
43 |
-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
44 |
-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
45 |
-
|
46 |
-
- name: "Install dependencies with composer"
|
47 |
-
run: "composer update --no-interaction --no-progress"
|
48 |
-
|
49 |
-
- name: "Run PHPBench"
|
50 |
-
run: "php ./vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/.github/workflows/release-on-milestone-closed.yml
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
name: "Automatic Releases"
|
2 |
-
|
3 |
-
on:
|
4 |
-
milestone:
|
5 |
-
types:
|
6 |
-
- "closed"
|
7 |
-
|
8 |
-
jobs:
|
9 |
-
release:
|
10 |
-
name: "Git tag, release & create merge-up PR"
|
11 |
-
runs-on: "ubuntu-20.04"
|
12 |
-
|
13 |
-
steps:
|
14 |
-
- name: "Checkout"
|
15 |
-
uses: "actions/checkout@v2"
|
16 |
-
|
17 |
-
- name: "Release"
|
18 |
-
uses: "laminas/automatic-releases@v1"
|
19 |
-
with:
|
20 |
-
command-name: "laminas:automatic-releases:release"
|
21 |
-
env:
|
22 |
-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
|
23 |
-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
|
24 |
-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
|
25 |
-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
|
26 |
-
|
27 |
-
- name: "Create Merge-Up Pull Request"
|
28 |
-
uses: "laminas/automatic-releases@v1"
|
29 |
-
with:
|
30 |
-
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
|
31 |
-
env:
|
32 |
-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
|
33 |
-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
|
34 |
-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
|
35 |
-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
|
36 |
-
|
37 |
-
- name: "Create new milestones"
|
38 |
-
uses: "laminas/automatic-releases@v1"
|
39 |
-
with:
|
40 |
-
command-name: "laminas:automatic-releases:create-milestones"
|
41 |
-
env:
|
42 |
-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
|
43 |
-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
|
44 |
-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
|
45 |
-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/.github/workflows/static-analysis.yml
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
|
2 |
-
name: "Static Analysis"
|
3 |
-
|
4 |
-
on:
|
5 |
-
pull_request:
|
6 |
-
branches:
|
7 |
-
- "*.x"
|
8 |
-
push:
|
9 |
-
branches:
|
10 |
-
- "*.x"
|
11 |
-
|
12 |
-
env:
|
13 |
-
COMPOSER_ROOT_VERSION: "1.4"
|
14 |
-
|
15 |
-
jobs:
|
16 |
-
static-analysis-phpstan:
|
17 |
-
name: "Static Analysis with PHPStan"
|
18 |
-
runs-on: "ubuntu-20.04"
|
19 |
-
|
20 |
-
strategy:
|
21 |
-
matrix:
|
22 |
-
php-version:
|
23 |
-
- "7.4"
|
24 |
-
|
25 |
-
steps:
|
26 |
-
- name: "Checkout code"
|
27 |
-
uses: "actions/checkout@v2"
|
28 |
-
|
29 |
-
- name: "Install PHP"
|
30 |
-
uses: "shivammathur/setup-php@v2"
|
31 |
-
with:
|
32 |
-
coverage: "none"
|
33 |
-
php-version: "${{ matrix.php-version }}"
|
34 |
-
tools: "cs2pr"
|
35 |
-
|
36 |
-
- name: "Cache dependencies installed with composer"
|
37 |
-
uses: "actions/cache@v2"
|
38 |
-
with:
|
39 |
-
path: "~/.composer/cache"
|
40 |
-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
41 |
-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
42 |
-
|
43 |
-
- name: "Install dependencies with composer"
|
44 |
-
run: "composer install --no-interaction --no-progress"
|
45 |
-
|
46 |
-
- name: "Run a static analysis with phpstan/phpstan"
|
47 |
-
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
Copyright (c) 2014 Doctrine Project
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4 |
-
this software and associated documentation files (the "Software"), to deal in
|
5 |
-
the Software without restriction, including without limitation the rights to
|
6 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
7 |
-
of the Software, and to permit persons to whom the Software is furnished to do
|
8 |
-
so, subject to the following conditions:
|
9 |
-
|
10 |
-
The above copyright notice and this permission notice shall be included in all
|
11 |
-
copies or substantial portions of the Software.
|
12 |
-
|
13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/README.md
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
# Instantiator
|
2 |
-
|
3 |
-
This library provides a way of avoiding usage of constructors when instantiating PHP classes.
|
4 |
-
|
5 |
-
[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator)
|
6 |
-
[![Code Coverage](https://codecov.io/gh/doctrine/instantiator/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/instantiator/branch/master)
|
7 |
-
[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator)
|
8 |
-
|
9 |
-
[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator)
|
10 |
-
[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator)
|
11 |
-
|
12 |
-
## Installation
|
13 |
-
|
14 |
-
The suggested installation method is via [composer](https://getcomposer.org/):
|
15 |
-
|
16 |
-
```sh
|
17 |
-
php composer.phar require "doctrine/instantiator:~1.0.3"
|
18 |
-
```
|
19 |
-
|
20 |
-
## Usage
|
21 |
-
|
22 |
-
The instantiator is able to create new instances of any class without using the constructor or any API of the class
|
23 |
-
itself:
|
24 |
-
|
25 |
-
```php
|
26 |
-
$instantiator = new \Doctrine\Instantiator\Instantiator();
|
27 |
-
|
28 |
-
$instance = $instantiator->instantiate(\My\ClassName\Here::class);
|
29 |
-
```
|
30 |
-
|
31 |
-
## Contributing
|
32 |
-
|
33 |
-
Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out!
|
34 |
-
|
35 |
-
## Credits
|
36 |
-
|
37 |
-
This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which
|
38 |
-
has been donated to the doctrine organization, and which is now deprecated in favour of this package.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/composer.json
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "doctrine/instantiator",
|
3 |
-
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
4 |
-
"type": "library",
|
5 |
-
"license": "MIT",
|
6 |
-
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
|
7 |
-
"keywords": [
|
8 |
-
"instantiate",
|
9 |
-
"constructor"
|
10 |
-
],
|
11 |
-
"authors": [
|
12 |
-
{
|
13 |
-
"name": "Marco Pivetta",
|
14 |
-
"email": "ocramius@gmail.com",
|
15 |
-
"homepage": "https://ocramius.github.io/"
|
16 |
-
}
|
17 |
-
],
|
18 |
-
"require": {
|
19 |
-
"php": "^7.1 || ^8.0"
|
20 |
-
},
|
21 |
-
"require-dev": {
|
22 |
-
"ext-phar": "*",
|
23 |
-
"ext-pdo": "*",
|
24 |
-
"doctrine/coding-standard": "^8.0",
|
25 |
-
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
|
26 |
-
"phpstan/phpstan": "^0.12",
|
27 |
-
"phpstan/phpstan-phpunit": "^0.12",
|
28 |
-
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
29 |
-
},
|
30 |
-
"autoload": {
|
31 |
-
"psr-4": {
|
32 |
-
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
33 |
-
}
|
34 |
-
},
|
35 |
-
"autoload-dev": {
|
36 |
-
"psr-0": {
|
37 |
-
"DoctrineTest\\InstantiatorPerformance\\": "tests",
|
38 |
-
"DoctrineTest\\InstantiatorTest\\": "tests",
|
39 |
-
"DoctrineTest\\InstantiatorTestAsset\\": "tests"
|
40 |
-
}
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/docs/en/index.rst
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
Introduction
|
2 |
-
============
|
3 |
-
|
4 |
-
This library provides a way of avoiding usage of constructors when instantiating PHP classes.
|
5 |
-
|
6 |
-
Installation
|
7 |
-
============
|
8 |
-
|
9 |
-
The suggested installation method is via `composer`_:
|
10 |
-
|
11 |
-
.. code-block:: console
|
12 |
-
|
13 |
-
$ composer require doctrine/instantiator
|
14 |
-
|
15 |
-
Usage
|
16 |
-
=====
|
17 |
-
|
18 |
-
The instantiator is able to create new instances of any class without
|
19 |
-
using the constructor or any API of the class itself:
|
20 |
-
|
21 |
-
.. code-block:: php
|
22 |
-
|
23 |
-
<?php
|
24 |
-
|
25 |
-
use Doctrine\Instantiator\Instantiator;
|
26 |
-
use App\Entities\User;
|
27 |
-
|
28 |
-
$instantiator = new Instantiator();
|
29 |
-
|
30 |
-
$user = $instantiator->instantiate(User::class);
|
31 |
-
|
32 |
-
Contributing
|
33 |
-
============
|
34 |
-
|
35 |
-
- Follow the `Doctrine Coding Standard`_
|
36 |
-
- The project will follow strict `object calisthenics`_
|
37 |
-
- Any contribution must provide tests for additional introduced
|
38 |
-
conditions
|
39 |
-
- Any un-confirmed issue needs a failing test case before being
|
40 |
-
accepted
|
41 |
-
- Pull requests must be sent from a new hotfix/feature branch, not from
|
42 |
-
``master``.
|
43 |
-
|
44 |
-
Testing
|
45 |
-
=======
|
46 |
-
|
47 |
-
The PHPUnit version to be used is the one installed as a dev- dependency
|
48 |
-
via composer:
|
49 |
-
|
50 |
-
.. code-block:: console
|
51 |
-
|
52 |
-
$ ./vendor/bin/phpunit
|
53 |
-
|
54 |
-
Accepted coverage for new contributions is 80%. Any contribution not
|
55 |
-
satisfying this requirement won’t be merged.
|
56 |
-
|
57 |
-
Credits
|
58 |
-
=======
|
59 |
-
|
60 |
-
This library was migrated from `ocramius/instantiator`_, which has been
|
61 |
-
donated to the doctrine organization, and which is now deprecated in
|
62 |
-
favour of this package.
|
63 |
-
|
64 |
-
.. _composer: https://getcomposer.org/
|
65 |
-
.. _CONTRIBUTING.md: CONTRIBUTING.md
|
66 |
-
.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator
|
67 |
-
.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard
|
68 |
-
.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/docs/en/sidebar.rst
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
.. toctree::
|
2 |
-
:depth: 3
|
3 |
-
|
4 |
-
index
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/phpbench.json
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"bootstrap": "vendor/autoload.php",
|
3 |
-
"path": "tests/DoctrineTest/InstantiatorPerformance"
|
4 |
-
}
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/phpcs.xml.dist
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<ruleset>
|
3 |
-
<arg name="basepath" value="."/>
|
4 |
-
<arg name="extensions" value="php"/>
|
5 |
-
<arg name="parallel" value="80"/>
|
6 |
-
<arg name="cache" value=".phpcs-cache"/>
|
7 |
-
<arg name="colors"/>
|
8 |
-
|
9 |
-
<!-- Ignore warnings, show progress of the run and show sniff names -->
|
10 |
-
<arg value="nps"/>
|
11 |
-
|
12 |
-
<file>src</file>
|
13 |
-
<file>tests</file>
|
14 |
-
|
15 |
-
<rule ref="Doctrine">
|
16 |
-
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
|
17 |
-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint"/>
|
18 |
-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/>
|
19 |
-
<exclude name="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException"/>
|
20 |
-
</rule>
|
21 |
-
|
22 |
-
<!-- Disable the rules that will require PHP 7.4 -->
|
23 |
-
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
|
24 |
-
<properties>
|
25 |
-
<property name="enableNativeTypeHint" value="false"/>
|
26 |
-
</properties>
|
27 |
-
</rule>
|
28 |
-
|
29 |
-
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
|
30 |
-
<exclude-pattern>*/src/*</exclude-pattern>
|
31 |
-
</rule>
|
32 |
-
|
33 |
-
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
|
34 |
-
<exclude-pattern>*/src/*</exclude-pattern>
|
35 |
-
</rule>
|
36 |
-
|
37 |
-
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming">
|
38 |
-
<exclude-pattern>tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php</exclude-pattern>
|
39 |
-
</rule>
|
40 |
-
|
41 |
-
<rule ref="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming">
|
42 |
-
<exclude-pattern>src/Doctrine/Instantiator/Exception/UnexpectedValueException.php</exclude-pattern>
|
43 |
-
<exclude-pattern>src/Doctrine/Instantiator/Exception/InvalidArgumentException.php</exclude-pattern>
|
44 |
-
</rule>
|
45 |
-
|
46 |
-
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming">
|
47 |
-
<exclude-pattern>src/Doctrine/Instantiator/Exception/ExceptionInterface.php</exclude-pattern>
|
48 |
-
<exclude-pattern>src/Doctrine/Instantiator/InstantiatorInterface.php</exclude-pattern>
|
49 |
-
</rule>
|
50 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/phpstan.neon.dist
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
includes:
|
2 |
-
- vendor/phpstan/phpstan-phpunit/extension.neon
|
3 |
-
- vendor/phpstan/phpstan-phpunit/rules.neon
|
4 |
-
|
5 |
-
parameters:
|
6 |
-
level: max
|
7 |
-
paths:
|
8 |
-
- src
|
9 |
-
- tests
|
10 |
-
|
11 |
-
ignoreErrors:
|
12 |
-
# dynamic properties confuse static analysis
|
13 |
-
-
|
14 |
-
message: '#Access to an undefined property object::\$foo\.#'
|
15 |
-
path: '*/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Doctrine\Instantiator\Exception;
|
4 |
-
|
5 |
-
use Throwable;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Base exception marker interface for the instantiator component
|
9 |
-
*/
|
10 |
-
interface ExceptionInterface extends Throwable
|
11 |
-
{
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Doctrine\Instantiator\Exception;
|
4 |
-
|
5 |
-
use InvalidArgumentException as BaseInvalidArgumentException;
|
6 |
-
use ReflectionClass;
|
7 |
-
|
8 |
-
use function interface_exists;
|
9 |
-
use function sprintf;
|
10 |
-
use function trait_exists;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Exception for invalid arguments provided to the instantiator
|
14 |
-
*/
|
15 |
-
class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface
|
16 |
-
{
|
17 |
-
public static function fromNonExistingClass(string $className): self
|
18 |
-
{
|
19 |
-
if (interface_exists($className)) {
|
20 |
-
return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className));
|
21 |
-
}
|
22 |
-
|
23 |
-
if (trait_exists($className)) {
|
24 |
-
return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className));
|
25 |
-
}
|
26 |
-
|
27 |
-
return new self(sprintf('The provided class "%s" does not exist', $className));
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @template T of object
|
32 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
33 |
-
*/
|
34 |
-
public static function fromAbstractClass(ReflectionClass $reflectionClass): self
|
35 |
-
{
|
36 |
-
return new self(sprintf(
|
37 |
-
'The provided class "%s" is abstract, and can not be instantiated',
|
38 |
-
$reflectionClass->getName()
|
39 |
-
));
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Doctrine\Instantiator\Exception;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use ReflectionClass;
|
7 |
-
use UnexpectedValueException as BaseUnexpectedValueException;
|
8 |
-
|
9 |
-
use function sprintf;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Exception for given parameters causing invalid/unexpected state on instantiation
|
13 |
-
*/
|
14 |
-
class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface
|
15 |
-
{
|
16 |
-
/**
|
17 |
-
* @template T of object
|
18 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
19 |
-
*/
|
20 |
-
public static function fromSerializationTriggeredException(
|
21 |
-
ReflectionClass $reflectionClass,
|
22 |
-
Exception $exception
|
23 |
-
): self {
|
24 |
-
return new self(
|
25 |
-
sprintf(
|
26 |
-
'An exception was raised while trying to instantiate an instance of "%s" via un-serialization',
|
27 |
-
$reflectionClass->getName()
|
28 |
-
),
|
29 |
-
0,
|
30 |
-
$exception
|
31 |
-
);
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @template T of object
|
36 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
37 |
-
*/
|
38 |
-
public static function fromUncleanUnSerialization(
|
39 |
-
ReflectionClass $reflectionClass,
|
40 |
-
string $errorString,
|
41 |
-
int $errorCode,
|
42 |
-
string $errorFile,
|
43 |
-
int $errorLine
|
44 |
-
): self {
|
45 |
-
return new self(
|
46 |
-
sprintf(
|
47 |
-
'Could not produce an instance of "%s" via un-serialization, since an error was triggered '
|
48 |
-
. 'in file "%s" at line "%d"',
|
49 |
-
$reflectionClass->getName(),
|
50 |
-
$errorFile,
|
51 |
-
$errorLine
|
52 |
-
),
|
53 |
-
0,
|
54 |
-
new Exception($errorString, $errorCode)
|
55 |
-
);
|
56 |
-
}
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php
DELETED
@@ -1,232 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Doctrine\Instantiator;
|
4 |
-
|
5 |
-
use ArrayIterator;
|
6 |
-
use Doctrine\Instantiator\Exception\InvalidArgumentException;
|
7 |
-
use Doctrine\Instantiator\Exception\UnexpectedValueException;
|
8 |
-
use Exception;
|
9 |
-
use ReflectionClass;
|
10 |
-
use ReflectionException;
|
11 |
-
use Serializable;
|
12 |
-
|
13 |
-
use function class_exists;
|
14 |
-
use function is_subclass_of;
|
15 |
-
use function restore_error_handler;
|
16 |
-
use function set_error_handler;
|
17 |
-
use function sprintf;
|
18 |
-
use function strlen;
|
19 |
-
use function unserialize;
|
20 |
-
|
21 |
-
final class Instantiator implements InstantiatorInterface
|
22 |
-
{
|
23 |
-
/**
|
24 |
-
* Markers used internally by PHP to define whether {@see \unserialize} should invoke
|
25 |
-
* the method {@see \Serializable::unserialize()} when dealing with classes implementing
|
26 |
-
* the {@see \Serializable} interface.
|
27 |
-
*/
|
28 |
-
public const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C';
|
29 |
-
public const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O';
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Used to instantiate specific classes, indexed by class name.
|
33 |
-
*
|
34 |
-
* @var callable[]
|
35 |
-
*/
|
36 |
-
private static $cachedInstantiators = [];
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Array of objects that can directly be cloned, indexed by class name.
|
40 |
-
*
|
41 |
-
* @var object[]
|
42 |
-
*/
|
43 |
-
private static $cachedCloneables = [];
|
44 |
-
|
45 |
-
/**
|
46 |
-
* {@inheritDoc}
|
47 |
-
*/
|
48 |
-
public function instantiate($className)
|
49 |
-
{
|
50 |
-
if (isset(self::$cachedCloneables[$className])) {
|
51 |
-
return clone self::$cachedCloneables[$className];
|
52 |
-
}
|
53 |
-
|
54 |
-
if (isset(self::$cachedInstantiators[$className])) {
|
55 |
-
$factory = self::$cachedInstantiators[$className];
|
56 |
-
|
57 |
-
return $factory();
|
58 |
-
}
|
59 |
-
|
60 |
-
return $this->buildAndCacheFromFactory($className);
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Builds the requested object and caches it in static properties for performance
|
65 |
-
*
|
66 |
-
* @return object
|
67 |
-
*
|
68 |
-
* @template T of object
|
69 |
-
* @phpstan-param class-string<T> $className
|
70 |
-
*
|
71 |
-
* @phpstan-return T
|
72 |
-
*/
|
73 |
-
private function buildAndCacheFromFactory(string $className)
|
74 |
-
{
|
75 |
-
$factory = self::$cachedInstantiators[$className] = $this->buildFactory($className);
|
76 |
-
$instance = $factory();
|
77 |
-
|
78 |
-
if ($this->isSafeToClone(new ReflectionClass($instance))) {
|
79 |
-
self::$cachedCloneables[$className] = clone $instance;
|
80 |
-
}
|
81 |
-
|
82 |
-
return $instance;
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Builds a callable capable of instantiating the given $className without
|
87 |
-
* invoking its constructor.
|
88 |
-
*
|
89 |
-
* @throws InvalidArgumentException
|
90 |
-
* @throws UnexpectedValueException
|
91 |
-
* @throws ReflectionException
|
92 |
-
*
|
93 |
-
* @template T of object
|
94 |
-
* @phpstan-param class-string<T> $className
|
95 |
-
*
|
96 |
-
* @phpstan-return callable(): T
|
97 |
-
*/
|
98 |
-
private function buildFactory(string $className): callable
|
99 |
-
{
|
100 |
-
$reflectionClass = $this->getReflectionClass($className);
|
101 |
-
|
102 |
-
if ($this->isInstantiableViaReflection($reflectionClass)) {
|
103 |
-
return [$reflectionClass, 'newInstanceWithoutConstructor'];
|
104 |
-
}
|
105 |
-
|
106 |
-
$serializedString = sprintf(
|
107 |
-
'%s:%d:"%s":0:{}',
|
108 |
-
is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER,
|
109 |
-
strlen($className),
|
110 |
-
$className
|
111 |
-
);
|
112 |
-
|
113 |
-
$this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString);
|
114 |
-
|
115 |
-
return static function () use ($serializedString) {
|
116 |
-
return unserialize($serializedString);
|
117 |
-
};
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* @throws InvalidArgumentException
|
122 |
-
* @throws ReflectionException
|
123 |
-
*
|
124 |
-
* @template T of object
|
125 |
-
* @phpstan-param class-string<T> $className
|
126 |
-
*
|
127 |
-
* @phpstan-return ReflectionClass<T>
|
128 |
-
*/
|
129 |
-
private function getReflectionClass(string $className): ReflectionClass
|
130 |
-
{
|
131 |
-
if (! class_exists($className)) {
|
132 |
-
throw InvalidArgumentException::fromNonExistingClass($className);
|
133 |
-
}
|
134 |
-
|
135 |
-
$reflection = new ReflectionClass($className);
|
136 |
-
|
137 |
-
if ($reflection->isAbstract()) {
|
138 |
-
throw InvalidArgumentException::fromAbstractClass($reflection);
|
139 |
-
}
|
140 |
-
|
141 |
-
return $reflection;
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* @throws UnexpectedValueException
|
146 |
-
*
|
147 |
-
* @template T of object
|
148 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
149 |
-
*/
|
150 |
-
private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void
|
151 |
-
{
|
152 |
-
set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool {
|
153 |
-
$error = UnexpectedValueException::fromUncleanUnSerialization(
|
154 |
-
$reflectionClass,
|
155 |
-
$message,
|
156 |
-
$code,
|
157 |
-
$file,
|
158 |
-
$line
|
159 |
-
);
|
160 |
-
|
161 |
-
return true;
|
162 |
-
});
|
163 |
-
|
164 |
-
try {
|
165 |
-
$this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);
|
166 |
-
} finally {
|
167 |
-
restore_error_handler();
|
168 |
-
}
|
169 |
-
|
170 |
-
if ($error) {
|
171 |
-
throw $error;
|
172 |
-
}
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* @throws UnexpectedValueException
|
177 |
-
*
|
178 |
-
* @template T of object
|
179 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
180 |
-
*/
|
181 |
-
private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void
|
182 |
-
{
|
183 |
-
try {
|
184 |
-
unserialize($serializedString);
|
185 |
-
} catch (Exception $exception) {
|
186 |
-
throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception);
|
187 |
-
}
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* @template T of object
|
192 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
193 |
-
*/
|
194 |
-
private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool
|
195 |
-
{
|
196 |
-
return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal());
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Verifies whether the given class is to be considered internal
|
201 |
-
*
|
202 |
-
* @template T of object
|
203 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
204 |
-
*/
|
205 |
-
private function hasInternalAncestors(ReflectionClass $reflectionClass): bool
|
206 |
-
{
|
207 |
-
do {
|
208 |
-
if ($reflectionClass->isInternal()) {
|
209 |
-
return true;
|
210 |
-
}
|
211 |
-
|
212 |
-
$reflectionClass = $reflectionClass->getParentClass();
|
213 |
-
} while ($reflectionClass);
|
214 |
-
|
215 |
-
return false;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Checks if a class is cloneable
|
220 |
-
*
|
221 |
-
* Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects.
|
222 |
-
*
|
223 |
-
* @template T of object
|
224 |
-
* @phpstan-param ReflectionClass<T> $reflectionClass
|
225 |
-
*/
|
226 |
-
private function isSafeToClone(ReflectionClass $reflectionClass): bool
|
227 |
-
{
|
228 |
-
return $reflectionClass->isCloneable()
|
229 |
-
&& ! $reflectionClass->hasMethod('__clone')
|
230 |
-
&& ! $reflectionClass->isSubclassOf(ArrayIterator::class);
|
231 |
-
}
|
232 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Doctrine\Instantiator;
|
4 |
-
|
5 |
-
use Doctrine\Instantiator\Exception\ExceptionInterface;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Instantiator provides utility methods to build objects without invoking their constructors
|
9 |
-
*/
|
10 |
-
interface InstantiatorInterface
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* @param string $className
|
14 |
-
*
|
15 |
-
* @return object
|
16 |
-
*
|
17 |
-
* @throws ExceptionInterface
|
18 |
-
*
|
19 |
-
* @template T of object
|
20 |
-
* @phpstan-param class-string<T> $className
|
21 |
-
*/
|
22 |
-
public function instantiate($className);
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/.travis.yml
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
language: php
|
2 |
-
|
3 |
-
php:
|
4 |
-
- 7.1
|
5 |
-
- 7.2
|
6 |
-
- 7.3
|
7 |
-
- 7.4
|
8 |
-
- nightly
|
9 |
-
|
10 |
-
env:
|
11 |
-
- PHPUNIT=7.*
|
12 |
-
- PHPUNIT=8.*
|
13 |
-
- PHPUNIT=9.*
|
14 |
-
- PHPUNIT=dev-master MIN_STABILITY=dev
|
15 |
-
|
16 |
-
matrix:
|
17 |
-
exclude:
|
18 |
-
- php: 7.1
|
19 |
-
env: PHPUNIT=8.*
|
20 |
-
- php: 7.1
|
21 |
-
env: PHPUNIT=9.*
|
22 |
-
- php: 7.1
|
23 |
-
env: PHPUNIT=dev-master MIN_STABILITY=dev
|
24 |
-
- php: 7.2
|
25 |
-
env: PHPUNIT=9.*
|
26 |
-
- php: 7.2
|
27 |
-
env: PHPUNIT=dev-master MIN_STABILITY=dev
|
28 |
-
allow_failures:
|
29 |
-
- php: nightly
|
30 |
-
|
31 |
-
cache:
|
32 |
-
directories:
|
33 |
-
- $HOME/.composer
|
34 |
-
|
35 |
-
before_script:
|
36 |
-
- phpenv config-rm xdebug.ini || true
|
37 |
-
- if [ "$MIN_STABILITY" != "" ]; then composer config minimum-stability $MIN_STABILITY; fi
|
38 |
-
- composer require phpunit/phpunit:${PHPUNIT}
|
39 |
-
|
40 |
-
script:
|
41 |
-
- ./vendor/bin/phpunit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/CHANGELOG.md
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
CHANGELOG
|
2 |
-
=================
|
3 |
-
|
4 |
-
View diff for a specific commit:
|
5 |
-
https://github.com/johnkary/phpunit-speedtrap/commit/XXX where XXX is the commit hash
|
6 |
-
|
7 |
-
View diff between two versions:
|
8 |
-
https://github.com/johnkary/phpunit-speedtrap/compare/v3.2.0...v3.3.0
|
9 |
-
|
10 |
-
## 3.3.0 (2020-12-18)
|
11 |
-
|
12 |
-
Version 3.3 adds supports for PHPUnit 9.5+, and a way to enable or disable the SpeedTrap listener using environment variables.
|
13 |
-
|
14 |
-
* [PR #73](https://github.com/johnkary/phpunit-speedtrap/pull/73) Compatibility with PHPUnit 9.5
|
15 |
-
* [PR #66](https://github.com/johnkary/phpunit-speedtrap/pull/66) Environment variable PHPUNIT_SPEEDTRAP="disabled" can disable profiling
|
16 |
-
|
17 |
-
## 3.2.0 (2020-02-12)
|
18 |
-
|
19 |
-
Version 3.2 introduces supports for PHPUnit 9.0+.
|
20 |
-
If your use of SpeedTrap depends on specific text output from SpeedTrap slowness
|
21 |
-
report, see below wording changes that may require updating your implementation.
|
22 |
-
|
23 |
-
* [PR #57](https://github.com/johnkary/phpunit-speedtrap/pull/57) Wording change to slowness report in renderHeader()
|
24 |
-
|
25 |
-
## 3.1.0 (2019-02-23)
|
26 |
-
|
27 |
-
Version 3.1 introduces support for PHPUnit 8.0+.
|
28 |
-
|
29 |
-
## 3.0.0 (2018-02-24)
|
30 |
-
|
31 |
-
Version 3.0 introduces support for PHPUnit 7.0+ and PHP 7.1+.
|
32 |
-
|
33 |
-
Changes may be required if you have extended SpeedTrapListener. See
|
34 |
-
[UPGRADE.md](UPGRADE.md) for upgrading your subclass to support 3.0.
|
35 |
-
|
36 |
-
* [PR #41](https://github.com/johnkary/phpunit-speedtrap/pull/41) Make compatible with phpunit 7.x
|
37 |
-
|
38 |
-
## 2.0.0 (2017-12-06)
|
39 |
-
|
40 |
-
Version 2.0 introduces support for PHPUnit 6.0+, PHP 7.0+ and PSR-4 autoloading.
|
41 |
-
|
42 |
-
Changes are required if you have extended SpeedTrapListener. See
|
43 |
-
[UPGRADE.md](UPGRADE.md) for upgrading your subclass to support 2.0.
|
44 |
-
|
45 |
-
* [PR #26](https://github.com/johnkary/phpunit-speedtrap/pull/26) Support PHPUnit 6.0
|
46 |
-
* [PR #30](https://github.com/johnkary/phpunit-speedtrap/pull/30) Add PHP 7 features (includes backwards compatibility breaks, see UPGRADE.md)
|
47 |
-
* [PR #31](https://github.com/johnkary/phpunit-speedtrap/pull/31) Support PSR-4 autoloading
|
48 |
-
* [PR #39](https://github.com/johnkary/phpunit-speedtrap/pull/39) SpeedTrapListener extends PHPUnit BaseTestListener
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
The MIT License (MIT)
|
2 |
-
|
3 |
-
Copyright (c) 2014 John Kary
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6 |
-
this software and associated documentation files (the "Software"), to deal in
|
7 |
-
the Software without restriction, including without limitation the rights to
|
8 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9 |
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
10 |
-
subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17 |
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18 |
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19 |
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20 |
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/README.md
DELETED
@@ -1,183 +0,0 @@
|
|
1 |
-
# phpunit-speedtrap
|
2 |
-
|
3 |
-
[![Build Status](https://travis-ci.org/johnkary/phpunit-speedtrap.svg?branch=master)](https://travis-ci.org/johnkary/phpunit-speedtrap)
|
4 |
-
|
5 |
-
SpeedTrap reports on slow-running PHPUnit tests right in the console.
|
6 |
-
|
7 |
-
Many factors affect test execution time. A test not properly isolated from variable latency (database, network, etc.) and even basic load on the test machine will cause test execution times to fluctuate.
|
8 |
-
|
9 |
-
SpeedTrap helps **identify slow tests** but cannot explain **why** those tests are slow. For that consider using [Blackfire.io](https://blackfire.io) to profile the test suite, or another PHPUnit listener [PHPUnit\_Listener\_XHProf](https://github.com/sebastianbergmann/phpunit-testlistener-xhprof), to specifically identify slow code.
|
10 |
-
|
11 |
-
![Screenshot of terminal using SpeedTrap](http://i.imgur.com/Zr34giR.png)
|
12 |
-
|
13 |
-
## Installation
|
14 |
-
|
15 |
-
SpeedTrap is installed using [Composer](http://getcomposer.org). Add it as a `require-dev` dependency:
|
16 |
-
|
17 |
-
composer require --dev johnkary/phpunit-speedtrap
|
18 |
-
|
19 |
-
|
20 |
-
## Usage
|
21 |
-
|
22 |
-
Enable with all defaults by adding the following code to your project's `phpunit.xml` file:
|
23 |
-
|
24 |
-
```xml
|
25 |
-
<phpunit bootstrap="vendor/autoload.php">
|
26 |
-
...
|
27 |
-
<listeners>
|
28 |
-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
29 |
-
</listeners>
|
30 |
-
</phpunit>
|
31 |
-
```
|
32 |
-
|
33 |
-
Now run the test suite. If one or more test executions exceed the slowness threshold (500ms by default), SpeedTrap will report on those tests in the console after all tests have completed.
|
34 |
-
|
35 |
-
## Config Parameters
|
36 |
-
|
37 |
-
SpeedTrap also supports these parameters:
|
38 |
-
|
39 |
-
* **slowThreshold** - Number of milliseconds when a test is considered "slow" (Default: 500ms)
|
40 |
-
* **reportLength** - Number of slow tests included in the report (Default: 10 tests)
|
41 |
-
|
42 |
-
Each parameter is set in `phpunit.xml`:
|
43 |
-
|
44 |
-
```xml
|
45 |
-
<phpunit bootstrap="vendor/autoload.php">
|
46 |
-
<!-- ... other suite configuration here ... -->
|
47 |
-
|
48 |
-
<listeners>
|
49 |
-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
|
50 |
-
<arguments>
|
51 |
-
<array>
|
52 |
-
<element key="slowThreshold">
|
53 |
-
<integer>500</integer>
|
54 |
-
</element>
|
55 |
-
<element key="reportLength">
|
56 |
-
<integer>5</integer>
|
57 |
-
</element>
|
58 |
-
</array>
|
59 |
-
</arguments>
|
60 |
-
</listener>
|
61 |
-
</listeners>
|
62 |
-
</phpunit>
|
63 |
-
```
|
64 |
-
|
65 |
-
## Custom slowness threshold per-test case
|
66 |
-
|
67 |
-
Some projects have a few complex tests that take a long time to run. It is possible to set a different slowness threshold for individual test cases.
|
68 |
-
|
69 |
-
The annotation `@slowThreshold` can set a custom slowness threshold for each test case. This number may be higher or lower than the default threshold and is used instead of the default threshold for that specific test.
|
70 |
-
|
71 |
-
```php
|
72 |
-
class SomeTestCase extends PHPUnit\Framework\TestCase
|
73 |
-
{
|
74 |
-
/**
|
75 |
-
* @slowThreshold 5000
|
76 |
-
*/
|
77 |
-
public function testLongRunningProcess()
|
78 |
-
{
|
79 |
-
// Code that takes a longer time to execute
|
80 |
-
}
|
81 |
-
}
|
82 |
-
```
|
83 |
-
|
84 |
-
## Disable slowness profiling using an environment variable
|
85 |
-
|
86 |
-
SpeedTrapListener profiles for slow tests when enabled in phpunit.xml. But using an environment variable named `PHPUNIT_SPEEDTRAP` can enable or disable the listener.
|
87 |
-
|
88 |
-
$ PHPUNIT_SPEEDTRAP="disabled" ./vendor/bin/phpunit
|
89 |
-
|
90 |
-
#### Use case: Disable profiling in development, but profile with Travis CI
|
91 |
-
|
92 |
-
Travis CI is popular for running tests in the cloud after pushing new code to a repository.
|
93 |
-
|
94 |
-
Step 1) Enable SpeedTrapListener in phpunit.xml, but set `PHPUNIT_SPEEDTRAP="disabled"` to disable profiling when running tests.
|
95 |
-
|
96 |
-
```xml
|
97 |
-
<phpunit bootstrap="vendor/autoload.php">
|
98 |
-
...
|
99 |
-
<php>
|
100 |
-
<env name="PHPUNIT_SPEEDTRAP" value="disabled" />
|
101 |
-
</php>
|
102 |
-
|
103 |
-
<listeners>
|
104 |
-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
105 |
-
</listeners>
|
106 |
-
</phpunit>
|
107 |
-
```
|
108 |
-
|
109 |
-
Step 2) Configure `.travis.yml` with `PHPUNIT_SPEEDTRAP="enabled"` to profile for slow tests when running on Travis CI:
|
110 |
-
|
111 |
-
```yaml
|
112 |
-
language: php
|
113 |
-
|
114 |
-
php:
|
115 |
-
- 7.3
|
116 |
-
|
117 |
-
env:
|
118 |
-
- PHPUNIT_SPEEDTRAP="enabled"
|
119 |
-
```
|
120 |
-
|
121 |
-
Step 3) View the Travis CI build output and read the slowness report printed in the console.
|
122 |
-
|
123 |
-
[Travis CI Documentation - Environment Variables](https://docs.travis-ci.com/user/environment-variables)
|
124 |
-
|
125 |
-
#### Use case: Enable profiling in development, but disable with Travis CI
|
126 |
-
|
127 |
-
Step 1) Enable SpeedTrapListener in phpunit.xml. The slowness report will output during all test suite executions.
|
128 |
-
|
129 |
-
```xml
|
130 |
-
<phpunit bootstrap="vendor/autoload.php">
|
131 |
-
...
|
132 |
-
<listeners>
|
133 |
-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
134 |
-
</listeners>
|
135 |
-
</phpunit>
|
136 |
-
```
|
137 |
-
|
138 |
-
Step 2) Configure `.travis.yml` with `PHPUNIT_SPEEDTRAP="disabled"` to turn off profiling when running on Travis CI:
|
139 |
-
|
140 |
-
```yaml
|
141 |
-
language: php
|
142 |
-
|
143 |
-
php:
|
144 |
-
- 7.3
|
145 |
-
|
146 |
-
env:
|
147 |
-
- PHPUNIT_SPEEDTRAP="disabled"
|
148 |
-
```
|
149 |
-
|
150 |
-
Step 3) View the Travis CI build output and confirm the slowness report is not printed in the console.
|
151 |
-
|
152 |
-
#### Use case: Only enable SpeedTrapListener on demand via command-line
|
153 |
-
|
154 |
-
Useful when you only want to profile slow tests once in a while.
|
155 |
-
|
156 |
-
Step 1) Setup phpunit.xml to enable SpeedTrapListener, but disable slowness profiling by setting `PHPUNIT_SPEEDTRAP="disabled"` like this:
|
157 |
-
|
158 |
-
```xml
|
159 |
-
<phpunit bootstrap="vendor/autoload.php">
|
160 |
-
...
|
161 |
-
<php>
|
162 |
-
<env name="PHPUNIT_SPEEDTRAP" value="disabled" />
|
163 |
-
</php>
|
164 |
-
|
165 |
-
<listeners>
|
166 |
-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
167 |
-
</listeners>
|
168 |
-
</phpunit>
|
169 |
-
```
|
170 |
-
|
171 |
-
Step 2) When executing `phpunit` from the command-line, enable slowness profiling only for this run by passing the environment variable `PHPUNIT_SPEEDTRAP="enabled"` like this:
|
172 |
-
|
173 |
-
```bash
|
174 |
-
$ PHPUNIT_SPEEDTRAP=enabled ./vendor/bin/phpunit
|
175 |
-
```
|
176 |
-
|
177 |
-
## Inspiration
|
178 |
-
|
179 |
-
SpeedTrap was inspired by [RSpec's](https://github.com/rspec/rspec) `--profile` option that displays feedback about slow tests.
|
180 |
-
|
181 |
-
## License
|
182 |
-
|
183 |
-
phpunit-speedtrap is available under the MIT License.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/UPGRADE.md
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
UPGRADE FROM 2.x to 3.0
|
2 |
-
=======================
|
3 |
-
|
4 |
-
### `JohnKary\PHPUnit\Listener\SpeedTrapListener` subclasses must ensure method signatures match PHPUnit TestListenerDefaultImplementation
|
5 |
-
|
6 |
-
SpeedTrapListener was upgraded to support PHPUnit 7.0, which introduced a
|
7 |
-
new trait `TestListenerDefaultImplementation` containing a few new scalar type
|
8 |
-
hints and void return hints. SpeedTrapListener subclasses overriding any
|
9 |
-
of the below methods will require updating the new method signatures:
|
10 |
-
|
11 |
-
| Old signature | New signature |
|
12 |
-
| -------- | --- |
|
13 |
-
| `public function endTest(Test $test, $time)` | `public function endTest(Test $test, float $time): void`
|
14 |
-
| `public function startTestSuite(TestSuite $suite)` | `public function startTestSuite(TestSuite $suite): void`
|
15 |
-
| `public function endTestSuite(TestSuite $suite)` | `public function endTestSuite(TestSuite $suite): void`
|
16 |
-
|
17 |
-
|
18 |
-
UPGRADE FROM 1.x to 2.0
|
19 |
-
=======================
|
20 |
-
|
21 |
-
### `JohnKary\PHPUnit\Listener\SpeedTrapListener` subclasses must implement scalar type hints
|
22 |
-
|
23 |
-
SpeedTrapListener was upgraded to support PHP 7 scalar type hints. Any
|
24 |
-
subclass will need to update the overridden function signature:
|
25 |
-
|
26 |
-
* Declare strict types at the top of your subclass: `declare(strict_types=1);`
|
27 |
-
* Update method signatures:
|
28 |
-
|
29 |
-
| Old signature | New signature |
|
30 |
-
| -------- | --- |
|
31 |
-
| `protected function isSlow($time, $slowThreshold)` | `protected function isSlow(int $time, int $slowThreshold) : bool`
|
32 |
-
| `protected function addSlowTest(TestCase $test, $time)` | `protected function addSlowTest(TestCase $test, int $time)`
|
33 |
-
| `protected function hasSlowTests()` | `protected function hasSlowTests() : bool`
|
34 |
-
| `protected function toMilliseconds($time)` | `protected function toMilliseconds(float $time) : int`
|
35 |
-
| `protected function makeLabel(TestCase $test)` | `protected function makeLabel(TestCase $test) : string`
|
36 |
-
| `protected function getReportLength()` | `protected function getReportLength() : int`
|
37 |
-
| `protected function getHiddenCount()` | `protected function getHiddenCount() : int`
|
38 |
-
| `protected function getSlowThreshold(TestCase $test)` | `protected function getSlowThreshold(TestCase $test) : int`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/composer.json
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "johnkary/phpunit-speedtrap",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Find and report on slow tests in your PHPUnit test suite",
|
5 |
-
"keywords": [
|
6 |
-
"PHPUnit",
|
7 |
-
"slow",
|
8 |
-
"profile"
|
9 |
-
],
|
10 |
-
"homepage": "https://github.com/johnkary/phpunit-speedtrap",
|
11 |
-
"license": "MIT",
|
12 |
-
"authors": [
|
13 |
-
{
|
14 |
-
"name": "John Kary",
|
15 |
-
"email": "john@johnkary.net"
|
16 |
-
}
|
17 |
-
],
|
18 |
-
"require": {
|
19 |
-
"php": ">=7.1",
|
20 |
-
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
21 |
-
},
|
22 |
-
"extra": {
|
23 |
-
"branch-alias": {
|
24 |
-
"dev-master": "4.0-dev"
|
25 |
-
}
|
26 |
-
},
|
27 |
-
"autoload": {
|
28 |
-
"psr-4": {
|
29 |
-
"JohnKary\\PHPUnit\\Listener\\": "src/"
|
30 |
-
}
|
31 |
-
},
|
32 |
-
"autoload-dev": {
|
33 |
-
"psr-4": {
|
34 |
-
"JohnKary\\PHPUnit\\Listener\\Tests\\": "tests/"
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/phpunit.xml.dist
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
|
3 |
-
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
|
4 |
-
<phpunit
|
5 |
-
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
|
6 |
-
xsi:noNamespaceSchemaLocation = "vendor/phpunit/phpunit/phpunit.xsd"
|
7 |
-
backupGlobals = "false"
|
8 |
-
backupStaticAttributes = "false"
|
9 |
-
colors = "true"
|
10 |
-
convertErrorsToExceptions = "true"
|
11 |
-
convertNoticesToExceptions = "true"
|
12 |
-
convertWarningsToExceptions = "true"
|
13 |
-
processIsolation = "false"
|
14 |
-
stopOnFailure = "false"
|
15 |
-
bootstrap = "vendor/autoload.php">
|
16 |
-
|
17 |
-
<testsuites>
|
18 |
-
<testsuite name="Project Test Suite">
|
19 |
-
<directory>tests</directory>
|
20 |
-
</testsuite>
|
21 |
-
</testsuites>
|
22 |
-
|
23 |
-
<listeners>
|
24 |
-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
|
25 |
-
<arguments>
|
26 |
-
<array>
|
27 |
-
<element key="slowThreshold">
|
28 |
-
<integer>500</integer>
|
29 |
-
</element>
|
30 |
-
<element key="reportLength">
|
31 |
-
<integer>5</integer>
|
32 |
-
</element>
|
33 |
-
</array>
|
34 |
-
</arguments>
|
35 |
-
</listener>
|
36 |
-
</listeners>
|
37 |
-
|
38 |
-
<filter>
|
39 |
-
<whitelist>
|
40 |
-
<directory>src</directory>
|
41 |
-
</whitelist>
|
42 |
-
</filter>
|
43 |
-
|
44 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/src/SpeedTrapListener.php
DELETED
@@ -1,251 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
declare(strict_types=1);
|
3 |
-
|
4 |
-
namespace JohnKary\PHPUnit\Listener;
|
5 |
-
|
6 |
-
use PHPUnit\Framework\{TestListener, TestListenerDefaultImplementation, TestSuite, Test, TestCase};
|
7 |
-
use PHPUnit\Util\Test as TestUtil;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* A PHPUnit TestListener that exposes your slowest running tests by outputting
|
11 |
-
* results directly to the console.
|
12 |
-
*/
|
13 |
-
class SpeedTrapListener implements TestListener
|
14 |
-
{
|
15 |
-
use TestListenerDefaultImplementation;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Slowness profiling enabled by default. Set to false to disable profiling
|
19 |
-
* and reporting.
|
20 |
-
*
|
21 |
-
* Use environment variable "PHPUNIT_SPEEDTRAP" set to value "disabled" to
|
22 |
-
* disable profiling.
|
23 |
-
*
|
24 |
-
* @var boolean
|
25 |
-
*/
|
26 |
-
protected $enabled = true;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Internal tracking for test suites.
|
30 |
-
*
|
31 |
-
* Increments as more suites are run, then decremented as they finish. All
|
32 |
-
* suites have been run when returns to 0.
|
33 |
-
*/
|
34 |
-
protected $suites = 0;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Test execution time (milliseconds) after which a test will be considered
|
38 |
-
* "slow" and be included in the slowness report.
|
39 |
-
*
|
40 |
-
* @var int
|
41 |
-
*/
|
42 |
-
protected $slowThreshold;
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Number of tests to print in slowness report.
|
46 |
-
*
|
47 |
-
* @var int
|
48 |
-
*/
|
49 |
-
protected $reportLength;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Collection of slow tests.
|
53 |
-
* Keys (string) => Printable label describing the test
|
54 |
-
* Values (int) => Test execution time, in milliseconds
|
55 |
-
*/
|
56 |
-
protected $slow = [];
|
57 |
-
|
58 |
-
public function __construct(array $options = [])
|
59 |
-
{
|
60 |
-
$this->enabled = getenv('PHPUNIT_SPEEDTRAP') === 'disabled' ? false : true;
|
61 |
-
|
62 |
-
$this->loadOptions($options);
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* A test ended.
|
67 |
-
*
|
68 |
-
* @param Test $test
|
69 |
-
* @param float $time
|
70 |
-
*/
|
71 |
-
public function endTest(Test $test, float $time): void
|
72 |
-
{
|
73 |
-
if (!$this->enabled) return;
|
74 |
-
if (!$test instanceof TestCase) return;
|
75 |
-
|
76 |
-
$timeInMilliseconds = $this->toMilliseconds($time);
|
77 |
-
$threshold = $this->getSlowThreshold($test);
|
78 |
-
|
79 |
-
if ($this->isSlow($timeInMilliseconds, $threshold)) {
|
80 |
-
$this->addSlowTest($test, $timeInMilliseconds);
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* A test suite started.
|
86 |
-
*
|
87 |
-
* @param TestSuite $suite
|
88 |
-
*/
|
89 |
-
public function startTestSuite(TestSuite $suite): void
|
90 |
-
{
|
91 |
-
if (!$this->enabled) return;
|
92 |
-
|
93 |
-
$this->suites++;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* A test suite ended.
|
98 |
-
*
|
99 |
-
* @param TestSuite $suite
|
100 |
-
*/
|
101 |
-
public function endTestSuite(TestSuite $suite): void
|
102 |
-
{
|
103 |
-
if (!$this->enabled) return;
|
104 |
-
|
105 |
-
$this->suites--;
|
106 |
-
|
107 |
-
if (0 === $this->suites && $this->hasSlowTests()) {
|
108 |
-
arsort($this->slow); // Sort longest running tests to the top
|
109 |
-
|
110 |
-
$this->renderHeader();
|
111 |
-
$this->renderBody();
|
112 |
-
$this->renderFooter();
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Whether the given test execution time is considered slow.
|
118 |
-
*
|
119 |
-
* @param int $time Test execution time in milliseconds
|
120 |
-
* @param int $slowThreshold Test execution time at which a test should be considered slow, in milliseconds
|
121 |
-
*/
|
122 |
-
protected function isSlow(int $time, int $slowThreshold): bool
|
123 |
-
{
|
124 |
-
return $time >= $slowThreshold;
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Stores a test as slow.
|
129 |
-
*/
|
130 |
-
protected function addSlowTest(TestCase $test, int $time)
|
131 |
-
{
|
132 |
-
$label = $this->makeLabel($test);
|
133 |
-
|
134 |
-
$this->slow[$label] = $time;
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Whether at least one test has been considered slow.
|
139 |
-
*/
|
140 |
-
protected function hasSlowTests(): bool
|
141 |
-
{
|
142 |
-
return !empty($this->slow);
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Convert PHPUnit's reported test time (microseconds) to milliseconds.
|
147 |
-
*/
|
148 |
-
protected function toMilliseconds(float $time): int
|
149 |
-
{
|
150 |
-
return (int) round($time * 1000);
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Label describing a test.
|
155 |
-
*/
|
156 |
-
protected function makeLabel(TestCase $test): string
|
157 |
-
{
|
158 |
-
return sprintf('%s:%s', get_class($test), $test->getName());
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Calculate number of tests to include in slowness report.
|
163 |
-
*/
|
164 |
-
protected function getReportLength(): int
|
165 |
-
{
|
166 |
-
return min(count($this->slow), $this->reportLength);
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Calculate number of slow tests to be hidden from the slowness report
|
171 |
-
* due to list length.
|
172 |
-
*/
|
173 |
-
protected function getHiddenCount(): int
|
174 |
-
{
|
175 |
-
$total = count($this->slow);
|
176 |
-
$showing = $this->getReportLength();
|
177 |
-
|
178 |
-
$hidden = 0;
|
179 |
-
if ($total > $showing) {
|
180 |
-
$hidden = $total - $showing;
|
181 |
-
}
|
182 |
-
|
183 |
-
return $hidden;
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Renders slowness report header.
|
188 |
-
*/
|
189 |
-
protected function renderHeader()
|
190 |
-
{
|
191 |
-
echo sprintf("\n\nYou should really speed up these slow tests (>%sms)...\n", $this->slowThreshold);
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Renders slowness report body.
|
196 |
-
*/
|
197 |
-
protected function renderBody()
|
198 |
-
{
|
199 |
-
$slowTests = $this->slow;
|
200 |
-
|
201 |
-
$length = $this->getReportLength();
|
202 |
-
for ($i = 1; $i <= $length; ++$i) {
|
203 |
-
$label = key($slowTests);
|
204 |
-
$time = array_shift($slowTests);
|
205 |
-
|
206 |
-
echo sprintf(" %s. %sms to run %s\n", $i, $time, $label);
|
207 |
-
}
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Renders slowness report footer.
|
212 |
-
*/
|
213 |
-
protected function renderFooter()
|
214 |
-
{
|
215 |
-
if ($hidden = $this->getHiddenCount()) {
|
216 |
-
echo sprintf("...and there %s %s more above your threshold hidden from view", $hidden == 1 ? 'is' : 'are', $hidden);
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Populate options into class internals.
|
222 |
-
*/
|
223 |
-
protected function loadOptions(array $options)
|
224 |
-
{
|
225 |
-
$this->slowThreshold = $options['slowThreshold'] ?? 500;
|
226 |
-
$this->reportLength = $options['reportLength'] ?? 10;
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Calculate slow test threshold for given test. A TestCase may override the
|
231 |
-
* suite-wide slowness threshold by using the annotation {@slowThreshold}
|
232 |
-
* with a threshold value in milliseconds.
|
233 |
-
*
|
234 |
-
* For example, the following test would be considered slow if its execution
|
235 |
-
* time meets or exceeds 5000ms (5 seconds):
|
236 |
-
*
|
237 |
-
* <code>
|
238 |
-
* \@slowThreshold 5000
|
239 |
-
* public function testLongRunningProcess() {}
|
240 |
-
* </code>
|
241 |
-
*/
|
242 |
-
protected function getSlowThreshold(TestCase $test): int
|
243 |
-
{
|
244 |
-
$ann = TestUtil::parseTestMethodAnnotations(
|
245 |
-
get_class($test),
|
246 |
-
$test->getName(false)
|
247 |
-
);
|
248 |
-
|
249 |
-
return isset($ann['method']['slowThreshold'][0]) ? (int) $ann['method']['slowThreshold'][0] : $this->slowThreshold;
|
250 |
-
}
|
251 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/tests/ExceptionalTest.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
declare(strict_types=1);
|
3 |
-
|
4 |
-
namespace JohnKary\PHPUnit\Listener\Tests;
|
5 |
-
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
class ExceptionalTest extends TestCase
|
9 |
-
{
|
10 |
-
public function testExceptionCanBeThrownInTest()
|
11 |
-
{
|
12 |
-
$this->expectException('InvalidArgumentException');
|
13 |
-
$this->expectExceptionMessage('CODE1');
|
14 |
-
throw new \InvalidArgumentException('CODE1');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function testSkippedTest()
|
18 |
-
{
|
19 |
-
$this->markTestSkipped('Skipped tests do not cause Exceptions in Listener');
|
20 |
-
}
|
21 |
-
|
22 |
-
public function testIncompleteTest()
|
23 |
-
{
|
24 |
-
$this->markTestIncomplete('Incomplete tests do not cause Exceptions in Listener');
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/johnkary/phpunit-speedtrap/tests/SomeSlowTest.php
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
declare(strict_types=1);
|
3 |
-
|
4 |
-
namespace JohnKary\PHPUnit\Listener\Tests;
|
5 |
-
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
class SomeSlowTest extends TestCase
|
9 |
-
{
|
10 |
-
public function testFastTest()
|
11 |
-
{
|
12 |
-
$this->assertTrue(true);
|
13 |
-
}
|
14 |
-
|
15 |
-
public function testSlowTests()
|
16 |
-
{
|
17 |
-
$this->extendTime(300);
|
18 |
-
|
19 |
-
$this->assertTrue(true);
|
20 |
-
}
|
21 |
-
|
22 |
-
public function testAnotherSlowTests()
|
23 |
-
{
|
24 |
-
$this->extendTime(500);
|
25 |
-
|
26 |
-
$this->assertTrue(true);
|
27 |
-
}
|
28 |
-
|
29 |
-
public function testLongEndToEndTest()
|
30 |
-
{
|
31 |
-
$this->extendTime(500);
|
32 |
-
|
33 |
-
$this->assertTrue(true);
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @dataProvider provideTime
|
38 |
-
*/
|
39 |
-
public function testWithDataProvider(int $time)
|
40 |
-
{
|
41 |
-
$this->extendTime($time);
|
42 |
-
|
43 |
-
$this->assertTrue(true);
|
44 |
-
}
|
45 |
-
public function provideTime()
|
46 |
-
{
|
47 |
-
return [
|
48 |
-
'Rock' => [800],
|
49 |
-
'Chalk' => [700],
|
50 |
-
'Jayhawk' => [600],
|
51 |
-
];
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* This test's runtime would normally be under the suite's threshold, but
|
56 |
-
* this annotation sets a lower threshold, causing it to be considered slow
|
57 |
-
* and reported on in the test output.
|
58 |
-
*
|
59 |
-
* @slowThreshold 5
|
60 |
-
*/
|
61 |
-
public function testCanSetLowerSlowThreshold()
|
62 |
-
{
|
63 |
-
$this->extendTime(10);
|
64 |
-
$this->assertTrue(true);
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* This test's runtime would normally be over the suite's threshold, but
|
69 |
-
* this annotation sets a higher threshold, causing it to be not be
|
70 |
-
* considered slow and not reported on in the test output.
|
71 |
-
*
|
72 |
-
* @slowThreshold 50000
|
73 |
-
*/
|
74 |
-
public function testCanSetHigherSlowThreshold()
|
75 |
-
{
|
76 |
-
$this->extendTime(600);
|
77 |
-
$this->assertTrue(true);
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @param int $ms Number of additional microseconds to execute code
|
82 |
-
*/
|
83 |
-
private function extendTime(int $ms)
|
84 |
-
{
|
85 |
-
usleep($ms * 1000);
|
86 |
-
}
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/.github/FUNDING.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
# These are supported funding model platforms
|
2 |
-
|
3 |
-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4 |
-
patreon: # Replace with a single Patreon username
|
5 |
-
open_collective: # Replace with a single Open Collective username
|
6 |
-
ko_fi: # Replace with a single Ko-fi username
|
7 |
-
tidelift: "packagist/myclabs/deep-copy"
|
8 |
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9 |
-
liberapay: # Replace with a single Liberapay username
|
10 |
-
issuehunt: # Replace with a single IssueHunt username
|
11 |
-
otechie: # Replace with a single Otechie username
|
12 |
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
The MIT License (MIT)
|
2 |
-
|
3 |
-
Copyright (c) 2013 My C-Sense
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6 |
-
this software and associated documentation files (the "Software"), to deal in
|
7 |
-
the Software without restriction, including without limitation the rights to
|
8 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9 |
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
10 |
-
subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17 |
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18 |
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19 |
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20 |
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/README.md
DELETED
@@ -1,375 +0,0 @@
|
|
1 |
-
# DeepCopy
|
2 |
-
|
3 |
-
DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph.
|
4 |
-
|
5 |
-
[![Build Status](https://travis-ci.org/myclabs/DeepCopy.png?branch=1.x)](https://travis-ci.org/myclabs/DeepCopy)
|
6 |
-
[![Coverage Status](https://coveralls.io/repos/myclabs/DeepCopy/badge.png?branch=1.x)](https://coveralls.io/r/myclabs/DeepCopy?branch=1.x)
|
7 |
-
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/myclabs/DeepCopy/badges/quality-score.png?s=2747100c19b275f93a777e3297c6c12d1b68b934)](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
|
8 |
-
[![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy)
|
9 |
-
|
10 |
-
## Table of Contents
|
11 |
-
|
12 |
-
1. [How](#how)
|
13 |
-
1. [Why](#why)
|
14 |
-
1. [Using simply `clone`](#using-simply-clone)
|
15 |
-
1. [Overridding `__clone()`](#overridding-__clone)
|
16 |
-
1. [With `DeepCopy`](#with-deepcopy)
|
17 |
-
1. [How it works](#how-it-works)
|
18 |
-
1. [Going further](#going-further)
|
19 |
-
1. [Matchers](#matchers)
|
20 |
-
1. [Property name](#property-name)
|
21 |
-
1. [Specific property](#specific-property)
|
22 |
-
1. [Type](#type)
|
23 |
-
1. [Filters](#filters)
|
24 |
-
1. [`SetNullFilter`](#setnullfilter-filter)
|
25 |
-
1. [`KeepFilter`](#keepfilter-filter)
|
26 |
-
1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter-filter)
|
27 |
-
1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter-filter)
|
28 |
-
1. [`DoctrineProxyFilter`](#doctrineproxyfilter-filter)
|
29 |
-
1. [`ReplaceFilter`](#replacefilter-type-filter)
|
30 |
-
1. [`ShallowCopyFilter`](#shallowcopyfilter-type-filter)
|
31 |
-
1. [Edge cases](#edge-cases)
|
32 |
-
1. [Contributing](#contributing)
|
33 |
-
1. [Tests](#tests)
|
34 |
-
|
35 |
-
|
36 |
-
## How?
|
37 |
-
|
38 |
-
Install with Composer:
|
39 |
-
|
40 |
-
```json
|
41 |
-
composer require myclabs/deep-copy
|
42 |
-
```
|
43 |
-
|
44 |
-
Use simply:
|
45 |
-
|
46 |
-
```php
|
47 |
-
use DeepCopy\DeepCopy;
|
48 |
-
|
49 |
-
$copier = new DeepCopy();
|
50 |
-
$myCopy = $copier->copy($myObject);
|
51 |
-
```
|
52 |
-
|
53 |
-
|
54 |
-
## Why?
|
55 |
-
|
56 |
-
- How do you create copies of your objects?
|
57 |
-
|
58 |
-
```php
|
59 |
-
$myCopy = clone $myObject;
|
60 |
-
```
|
61 |
-
|
62 |
-
- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)?
|
63 |
-
|
64 |
-
You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior
|
65 |
-
yourself.
|
66 |
-
|
67 |
-
- But how do you handle **cycles** in the association graph?
|
68 |
-
|
69 |
-
Now you're in for a big mess :(
|
70 |
-
|
71 |
-
![association graph](doc/graph.png)
|
72 |
-
|
73 |
-
|
74 |
-
### Using simply `clone`
|
75 |
-
|
76 |
-
![Using clone](doc/clone.png)
|
77 |
-
|
78 |
-
|
79 |
-
### Overridding `__clone()`
|
80 |
-
|
81 |
-
![Overridding __clone](doc/deep-clone.png)
|
82 |
-
|
83 |
-
|
84 |
-
### With `DeepCopy`
|
85 |
-
|
86 |
-
![With DeepCopy](doc/deep-copy.png)
|
87 |
-
|
88 |
-
|
89 |
-
## How it works
|
90 |
-
|
91 |
-
DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it
|
92 |
-
keeps a hash map of all instances and thus preserves the object graph.
|
93 |
-
|
94 |
-
To use it:
|
95 |
-
|
96 |
-
```php
|
97 |
-
use function DeepCopy\deep_copy;
|
98 |
-
|
99 |
-
$copy = deep_copy($var);
|
100 |
-
```
|
101 |
-
|
102 |
-
Alternatively, you can create your own `DeepCopy` instance to configure it differently for example:
|
103 |
-
|
104 |
-
```php
|
105 |
-
use DeepCopy\DeepCopy;
|
106 |
-
|
107 |
-
$copier = new DeepCopy(true);
|
108 |
-
|
109 |
-
$copy = $copier->copy($var);
|
110 |
-
```
|
111 |
-
|
112 |
-
You may want to roll your own deep copy function:
|
113 |
-
|
114 |
-
```php
|
115 |
-
namespace Acme;
|
116 |
-
|
117 |
-
use DeepCopy\DeepCopy;
|
118 |
-
|
119 |
-
function deep_copy($var)
|
120 |
-
{
|
121 |
-
static $copier = null;
|
122 |
-
|
123 |
-
if (null === $copier) {
|
124 |
-
$copier = new DeepCopy(true);
|
125 |
-
}
|
126 |
-
|
127 |
-
return $copier->copy($var);
|
128 |
-
}
|
129 |
-
```
|
130 |
-
|
131 |
-
|
132 |
-
## Going further
|
133 |
-
|
134 |
-
You can add filters to customize the copy process.
|
135 |
-
|
136 |
-
The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`,
|
137 |
-
with `$filter` implementing `DeepCopy\Filter\Filter`
|
138 |
-
and `$matcher` implementing `DeepCopy\Matcher\Matcher`.
|
139 |
-
|
140 |
-
We provide some generic filters and matchers.
|
141 |
-
|
142 |
-
|
143 |
-
### Matchers
|
144 |
-
|
145 |
-
- `DeepCopy\Matcher` applies on a object attribute.
|
146 |
-
- `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements.
|
147 |
-
|
148 |
-
|
149 |
-
#### Property name
|
150 |
-
|
151 |
-
The `PropertyNameMatcher` will match a property by its name:
|
152 |
-
|
153 |
-
```php
|
154 |
-
use DeepCopy\Matcher\PropertyNameMatcher;
|
155 |
-
|
156 |
-
// Will apply a filter to any property of any objects named "id"
|
157 |
-
$matcher = new PropertyNameMatcher('id');
|
158 |
-
```
|
159 |
-
|
160 |
-
|
161 |
-
#### Specific property
|
162 |
-
|
163 |
-
The `PropertyMatcher` will match a specific property of a specific class:
|
164 |
-
|
165 |
-
```php
|
166 |
-
use DeepCopy\Matcher\PropertyMatcher;
|
167 |
-
|
168 |
-
// Will apply a filter to the property "id" of any objects of the class "MyClass"
|
169 |
-
$matcher = new PropertyMatcher('MyClass', 'id');
|
170 |
-
```
|
171 |
-
|
172 |
-
|
173 |
-
#### Type
|
174 |
-
|
175 |
-
The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of
|
176 |
-
[gettype()](http://php.net/manual/en/function.gettype.php) function):
|
177 |
-
|
178 |
-
```php
|
179 |
-
use DeepCopy\TypeMatcher\TypeMatcher;
|
180 |
-
|
181 |
-
// Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection
|
182 |
-
$matcher = new TypeMatcher('Doctrine\Common\Collections\Collection');
|
183 |
-
```
|
184 |
-
|
185 |
-
|
186 |
-
### Filters
|
187 |
-
|
188 |
-
- `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher`
|
189 |
-
- `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher`
|
190 |
-
|
191 |
-
|
192 |
-
#### `SetNullFilter` (filter)
|
193 |
-
|
194 |
-
Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have
|
195 |
-
any ID:
|
196 |
-
|
197 |
-
```php
|
198 |
-
use DeepCopy\DeepCopy;
|
199 |
-
use DeepCopy\Filter\SetNullFilter;
|
200 |
-
use DeepCopy\Matcher\PropertyNameMatcher;
|
201 |
-
|
202 |
-
$object = MyClass::load(123);
|
203 |
-
echo $object->id; // 123
|
204 |
-
|
205 |
-
$copier = new DeepCopy();
|
206 |
-
$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id'));
|
207 |
-
|
208 |
-
$copy = $copier->copy($object);
|
209 |
-
|
210 |
-
echo $copy->id; // null
|
211 |
-
```
|
212 |
-
|
213 |
-
|
214 |
-
#### `KeepFilter` (filter)
|
215 |
-
|
216 |
-
If you want a property to remain untouched (for example, an association to an object):
|
217 |
-
|
218 |
-
```php
|
219 |
-
use DeepCopy\DeepCopy;
|
220 |
-
use DeepCopy\Filter\KeepFilter;
|
221 |
-
use DeepCopy\Matcher\PropertyMatcher;
|
222 |
-
|
223 |
-
$copier = new DeepCopy();
|
224 |
-
$copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category'));
|
225 |
-
|
226 |
-
$copy = $copier->copy($object);
|
227 |
-
// $copy->category has not been touched
|
228 |
-
```
|
229 |
-
|
230 |
-
|
231 |
-
#### `DoctrineCollectionFilter` (filter)
|
232 |
-
|
233 |
-
If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
|
234 |
-
|
235 |
-
```php
|
236 |
-
use DeepCopy\DeepCopy;
|
237 |
-
use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter;
|
238 |
-
use DeepCopy\Matcher\PropertyTypeMatcher;
|
239 |
-
|
240 |
-
$copier = new DeepCopy();
|
241 |
-
$copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
|
242 |
-
|
243 |
-
$copy = $copier->copy($object);
|
244 |
-
```
|
245 |
-
|
246 |
-
|
247 |
-
#### `DoctrineEmptyCollectionFilter` (filter)
|
248 |
-
|
249 |
-
If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the
|
250 |
-
`DoctrineEmptyCollectionFilter`
|
251 |
-
|
252 |
-
```php
|
253 |
-
use DeepCopy\DeepCopy;
|
254 |
-
use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter;
|
255 |
-
use DeepCopy\Matcher\PropertyMatcher;
|
256 |
-
|
257 |
-
$copier = new DeepCopy();
|
258 |
-
$copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty'));
|
259 |
-
|
260 |
-
$copy = $copier->copy($object);
|
261 |
-
|
262 |
-
// $copy->myProperty will return an empty collection
|
263 |
-
```
|
264 |
-
|
265 |
-
|
266 |
-
#### `DoctrineProxyFilter` (filter)
|
267 |
-
|
268 |
-
If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a
|
269 |
-
Doctrine proxy class (...\\\_\_CG\_\_\Proxy).
|
270 |
-
You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class.
|
271 |
-
**Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded
|
272 |
-
before other filters are applied!**
|
273 |
-
|
274 |
-
```php
|
275 |
-
use DeepCopy\DeepCopy;
|
276 |
-
use DeepCopy\Filter\Doctrine\DoctrineProxyFilter;
|
277 |
-
use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher;
|
278 |
-
|
279 |
-
$copier = new DeepCopy();
|
280 |
-
$copier->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher());
|
281 |
-
|
282 |
-
$copy = $copier->copy($object);
|
283 |
-
|
284 |
-
// $copy should now contain a clone of all entities, including those that were not yet fully loaded.
|
285 |
-
```
|
286 |
-
|
287 |
-
|
288 |
-
#### `ReplaceFilter` (type filter)
|
289 |
-
|
290 |
-
1. If you want to replace the value of a property:
|
291 |
-
|
292 |
-
```php
|
293 |
-
use DeepCopy\DeepCopy;
|
294 |
-
use DeepCopy\Filter\ReplaceFilter;
|
295 |
-
use DeepCopy\Matcher\PropertyMatcher;
|
296 |
-
|
297 |
-
$copier = new DeepCopy();
|
298 |
-
$callback = function ($currentValue) {
|
299 |
-
return $currentValue . ' (copy)'
|
300 |
-
};
|
301 |
-
$copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title'));
|
302 |
-
|
303 |
-
$copy = $copier->copy($object);
|
304 |
-
|
305 |
-
// $copy->title will contain the data returned by the callback, e.g. 'The title (copy)'
|
306 |
-
```
|
307 |
-
|
308 |
-
2. If you want to replace whole element:
|
309 |
-
|
310 |
-
```php
|
311 |
-
use DeepCopy\DeepCopy;
|
312 |
-
use DeepCopy\TypeFilter\ReplaceFilter;
|
313 |
-
use DeepCopy\TypeMatcher\TypeMatcher;
|
314 |
-
|
315 |
-
$copier = new DeepCopy();
|
316 |
-
$callback = function (MyClass $myClass) {
|
317 |
-
return get_class($myClass);
|
318 |
-
};
|
319 |
-
$copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass'));
|
320 |
-
|
321 |
-
$copy = $copier->copy([new MyClass, 'some string', new MyClass]);
|
322 |
-
|
323 |
-
// $copy will contain ['MyClass', 'some string', 'MyClass']
|
324 |
-
```
|
325 |
-
|
326 |
-
|
327 |
-
The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable.
|
328 |
-
|
329 |
-
|
330 |
-
#### `ShallowCopyFilter` (type filter)
|
331 |
-
|
332 |
-
Stop *DeepCopy* from recursively copying element, using standard `clone` instead:
|
333 |
-
|
334 |
-
```php
|
335 |
-
use DeepCopy\DeepCopy;
|
336 |
-
use DeepCopy\TypeFilter\ShallowCopyFilter;
|
337 |
-
use DeepCopy\TypeMatcher\TypeMatcher;
|
338 |
-
use Mockery as m;
|
339 |
-
|
340 |
-
$this->deepCopy = new DeepCopy();
|
341 |
-
$this->deepCopy->addTypeFilter(
|
342 |
-
new ShallowCopyFilter,
|
343 |
-
new TypeMatcher(m\MockInterface::class)
|
344 |
-
);
|
345 |
-
|
346 |
-
$myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class));
|
347 |
-
// All mocks will be just cloned, not deep copied
|
348 |
-
```
|
349 |
-
|
350 |
-
|
351 |
-
## Edge cases
|
352 |
-
|
353 |
-
The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are
|
354 |
-
not applied. There is two ways for you to handle them:
|
355 |
-
|
356 |
-
- Implement your own `__clone()` method
|
357 |
-
- Use a filter with a type matcher
|
358 |
-
|
359 |
-
|
360 |
-
## Contributing
|
361 |
-
|
362 |
-
DeepCopy is distributed under the MIT license.
|
363 |
-
|
364 |
-
|
365 |
-
### Tests
|
366 |
-
|
367 |
-
Running the tests is simple:
|
368 |
-
|
369 |
-
```php
|
370 |
-
vendor/bin/phpunit
|
371 |
-
```
|
372 |
-
|
373 |
-
### Support
|
374 |
-
|
375 |
-
Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/composer.json
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "myclabs/deep-copy",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Create deep copies (clones) of your objects",
|
5 |
-
"keywords": ["clone", "copy", "duplicate", "object", "object graph"],
|
6 |
-
"license": "MIT",
|
7 |
-
|
8 |
-
"autoload": {
|
9 |
-
"psr-4": {
|
10 |
-
"DeepCopy\\": "src/DeepCopy/"
|
11 |
-
},
|
12 |
-
"files": [
|
13 |
-
"src/DeepCopy/deep_copy.php"
|
14 |
-
]
|
15 |
-
},
|
16 |
-
"autoload-dev": {
|
17 |
-
"psr-4": {
|
18 |
-
"DeepCopy\\": "fixtures/",
|
19 |
-
"DeepCopyTest\\": "tests/DeepCopyTest/"
|
20 |
-
}
|
21 |
-
},
|
22 |
-
|
23 |
-
"require": {
|
24 |
-
"php": "^7.1 || ^8.0"
|
25 |
-
},
|
26 |
-
"require-dev": {
|
27 |
-
"doctrine/collections": "^1.0",
|
28 |
-
"doctrine/common": "^2.6",
|
29 |
-
"phpunit/phpunit": "^7.1"
|
30 |
-
},
|
31 |
-
"replace": {
|
32 |
-
"myclabs/deep-copy": "self.version"
|
33 |
-
},
|
34 |
-
|
35 |
-
"config": {
|
36 |
-
"sort-packages": true
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
DELETED
@@ -1,298 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy;
|
4 |
-
|
5 |
-
use ArrayObject;
|
6 |
-
use DateInterval;
|
7 |
-
use DateTimeInterface;
|
8 |
-
use DateTimeZone;
|
9 |
-
use DeepCopy\Exception\CloneException;
|
10 |
-
use DeepCopy\Filter\Filter;
|
11 |
-
use DeepCopy\Matcher\Matcher;
|
12 |
-
use DeepCopy\Reflection\ReflectionHelper;
|
13 |
-
use DeepCopy\TypeFilter\Date\DateIntervalFilter;
|
14 |
-
use DeepCopy\TypeFilter\Spl\ArrayObjectFilter;
|
15 |
-
use DeepCopy\TypeFilter\Spl\SplDoublyLinkedListFilter;
|
16 |
-
use DeepCopy\TypeFilter\TypeFilter;
|
17 |
-
use DeepCopy\TypeMatcher\TypeMatcher;
|
18 |
-
use ReflectionObject;
|
19 |
-
use ReflectionProperty;
|
20 |
-
use SplDoublyLinkedList;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @final
|
24 |
-
*/
|
25 |
-
class DeepCopy
|
26 |
-
{
|
27 |
-
/**
|
28 |
-
* @var object[] List of objects copied.
|
29 |
-
*/
|
30 |
-
private $hashMap = [];
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Filters to apply.
|
34 |
-
*
|
35 |
-
* @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
|
36 |
-
*/
|
37 |
-
private $filters = [];
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Type Filters to apply.
|
41 |
-
*
|
42 |
-
* @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
|
43 |
-
*/
|
44 |
-
private $typeFilters = [];
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @var bool
|
48 |
-
*/
|
49 |
-
private $skipUncloneable = false;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @var bool
|
53 |
-
*/
|
54 |
-
private $useCloneMethod;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used
|
58 |
-
* instead of the regular deep cloning.
|
59 |
-
*/
|
60 |
-
public function __construct($useCloneMethod = false)
|
61 |
-
{
|
62 |
-
$this->useCloneMethod = $useCloneMethod;
|
63 |
-
|
64 |
-
$this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class));
|
65 |
-
$this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
|
66 |
-
$this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* If enabled, will not throw an exception when coming across an uncloneable property.
|
71 |
-
*
|
72 |
-
* @param $skipUncloneable
|
73 |
-
*
|
74 |
-
* @return $this
|
75 |
-
*/
|
76 |
-
public function skipUncloneable($skipUncloneable = true)
|
77 |
-
{
|
78 |
-
$this->skipUncloneable = $skipUncloneable;
|
79 |
-
|
80 |
-
return $this;
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Deep copies the given object.
|
85 |
-
*
|
86 |
-
* @param mixed $object
|
87 |
-
*
|
88 |
-
* @return mixed
|
89 |
-
*/
|
90 |
-
public function copy($object)
|
91 |
-
{
|
92 |
-
$this->hashMap = [];
|
93 |
-
|
94 |
-
return $this->recursiveCopy($object);
|
95 |
-
}
|
96 |
-
|
97 |
-
public function addFilter(Filter $filter, Matcher $matcher)
|
98 |
-
{
|
99 |
-
$this->filters[] = [
|
100 |
-
'matcher' => $matcher,
|
101 |
-
'filter' => $filter,
|
102 |
-
];
|
103 |
-
}
|
104 |
-
|
105 |
-
public function prependFilter(Filter $filter, Matcher $matcher)
|
106 |
-
{
|
107 |
-
array_unshift($this->filters, [
|
108 |
-
'matcher' => $matcher,
|
109 |
-
'filter' => $filter,
|
110 |
-
]);
|
111 |
-
}
|
112 |
-
|
113 |
-
public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher)
|
114 |
-
{
|
115 |
-
$this->typeFilters[] = [
|
116 |
-
'matcher' => $matcher,
|
117 |
-
'filter' => $filter,
|
118 |
-
];
|
119 |
-
}
|
120 |
-
|
121 |
-
private function recursiveCopy($var)
|
122 |
-
{
|
123 |
-
// Matches Type Filter
|
124 |
-
if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) {
|
125 |
-
return $filter->apply($var);
|
126 |
-
}
|
127 |
-
|
128 |
-
// Resource
|
129 |
-
if (is_resource($var)) {
|
130 |
-
return $var;
|
131 |
-
}
|
132 |
-
|
133 |
-
// Array
|
134 |
-
if (is_array($var)) {
|
135 |
-
return $this->copyArray($var);
|
136 |
-
}
|
137 |
-
|
138 |
-
// Scalar
|
139 |
-
if (! is_object($var)) {
|
140 |
-
return $var;
|
141 |
-
}
|
142 |
-
|
143 |
-
// Object
|
144 |
-
return $this->copyObject($var);
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Copy an array
|
149 |
-
* @param array $array
|
150 |
-
* @return array
|
151 |
-
*/
|
152 |
-
private function copyArray(array $array)
|
153 |
-
{
|
154 |
-
foreach ($array as $key => $value) {
|
155 |
-
$array[$key] = $this->recursiveCopy($value);
|
156 |
-
}
|
157 |
-
|
158 |
-
return $array;
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Copies an object.
|
163 |
-
*
|
164 |
-
* @param object $object
|
165 |
-
*
|
166 |
-
* @throws CloneException
|
167 |
-
*
|
168 |
-
* @return object
|
169 |
-
*/
|
170 |
-
private function copyObject($object)
|
171 |
-
{
|
172 |
-
$objectHash = spl_object_hash($object);
|
173 |
-
|
174 |
-
if (isset($this->hashMap[$objectHash])) {
|
175 |
-
return $this->hashMap[$objectHash];
|
176 |
-
}
|
177 |
-
|
178 |
-
$reflectedObject = new ReflectionObject($object);
|
179 |
-
$isCloneable = $reflectedObject->isCloneable();
|
180 |
-
|
181 |
-
if (false === $isCloneable) {
|
182 |
-
if ($this->skipUncloneable) {
|
183 |
-
$this->hashMap[$objectHash] = $object;
|
184 |
-
|
185 |
-
return $object;
|
186 |
-
}
|
187 |
-
|
188 |
-
throw new CloneException(
|
189 |
-
sprintf(
|
190 |
-
'The class "%s" is not cloneable.',
|
191 |
-
$reflectedObject->getName()
|
192 |
-
)
|
193 |
-
);
|
194 |
-
}
|
195 |
-
|
196 |
-
$newObject = clone $object;
|
197 |
-
$this->hashMap[$objectHash] = $newObject;
|
198 |
-
|
199 |
-
if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) {
|
200 |
-
return $newObject;
|
201 |
-
}
|
202 |
-
|
203 |
-
if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) {
|
204 |
-
return $newObject;
|
205 |
-
}
|
206 |
-
|
207 |
-
foreach (ReflectionHelper::getProperties($reflectedObject) as $property) {
|
208 |
-
$this->copyObjectProperty($newObject, $property);
|
209 |
-
}
|
210 |
-
|
211 |
-
return $newObject;
|
212 |
-
}
|
213 |
-
|
214 |
-
private function copyObjectProperty($object, ReflectionProperty $property)
|
215 |
-
{
|
216 |
-
// Ignore static properties
|
217 |
-
if ($property->isStatic()) {
|
218 |
-
return;
|
219 |
-
}
|
220 |
-
|
221 |
-
// Apply the filters
|
222 |
-
foreach ($this->filters as $item) {
|
223 |
-
/** @var Matcher $matcher */
|
224 |
-
$matcher = $item['matcher'];
|
225 |
-
/** @var Filter $filter */
|
226 |
-
$filter = $item['filter'];
|
227 |
-
|
228 |
-
if ($matcher->matches($object, $property->getName())) {
|
229 |
-
$filter->apply(
|
230 |
-
$object,
|
231 |
-
$property->getName(),
|
232 |
-
function ($object) {
|
233 |
-
return $this->recursiveCopy($object);
|
234 |
-
}
|
235 |
-
);
|
236 |
-
|
237 |
-
// If a filter matches, we stop processing this property
|
238 |
-
return;
|
239 |
-
}
|
240 |
-
}
|
241 |
-
|
242 |
-
$property->setAccessible(true);
|
243 |
-
|
244 |
-
// Ignore uninitialized properties (for PHP >7.4)
|
245 |
-
if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) {
|
246 |
-
return;
|
247 |
-
}
|
248 |
-
|
249 |
-
$propertyValue = $property->getValue($object);
|
250 |
-
|
251 |
-
// Copy the property
|
252 |
-
$property->setValue($object, $this->recursiveCopy($propertyValue));
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Returns first filter that matches variable, `null` if no such filter found.
|
257 |
-
*
|
258 |
-
* @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and
|
259 |
-
* 'matcher' with value of type {@see TypeMatcher}
|
260 |
-
* @param mixed $var
|
261 |
-
*
|
262 |
-
* @return TypeFilter|null
|
263 |
-
*/
|
264 |
-
private function getFirstMatchedTypeFilter(array $filterRecords, $var)
|
265 |
-
{
|
266 |
-
$matched = $this->first(
|
267 |
-
$filterRecords,
|
268 |
-
function (array $record) use ($var) {
|
269 |
-
/* @var TypeMatcher $matcher */
|
270 |
-
$matcher = $record['matcher'];
|
271 |
-
|
272 |
-
return $matcher->matches($var);
|
273 |
-
}
|
274 |
-
);
|
275 |
-
|
276 |
-
return isset($matched) ? $matched['filter'] : null;
|
277 |
-
}
|
278 |
-
|
279 |
-
/**
|
280 |
-
* Returns first element that matches predicate, `null` if no such element found.
|
281 |
-
*
|
282 |
-
* @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
|
283 |
-
* @param callable $predicate Predicate arguments are: element.
|
284 |
-
*
|
285 |
-
* @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher'
|
286 |
-
* with value of type {@see TypeMatcher} or `null`.
|
287 |
-
*/
|
288 |
-
private function first(array $elements, callable $predicate)
|
289 |
-
{
|
290 |
-
foreach ($elements as $element) {
|
291 |
-
if (call_user_func($predicate, $element)) {
|
292 |
-
return $element;
|
293 |
-
}
|
294 |
-
}
|
295 |
-
|
296 |
-
return null;
|
297 |
-
}
|
298 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Exception;
|
4 |
-
|
5 |
-
use UnexpectedValueException;
|
6 |
-
|
7 |
-
class CloneException extends UnexpectedValueException
|
8 |
-
{
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Exception;
|
4 |
-
|
5 |
-
use ReflectionException;
|
6 |
-
|
7 |
-
class PropertyException extends ReflectionException
|
8 |
-
{
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter\Doctrine;
|
4 |
-
|
5 |
-
use DeepCopy\Filter\Filter;
|
6 |
-
use DeepCopy\Reflection\ReflectionHelper;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @final
|
10 |
-
*/
|
11 |
-
class DoctrineCollectionFilter implements Filter
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* Copies the object property doctrine collection.
|
15 |
-
*
|
16 |
-
* {@inheritdoc}
|
17 |
-
*/
|
18 |
-
public function apply($object, $property, $objectCopier)
|
19 |
-
{
|
20 |
-
$reflectionProperty = ReflectionHelper::getProperty($object, $property);
|
21 |
-
|
22 |
-
$reflectionProperty->setAccessible(true);
|
23 |
-
$oldCollection = $reflectionProperty->getValue($object);
|
24 |
-
|
25 |
-
$newCollection = $oldCollection->map(
|
26 |
-
function ($item) use ($objectCopier) {
|
27 |
-
return $objectCopier($item);
|
28 |
-
}
|
29 |
-
);
|
30 |
-
|
31 |
-
$reflectionProperty->setValue($object, $newCollection);
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter\Doctrine;
|
4 |
-
|
5 |
-
use DeepCopy\Filter\Filter;
|
6 |
-
use DeepCopy\Reflection\ReflectionHelper;
|
7 |
-
use Doctrine\Common\Collections\ArrayCollection;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* @final
|
11 |
-
*/
|
12 |
-
class DoctrineEmptyCollectionFilter implements Filter
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* Sets the object property to an empty doctrine collection.
|
16 |
-
*
|
17 |
-
* @param object $object
|
18 |
-
* @param string $property
|
19 |
-
* @param callable $objectCopier
|
20 |
-
*/
|
21 |
-
public function apply($object, $property, $objectCopier)
|
22 |
-
{
|
23 |
-
$reflectionProperty = ReflectionHelper::getProperty($object, $property);
|
24 |
-
$reflectionProperty->setAccessible(true);
|
25 |
-
|
26 |
-
$reflectionProperty->setValue($object, new ArrayCollection());
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter\Doctrine;
|
4 |
-
|
5 |
-
use DeepCopy\Filter\Filter;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @final
|
9 |
-
*/
|
10 |
-
class DoctrineProxyFilter implements Filter
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Triggers the magic method __load() on a Doctrine Proxy class to load the
|
14 |
-
* actual entity from the database.
|
15 |
-
*
|
16 |
-
* {@inheritdoc}
|
17 |
-
*/
|
18 |
-
public function apply($object, $property, $objectCopier)
|
19 |
-
{
|
20 |
-
$object->__load();
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Filter to apply to a property while copying an object
|
7 |
-
*/
|
8 |
-
interface Filter
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* Applies the filter to the object.
|
12 |
-
*
|
13 |
-
* @param object $object
|
14 |
-
* @param string $property
|
15 |
-
* @param callable $objectCopier
|
16 |
-
*/
|
17 |
-
public function apply($object, $property, $objectCopier);
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter;
|
4 |
-
|
5 |
-
class KeepFilter implements Filter
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Keeps the value of the object property.
|
9 |
-
*
|
10 |
-
* {@inheritdoc}
|
11 |
-
*/
|
12 |
-
public function apply($object, $property, $objectCopier)
|
13 |
-
{
|
14 |
-
// Nothing to do
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter;
|
4 |
-
|
5 |
-
use DeepCopy\Reflection\ReflectionHelper;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @final
|
9 |
-
*/
|
10 |
-
class ReplaceFilter implements Filter
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* @var callable
|
14 |
-
*/
|
15 |
-
protected $callback;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @param callable $callable Will be called to get the new value for each property to replace
|
19 |
-
*/
|
20 |
-
public function __construct(callable $callable)
|
21 |
-
{
|
22 |
-
$this->callback = $callable;
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Replaces the object property by the result of the callback called with the object property.
|
27 |
-
*
|
28 |
-
* {@inheritdoc}
|
29 |
-
*/
|
30 |
-
public function apply($object, $property, $objectCopier)
|
31 |
-
{
|
32 |
-
$reflectionProperty = ReflectionHelper::getProperty($object, $property);
|
33 |
-
$reflectionProperty->setAccessible(true);
|
34 |
-
|
35 |
-
$value = call_user_func($this->callback, $reflectionProperty->getValue($object));
|
36 |
-
|
37 |
-
$reflectionProperty->setValue($object, $value);
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Filter;
|
4 |
-
|
5 |
-
use DeepCopy\Reflection\ReflectionHelper;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @final
|
9 |
-
*/
|
10 |
-
class SetNullFilter implements Filter
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Sets the object property to null.
|
14 |
-
*
|
15 |
-
* {@inheritdoc}
|
16 |
-
*/
|
17 |
-
public function apply($object, $property, $objectCopier)
|
18 |
-
{
|
19 |
-
$reflectionProperty = ReflectionHelper::getProperty($object, $property);
|
20 |
-
|
21 |
-
$reflectionProperty->setAccessible(true);
|
22 |
-
$reflectionProperty->setValue($object, null);
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Matcher\Doctrine;
|
4 |
-
|
5 |
-
use DeepCopy\Matcher\Matcher;
|
6 |
-
use Doctrine\Common\Persistence\Proxy;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @final
|
10 |
-
*/
|
11 |
-
class DoctrineProxyMatcher implements Matcher
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* Matches a Doctrine Proxy class.
|
15 |
-
*
|
16 |
-
* {@inheritdoc}
|
17 |
-
*/
|
18 |
-
public function matches($object, $property)
|
19 |
-
{
|
20 |
-
return $object instanceof Proxy;
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Matcher;
|
4 |
-
|
5 |
-
interface Matcher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* @param object $object
|
9 |
-
* @param string $property
|
10 |
-
*
|
11 |
-
* @return boolean
|
12 |
-
*/
|
13 |
-
public function matches($object, $property);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Matcher;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @final
|
7 |
-
*/
|
8 |
-
class PropertyMatcher implements Matcher
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* @var string
|
12 |
-
*/
|
13 |
-
private $class;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
private $property;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @param string $class Class name
|
22 |
-
* @param string $property Property name
|
23 |
-
*/
|
24 |
-
public function __construct($class, $property)
|
25 |
-
{
|
26 |
-
$this->class = $class;
|
27 |
-
$this->property = $property;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Matches a specific property of a specific class.
|
32 |
-
*
|
33 |
-
* {@inheritdoc}
|
34 |
-
*/
|
35 |
-
public function matches($object, $property)
|
36 |
-
{
|
37 |
-
return ($object instanceof $this->class) && $property == $this->property;
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Matcher;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @final
|
7 |
-
*/
|
8 |
-
class PropertyNameMatcher implements Matcher
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* @var string
|
12 |
-
*/
|
13 |
-
private $property;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @param string $property Property name
|
17 |
-
*/
|
18 |
-
public function __construct($property)
|
19 |
-
{
|
20 |
-
$this->property = $property;
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Matches a property by its name.
|
25 |
-
*
|
26 |
-
* {@inheritdoc}
|
27 |
-
*/
|
28 |
-
public function matches($object, $property)
|
29 |
-
{
|
30 |
-
return $property == $this->property;
|
31 |
-
}
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Matcher;
|
4 |
-
|
5 |
-
use DeepCopy\Reflection\ReflectionHelper;
|
6 |
-
use ReflectionException;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Matches a property by its type.
|
10 |
-
*
|
11 |
-
* It is recommended to use {@see DeepCopy\TypeFilter\TypeFilter} instead, as it applies on all occurrences
|
12 |
-
* of given type in copied context (eg. array elements), not just on object properties.
|
13 |
-
*
|
14 |
-
* @final
|
15 |
-
*/
|
16 |
-
class PropertyTypeMatcher implements Matcher
|
17 |
-
{
|
18 |
-
/**
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
private $propertyType;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param string $propertyType Property type
|
25 |
-
*/
|
26 |
-
public function __construct($propertyType)
|
27 |
-
{
|
28 |
-
$this->propertyType = $propertyType;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* {@inheritdoc}
|
33 |
-
*/
|
34 |
-
public function matches($object, $property)
|
35 |
-
{
|
36 |
-
try {
|
37 |
-
$reflectionProperty = ReflectionHelper::getProperty($object, $property);
|
38 |
-
} catch (ReflectionException $exception) {
|
39 |
-
return false;
|
40 |
-
}
|
41 |
-
|
42 |
-
$reflectionProperty->setAccessible(true);
|
43 |
-
|
44 |
-
// Uninitialized properties (for PHP >7.4)
|
45 |
-
if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) {
|
46 |
-
// null instanceof $this->propertyType
|
47 |
-
return false;
|
48 |
-
}
|
49 |
-
|
50 |
-
return $reflectionProperty->getValue($object) instanceof $this->propertyType;
|
51 |
-
}
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\Reflection;
|
4 |
-
|
5 |
-
use DeepCopy\Exception\PropertyException;
|
6 |
-
use ReflectionClass;
|
7 |
-
use ReflectionException;
|
8 |
-
use ReflectionObject;
|
9 |
-
use ReflectionProperty;
|
10 |
-
|
11 |
-
class ReflectionHelper
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* Retrieves all properties (including private ones), from object and all its ancestors.
|
15 |
-
*
|
16 |
-
* Standard \ReflectionClass->getProperties() does not return private properties from ancestor classes.
|
17 |
-
*
|
18 |
-
* @author muratyaman@gmail.com
|
19 |
-
* @see http://php.net/manual/en/reflectionclass.getproperties.php
|
20 |
-
*
|
21 |
-
* @param ReflectionClass $ref
|
22 |
-
*
|
23 |
-
* @return ReflectionProperty[]
|
24 |
-
*/
|
25 |
-
public static function getProperties(ReflectionClass $ref)
|
26 |
-
{
|
27 |
-
$props = $ref->getProperties();
|
28 |
-
$propsArr = array();
|
29 |
-
|
30 |
-
foreach ($props as $prop) {
|
31 |
-
$propertyName = $prop->getName();
|
32 |
-
$propsArr[$propertyName] = $prop;
|
33 |
-
}
|
34 |
-
|
35 |
-
if ($parentClass = $ref->getParentClass()) {
|
36 |
-
$parentPropsArr = self::getProperties($parentClass);
|
37 |
-
foreach ($propsArr as $key => $property) {
|
38 |
-
$parentPropsArr[$key] = $property;
|
39 |
-
}
|
40 |
-
|
41 |
-
return $parentPropsArr;
|
42 |
-
}
|
43 |
-
|
44 |
-
return $propsArr;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Retrieves property by name from object and all its ancestors.
|
49 |
-
*
|
50 |
-
* @param object|string $object
|
51 |
-
* @param string $name
|
52 |
-
*
|
53 |
-
* @throws PropertyException
|
54 |
-
* @throws ReflectionException
|
55 |
-
*
|
56 |
-
* @return ReflectionProperty
|
57 |
-
*/
|
58 |
-
public static function getProperty($object, $name)
|
59 |
-
{
|
60 |
-
$reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object);
|
61 |
-
|
62 |
-
if ($reflection->hasProperty($name)) {
|
63 |
-
return $reflection->getProperty($name);
|
64 |
-
}
|
65 |
-
|
66 |
-
if ($parentClass = $reflection->getParentClass()) {
|
67 |
-
return self::getProperty($parentClass->getName(), $name);
|
68 |
-
}
|
69 |
-
|
70 |
-
throw new PropertyException(
|
71 |
-
sprintf(
|
72 |
-
'The class "%s" doesn\'t have a property with the given name: "%s".',
|
73 |
-
is_object($object) ? get_class($object) : $object,
|
74 |
-
$name
|
75 |
-
)
|
76 |
-
);
|
77 |
-
}
|
78 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeFilter\Date;
|
4 |
-
|
5 |
-
use DateInterval;
|
6 |
-
use DeepCopy\TypeFilter\TypeFilter;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @final
|
10 |
-
*
|
11 |
-
* @deprecated Will be removed in 2.0. This filter will no longer be necessary in PHP 7.1+.
|
12 |
-
*/
|
13 |
-
class DateIntervalFilter implements TypeFilter
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* {@inheritdoc}
|
18 |
-
*
|
19 |
-
* @param DateInterval $element
|
20 |
-
*
|
21 |
-
* @see http://news.php.net/php.bugs/205076
|
22 |
-
*/
|
23 |
-
public function apply($element)
|
24 |
-
{
|
25 |
-
$copy = new DateInterval('P0D');
|
26 |
-
|
27 |
-
foreach ($element as $propertyName => $propertyValue) {
|
28 |
-
$copy->{$propertyName} = $propertyValue;
|
29 |
-
}
|
30 |
-
|
31 |
-
return $copy;
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeFilter;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @final
|
7 |
-
*/
|
8 |
-
class ReplaceFilter implements TypeFilter
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* @var callable
|
12 |
-
*/
|
13 |
-
protected $callback;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @param callable $callable Will be called to get the new value for each element to replace
|
17 |
-
*/
|
18 |
-
public function __construct(callable $callable)
|
19 |
-
{
|
20 |
-
$this->callback = $callable;
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* {@inheritdoc}
|
25 |
-
*/
|
26 |
-
public function apply($element)
|
27 |
-
{
|
28 |
-
return call_user_func($this->callback, $element);
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeFilter;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @final
|
7 |
-
*/
|
8 |
-
class ShallowCopyFilter implements TypeFilter
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* {@inheritdoc}
|
12 |
-
*/
|
13 |
-
public function apply($element)
|
14 |
-
{
|
15 |
-
return clone $element;
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace DeepCopy\TypeFilter\Spl;
|
3 |
-
|
4 |
-
use DeepCopy\DeepCopy;
|
5 |
-
use DeepCopy\TypeFilter\TypeFilter;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* In PHP 7.4 the storage of an ArrayObject isn't returned as
|
9 |
-
* ReflectionProperty. So we deep copy its array copy.
|
10 |
-
*/
|
11 |
-
final class ArrayObjectFilter implements TypeFilter
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* @var DeepCopy
|
15 |
-
*/
|
16 |
-
private $copier;
|
17 |
-
|
18 |
-
public function __construct(DeepCopy $copier)
|
19 |
-
{
|
20 |
-
$this->copier = $copier;
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* {@inheritdoc}
|
25 |
-
*/
|
26 |
-
public function apply($arrayObject)
|
27 |
-
{
|
28 |
-
$clone = clone $arrayObject;
|
29 |
-
foreach ($arrayObject->getArrayCopy() as $k => $v) {
|
30 |
-
$clone->offsetSet($k, $this->copier->copy($v));
|
31 |
-
}
|
32 |
-
|
33 |
-
return $clone;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeFilter\Spl;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @deprecated Use {@see SplDoublyLinkedListFilter} instead.
|
7 |
-
*/
|
8 |
-
class SplDoublyLinkedList extends SplDoublyLinkedListFilter
|
9 |
-
{
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeFilter\Spl;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
use DeepCopy\DeepCopy;
|
7 |
-
use DeepCopy\TypeFilter\TypeFilter;
|
8 |
-
use SplDoublyLinkedList;
|
9 |
-
|
10 |
-
/**
|
11 |
-
* @final
|
12 |
-
*/
|
13 |
-
class SplDoublyLinkedListFilter implements TypeFilter
|
14 |
-
{
|
15 |
-
private $copier;
|
16 |
-
|
17 |
-
public function __construct(DeepCopy $copier)
|
18 |
-
{
|
19 |
-
$this->copier = $copier;
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* {@inheritdoc}
|
24 |
-
*/
|
25 |
-
public function apply($element)
|
26 |
-
{
|
27 |
-
$newElement = clone $element;
|
28 |
-
|
29 |
-
$copy = $this->createCopyClosure();
|
30 |
-
|
31 |
-
return $copy($newElement);
|
32 |
-
}
|
33 |
-
|
34 |
-
private function createCopyClosure()
|
35 |
-
{
|
36 |
-
$copier = $this->copier;
|
37 |
-
|
38 |
-
$copy = function (SplDoublyLinkedList $list) use ($copier) {
|
39 |
-
// Replace each element in the list with a deep copy of itself
|
40 |
-
for ($i = 1; $i <= $list->count(); $i++) {
|
41 |
-
$copy = $copier->recursiveCopy($list->shift());
|
42 |
-
|
43 |
-
$list->push($copy);
|
44 |
-
}
|
45 |
-
|
46 |
-
return $list;
|
47 |
-
};
|
48 |
-
|
49 |
-
return Closure::bind($copy, null, DeepCopy::class);
|
50 |
-
}
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeFilter;
|
4 |
-
|
5 |
-
interface TypeFilter
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Applies the filter to the object.
|
9 |
-
*
|
10 |
-
* @param mixed $element
|
11 |
-
*/
|
12 |
-
public function apply($element);
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy\TypeMatcher;
|
4 |
-
|
5 |
-
class TypeMatcher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* @var string
|
9 |
-
*/
|
10 |
-
private $type;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @param string $type
|
14 |
-
*/
|
15 |
-
public function __construct($type)
|
16 |
-
{
|
17 |
-
$this->type = $type;
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @param mixed $element
|
22 |
-
*
|
23 |
-
* @return boolean
|
24 |
-
*/
|
25 |
-
public function matches($element)
|
26 |
-
{
|
27 |
-
return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type;
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DeepCopy;
|
4 |
-
|
5 |
-
use function function_exists;
|
6 |
-
|
7 |
-
if (false === function_exists('DeepCopy\deep_copy')) {
|
8 |
-
/**
|
9 |
-
* Deep copies the given value.
|
10 |
-
*
|
11 |
-
* @param mixed $value
|
12 |
-
* @param bool $useCloneMethod
|
13 |
-
*
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
function deep_copy($value, $useCloneMethod = false)
|
17 |
-
{
|
18 |
-
return (new DeepCopy($useCloneMethod))->copy($value);
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/CHANGELOG.md
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
# Changelog
|
2 |
-
|
3 |
-
All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
4 |
-
|
5 |
-
## [2.0.1] - 27.06.2020
|
6 |
-
|
7 |
-
This release now supports the use of PHP 7.2+ and ^8.0
|
8 |
-
|
9 |
-
## [2.0.0] - 10.05.2020
|
10 |
-
|
11 |
-
This release now requires PHP 7.2+
|
12 |
-
|
13 |
-
### Changed
|
14 |
-
|
15 |
-
- Upgraded to phar-io/version 3.0
|
16 |
-
- Version strings `v1.2.3` will now be converted to valid semantic version strings `1.2.3`
|
17 |
-
- Abreviated strings like `1.0` will get expaneded to `1.0.0`
|
18 |
-
|
19 |
-
### Unreleased
|
20 |
-
|
21 |
-
[Unreleased]: https://github.com/phar-io/version/compare/2.0.0...HEAD
|
22 |
-
[2.0.0]: https://github.com/phar-io/version/compare/1.0.1...2.0.0
|
23 |
-
[1.0.3]: https://github.com/phar-io/version/compare/1.0.2...1.0.3
|
24 |
-
[1.0.2]: https://github.com/phar-io/version/compare/1.0.1...1.0.2
|
25 |
-
[1.0.1]: https://github.com/phar-io/version/compare/1.0.0...1.0.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/LICENSE
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
Phar.io - Manifest
|
2 |
-
|
3 |
-
Copyright (c) 2016-2019 Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>, and contributors
|
4 |
-
All rights reserved.
|
5 |
-
|
6 |
-
Redistribution and use in source and binary forms, with or without modification,
|
7 |
-
are permitted provided that the following conditions are met:
|
8 |
-
|
9 |
-
* Redistributions of source code must retain the above copyright notice,
|
10 |
-
this list of conditions and the following disclaimer.
|
11 |
-
|
12 |
-
* Redistributions in binary form must reproduce the above copyright notice,
|
13 |
-
this list of conditions and the following disclaimer in the documentation
|
14 |
-
and/or other materials provided with the distribution.
|
15 |
-
|
16 |
-
* Neither the name of Arne Blankerts nor the names of contributors
|
17 |
-
may be used to endorse or promote products derived from this software
|
18 |
-
without specific prior written permission.
|
19 |
-
|
20 |
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21 |
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO,
|
22 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
23 |
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
|
24 |
-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
25 |
-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
26 |
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
27 |
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28 |
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
29 |
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
30 |
-
POSSIBILITY OF SUCH DAMAGE.
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/README.md
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
# Manifest
|
2 |
-
|
3 |
-
Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar).
|
4 |
-
|
5 |
-
[![Build Status](https://travis-ci.org/phar-io/manifest.svg?branch=master)](https://travis-ci.org/phar-io/manifest)
|
6 |
-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phar-io/manifest/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phar-io/manifest/?branch=master)
|
7 |
-
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7/mini.png)](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7)
|
8 |
-
|
9 |
-
## Installation
|
10 |
-
|
11 |
-
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
12 |
-
|
13 |
-
composer require phar-io/manifest
|
14 |
-
|
15 |
-
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:
|
16 |
-
|
17 |
-
composer require --dev phar-io/manifest
|
18 |
-
|
19 |
-
## Usage
|
20 |
-
|
21 |
-
```php
|
22 |
-
use PharIo\Manifest\ManifestLoader;
|
23 |
-
use PharIo\Manifest\ManifestSerializer;
|
24 |
-
|
25 |
-
$manifest = ManifestLoader::fromFile('manifest.xml');
|
26 |
-
|
27 |
-
var_dump($manifest);
|
28 |
-
|
29 |
-
echo (new ManifestSerializer)->serializeToString($manifest);
|
30 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/composer.json
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "phar-io/manifest",
|
3 |
-
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
|
4 |
-
"license": "BSD-3-Clause",
|
5 |
-
"authors": [
|
6 |
-
{
|
7 |
-
"name": "Arne Blankerts",
|
8 |
-
"email": "arne@blankerts.de",
|
9 |
-
"role": "Developer"
|
10 |
-
},
|
11 |
-
{
|
12 |
-
"name": "Sebastian Heuer",
|
13 |
-
"email": "sebastian@phpeople.de",
|
14 |
-
"role": "Developer"
|
15 |
-
},
|
16 |
-
{
|
17 |
-
"name": "Sebastian Bergmann",
|
18 |
-
"email": "sebastian@phpunit.de",
|
19 |
-
"role": "Developer"
|
20 |
-
}
|
21 |
-
],
|
22 |
-
"support": {
|
23 |
-
"issues": "https://github.com/phar-io/manifest/issues"
|
24 |
-
},
|
25 |
-
"require": {
|
26 |
-
"php": "^7.2 || ^8.0",
|
27 |
-
"ext-dom": "*",
|
28 |
-
"ext-phar": "*",
|
29 |
-
"ext-xmlwriter": "*",
|
30 |
-
"phar-io/version": "^3.0.1"
|
31 |
-
},
|
32 |
-
"autoload": {
|
33 |
-
"classmap": [
|
34 |
-
"src/"
|
35 |
-
]
|
36 |
-
},
|
37 |
-
"extra": {
|
38 |
-
"branch-alias": {
|
39 |
-
"dev-master": "2.0.x-dev"
|
40 |
-
}
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/composer.lock
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"content-hash": "f2ac4614ce4f7273fd54a64b65fd047a",
|
8 |
-
"packages": [
|
9 |
-
{
|
10 |
-
"name": "phar-io/version",
|
11 |
-
"version": "3.0.1",
|
12 |
-
"source": {
|
13 |
-
"type": "git",
|
14 |
-
"url": "https://github.com/phar-io/version.git",
|
15 |
-
"reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f"
|
16 |
-
},
|
17 |
-
"dist": {
|
18 |
-
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/phar-io/version/zipball/d06a5000ac1a258a7d035295f0bd4ae7c859bc4f",
|
20 |
-
"reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f",
|
21 |
-
"shasum": ""
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"php": "^7.2"
|
25 |
-
},
|
26 |
-
"type": "library",
|
27 |
-
"autoload": {
|
28 |
-
"classmap": [
|
29 |
-
"src/"
|
30 |
-
]
|
31 |
-
},
|
32 |
-
"notification-url": "https://packagist.org/downloads/",
|
33 |
-
"license": [
|
34 |
-
"BSD-3-Clause"
|
35 |
-
],
|
36 |
-
"authors": [
|
37 |
-
{
|
38 |
-
"name": "Arne Blankerts",
|
39 |
-
"email": "arne@blankerts.de",
|
40 |
-
"role": "Developer"
|
41 |
-
},
|
42 |
-
{
|
43 |
-
"name": "Sebastian Heuer",
|
44 |
-
"email": "sebastian@phpeople.de",
|
45 |
-
"role": "Developer"
|
46 |
-
},
|
47 |
-
{
|
48 |
-
"name": "Sebastian Bergmann",
|
49 |
-
"email": "sebastian@phpunit.de",
|
50 |
-
"role": "Developer"
|
51 |
-
}
|
52 |
-
],
|
53 |
-
"description": "Library for handling version information and constraints",
|
54 |
-
"time": "2020-05-09T21:27:55+00:00"
|
55 |
-
}
|
56 |
-
],
|
57 |
-
"packages-dev": [],
|
58 |
-
"aliases": [],
|
59 |
-
"minimum-stability": "stable",
|
60 |
-
"stability-flags": [],
|
61 |
-
"prefer-stable": false,
|
62 |
-
"prefer-lowest": false,
|
63 |
-
"platform": {
|
64 |
-
"php": "^7.2",
|
65 |
-
"ext-dom": "*",
|
66 |
-
"ext-phar": "*",
|
67 |
-
"ext-xmlwriter": "*"
|
68 |
-
},
|
69 |
-
"platform-dev": []
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/ManifestDocumentMapper.php
DELETED
@@ -1,150 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\Exception as VersionException;
|
13 |
-
use PharIo\Version\Version;
|
14 |
-
use PharIo\Version\VersionConstraintParser;
|
15 |
-
|
16 |
-
class ManifestDocumentMapper {
|
17 |
-
public function map(ManifestDocument $document): Manifest {
|
18 |
-
try {
|
19 |
-
$contains = $document->getContainsElement();
|
20 |
-
$type = $this->mapType($contains);
|
21 |
-
$copyright = $this->mapCopyright($document->getCopyrightElement());
|
22 |
-
$requirements = $this->mapRequirements($document->getRequiresElement());
|
23 |
-
$bundledComponents = $this->mapBundledComponents($document);
|
24 |
-
|
25 |
-
return new Manifest(
|
26 |
-
new ApplicationName($contains->getName()),
|
27 |
-
new Version($contains->getVersion()),
|
28 |
-
$type,
|
29 |
-
$copyright,
|
30 |
-
$requirements,
|
31 |
-
$bundledComponents
|
32 |
-
);
|
33 |
-
} catch (VersionException $e) {
|
34 |
-
throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e);
|
35 |
-
} catch (Exception $e) {
|
36 |
-
throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e);
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
private function mapType(ContainsElement $contains): Type {
|
41 |
-
switch ($contains->getType()) {
|
42 |
-
case 'application':
|
43 |
-
return Type::application();
|
44 |
-
case 'library':
|
45 |
-
return Type::library();
|
46 |
-
case 'extension':
|
47 |
-
return $this->mapExtension($contains->getExtensionElement());
|
48 |
-
}
|
49 |
-
|
50 |
-
throw new ManifestDocumentMapperException(
|
51 |
-
\sprintf('Unsupported type %s', $contains->getType())
|
52 |
-
);
|
53 |
-
}
|
54 |
-
|
55 |
-
private function mapCopyright(CopyrightElement $copyright): CopyrightInformation {
|
56 |
-
$authors = new AuthorCollection();
|
57 |
-
|
58 |
-
foreach ($copyright->getAuthorElements() as $authorElement) {
|
59 |
-
$authors->add(
|
60 |
-
new Author(
|
61 |
-
$authorElement->getName(),
|
62 |
-
new Email($authorElement->getEmail())
|
63 |
-
)
|
64 |
-
);
|
65 |
-
}
|
66 |
-
|
67 |
-
$licenseElement = $copyright->getLicenseElement();
|
68 |
-
$license = new License(
|
69 |
-
$licenseElement->getType(),
|
70 |
-
new Url($licenseElement->getUrl())
|
71 |
-
);
|
72 |
-
|
73 |
-
return new CopyrightInformation(
|
74 |
-
$authors,
|
75 |
-
$license
|
76 |
-
);
|
77 |
-
}
|
78 |
-
|
79 |
-
private function mapRequirements(RequiresElement $requires): RequirementCollection {
|
80 |
-
$collection = new RequirementCollection();
|
81 |
-
$phpElement = $requires->getPHPElement();
|
82 |
-
$parser = new VersionConstraintParser;
|
83 |
-
|
84 |
-
try {
|
85 |
-
$versionConstraint = $parser->parse($phpElement->getVersion());
|
86 |
-
} catch (VersionException $e) {
|
87 |
-
throw new ManifestDocumentMapperException(
|
88 |
-
\sprintf('Unsupported version constraint - %s', $e->getMessage()),
|
89 |
-
(int)$e->getCode(),
|
90 |
-
$e
|
91 |
-
);
|
92 |
-
}
|
93 |
-
|
94 |
-
$collection->add(
|
95 |
-
new PhpVersionRequirement(
|
96 |
-
$versionConstraint
|
97 |
-
)
|
98 |
-
);
|
99 |
-
|
100 |
-
if (!$phpElement->hasExtElements()) {
|
101 |
-
return $collection;
|
102 |
-
}
|
103 |
-
|
104 |
-
foreach ($phpElement->getExtElements() as $extElement) {
|
105 |
-
$collection->add(
|
106 |
-
new PhpExtensionRequirement($extElement->getName())
|
107 |
-
);
|
108 |
-
}
|
109 |
-
|
110 |
-
return $collection;
|
111 |
-
}
|
112 |
-
|
113 |
-
private function mapBundledComponents(ManifestDocument $document): BundledComponentCollection {
|
114 |
-
$collection = new BundledComponentCollection();
|
115 |
-
|
116 |
-
if (!$document->hasBundlesElement()) {
|
117 |
-
return $collection;
|
118 |
-
}
|
119 |
-
|
120 |
-
foreach ($document->getBundlesElement()->getComponentElements() as $componentElement) {
|
121 |
-
$collection->add(
|
122 |
-
new BundledComponent(
|
123 |
-
$componentElement->getName(),
|
124 |
-
new Version(
|
125 |
-
$componentElement->getVersion()
|
126 |
-
)
|
127 |
-
)
|
128 |
-
);
|
129 |
-
}
|
130 |
-
|
131 |
-
return $collection;
|
132 |
-
}
|
133 |
-
|
134 |
-
private function mapExtension(ExtensionElement $extension): Extension {
|
135 |
-
try {
|
136 |
-
$versionConstraint = (new VersionConstraintParser)->parse($extension->getCompatible());
|
137 |
-
|
138 |
-
return Type::extension(
|
139 |
-
new ApplicationName($extension->getFor()),
|
140 |
-
$versionConstraint
|
141 |
-
);
|
142 |
-
} catch (VersionException $e) {
|
143 |
-
throw new ManifestDocumentMapperException(
|
144 |
-
\sprintf('Unsupported version constraint - %s', $e->getMessage()),
|
145 |
-
(int)$e->getCode(),
|
146 |
-
$e
|
147 |
-
);
|
148 |
-
}
|
149 |
-
}
|
150 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/ManifestLoader.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ManifestLoader {
|
13 |
-
public static function fromFile(string $filename): Manifest {
|
14 |
-
try {
|
15 |
-
return (new ManifestDocumentMapper())->map(
|
16 |
-
ManifestDocument::fromFile($filename)
|
17 |
-
);
|
18 |
-
} catch (Exception $e) {
|
19 |
-
throw new ManifestLoaderException(
|
20 |
-
\sprintf('Loading %s failed.', $filename),
|
21 |
-
(int)$e->getCode(),
|
22 |
-
$e
|
23 |
-
);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
public static function fromPhar(string $filename): Manifest {
|
28 |
-
return self::fromFile('phar://' . $filename . '/manifest.xml');
|
29 |
-
}
|
30 |
-
|
31 |
-
public static function fromString(string $manifest): Manifest {
|
32 |
-
try {
|
33 |
-
return (new ManifestDocumentMapper())->map(
|
34 |
-
ManifestDocument::fromString($manifest)
|
35 |
-
);
|
36 |
-
} catch (Exception $e) {
|
37 |
-
throw new ManifestLoaderException(
|
38 |
-
'Processing string failed',
|
39 |
-
(int)$e->getCode(),
|
40 |
-
$e
|
41 |
-
);
|
42 |
-
}
|
43 |
-
}
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/ManifestSerializer.php
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\AnyVersionConstraint;
|
13 |
-
use PharIo\Version\Version;
|
14 |
-
use PharIo\Version\VersionConstraint;
|
15 |
-
use XMLWriter;
|
16 |
-
|
17 |
-
/** @psalm-suppress MissingConstructor */
|
18 |
-
class ManifestSerializer {
|
19 |
-
/** @var XMLWriter */
|
20 |
-
private $xmlWriter;
|
21 |
-
|
22 |
-
public function serializeToFile(Manifest $manifest, string $filename): void {
|
23 |
-
\file_put_contents(
|
24 |
-
$filename,
|
25 |
-
$this->serializeToString($manifest)
|
26 |
-
);
|
27 |
-
}
|
28 |
-
|
29 |
-
public function serializeToString(Manifest $manifest): string {
|
30 |
-
$this->startDocument();
|
31 |
-
|
32 |
-
$this->addContains($manifest->getName(), $manifest->getVersion(), $manifest->getType());
|
33 |
-
$this->addCopyright($manifest->getCopyrightInformation());
|
34 |
-
$this->addRequirements($manifest->getRequirements());
|
35 |
-
$this->addBundles($manifest->getBundledComponents());
|
36 |
-
|
37 |
-
return $this->finishDocument();
|
38 |
-
}
|
39 |
-
|
40 |
-
private function startDocument(): void {
|
41 |
-
$xmlWriter = new XMLWriter();
|
42 |
-
$xmlWriter->openMemory();
|
43 |
-
$xmlWriter->setIndent(true);
|
44 |
-
$xmlWriter->setIndentString(\str_repeat(' ', 4));
|
45 |
-
$xmlWriter->startDocument('1.0', 'UTF-8');
|
46 |
-
$xmlWriter->startElement('phar');
|
47 |
-
$xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0');
|
48 |
-
|
49 |
-
$this->xmlWriter = $xmlWriter;
|
50 |
-
}
|
51 |
-
|
52 |
-
private function finishDocument(): string {
|
53 |
-
$this->xmlWriter->endElement();
|
54 |
-
$this->xmlWriter->endDocument();
|
55 |
-
|
56 |
-
return $this->xmlWriter->outputMemory();
|
57 |
-
}
|
58 |
-
|
59 |
-
private function addContains(ApplicationName $name, Version $version, Type $type): void {
|
60 |
-
$this->xmlWriter->startElement('contains');
|
61 |
-
$this->xmlWriter->writeAttribute('name', $name->asString());
|
62 |
-
$this->xmlWriter->writeAttribute('version', $version->getVersionString());
|
63 |
-
|
64 |
-
switch (true) {
|
65 |
-
case $type->isApplication(): {
|
66 |
-
$this->xmlWriter->writeAttribute('type', 'application');
|
67 |
-
|
68 |
-
break;
|
69 |
-
}
|
70 |
-
|
71 |
-
case $type->isLibrary(): {
|
72 |
-
$this->xmlWriter->writeAttribute('type', 'library');
|
73 |
-
|
74 |
-
break;
|
75 |
-
}
|
76 |
-
|
77 |
-
case $type->isExtension(): {
|
78 |
-
$this->xmlWriter->writeAttribute('type', 'extension');
|
79 |
-
/* @var $type Extension */
|
80 |
-
$this->addExtension(
|
81 |
-
$type->getApplicationName(),
|
82 |
-
$type->getVersionConstraint()
|
83 |
-
);
|
84 |
-
|
85 |
-
break;
|
86 |
-
}
|
87 |
-
|
88 |
-
default: {
|
89 |
-
$this->xmlWriter->writeAttribute('type', 'custom');
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
$this->xmlWriter->endElement();
|
94 |
-
}
|
95 |
-
|
96 |
-
private function addCopyright(CopyrightInformation $copyrightInformation): void {
|
97 |
-
$this->xmlWriter->startElement('copyright');
|
98 |
-
|
99 |
-
foreach ($copyrightInformation->getAuthors() as $author) {
|
100 |
-
$this->xmlWriter->startElement('author');
|
101 |
-
$this->xmlWriter->writeAttribute('name', $author->getName());
|
102 |
-
$this->xmlWriter->writeAttribute('email', $author->getEmail()->asString());
|
103 |
-
$this->xmlWriter->endElement();
|
104 |
-
}
|
105 |
-
|
106 |
-
$license = $copyrightInformation->getLicense();
|
107 |
-
|
108 |
-
$this->xmlWriter->startElement('license');
|
109 |
-
$this->xmlWriter->writeAttribute('type', $license->getName());
|
110 |
-
$this->xmlWriter->writeAttribute('url', $license->getUrl()->asString());
|
111 |
-
$this->xmlWriter->endElement();
|
112 |
-
|
113 |
-
$this->xmlWriter->endElement();
|
114 |
-
}
|
115 |
-
|
116 |
-
private function addRequirements(RequirementCollection $requirementCollection): void {
|
117 |
-
$phpRequirement = new AnyVersionConstraint();
|
118 |
-
$extensions = [];
|
119 |
-
|
120 |
-
foreach ($requirementCollection as $requirement) {
|
121 |
-
if ($requirement instanceof PhpVersionRequirement) {
|
122 |
-
$phpRequirement = $requirement->getVersionConstraint();
|
123 |
-
|
124 |
-
continue;
|
125 |
-
}
|
126 |
-
|
127 |
-
if ($requirement instanceof PhpExtensionRequirement) {
|
128 |
-
$extensions[] = $requirement->asString();
|
129 |
-
}
|
130 |
-
}
|
131 |
-
|
132 |
-
$this->xmlWriter->startElement('requires');
|
133 |
-
$this->xmlWriter->startElement('php');
|
134 |
-
$this->xmlWriter->writeAttribute('version', $phpRequirement->asString());
|
135 |
-
|
136 |
-
foreach ($extensions as $extension) {
|
137 |
-
$this->xmlWriter->startElement('ext');
|
138 |
-
$this->xmlWriter->writeAttribute('name', $extension);
|
139 |
-
$this->xmlWriter->endElement();
|
140 |
-
}
|
141 |
-
|
142 |
-
$this->xmlWriter->endElement();
|
143 |
-
$this->xmlWriter->endElement();
|
144 |
-
}
|
145 |
-
|
146 |
-
private function addBundles(BundledComponentCollection $bundledComponentCollection): void {
|
147 |
-
if (\count($bundledComponentCollection) === 0) {
|
148 |
-
return;
|
149 |
-
}
|
150 |
-
$this->xmlWriter->startElement('bundles');
|
151 |
-
|
152 |
-
foreach ($bundledComponentCollection as $bundledComponent) {
|
153 |
-
$this->xmlWriter->startElement('component');
|
154 |
-
$this->xmlWriter->writeAttribute('name', $bundledComponent->getName());
|
155 |
-
$this->xmlWriter->writeAttribute('version', $bundledComponent->getVersion()->getVersionString());
|
156 |
-
$this->xmlWriter->endElement();
|
157 |
-
}
|
158 |
-
|
159 |
-
$this->xmlWriter->endElement();
|
160 |
-
}
|
161 |
-
|
162 |
-
private function addExtension(ApplicationName $applicationName, VersionConstraint $versionConstraint): void {
|
163 |
-
$this->xmlWriter->startElement('extension');
|
164 |
-
$this->xmlWriter->writeAttribute('for', $applicationName->asString());
|
165 |
-
$this->xmlWriter->writeAttribute('compatible', $versionConstraint->asString());
|
166 |
-
$this->xmlWriter->endElement();
|
167 |
-
}
|
168 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ElementCollectionException extends \InvalidArgumentException implements Exception {
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/Exception.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
interface Exception extends \Throwable {
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class InvalidApplicationNameException extends \InvalidArgumentException implements Exception {
|
13 |
-
public const InvalidFormat = 2;
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class InvalidEmailException extends \InvalidArgumentException implements Exception {
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class InvalidUrlException extends \InvalidArgumentException implements Exception {
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Manifest;
|
3 |
-
|
4 |
-
class ManifestDocumentException extends \RuntimeException implements Exception {
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use LibXMLError;
|
13 |
-
|
14 |
-
class ManifestDocumentLoadingException extends \Exception implements Exception {
|
15 |
-
/** @var LibXMLError[] */
|
16 |
-
private $libxmlErrors;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* ManifestDocumentLoadingException constructor.
|
20 |
-
*
|
21 |
-
* @param LibXMLError[] $libxmlErrors
|
22 |
-
*/
|
23 |
-
public function __construct(array $libxmlErrors) {
|
24 |
-
$this->libxmlErrors = $libxmlErrors;
|
25 |
-
$first = $this->libxmlErrors[0];
|
26 |
-
|
27 |
-
parent::__construct(
|
28 |
-
\sprintf(
|
29 |
-
'%s (Line: %d / Column: %d / File: %s)',
|
30 |
-
$first->message,
|
31 |
-
$first->line,
|
32 |
-
$first->column,
|
33 |
-
$first->file
|
34 |
-
),
|
35 |
-
$first->code
|
36 |
-
);
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @return LibXMLError[]
|
41 |
-
*/
|
42 |
-
public function getLibxmlErrors(): array {
|
43 |
-
return $this->libxmlErrors;
|
44 |
-
}
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Manifest;
|
3 |
-
|
4 |
-
class ManifestDocumentMapperException extends \RuntimeException implements Exception {
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/ManifestElementException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Manifest;
|
3 |
-
|
4 |
-
class ManifestElementException extends \RuntimeException implements Exception {
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Manifest;
|
3 |
-
|
4 |
-
class ManifestLoaderException extends \Exception implements Exception {
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Application.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class Application extends Type {
|
13 |
-
public function isApplication(): bool {
|
14 |
-
return true;
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/ApplicationName.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ApplicationName {
|
13 |
-
/** @var string */
|
14 |
-
private $name;
|
15 |
-
|
16 |
-
public function __construct(string $name) {
|
17 |
-
$this->ensureValidFormat($name);
|
18 |
-
$this->name = $name;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function asString(): string {
|
22 |
-
return $this->name;
|
23 |
-
}
|
24 |
-
|
25 |
-
public function isEqual(ApplicationName $name): bool {
|
26 |
-
return $this->name === $name->name;
|
27 |
-
}
|
28 |
-
|
29 |
-
private function ensureValidFormat(string $name): void {
|
30 |
-
if (!\preg_match('#\w/\w#', $name)) {
|
31 |
-
throw new InvalidApplicationNameException(
|
32 |
-
\sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name),
|
33 |
-
InvalidApplicationNameException::InvalidFormat
|
34 |
-
);
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Author.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class Author {
|
13 |
-
/** @var string */
|
14 |
-
private $name;
|
15 |
-
|
16 |
-
/** @var Email */
|
17 |
-
private $email;
|
18 |
-
|
19 |
-
public function __construct(string $name, Email $email) {
|
20 |
-
$this->name = $name;
|
21 |
-
$this->email = $email;
|
22 |
-
}
|
23 |
-
|
24 |
-
public function asString(): string {
|
25 |
-
return \sprintf(
|
26 |
-
'%s <%s>',
|
27 |
-
$this->name,
|
28 |
-
$this->email->asString()
|
29 |
-
);
|
30 |
-
}
|
31 |
-
|
32 |
-
public function getName(): string {
|
33 |
-
return $this->name;
|
34 |
-
}
|
35 |
-
|
36 |
-
public function getEmail(): Email {
|
37 |
-
return $this->email;
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/AuthorCollection.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class AuthorCollection implements \Countable, \IteratorAggregate {
|
13 |
-
/** @var Author[] */
|
14 |
-
private $authors = [];
|
15 |
-
|
16 |
-
public function add(Author $author): void {
|
17 |
-
$this->authors[] = $author;
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @return Author[]
|
22 |
-
*/
|
23 |
-
public function getAuthors(): array {
|
24 |
-
return $this->authors;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function count(): int {
|
28 |
-
return \count($this->authors);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getIterator(): AuthorCollectionIterator {
|
32 |
-
return new AuthorCollectionIterator($this);
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class AuthorCollectionIterator implements \Iterator {
|
13 |
-
/** @var Author[] */
|
14 |
-
private $authors;
|
15 |
-
|
16 |
-
/** @var int */
|
17 |
-
private $position = 0;
|
18 |
-
|
19 |
-
public function __construct(AuthorCollection $authors) {
|
20 |
-
$this->authors = $authors->getAuthors();
|
21 |
-
}
|
22 |
-
|
23 |
-
public function rewind(): void {
|
24 |
-
$this->position = 0;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function valid(): bool {
|
28 |
-
return $this->position < \count($this->authors);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function key(): int {
|
32 |
-
return $this->position;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function current(): Author {
|
36 |
-
return $this->authors[$this->position];
|
37 |
-
}
|
38 |
-
|
39 |
-
public function next(): void {
|
40 |
-
$this->position++;
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/BundledComponent.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\Version;
|
13 |
-
|
14 |
-
class BundledComponent {
|
15 |
-
/** @var string */
|
16 |
-
private $name;
|
17 |
-
|
18 |
-
/** @var Version */
|
19 |
-
private $version;
|
20 |
-
|
21 |
-
public function __construct(string $name, Version $version) {
|
22 |
-
$this->name = $name;
|
23 |
-
$this->version = $version;
|
24 |
-
}
|
25 |
-
|
26 |
-
public function getName(): string {
|
27 |
-
return $this->name;
|
28 |
-
}
|
29 |
-
|
30 |
-
public function getVersion(): Version {
|
31 |
-
return $this->version;
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/BundledComponentCollection.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class BundledComponentCollection implements \Countable, \IteratorAggregate {
|
13 |
-
/** @var BundledComponent[] */
|
14 |
-
private $bundledComponents = [];
|
15 |
-
|
16 |
-
public function add(BundledComponent $bundledComponent): void {
|
17 |
-
$this->bundledComponents[] = $bundledComponent;
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @return BundledComponent[]
|
22 |
-
*/
|
23 |
-
public function getBundledComponents(): array {
|
24 |
-
return $this->bundledComponents;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function count(): int {
|
28 |
-
return \count($this->bundledComponents);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getIterator(): BundledComponentCollectionIterator {
|
32 |
-
return new BundledComponentCollectionIterator($this);
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class BundledComponentCollectionIterator implements \Iterator {
|
13 |
-
/** @var BundledComponent[] */
|
14 |
-
private $bundledComponents;
|
15 |
-
|
16 |
-
/** @var int */
|
17 |
-
private $position = 0;
|
18 |
-
|
19 |
-
public function __construct(BundledComponentCollection $bundledComponents) {
|
20 |
-
$this->bundledComponents = $bundledComponents->getBundledComponents();
|
21 |
-
}
|
22 |
-
|
23 |
-
public function rewind(): void {
|
24 |
-
$this->position = 0;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function valid(): bool {
|
28 |
-
return $this->position < \count($this->bundledComponents);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function key(): int {
|
32 |
-
return $this->position;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function current(): BundledComponent {
|
36 |
-
return $this->bundledComponents[$this->position];
|
37 |
-
}
|
38 |
-
|
39 |
-
public function next(): void {
|
40 |
-
$this->position++;
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/CopyrightInformation.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class CopyrightInformation {
|
13 |
-
/** @var AuthorCollection */
|
14 |
-
private $authors;
|
15 |
-
|
16 |
-
/** @var License */
|
17 |
-
private $license;
|
18 |
-
|
19 |
-
public function __construct(AuthorCollection $authors, License $license) {
|
20 |
-
$this->authors = $authors;
|
21 |
-
$this->license = $license;
|
22 |
-
}
|
23 |
-
|
24 |
-
public function getAuthors(): AuthorCollection {
|
25 |
-
return $this->authors;
|
26 |
-
}
|
27 |
-
|
28 |
-
public function getLicense(): License {
|
29 |
-
return $this->license;
|
30 |
-
}
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Email.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class Email {
|
13 |
-
/** @var string */
|
14 |
-
private $email;
|
15 |
-
|
16 |
-
public function __construct(string $email) {
|
17 |
-
$this->ensureEmailIsValid($email);
|
18 |
-
|
19 |
-
$this->email = $email;
|
20 |
-
}
|
21 |
-
|
22 |
-
public function asString(): string {
|
23 |
-
return $this->email;
|
24 |
-
}
|
25 |
-
|
26 |
-
private function ensureEmailIsValid(string $url): void {
|
27 |
-
if (\filter_var($url, \FILTER_VALIDATE_EMAIL) === false) {
|
28 |
-
throw new InvalidEmailException;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Extension.php
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\Version;
|
13 |
-
use PharIo\Version\VersionConstraint;
|
14 |
-
|
15 |
-
class Extension extends Type {
|
16 |
-
/** @var ApplicationName */
|
17 |
-
private $application;
|
18 |
-
|
19 |
-
/** @var VersionConstraint */
|
20 |
-
private $versionConstraint;
|
21 |
-
|
22 |
-
public function __construct(ApplicationName $application, VersionConstraint $versionConstraint) {
|
23 |
-
$this->application = $application;
|
24 |
-
$this->versionConstraint = $versionConstraint;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function getApplicationName(): ApplicationName {
|
28 |
-
return $this->application;
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getVersionConstraint(): VersionConstraint {
|
32 |
-
return $this->versionConstraint;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function isExtension(): bool {
|
36 |
-
return true;
|
37 |
-
}
|
38 |
-
|
39 |
-
public function isExtensionFor(ApplicationName $name): bool {
|
40 |
-
return $this->application->isEqual($name);
|
41 |
-
}
|
42 |
-
|
43 |
-
public function isCompatibleWith(ApplicationName $name, Version $version): bool {
|
44 |
-
return $this->isExtensionFor($name) && $this->versionConstraint->complies($version);
|
45 |
-
}
|
46 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Library.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class Library extends Type {
|
13 |
-
public function isLibrary(): bool {
|
14 |
-
return true;
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/License.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class License {
|
13 |
-
/** @var string */
|
14 |
-
private $name;
|
15 |
-
|
16 |
-
/** @var Url */
|
17 |
-
private $url;
|
18 |
-
|
19 |
-
public function __construct(string $name, Url $url) {
|
20 |
-
$this->name = $name;
|
21 |
-
$this->url = $url;
|
22 |
-
}
|
23 |
-
|
24 |
-
public function getName(): string {
|
25 |
-
return $this->name;
|
26 |
-
}
|
27 |
-
|
28 |
-
public function getUrl(): Url {
|
29 |
-
return $this->url;
|
30 |
-
}
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Manifest.php
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\Version;
|
13 |
-
|
14 |
-
class Manifest {
|
15 |
-
/** @var ApplicationName */
|
16 |
-
private $name;
|
17 |
-
|
18 |
-
/** @var Version */
|
19 |
-
private $version;
|
20 |
-
|
21 |
-
/** @var Type */
|
22 |
-
private $type;
|
23 |
-
|
24 |
-
/** @var CopyrightInformation */
|
25 |
-
private $copyrightInformation;
|
26 |
-
|
27 |
-
/** @var RequirementCollection */
|
28 |
-
private $requirements;
|
29 |
-
|
30 |
-
/** @var BundledComponentCollection */
|
31 |
-
private $bundledComponents;
|
32 |
-
|
33 |
-
public function __construct(ApplicationName $name, Version $version, Type $type, CopyrightInformation $copyrightInformation, RequirementCollection $requirements, BundledComponentCollection $bundledComponents) {
|
34 |
-
$this->name = $name;
|
35 |
-
$this->version = $version;
|
36 |
-
$this->type = $type;
|
37 |
-
$this->copyrightInformation = $copyrightInformation;
|
38 |
-
$this->requirements = $requirements;
|
39 |
-
$this->bundledComponents = $bundledComponents;
|
40 |
-
}
|
41 |
-
|
42 |
-
public function getName(): ApplicationName {
|
43 |
-
return $this->name;
|
44 |
-
}
|
45 |
-
|
46 |
-
public function getVersion(): Version {
|
47 |
-
return $this->version;
|
48 |
-
}
|
49 |
-
|
50 |
-
public function getType(): Type {
|
51 |
-
return $this->type;
|
52 |
-
}
|
53 |
-
|
54 |
-
public function getCopyrightInformation(): CopyrightInformation {
|
55 |
-
return $this->copyrightInformation;
|
56 |
-
}
|
57 |
-
|
58 |
-
public function getRequirements(): RequirementCollection {
|
59 |
-
return $this->requirements;
|
60 |
-
}
|
61 |
-
|
62 |
-
public function getBundledComponents(): BundledComponentCollection {
|
63 |
-
return $this->bundledComponents;
|
64 |
-
}
|
65 |
-
|
66 |
-
public function isApplication(): bool {
|
67 |
-
return $this->type->isApplication();
|
68 |
-
}
|
69 |
-
|
70 |
-
public function isLibrary(): bool {
|
71 |
-
return $this->type->isLibrary();
|
72 |
-
}
|
73 |
-
|
74 |
-
public function isExtension(): bool {
|
75 |
-
return $this->type->isExtension();
|
76 |
-
}
|
77 |
-
|
78 |
-
public function isExtensionFor(ApplicationName $application, Version $version = null): bool {
|
79 |
-
if (!$this->isExtension()) {
|
80 |
-
return false;
|
81 |
-
}
|
82 |
-
|
83 |
-
/** @var Extension $type */
|
84 |
-
$type = $this->type;
|
85 |
-
|
86 |
-
if ($version !== null) {
|
87 |
-
return $type->isCompatibleWith($application, $version);
|
88 |
-
}
|
89 |
-
|
90 |
-
return $type->isExtensionFor($application);
|
91 |
-
}
|
92 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class PhpExtensionRequirement implements Requirement {
|
13 |
-
/** @var string */
|
14 |
-
private $extension;
|
15 |
-
|
16 |
-
public function __construct(string $extension) {
|
17 |
-
$this->extension = $extension;
|
18 |
-
}
|
19 |
-
|
20 |
-
public function asString(): string {
|
21 |
-
return $this->extension;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/PhpVersionRequirement.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\VersionConstraint;
|
13 |
-
|
14 |
-
class PhpVersionRequirement implements Requirement {
|
15 |
-
/** @var VersionConstraint */
|
16 |
-
private $versionConstraint;
|
17 |
-
|
18 |
-
public function __construct(VersionConstraint $versionConstraint) {
|
19 |
-
$this->versionConstraint = $versionConstraint;
|
20 |
-
}
|
21 |
-
|
22 |
-
public function getVersionConstraint(): VersionConstraint {
|
23 |
-
return $this->versionConstraint;
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Requirement.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
interface Requirement {
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/RequirementCollection.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class RequirementCollection implements \Countable, \IteratorAggregate {
|
13 |
-
/** @var Requirement[] */
|
14 |
-
private $requirements = [];
|
15 |
-
|
16 |
-
public function add(Requirement $requirement): void {
|
17 |
-
$this->requirements[] = $requirement;
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @return Requirement[]
|
22 |
-
*/
|
23 |
-
public function getRequirements(): array {
|
24 |
-
return $this->requirements;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function count(): int {
|
28 |
-
return \count($this->requirements);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getIterator(): RequirementCollectionIterator {
|
32 |
-
return new RequirementCollectionIterator($this);
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class RequirementCollectionIterator implements \Iterator {
|
13 |
-
/** @var Requirement[] */
|
14 |
-
private $requirements;
|
15 |
-
|
16 |
-
/** @var int */
|
17 |
-
private $position = 0;
|
18 |
-
|
19 |
-
public function __construct(RequirementCollection $requirements) {
|
20 |
-
$this->requirements = $requirements->getRequirements();
|
21 |
-
}
|
22 |
-
|
23 |
-
public function rewind(): void {
|
24 |
-
$this->position = 0;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function valid(): bool {
|
28 |
-
return $this->position < \count($this->requirements);
|
29 |
-
}
|
30 |
-
|
31 |
-
public function key(): int {
|
32 |
-
return $this->position;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function current(): Requirement {
|
36 |
-
return $this->requirements[$this->position];
|
37 |
-
}
|
38 |
-
|
39 |
-
public function next(): void {
|
40 |
-
$this->position++;
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Type.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use PharIo\Version\VersionConstraint;
|
13 |
-
|
14 |
-
abstract class Type {
|
15 |
-
public static function application(): Application {
|
16 |
-
return new Application;
|
17 |
-
}
|
18 |
-
|
19 |
-
public static function library(): Library {
|
20 |
-
return new Library;
|
21 |
-
}
|
22 |
-
|
23 |
-
public static function extension(ApplicationName $application, VersionConstraint $versionConstraint): Extension {
|
24 |
-
return new Extension($application, $versionConstraint);
|
25 |
-
}
|
26 |
-
|
27 |
-
/** @psalm-assert-if-true Application $this */
|
28 |
-
public function isApplication(): bool {
|
29 |
-
return false;
|
30 |
-
}
|
31 |
-
|
32 |
-
/** @psalm-assert-if-true Library $this */
|
33 |
-
public function isLibrary(): bool {
|
34 |
-
return false;
|
35 |
-
}
|
36 |
-
|
37 |
-
/** @psalm-assert-if-true Extension $this */
|
38 |
-
public function isExtension(): bool {
|
39 |
-
return false;
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/values/Url.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class Url {
|
13 |
-
/** @var string */
|
14 |
-
private $url;
|
15 |
-
|
16 |
-
public function __construct(string $url) {
|
17 |
-
$this->ensureUrlIsValid($url);
|
18 |
-
|
19 |
-
$this->url = $url;
|
20 |
-
}
|
21 |
-
|
22 |
-
public function asString(): string {
|
23 |
-
return $this->url;
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param string $url
|
28 |
-
*
|
29 |
-
* @throws InvalidUrlException
|
30 |
-
*/
|
31 |
-
private function ensureUrlIsValid($url): void {
|
32 |
-
if (\filter_var($url, \FILTER_VALIDATE_URL) === false) {
|
33 |
-
throw new InvalidUrlException;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/AuthorElement.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class AuthorElement extends ManifestElement {
|
13 |
-
public function getName(): string {
|
14 |
-
return $this->getAttributeValue('name');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function getEmail(): string {
|
18 |
-
return $this->getAttributeValue('email');
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/AuthorElementCollection.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class AuthorElementCollection extends ElementCollection {
|
13 |
-
public function current(): AuthorElement {
|
14 |
-
return new AuthorElement(
|
15 |
-
$this->getCurrentElement()
|
16 |
-
);
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/BundlesElement.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class BundlesElement extends ManifestElement {
|
13 |
-
public function getComponentElements(): ComponentElementCollection {
|
14 |
-
return new ComponentElementCollection(
|
15 |
-
$this->getChildrenByName('component')
|
16 |
-
);
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ComponentElement.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ComponentElement extends ManifestElement {
|
13 |
-
public function getName(): string {
|
14 |
-
return $this->getAttributeValue('name');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function getVersion(): string {
|
18 |
-
return $this->getAttributeValue('version');
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ComponentElementCollection.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ComponentElementCollection extends ElementCollection {
|
13 |
-
public function current(): ComponentElement {
|
14 |
-
return new ComponentElement(
|
15 |
-
$this->getCurrentElement()
|
16 |
-
);
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ContainsElement.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ContainsElement extends ManifestElement {
|
13 |
-
public function getName(): string {
|
14 |
-
return $this->getAttributeValue('name');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function getVersion(): string {
|
18 |
-
return $this->getAttributeValue('version');
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getType(): string {
|
22 |
-
return $this->getAttributeValue('type');
|
23 |
-
}
|
24 |
-
|
25 |
-
public function getExtensionElement(): ExtensionElement {
|
26 |
-
return new ExtensionElement(
|
27 |
-
$this->getChildByName('extension')
|
28 |
-
);
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/CopyrightElement.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class CopyrightElement extends ManifestElement {
|
13 |
-
public function getAuthorElements(): AuthorElementCollection {
|
14 |
-
return new AuthorElementCollection(
|
15 |
-
$this->getChildrenByName('author')
|
16 |
-
);
|
17 |
-
}
|
18 |
-
|
19 |
-
public function getLicenseElement(): LicenseElement {
|
20 |
-
return new LicenseElement(
|
21 |
-
$this->getChildByName('license')
|
22 |
-
);
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ElementCollection.php
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use DOMElement;
|
13 |
-
use DOMNodeList;
|
14 |
-
|
15 |
-
abstract class ElementCollection implements \Iterator {
|
16 |
-
/** @var DOMElement[] */
|
17 |
-
private $nodes = [];
|
18 |
-
|
19 |
-
/** @var int */
|
20 |
-
private $position;
|
21 |
-
|
22 |
-
public function __construct(DOMNodeList $nodeList) {
|
23 |
-
$this->position = 0;
|
24 |
-
$this->importNodes($nodeList);
|
25 |
-
}
|
26 |
-
|
27 |
-
abstract public function current();
|
28 |
-
|
29 |
-
public function next(): void {
|
30 |
-
$this->position++;
|
31 |
-
}
|
32 |
-
|
33 |
-
public function key() {
|
34 |
-
return $this->position;
|
35 |
-
}
|
36 |
-
|
37 |
-
public function valid() {
|
38 |
-
return $this->position < \count($this->nodes);
|
39 |
-
}
|
40 |
-
|
41 |
-
public function rewind(): void {
|
42 |
-
$this->position = 0;
|
43 |
-
}
|
44 |
-
|
45 |
-
protected function getCurrentElement(): DOMElement {
|
46 |
-
return $this->nodes[$this->position];
|
47 |
-
}
|
48 |
-
|
49 |
-
private function importNodes(DOMNodeList $nodeList): void {
|
50 |
-
foreach ($nodeList as $node) {
|
51 |
-
if (!$node instanceof DOMElement) {
|
52 |
-
throw new ElementCollectionException(
|
53 |
-
\sprintf('\DOMElement expected, got \%s', \get_class($node))
|
54 |
-
);
|
55 |
-
}
|
56 |
-
|
57 |
-
$this->nodes[] = $node;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ExtElement.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ExtElement extends ManifestElement {
|
13 |
-
public function getName(): string {
|
14 |
-
return $this->getAttributeValue('name');
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ExtElementCollection.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ExtElementCollection extends ElementCollection {
|
13 |
-
public function current(): ExtElement {
|
14 |
-
return new ExtElement(
|
15 |
-
$this->getCurrentElement()
|
16 |
-
);
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ExtensionElement.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class ExtensionElement extends ManifestElement {
|
13 |
-
public function getFor(): string {
|
14 |
-
return $this->getAttributeValue('for');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function getCompatible(): string {
|
18 |
-
return $this->getAttributeValue('compatible');
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/LicenseElement.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class LicenseElement extends ManifestElement {
|
13 |
-
public function getType(): string {
|
14 |
-
return $this->getAttributeValue('type');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function getUrl(): string {
|
18 |
-
return $this->getAttributeValue('url');
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ManifestDocument.php
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use DOMDocument;
|
13 |
-
use DOMElement;
|
14 |
-
|
15 |
-
class ManifestDocument {
|
16 |
-
public const XMLNS = 'https://phar.io/xml/manifest/1.0';
|
17 |
-
|
18 |
-
/** @var DOMDocument */
|
19 |
-
private $dom;
|
20 |
-
|
21 |
-
public static function fromFile(string $filename): ManifestDocument {
|
22 |
-
if (!\file_exists($filename)) {
|
23 |
-
throw new ManifestDocumentException(
|
24 |
-
\sprintf('File "%s" not found', $filename)
|
25 |
-
);
|
26 |
-
}
|
27 |
-
|
28 |
-
return self::fromString(
|
29 |
-
\file_get_contents($filename)
|
30 |
-
);
|
31 |
-
}
|
32 |
-
|
33 |
-
public static function fromString(string $xmlString): ManifestDocument {
|
34 |
-
$prev = \libxml_use_internal_errors(true);
|
35 |
-
\libxml_clear_errors();
|
36 |
-
|
37 |
-
$dom = new DOMDocument();
|
38 |
-
$dom->loadXML($xmlString);
|
39 |
-
|
40 |
-
$errors = \libxml_get_errors();
|
41 |
-
\libxml_use_internal_errors($prev);
|
42 |
-
|
43 |
-
if (\count($errors) !== 0) {
|
44 |
-
throw new ManifestDocumentLoadingException($errors);
|
45 |
-
}
|
46 |
-
|
47 |
-
return new self($dom);
|
48 |
-
}
|
49 |
-
|
50 |
-
private function __construct(DOMDocument $dom) {
|
51 |
-
$this->ensureCorrectDocumentType($dom);
|
52 |
-
|
53 |
-
$this->dom = $dom;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getContainsElement(): ContainsElement {
|
57 |
-
return new ContainsElement(
|
58 |
-
$this->fetchElementByName('contains')
|
59 |
-
);
|
60 |
-
}
|
61 |
-
|
62 |
-
public function getCopyrightElement(): CopyrightElement {
|
63 |
-
return new CopyrightElement(
|
64 |
-
$this->fetchElementByName('copyright')
|
65 |
-
);
|
66 |
-
}
|
67 |
-
|
68 |
-
public function getRequiresElement(): RequiresElement {
|
69 |
-
return new RequiresElement(
|
70 |
-
$this->fetchElementByName('requires')
|
71 |
-
);
|
72 |
-
}
|
73 |
-
|
74 |
-
public function hasBundlesElement(): bool {
|
75 |
-
return $this->dom->getElementsByTagNameNS(self::XMLNS, 'bundles')->length === 1;
|
76 |
-
}
|
77 |
-
|
78 |
-
public function getBundlesElement(): BundlesElement {
|
79 |
-
return new BundlesElement(
|
80 |
-
$this->fetchElementByName('bundles')
|
81 |
-
);
|
82 |
-
}
|
83 |
-
|
84 |
-
private function ensureCorrectDocumentType(DOMDocument $dom): void {
|
85 |
-
$root = $dom->documentElement;
|
86 |
-
|
87 |
-
if ($root->localName !== 'phar' || $root->namespaceURI !== self::XMLNS) {
|
88 |
-
throw new ManifestDocumentException('Not a phar.io manifest document');
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
private function fetchElementByName(string $elementName): DOMElement {
|
93 |
-
$element = $this->dom->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0);
|
94 |
-
|
95 |
-
if (!$element instanceof DOMElement) {
|
96 |
-
throw new ManifestDocumentException(
|
97 |
-
\sprintf('Element %s missing', $elementName)
|
98 |
-
);
|
99 |
-
}
|
100 |
-
|
101 |
-
return $element;
|
102 |
-
}
|
103 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/ManifestElement.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
use DOMElement;
|
13 |
-
use DOMNodeList;
|
14 |
-
|
15 |
-
class ManifestElement {
|
16 |
-
public const XMLNS = 'https://phar.io/xml/manifest/1.0';
|
17 |
-
|
18 |
-
/** @var DOMElement */
|
19 |
-
private $element;
|
20 |
-
|
21 |
-
public function __construct(DOMElement $element) {
|
22 |
-
$this->element = $element;
|
23 |
-
}
|
24 |
-
|
25 |
-
protected function getAttributeValue(string $name): string {
|
26 |
-
if (!$this->element->hasAttribute($name)) {
|
27 |
-
throw new ManifestElementException(
|
28 |
-
\sprintf(
|
29 |
-
'Attribute %s not set on element %s',
|
30 |
-
$name,
|
31 |
-
$this->element->localName
|
32 |
-
)
|
33 |
-
);
|
34 |
-
}
|
35 |
-
|
36 |
-
return $this->element->getAttribute($name);
|
37 |
-
}
|
38 |
-
|
39 |
-
protected function getChildByName(string $elementName): DOMElement {
|
40 |
-
$element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0);
|
41 |
-
|
42 |
-
if (!$element instanceof DOMElement) {
|
43 |
-
throw new ManifestElementException(
|
44 |
-
\sprintf('Element %s missing', $elementName)
|
45 |
-
);
|
46 |
-
}
|
47 |
-
|
48 |
-
return $element;
|
49 |
-
}
|
50 |
-
|
51 |
-
protected function getChildrenByName(string $elementName): DOMNodeList {
|
52 |
-
$elementList = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName);
|
53 |
-
|
54 |
-
if ($elementList->length === 0) {
|
55 |
-
throw new ManifestElementException(
|
56 |
-
\sprintf('Element(s) %s missing', $elementName)
|
57 |
-
);
|
58 |
-
}
|
59 |
-
|
60 |
-
return $elementList;
|
61 |
-
}
|
62 |
-
|
63 |
-
protected function hasChild(string $elementName): bool {
|
64 |
-
return $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->length !== 0;
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/PhpElement.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class PhpElement extends ManifestElement {
|
13 |
-
public function getVersion(): string {
|
14 |
-
return $this->getAttributeValue('version');
|
15 |
-
}
|
16 |
-
|
17 |
-
public function hasExtElements(): bool {
|
18 |
-
return $this->hasChild('ext');
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getExtElements(): ExtElementCollection {
|
22 |
-
return new ExtElementCollection(
|
23 |
-
$this->getChildrenByName('ext')
|
24 |
-
);
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/manifest/src/xml/RequiresElement.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Manifest.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Manifest;
|
11 |
-
|
12 |
-
class RequiresElement extends ManifestElement {
|
13 |
-
public function getPHPElement(): PhpElement {
|
14 |
-
return new PhpElement(
|
15 |
-
$this->getChildByName('php')
|
16 |
-
);
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/CHANGELOG.md
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
# Changelog
|
2 |
-
|
3 |
-
All notable changes to phar-io/version are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
4 |
-
|
5 |
-
## [3.0.4] - 14.12.2020
|
6 |
-
|
7 |
-
### Fixed
|
8 |
-
|
9 |
-
- [#22](https://github.com/phar-io/version/pull/22): make dev suffix rank works for uppercase too
|
10 |
-
|
11 |
-
|
12 |
-
## [3.0.3] - 30.11.2020
|
13 |
-
|
14 |
-
### Added
|
15 |
-
|
16 |
-
- Comparator method `Version::equals()` added
|
17 |
-
|
18 |
-
## [3.0.2] - 27.06.2020
|
19 |
-
|
20 |
-
This release now supports PHP 7.2+ and PHP ^8.0. No other changes included.
|
21 |
-
|
22 |
-
## [3.0.1] - 09.05.2020
|
23 |
-
|
24 |
-
### Changed
|
25 |
-
|
26 |
-
- Internal Refactoring
|
27 |
-
- More scalar types
|
28 |
-
|
29 |
-
### Fixed
|
30 |
-
|
31 |
-
- Fixed Constraint processing Regression for ^1.2 and ~1.2
|
32 |
-
|
33 |
-
|
34 |
-
## [3.0.0] - 05.05.2020
|
35 |
-
|
36 |
-
### Changed
|
37 |
-
|
38 |
-
- Require PHP 7.2+
|
39 |
-
- All code now uses strict mode
|
40 |
-
- Scalar types have been added as needed
|
41 |
-
|
42 |
-
### Added
|
43 |
-
|
44 |
-
- The technically invalid format using 'v' prefix ("v1.2.3") is now properly supported
|
45 |
-
|
46 |
-
|
47 |
-
## [2.0.1] - 08.07.2018
|
48 |
-
|
49 |
-
### Fixed
|
50 |
-
|
51 |
-
- Versions without a pre-release suffix are now always considered greater
|
52 |
-
than versions with a pre-release suffix. Example: `3.0.0 > 3.0.0-alpha.1`
|
53 |
-
|
54 |
-
## [2.0.0] - 23.06.2018
|
55 |
-
|
56 |
-
Changes to public API:
|
57 |
-
|
58 |
-
- `PreReleaseSuffix::construct()`: optional parameter `$number` removed
|
59 |
-
- `PreReleaseSuffix::isGreaterThan()`: introduced
|
60 |
-
- `Version::hasPreReleaseSuffix()`: introduced
|
61 |
-
|
62 |
-
### Added
|
63 |
-
|
64 |
-
- [#11](https://github.com/phar-io/version/issues/11): Added support for pre-release version suffixes. Supported values are:
|
65 |
-
- `dev`
|
66 |
-
- `beta` (also abbreviated form `b`)
|
67 |
-
- `rc`
|
68 |
-
- `alpha` (also abbreviated form `a`)
|
69 |
-
- `patch` (also abbreviated form `p`)
|
70 |
-
|
71 |
-
All values can be followed by a number, e.g. `beta3`.
|
72 |
-
|
73 |
-
When comparing versions, the pre-release suffix is taken into account. Example:
|
74 |
-
`1.5.0 > 1.5.0-beta1 > 1.5.0-alpha3 > 1.5.0-alpha2 > 1.5.0-dev11`
|
75 |
-
|
76 |
-
### Changed
|
77 |
-
|
78 |
-
- reorganized the source directories
|
79 |
-
|
80 |
-
### Fixed
|
81 |
-
|
82 |
-
- [#10](https://github.com/phar-io/version/issues/10): Version numbers containing
|
83 |
-
a numeric suffix as seen in Debian packages are now supported.
|
84 |
-
|
85 |
-
|
86 |
-
[3.0.4]: https://github.com/phar-io/version/compare/3.0.3...3.0.4
|
87 |
-
[3.0.3]: https://github.com/phar-io/version/compare/3.0.2...3.0.3
|
88 |
-
[3.0.2]: https://github.com/phar-io/version/compare/3.0.1...3.0.2
|
89 |
-
[3.0.1]: https://github.com/phar-io/version/compare/3.0.0...3.0.1
|
90 |
-
[3.0.0]: https://github.com/phar-io/version/compare/2.0.1...3.0.0
|
91 |
-
[2.0.1]: https://github.com/phar-io/version/compare/2.0.0...2.0.1
|
92 |
-
[2.0.0]: https://github.com/phar-io/version/compare/1.0.1...2.0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/LICENSE
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
phar-io/version
|
2 |
-
|
3 |
-
Copyright (c) 2016-2017 Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de> and contributors
|
4 |
-
All rights reserved.
|
5 |
-
|
6 |
-
Redistribution and use in source and binary forms, with or without modification,
|
7 |
-
are permitted provided that the following conditions are met:
|
8 |
-
|
9 |
-
* Redistributions of source code must retain the above copyright notice,
|
10 |
-
this list of conditions and the following disclaimer.
|
11 |
-
|
12 |
-
* Redistributions in binary form must reproduce the above copyright notice,
|
13 |
-
this list of conditions and the following disclaimer in the documentation
|
14 |
-
and/or other materials provided with the distribution.
|
15 |
-
|
16 |
-
* Neither the name of Arne Blankerts nor the names of contributors
|
17 |
-
may be used to endorse or promote products derived from this software
|
18 |
-
without specific prior written permission.
|
19 |
-
|
20 |
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21 |
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO,
|
22 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
23 |
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
|
24 |
-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
25 |
-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
26 |
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
27 |
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28 |
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
29 |
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
30 |
-
POSSIBILITY OF SUCH DAMAGE.
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/README.md
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
# Version
|
2 |
-
|
3 |
-
Library for handling version information and constraints
|
4 |
-
|
5 |
-
[![Build Status](https://travis-ci.org/phar-io/version.svg?branch=master)](https://travis-ci.org/phar-io/version)
|
6 |
-
|
7 |
-
## Installation
|
8 |
-
|
9 |
-
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
10 |
-
|
11 |
-
composer require phar-io/version
|
12 |
-
|
13 |
-
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:
|
14 |
-
|
15 |
-
composer require --dev phar-io/version
|
16 |
-
|
17 |
-
## Version constraints
|
18 |
-
|
19 |
-
A Version constraint describes a range of versions or a discrete version number. The format of version numbers follows the schema of [semantic versioning](http://semver.org): `<major>.<minor>.<patch>`. A constraint might contain an operator that describes the range.
|
20 |
-
|
21 |
-
Beside the typical mathematical operators like `<=`, `>=`, there are two special operators:
|
22 |
-
|
23 |
-
*Caret operator*: `^1.0`
|
24 |
-
can be written as `>=1.0.0 <2.0.0` and read as »every Version within major version `1`«.
|
25 |
-
|
26 |
-
*Tilde operator*: `~1.0.0`
|
27 |
-
can be written as `>=1.0.0 <1.1.0` and read as »every version within minor version `1.1`. The behavior of tilde operator depends on whether a patch level version is provided or not. If no patch level is provided, tilde operator behaves like the caret operator: `~1.0` is identical to `^1.0`.
|
28 |
-
|
29 |
-
## Usage examples
|
30 |
-
|
31 |
-
Parsing version constraints and check discrete versions for compliance:
|
32 |
-
|
33 |
-
```php
|
34 |
-
|
35 |
-
use PharIo\Version\Version;
|
36 |
-
use PharIo\Version\VersionConstraintParser;
|
37 |
-
|
38 |
-
$parser = new VersionConstraintParser();
|
39 |
-
$caret_constraint = $parser->parse( '^7.0' );
|
40 |
-
|
41 |
-
$caret_constraint->complies( new Version( '7.0.17' ) ); // true
|
42 |
-
$caret_constraint->complies( new Version( '7.1.0' ) ); // true
|
43 |
-
$caret_constraint->complies( new Version( '6.4.34' ) ); // false
|
44 |
-
|
45 |
-
$tilde_constraint = $parser->parse( '~1.1.0' );
|
46 |
-
|
47 |
-
$tilde_constraint->complies( new Version( '1.1.4' ) ); // true
|
48 |
-
$tilde_constraint->complies( new Version( '1.2.0' ) ); // false
|
49 |
-
```
|
50 |
-
|
51 |
-
As of version 2.0.0, pre-release labels are supported and taken into account when comparing versions:
|
52 |
-
|
53 |
-
```php
|
54 |
-
|
55 |
-
$leftVersion = new PharIo\Version\Version('3.0.0-alpha.1');
|
56 |
-
$rightVersion = new PharIo\Version\Version('3.0.0-alpha.2');
|
57 |
-
|
58 |
-
$leftVersion->isGreaterThan($rightVersion); // false
|
59 |
-
$rightVersion->isGreaterThan($leftVersion); // true
|
60 |
-
|
61 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/composer.json
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "phar-io/version",
|
3 |
-
"description": "Library for handling version information and constraints",
|
4 |
-
"license": "BSD-3-Clause",
|
5 |
-
"authors": [
|
6 |
-
{
|
7 |
-
"name": "Arne Blankerts",
|
8 |
-
"email": "arne@blankerts.de",
|
9 |
-
"role": "Developer"
|
10 |
-
},
|
11 |
-
{
|
12 |
-
"name": "Sebastian Heuer",
|
13 |
-
"email": "sebastian@phpeople.de",
|
14 |
-
"role": "Developer"
|
15 |
-
},
|
16 |
-
{
|
17 |
-
"name": "Sebastian Bergmann",
|
18 |
-
"email": "sebastian@phpunit.de",
|
19 |
-
"role": "Developer"
|
20 |
-
}
|
21 |
-
],
|
22 |
-
"support": {
|
23 |
-
"issues": "https://github.com/phar-io/version/issues"
|
24 |
-
},
|
25 |
-
"require": {
|
26 |
-
"php": "^7.2 || ^8.0"
|
27 |
-
},
|
28 |
-
"autoload": {
|
29 |
-
"classmap": [
|
30 |
-
"src/"
|
31 |
-
]
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/PreReleaseSuffix.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Version;
|
3 |
-
|
4 |
-
class PreReleaseSuffix {
|
5 |
-
private const valueScoreMap = [
|
6 |
-
'dev' => 0,
|
7 |
-
'a' => 1,
|
8 |
-
'alpha' => 1,
|
9 |
-
'b' => 2,
|
10 |
-
'beta' => 2,
|
11 |
-
'rc' => 3,
|
12 |
-
'p' => 4,
|
13 |
-
'patch' => 4,
|
14 |
-
];
|
15 |
-
|
16 |
-
/** @var string */
|
17 |
-
private $value;
|
18 |
-
|
19 |
-
/** @var int */
|
20 |
-
private $valueScore;
|
21 |
-
|
22 |
-
/** @var int */
|
23 |
-
private $number = 0;
|
24 |
-
|
25 |
-
/** @var string */
|
26 |
-
private $full;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @throws InvalidPreReleaseSuffixException
|
30 |
-
*/
|
31 |
-
public function __construct(string $value) {
|
32 |
-
$this->parseValue($value);
|
33 |
-
}
|
34 |
-
|
35 |
-
public function asString(): string {
|
36 |
-
return $this->full;
|
37 |
-
}
|
38 |
-
|
39 |
-
public function getValue(): string {
|
40 |
-
return $this->value;
|
41 |
-
}
|
42 |
-
|
43 |
-
public function getNumber(): ?int {
|
44 |
-
return $this->number;
|
45 |
-
}
|
46 |
-
|
47 |
-
public function isGreaterThan(PreReleaseSuffix $suffix): bool {
|
48 |
-
if ($this->valueScore > $suffix->valueScore) {
|
49 |
-
return true;
|
50 |
-
}
|
51 |
-
|
52 |
-
if ($this->valueScore < $suffix->valueScore) {
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
|
56 |
-
return $this->getNumber() > $suffix->getNumber();
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @param $value
|
61 |
-
*/
|
62 |
-
private function mapValueToScore($value): int {
|
63 |
-
$value = strtolower($value);
|
64 |
-
|
65 |
-
if (\array_key_exists($value, self::valueScoreMap)) {
|
66 |
-
return self::valueScoreMap[$value];
|
67 |
-
}
|
68 |
-
|
69 |
-
return 0;
|
70 |
-
}
|
71 |
-
|
72 |
-
private function parseValue($value): void {
|
73 |
-
$regex = '/-?((dev|beta|b|rc|alpha|a|patch|p)\.?(\d*)).*$/i';
|
74 |
-
|
75 |
-
if (\preg_match($regex, $value, $matches) !== 1) {
|
76 |
-
throw new InvalidPreReleaseSuffixException(\sprintf('Invalid label %s', $value));
|
77 |
-
}
|
78 |
-
|
79 |
-
$this->full = $matches[1];
|
80 |
-
$this->value = $matches[2];
|
81 |
-
|
82 |
-
if ($matches[3] !== '') {
|
83 |
-
$this->number = (int)$matches[3];
|
84 |
-
}
|
85 |
-
|
86 |
-
$this->valueScore = $this->mapValueToScore($matches[2]);
|
87 |
-
}
|
88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/Version.php
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class Version {
|
13 |
-
/** @var VersionNumber */
|
14 |
-
private $major;
|
15 |
-
|
16 |
-
/** @var VersionNumber */
|
17 |
-
private $minor;
|
18 |
-
|
19 |
-
/** @var VersionNumber */
|
20 |
-
private $patch;
|
21 |
-
|
22 |
-
/** @var PreReleaseSuffix */
|
23 |
-
private $preReleaseSuffix;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @param string $versionString
|
27 |
-
*/
|
28 |
-
public function __construct($versionString) {
|
29 |
-
$this->ensureVersionStringIsValid($versionString);
|
30 |
-
}
|
31 |
-
|
32 |
-
public function getPreReleaseSuffix(): PreReleaseSuffix {
|
33 |
-
return $this->preReleaseSuffix;
|
34 |
-
}
|
35 |
-
|
36 |
-
public function getVersionString(): string {
|
37 |
-
$str = sprintf(
|
38 |
-
'%d.%d.%d',
|
39 |
-
$this->getMajor()->getValue(),
|
40 |
-
$this->getMinor()->getValue(),
|
41 |
-
$this->getPatch()->getValue()
|
42 |
-
);
|
43 |
-
|
44 |
-
if (!$this->hasPreReleaseSuffix()) {
|
45 |
-
return $str;
|
46 |
-
}
|
47 |
-
|
48 |
-
return $str . '-' . $this->getPreReleaseSuffix()->asString();
|
49 |
-
}
|
50 |
-
|
51 |
-
public function hasPreReleaseSuffix(): bool {
|
52 |
-
return $this->preReleaseSuffix !== null;
|
53 |
-
}
|
54 |
-
|
55 |
-
public function equals(Version $other): bool {
|
56 |
-
return $this->getVersionString() === $other->getVersionString();
|
57 |
-
}
|
58 |
-
|
59 |
-
public function isGreaterThan(Version $version): bool {
|
60 |
-
if ($version->getMajor()->getValue() > $this->getMajor()->getValue()) {
|
61 |
-
return false;
|
62 |
-
}
|
63 |
-
|
64 |
-
if ($version->getMajor()->getValue() < $this->getMajor()->getValue()) {
|
65 |
-
return true;
|
66 |
-
}
|
67 |
-
|
68 |
-
if ($version->getMinor()->getValue() > $this->getMinor()->getValue()) {
|
69 |
-
return false;
|
70 |
-
}
|
71 |
-
|
72 |
-
if ($version->getMinor()->getValue() < $this->getMinor()->getValue()) {
|
73 |
-
return true;
|
74 |
-
}
|
75 |
-
|
76 |
-
if ($version->getPatch()->getValue() > $this->getPatch()->getValue()) {
|
77 |
-
return false;
|
78 |
-
}
|
79 |
-
|
80 |
-
if ($version->getPatch()->getValue() < $this->getPatch()->getValue()) {
|
81 |
-
return true;
|
82 |
-
}
|
83 |
-
|
84 |
-
if (!$version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) {
|
85 |
-
return false;
|
86 |
-
}
|
87 |
-
|
88 |
-
if ($version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) {
|
89 |
-
return true;
|
90 |
-
}
|
91 |
-
|
92 |
-
if (!$version->hasPreReleaseSuffix() && $this->hasPreReleaseSuffix()) {
|
93 |
-
return false;
|
94 |
-
}
|
95 |
-
|
96 |
-
return $this->getPreReleaseSuffix()->isGreaterThan($version->getPreReleaseSuffix());
|
97 |
-
}
|
98 |
-
|
99 |
-
public function getMajor(): VersionNumber {
|
100 |
-
return $this->major;
|
101 |
-
}
|
102 |
-
|
103 |
-
public function getMinor(): VersionNumber {
|
104 |
-
return $this->minor;
|
105 |
-
}
|
106 |
-
|
107 |
-
public function getPatch(): VersionNumber {
|
108 |
-
return $this->patch;
|
109 |
-
}
|
110 |
-
|
111 |
-
private function parseVersion(array $matches): void {
|
112 |
-
$this->major = new VersionNumber((int)$matches['Major']);
|
113 |
-
$this->minor = new VersionNumber((int)$matches['Minor']);
|
114 |
-
$this->patch = isset($matches['Patch']) ? new VersionNumber((int)$matches['Patch']) : new VersionNumber(0);
|
115 |
-
|
116 |
-
if (isset($matches['PreReleaseSuffix'])) {
|
117 |
-
$this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']);
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @param string $version
|
123 |
-
*
|
124 |
-
* @throws InvalidVersionException
|
125 |
-
*/
|
126 |
-
private function ensureVersionStringIsValid($version): void {
|
127 |
-
$regex = '/^v?
|
128 |
-
(?<Major>(0|(?:[1-9]\d*)))
|
129 |
-
\\.
|
130 |
-
(?<Minor>(0|(?:[1-9]\d*)))
|
131 |
-
(\\.
|
132 |
-
(?<Patch>(0|(?:[1-9]\d*)))
|
133 |
-
)?
|
134 |
-
(?:
|
135 |
-
-
|
136 |
-
(?<PreReleaseSuffix>(?:(dev|beta|b|rc|alpha|a|patch|p)\.?\d*))
|
137 |
-
)?
|
138 |
-
$/xi';
|
139 |
-
|
140 |
-
if (\preg_match($regex, $version, $matches) !== 1) {
|
141 |
-
throw new InvalidVersionException(
|
142 |
-
\sprintf("Version string '%s' does not follow SemVer semantics", $version)
|
143 |
-
);
|
144 |
-
}
|
145 |
-
|
146 |
-
$this->parseVersion($matches);
|
147 |
-
}
|
148 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/VersionConstraintParser.php
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class VersionConstraintParser {
|
13 |
-
/**
|
14 |
-
* @param string $value
|
15 |
-
*
|
16 |
-
* @throws UnsupportedVersionConstraintException
|
17 |
-
*/
|
18 |
-
public function parse($value): VersionConstraint {
|
19 |
-
if (\strpos($value, '||') !== false) {
|
20 |
-
return $this->handleOrGroup($value);
|
21 |
-
}
|
22 |
-
|
23 |
-
if (!\preg_match('/^[\^~*]?v?[\d.*]+(?:-.*)?$/i', $value)) {
|
24 |
-
throw new UnsupportedVersionConstraintException(
|
25 |
-
\sprintf('Version constraint %s is not supported.', $value)
|
26 |
-
);
|
27 |
-
}
|
28 |
-
|
29 |
-
switch ($value[0]) {
|
30 |
-
case '~':
|
31 |
-
return $this->handleTildeOperator($value);
|
32 |
-
case '^':
|
33 |
-
return $this->handleCaretOperator($value);
|
34 |
-
}
|
35 |
-
|
36 |
-
$version = new VersionConstraintValue($value);
|
37 |
-
|
38 |
-
if ($version->getMajor()->isAny()) {
|
39 |
-
return new AnyVersionConstraint();
|
40 |
-
}
|
41 |
-
|
42 |
-
if ($version->getMinor()->isAny()) {
|
43 |
-
return new SpecificMajorVersionConstraint(
|
44 |
-
$version->getVersionString(),
|
45 |
-
$version->getMajor()->getValue()
|
46 |
-
);
|
47 |
-
}
|
48 |
-
|
49 |
-
if ($version->getPatch()->isAny()) {
|
50 |
-
return new SpecificMajorAndMinorVersionConstraint(
|
51 |
-
$version->getVersionString(),
|
52 |
-
$version->getMajor()->getValue(),
|
53 |
-
$version->getMinor()->getValue()
|
54 |
-
);
|
55 |
-
}
|
56 |
-
|
57 |
-
return new ExactVersionConstraint($version->getVersionString());
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @param $value
|
62 |
-
*/
|
63 |
-
private function handleOrGroup($value): OrVersionConstraintGroup {
|
64 |
-
$constraints = [];
|
65 |
-
|
66 |
-
foreach (\explode('||', $value) as $groupSegment) {
|
67 |
-
$constraints[] = $this->parse(\trim($groupSegment));
|
68 |
-
}
|
69 |
-
|
70 |
-
return new OrVersionConstraintGroup($value, $constraints);
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* @param string $value
|
75 |
-
*/
|
76 |
-
private function handleTildeOperator($value): AndVersionConstraintGroup {
|
77 |
-
$version = new Version(\substr($value, 1));
|
78 |
-
$constraints = [
|
79 |
-
new GreaterThanOrEqualToVersionConstraint($value, $version)
|
80 |
-
];
|
81 |
-
|
82 |
-
if ($version->getPatch()->isAny()) {
|
83 |
-
$constraints[] = new SpecificMajorVersionConstraint(
|
84 |
-
$value,
|
85 |
-
$version->getMajor()->getValue()
|
86 |
-
);
|
87 |
-
} else {
|
88 |
-
$constraints[] = new SpecificMajorAndMinorVersionConstraint(
|
89 |
-
$value,
|
90 |
-
$version->getMajor()->getValue(),
|
91 |
-
$version->getMinor()->getValue()
|
92 |
-
);
|
93 |
-
}
|
94 |
-
|
95 |
-
return new AndVersionConstraintGroup($value, $constraints);
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* @param string $value
|
100 |
-
*/
|
101 |
-
private function handleCaretOperator($value): AndVersionConstraintGroup {
|
102 |
-
$version = new Version(\substr($value, 1));
|
103 |
-
|
104 |
-
return new AndVersionConstraintGroup(
|
105 |
-
$value,
|
106 |
-
[
|
107 |
-
new GreaterThanOrEqualToVersionConstraint($value, $version),
|
108 |
-
new SpecificMajorVersionConstraint($value, $version->getMajor()->getValue())
|
109 |
-
]
|
110 |
-
);
|
111 |
-
}
|
112 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/VersionConstraintValue.php
DELETED
@@ -1,100 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Version;
|
3 |
-
|
4 |
-
class VersionConstraintValue {
|
5 |
-
/** @var VersionNumber */
|
6 |
-
private $major;
|
7 |
-
|
8 |
-
/** @var VersionNumber */
|
9 |
-
private $minor;
|
10 |
-
|
11 |
-
/** @var VersionNumber */
|
12 |
-
private $patch;
|
13 |
-
|
14 |
-
/** @var string */
|
15 |
-
private $label = '';
|
16 |
-
|
17 |
-
/** @var string */
|
18 |
-
private $buildMetaData = '';
|
19 |
-
|
20 |
-
/** @var string */
|
21 |
-
private $versionString = '';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param string $versionString
|
25 |
-
*/
|
26 |
-
public function __construct($versionString) {
|
27 |
-
$this->versionString = $versionString;
|
28 |
-
|
29 |
-
$this->parseVersion($versionString);
|
30 |
-
}
|
31 |
-
|
32 |
-
public function getLabel(): string {
|
33 |
-
return $this->label;
|
34 |
-
}
|
35 |
-
|
36 |
-
public function getBuildMetaData(): string {
|
37 |
-
return $this->buildMetaData;
|
38 |
-
}
|
39 |
-
|
40 |
-
public function getVersionString(): string {
|
41 |
-
return $this->versionString;
|
42 |
-
}
|
43 |
-
|
44 |
-
public function getMajor(): VersionNumber {
|
45 |
-
return $this->major;
|
46 |
-
}
|
47 |
-
|
48 |
-
public function getMinor(): VersionNumber {
|
49 |
-
return $this->minor;
|
50 |
-
}
|
51 |
-
|
52 |
-
public function getPatch(): VersionNumber {
|
53 |
-
return $this->patch;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* @param $versionString
|
58 |
-
*/
|
59 |
-
private function parseVersion($versionString): void {
|
60 |
-
$this->extractBuildMetaData($versionString);
|
61 |
-
$this->extractLabel($versionString);
|
62 |
-
$this->stripPotentialVPrefix($versionString);
|
63 |
-
|
64 |
-
$versionSegments = \explode('.', $versionString);
|
65 |
-
$this->major = new VersionNumber(\is_numeric($versionSegments[0]) ? (int)$versionSegments[0] : null);
|
66 |
-
|
67 |
-
$minorValue = isset($versionSegments[1]) && \is_numeric($versionSegments[1]) ? (int)$versionSegments[1] : null;
|
68 |
-
$patchValue = isset($versionSegments[2]) && \is_numeric($versionSegments[2]) ? (int)$versionSegments[2] : null;
|
69 |
-
|
70 |
-
$this->minor = new VersionNumber($minorValue);
|
71 |
-
$this->patch = new VersionNumber($patchValue);
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @param string $versionString
|
76 |
-
*/
|
77 |
-
private function extractBuildMetaData(&$versionString): void {
|
78 |
-
if (\preg_match('/\+(.*)/', $versionString, $matches) === 1) {
|
79 |
-
$this->buildMetaData = $matches[1];
|
80 |
-
$versionString = \str_replace($matches[0], '', $versionString);
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @param string $versionString
|
86 |
-
*/
|
87 |
-
private function extractLabel(&$versionString): void {
|
88 |
-
if (\preg_match('/-(.*)/', $versionString, $matches) === 1) {
|
89 |
-
$this->label = $matches[1];
|
90 |
-
$versionString = \str_replace($matches[0], '', $versionString);
|
91 |
-
}
|
92 |
-
}
|
93 |
-
|
94 |
-
private function stripPotentialVPrefix(&$versionString): void {
|
95 |
-
if ($versionString[0] !== 'v') {
|
96 |
-
return;
|
97 |
-
}
|
98 |
-
$versionString = \substr($versionString, 1);
|
99 |
-
}
|
100 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/VersionNumber.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class VersionNumber {
|
13 |
-
|
14 |
-
/** @var ?int */
|
15 |
-
private $value;
|
16 |
-
|
17 |
-
public function __construct(?int $value) {
|
18 |
-
$this->value = $value;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function isAny(): bool {
|
22 |
-
return $this->value === null;
|
23 |
-
}
|
24 |
-
|
25 |
-
public function getValue(): ?int {
|
26 |
-
return $this->value;
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
abstract class AbstractVersionConstraint implements VersionConstraint {
|
13 |
-
/** @var string */
|
14 |
-
private $originalValue;
|
15 |
-
|
16 |
-
public function __construct(string $originalValue) {
|
17 |
-
$this->originalValue = $originalValue;
|
18 |
-
}
|
19 |
-
|
20 |
-
public function asString(): string {
|
21 |
-
return $this->originalValue;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class AndVersionConstraintGroup extends AbstractVersionConstraint {
|
13 |
-
/** @var VersionConstraint[] */
|
14 |
-
private $constraints = [];
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param VersionConstraint[] $constraints
|
18 |
-
*/
|
19 |
-
public function __construct(string $originalValue, array $constraints) {
|
20 |
-
parent::__construct($originalValue);
|
21 |
-
|
22 |
-
$this->constraints = $constraints;
|
23 |
-
}
|
24 |
-
|
25 |
-
public function complies(Version $version): bool {
|
26 |
-
foreach ($this->constraints as $constraint) {
|
27 |
-
if (!$constraint->complies($version)) {
|
28 |
-
return false;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
return true;
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/AnyVersionConstraint.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class AnyVersionConstraint implements VersionConstraint {
|
13 |
-
public function complies(Version $version): bool {
|
14 |
-
return true;
|
15 |
-
}
|
16 |
-
|
17 |
-
public function asString(): string {
|
18 |
-
return '*';
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/ExactVersionConstraint.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class ExactVersionConstraint extends AbstractVersionConstraint {
|
13 |
-
public function complies(Version $version): bool {
|
14 |
-
return $this->asString() === $version->getVersionString();
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class GreaterThanOrEqualToVersionConstraint extends AbstractVersionConstraint {
|
13 |
-
/** @var Version */
|
14 |
-
private $minimalVersion;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $originalValue
|
18 |
-
*/
|
19 |
-
public function __construct($originalValue, Version $minimalVersion) {
|
20 |
-
parent::__construct($originalValue);
|
21 |
-
|
22 |
-
$this->minimalVersion = $minimalVersion;
|
23 |
-
}
|
24 |
-
|
25 |
-
public function complies(Version $version): bool {
|
26 |
-
return $version->getVersionString() === $this->minimalVersion->getVersionString()
|
27 |
-
|| $version->isGreaterThan($this->minimalVersion);
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class OrVersionConstraintGroup extends AbstractVersionConstraint {
|
13 |
-
/** @var VersionConstraint[] */
|
14 |
-
private $constraints = [];
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $originalValue
|
18 |
-
* @param VersionConstraint[] $constraints
|
19 |
-
*/
|
20 |
-
public function __construct($originalValue, array $constraints) {
|
21 |
-
parent::__construct($originalValue);
|
22 |
-
|
23 |
-
$this->constraints = $constraints;
|
24 |
-
}
|
25 |
-
|
26 |
-
public function complies(Version $version): bool {
|
27 |
-
foreach ($this->constraints as $constraint) {
|
28 |
-
if ($constraint->complies($version)) {
|
29 |
-
return true;
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
return false;
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class SpecificMajorAndMinorVersionConstraint extends AbstractVersionConstraint {
|
13 |
-
/** @var int */
|
14 |
-
private $major = 0;
|
15 |
-
|
16 |
-
/** @var int */
|
17 |
-
private $minor = 0;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @param string $originalValue
|
21 |
-
* @param int $major
|
22 |
-
* @param int $minor
|
23 |
-
*/
|
24 |
-
public function __construct($originalValue, $major, $minor) {
|
25 |
-
parent::__construct($originalValue);
|
26 |
-
|
27 |
-
$this->major = $major;
|
28 |
-
$this->minor = $minor;
|
29 |
-
}
|
30 |
-
|
31 |
-
public function complies(Version $version): bool {
|
32 |
-
if ($version->getMajor()->getValue() !== $this->major) {
|
33 |
-
return false;
|
34 |
-
}
|
35 |
-
|
36 |
-
return $version->getMinor()->getValue() === $this->minor;
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
class SpecificMajorVersionConstraint extends AbstractVersionConstraint {
|
13 |
-
/** @var int */
|
14 |
-
private $major = 0;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $originalValue
|
18 |
-
* @param int $major
|
19 |
-
*/
|
20 |
-
public function __construct($originalValue, $major) {
|
21 |
-
parent::__construct($originalValue);
|
22 |
-
|
23 |
-
$this->major = $major;
|
24 |
-
}
|
25 |
-
|
26 |
-
public function complies(Version $version): bool {
|
27 |
-
return $version->getMajor()->getValue() === $this->major;
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/constraints/VersionConstraint.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
interface VersionConstraint {
|
13 |
-
public function complies(Version $version): bool;
|
14 |
-
|
15 |
-
public function asString(): string;
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/exceptions/Exception.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
use Throwable;
|
13 |
-
|
14 |
-
interface Exception extends Throwable {
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Version;
|
3 |
-
|
4 |
-
class InvalidPreReleaseSuffixException extends \Exception implements Exception {
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/exceptions/InvalidVersionException.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
namespace PharIo\Version;
|
3 |
-
|
4 |
-
class InvalidVersionException extends \InvalidArgumentException implements Exception {
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
vendor/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php declare(strict_types = 1);
|
2 |
-
/*
|
3 |
-
* This file is part of PharIo\Version.
|
4 |
-
*
|
5 |
-
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
|
6 |
-
*
|
7 |
-
* For the full copyright and license information, please view the LICENSE
|
8 |
-
* file that was distributed with this source code.
|
9 |
-
*/
|
10 |
-
namespace PharIo\Version;
|
11 |
-
|
12 |
-
final class UnsupportedVersionConstraintException extends \RuntimeException implements Exception {
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/.travis.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
language: php
|
2 |
-
|
3 |
-
cache:
|
4 |
-
directories:
|
5 |
-
- $HOME/.composer/cache
|
6 |
-
|
7 |
-
php:
|
8 |
-
- 7.4
|
9 |
-
- 7.3
|
10 |
-
- 7.2
|
11 |
-
- 7.1
|
12 |
-
- 7.0
|
13 |
-
- 5.6
|
14 |
-
|
15 |
-
matrix:
|
16 |
-
fast_finish: true
|
17 |
-
|
18 |
-
install:
|
19 |
-
- composer require squizlabs/php_codesniffer
|
20 |
-
- composer require phpmd/phpmd
|
21 |
-
|
22 |
-
script:
|
23 |
-
- vendor/bin/phpunit
|
24 |
-
- vendor/bin/phpcs --standard=PSR2 classes/ tests/
|
25 |
-
- vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/LICENSE
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2 |
-
Version 2, December 2004
|
3 |
-
|
4 |
-
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
5 |
-
|
6 |
-
Everyone is permitted to copy and distribute verbatim or modified
|
7 |
-
copies of this license document, and changing it is allowed as long
|
8 |
-
as the name is changed.
|
9 |
-
|
10 |
-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12 |
-
|
13 |
-
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/README.md
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
# PHP-Mock integration package
|
2 |
-
|
3 |
-
This is a support package for PHP-Mock integration into other frameworks.
|
4 |
-
You'll find these integrations:
|
5 |
-
|
6 |
-
- [php-mock/php-mock-phpunit](https://github.com/php-mock/php-mock-phpunit) - PHPUnit integration
|
7 |
-
|
8 |
-
- [php-mock/php-mock-mockery](https://github.com/php-mock/php-mock-mockery) - Mockery integration
|
9 |
-
|
10 |
-
- [php-mock/php-mock-prophecy](https://github.com/php-mock/php-mock-prophecy) - Prophecy (phpspec) integration
|
11 |
-
|
12 |
-
# License and authors
|
13 |
-
|
14 |
-
This project is free and under the WTFPL.
|
15 |
-
Responsable for this project is Markus Malkusch markus@malkusch.de.
|
16 |
-
|
17 |
-
## Donations
|
18 |
-
|
19 |
-
If you like PHP-Mock and feel generous donate a few Bitcoins here:
|
20 |
-
[1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK)
|
21 |
-
|
22 |
-
[![Build Status](https://travis-ci.org/php-mock/php-mock-integration.svg?branch=master)](https://travis-ci.org/php-mock/php-mock-integration)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/classes/MockDelegateFunction.tpl
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
namespace {namespace};
|
2 |
-
|
3 |
-
use phpmock\functions\FunctionProvider;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Function provider which delegates to a mockable MockDelegate.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
* @internal
|
12 |
-
*/
|
13 |
-
abstract class MockDelegateFunction implements FunctionProvider
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* A mocked function will redirect its call to this method.
|
18 |
-
*
|
19 |
-
* @return mixed Returns the function output.
|
20 |
-
*/
|
21 |
-
abstract public function delegate({signatureParameters});
|
22 |
-
|
23 |
-
public function getCallable()
|
24 |
-
{
|
25 |
-
return [$this, "delegate"];
|
26 |
-
}
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/classes/MockDelegateFunctionBuilder.php
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\integration;
|
4 |
-
|
5 |
-
use phpmock\generator\ParameterBuilder;
|
6 |
-
use SebastianBergmann\Template\Template;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Defines a MockDelegateFunction.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @internal
|
15 |
-
*/
|
16 |
-
class MockDelegateFunctionBuilder
|
17 |
-
{
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The delegation method name.
|
21 |
-
*/
|
22 |
-
const METHOD = "delegate";
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @var string The namespace of the build class.
|
26 |
-
*/
|
27 |
-
private $namespace;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @var Template The MockDelegateFunction template.
|
31 |
-
*/
|
32 |
-
private $template;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Instantiation.
|
36 |
-
*/
|
37 |
-
public function __construct()
|
38 |
-
{
|
39 |
-
$this->template = new Template(__DIR__ . '/MockDelegateFunction.tpl');
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Builds a MockDelegateFunction for a function.
|
44 |
-
*
|
45 |
-
* @param string|null $functionName The mocked function.
|
46 |
-
*
|
47 |
-
* @SuppressWarnings(PHPMD)
|
48 |
-
*/
|
49 |
-
public function build($functionName = null)
|
50 |
-
{
|
51 |
-
$parameterBuilder = new ParameterBuilder();
|
52 |
-
$parameterBuilder->build($functionName);
|
53 |
-
$signatureParameters = $parameterBuilder->getSignatureParameters();
|
54 |
-
|
55 |
-
/**
|
56 |
-
* If a class with the same signature exists, it is considered equivalent
|
57 |
-
* to the generated class.
|
58 |
-
*/
|
59 |
-
$hash = md5($signatureParameters);
|
60 |
-
$this->namespace = __NAMESPACE__ . $hash;
|
61 |
-
if (class_exists($this->getFullyQualifiedClassName())) {
|
62 |
-
return;
|
63 |
-
}
|
64 |
-
|
65 |
-
$data = [
|
66 |
-
"namespace" => $this->namespace,
|
67 |
-
"signatureParameters" => $signatureParameters,
|
68 |
-
];
|
69 |
-
$this->template->setVar($data, false);
|
70 |
-
$definition = $this->template->render();
|
71 |
-
|
72 |
-
eval($definition);
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Returns the fully qualified class name
|
77 |
-
*
|
78 |
-
* @return string The class name.
|
79 |
-
*/
|
80 |
-
public function getFullyQualifiedClassName()
|
81 |
-
{
|
82 |
-
return "$this->namespace\\MockDelegateFunction";
|
83 |
-
}
|
84 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/composer.json
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "php-mock/php-mock-integration",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Integration package for PHP-Mock",
|
5 |
-
"keywords": ["mock", "stub", "test double", "function", "test", "TDD", "BDD"],
|
6 |
-
"homepage": "https://github.com/php-mock/php-mock-integration",
|
7 |
-
"license": "WTFPL",
|
8 |
-
"authors": [
|
9 |
-
{
|
10 |
-
"name": "Markus Malkusch",
|
11 |
-
"email": "markus@malkusch.de",
|
12 |
-
"homepage": "http://markus.malkusch.de",
|
13 |
-
"role": "Developer"
|
14 |
-
}
|
15 |
-
],
|
16 |
-
"autoload": {
|
17 |
-
"psr-4": {"phpmock\\integration\\": "classes/"}
|
18 |
-
},
|
19 |
-
"autoload-dev": {
|
20 |
-
"files": ["tests/autoload.php"],
|
21 |
-
"psr-4": {"phpmock\\integration\\": "tests/"}
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"php": ">=5.6",
|
25 |
-
"php-mock/php-mock": "^2.2",
|
26 |
-
"phpunit/php-text-template": "^1 || ^2"
|
27 |
-
},
|
28 |
-
"require-dev": {
|
29 |
-
"phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9"
|
30 |
-
},
|
31 |
-
"archive": {
|
32 |
-
"exclude": ["/tests"]
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/tests/MockDelegateFunctionBuilderTest.php
DELETED
@@ -1,128 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\integration;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests MockDelegateFunctionBuilder.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see MockDelegateFunctionBuilder
|
14 |
-
*/
|
15 |
-
class MockDelegateFunctionBuilderTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Test build() defines a class.
|
20 |
-
*
|
21 |
-
* @test
|
22 |
-
*/
|
23 |
-
public function testBuild()
|
24 |
-
{
|
25 |
-
$builder = new MockDelegateFunctionBuilder();
|
26 |
-
$builder->build();
|
27 |
-
$this->assertTrue(class_exists($builder->getFullyQualifiedClassName()));
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Test build() would never create the same class name for different signatures.
|
32 |
-
*
|
33 |
-
* @test
|
34 |
-
*/
|
35 |
-
public function testDiverseSignaturesProduceDifferentClasses()
|
36 |
-
{
|
37 |
-
$builder = new MockDelegateFunctionBuilder();
|
38 |
-
|
39 |
-
$builder->build('f0');
|
40 |
-
$class1 = $builder->getFullyQualifiedClassName();
|
41 |
-
|
42 |
-
$builder->build('f1');
|
43 |
-
$class2 = $builder->getFullyQualifiedClassName();
|
44 |
-
|
45 |
-
$builder2 = new MockDelegateFunctionBuilder();
|
46 |
-
$builder2->build('f2');
|
47 |
-
$class3 = $builder2->getFullyQualifiedClassName();
|
48 |
-
|
49 |
-
$this->assertNotEquals($class1, $class2);
|
50 |
-
$this->assertNotEquals($class1, $class3);
|
51 |
-
$this->assertNotEquals($class2, $class3);
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Test build() would create the same class name for identical signatures.
|
56 |
-
*
|
57 |
-
* @test
|
58 |
-
*/
|
59 |
-
public function testSameSignaturesProduceSameClass()
|
60 |
-
{
|
61 |
-
$builder = new MockDelegateFunctionBuilder();
|
62 |
-
|
63 |
-
$builder->build('f1');
|
64 |
-
$class1 = $builder->getFullyQualifiedClassName();
|
65 |
-
|
66 |
-
$builder->build('f1');
|
67 |
-
$class2 = $builder->getFullyQualifiedClassName();
|
68 |
-
|
69 |
-
$this->assertEquals($class1, $class2);
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Tests declaring a class with enabled backupStaticAttributes.
|
74 |
-
*
|
75 |
-
* @test
|
76 |
-
* @backupStaticAttributes enabled
|
77 |
-
* @dataProvider provideTestBackupStaticAttributes
|
78 |
-
*
|
79 |
-
* @doesNotPerformAssertions
|
80 |
-
*/
|
81 |
-
public function testBackupStaticAttributes()
|
82 |
-
{
|
83 |
-
$builder = new MockDelegateFunctionBuilder();
|
84 |
-
$builder->build("min");
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Just repeat testBackupStaticAttributes a few times.
|
89 |
-
*
|
90 |
-
* @return array Test cases.
|
91 |
-
*/
|
92 |
-
public function provideTestBackupStaticAttributes()
|
93 |
-
{
|
94 |
-
return [
|
95 |
-
[],
|
96 |
-
[]
|
97 |
-
];
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Tests deserialization.
|
102 |
-
*
|
103 |
-
* @test
|
104 |
-
* @runInSeparateProcess
|
105 |
-
* @dataProvider provideTestDeserializationInNewProcess
|
106 |
-
*
|
107 |
-
* @doesNotPerformAssertions
|
108 |
-
*/
|
109 |
-
public function testDeserializationInNewProcess($data)
|
110 |
-
{
|
111 |
-
unserialize($data);
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Returns test cases for testDeserializationInNewProcess().
|
116 |
-
*
|
117 |
-
* @return array Test cases.
|
118 |
-
*/
|
119 |
-
public function provideTestDeserializationInNewProcess()
|
120 |
-
{
|
121 |
-
$builder = new MockDelegateFunctionBuilder();
|
122 |
-
$builder->build("min");
|
123 |
-
|
124 |
-
return [
|
125 |
-
[serialize($this->getMockForAbstractClass($builder->getFullyQualifiedClassName()))]
|
126 |
-
];
|
127 |
-
}
|
128 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/tests/MockDelegateFunctionTest.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\integration;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests MockDelegateFunction.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see MockDelegateFunction
|
14 |
-
*/
|
15 |
-
class MockDelegateFunctionTest extends TestCase
|
16 |
-
{
|
17 |
-
use TestCaseTrait;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @var string The class name of a generated class.
|
21 |
-
*/
|
22 |
-
private $className;
|
23 |
-
|
24 |
-
protected function setUpCompat()
|
25 |
-
{
|
26 |
-
parent::setUp();
|
27 |
-
|
28 |
-
$builder = new MockDelegateFunctionBuilder();
|
29 |
-
$builder->build();
|
30 |
-
$this->className = $builder->getFullyQualifiedClassName();
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Tests delegate() returns the mock's result.
|
35 |
-
*
|
36 |
-
* @test
|
37 |
-
*/
|
38 |
-
public function testDelegateReturnsMockResult()
|
39 |
-
{
|
40 |
-
$expected = 3;
|
41 |
-
$mock = $this->getMockForAbstractClass($this->className);
|
42 |
-
|
43 |
-
$mock->expects($this->once())
|
44 |
-
->method(MockDelegateFunctionBuilder::METHOD)
|
45 |
-
->willReturn($expected);
|
46 |
-
|
47 |
-
$result = call_user_func($mock->getCallable());
|
48 |
-
$this->assertEquals($expected, $result);
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Tests delegate() forwards the arguments.
|
53 |
-
*
|
54 |
-
* @test
|
55 |
-
*/
|
56 |
-
public function testDelegateForwardsArguments()
|
57 |
-
{
|
58 |
-
$mock = $this->getMockForAbstractClass($this->className);
|
59 |
-
|
60 |
-
$mock->expects($this->once())
|
61 |
-
->method(MockDelegateFunctionBuilder::METHOD)
|
62 |
-
->with(1, 2);
|
63 |
-
|
64 |
-
call_user_func($mock->getCallable(), 1, 2);
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/tests/TestCaseNoTypeHintTrait.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\integration;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @internal
|
7 |
-
*/
|
8 |
-
trait TestCaseNoTypeHintTrait
|
9 |
-
{
|
10 |
-
protected function setUp()
|
11 |
-
{
|
12 |
-
if (method_exists($this, 'setUpCompat')) {
|
13 |
-
$this->setUpCompat();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
protected function tearDown()
|
18 |
-
{
|
19 |
-
if (method_exists($this, 'tearDownCompat')) {
|
20 |
-
$this->tearDownCompat();
|
21 |
-
}
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/tests/TestCaseTypeHintTrait.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\integration;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @internal
|
7 |
-
*/
|
8 |
-
trait TestCaseTypeHintTrait
|
9 |
-
{
|
10 |
-
protected function setUp(): void
|
11 |
-
{
|
12 |
-
if (method_exists($this, 'setUpCompat')) {
|
13 |
-
$this->setUpCompat();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
protected function tearDown(): void
|
18 |
-
{
|
19 |
-
if (method_exists($this, 'tearDownCompat')) {
|
20 |
-
$this->tearDownCompat();
|
21 |
-
}
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-integration/tests/autoload.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php // phpcs:ignore
|
2 |
-
|
3 |
-
use PHPUnit\Runner\Version;
|
4 |
-
|
5 |
-
// Compatibility with PHPUnit 8.0+
|
6 |
-
// We need to use "magic" trait \phpmock\integration\TestCaseTrait
|
7 |
-
// and instead of setUp/tearDown method in test case
|
8 |
-
// we should have setUpCompat/tearDownCompat.
|
9 |
-
if (class_exists(Version::class)
|
10 |
-
&& version_compare(Version::id(), '8.0.0') >= 0
|
11 |
-
) {
|
12 |
-
class_alias(\phpmock\integration\TestCaseTypeHintTrait::class, \phpmock\integration\TestCaseTrait::class);
|
13 |
-
} else {
|
14 |
-
class_alias(\phpmock\integration\TestCaseNoTypeHintTrait::class, \phpmock\integration\TestCaseTrait::class);
|
15 |
-
}
|
16 |
-
|
17 |
-
function f0()
|
18 |
-
{
|
19 |
-
}
|
20 |
-
function f1($a)
|
21 |
-
{
|
22 |
-
}
|
23 |
-
function f2($a, $b)
|
24 |
-
{
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/.travis.yml
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
language: php
|
2 |
-
|
3 |
-
cache:
|
4 |
-
directories:
|
5 |
-
- $HOME/.composer/cache
|
6 |
-
|
7 |
-
env:
|
8 |
-
- PHPUNIT_VERSION=dev-master
|
9 |
-
- PHPUNIT_VERSION=~9.0.0
|
10 |
-
- PHPUNIT_VERSION=~8.5.0
|
11 |
-
- PHPUNIT_VERSION=~8.4.0
|
12 |
-
- PHPUNIT_VERSION=~8.3.0
|
13 |
-
- PHPUNIT_VERSION=~8.2.0
|
14 |
-
- PHPUNIT_VERSION=~8.1.0
|
15 |
-
- PHPUNIT_VERSION=~8.0.0
|
16 |
-
- PHPUNIT_VERSION=~7.5.0
|
17 |
-
- PHPUNIT_VERSION=~7.4.0
|
18 |
-
- PHPUNIT_VERSION=~7.3.0
|
19 |
-
- PHPUNIT_VERSION=~7.2.0
|
20 |
-
- PHPUNIT_VERSION=~7.1.0
|
21 |
-
- PHPUNIT_VERSION=~7.0.0
|
22 |
-
- PHPUNIT_VERSION=~6.5.0
|
23 |
-
- PHPUNIT_VERSION=~6.4.0
|
24 |
-
- PHPUNIT_VERSION=~6.3.0
|
25 |
-
- PHPUNIT_VERSION=~6.2.0
|
26 |
-
- PHPUNIT_VERSION=~6.1.0
|
27 |
-
- PHPUNIT_VERSION=~6.0.0
|
28 |
-
|
29 |
-
php:
|
30 |
-
- 7.4
|
31 |
-
- 7.3
|
32 |
-
- 7.2
|
33 |
-
- 7.1
|
34 |
-
- 7
|
35 |
-
|
36 |
-
matrix:
|
37 |
-
fast_finish: true
|
38 |
-
exclude:
|
39 |
-
- php: 7.4
|
40 |
-
env: PHPUNIT_VERSION=~8.1.0
|
41 |
-
- php: 7.4
|
42 |
-
env: PHPUNIT_VERSION=~8.0.0
|
43 |
-
- php: 7.4
|
44 |
-
env: PHPUNIT_VERSION=~7.4.0
|
45 |
-
- php: 7.4
|
46 |
-
env: PHPUNIT_VERSION=~7.3.0
|
47 |
-
- php: 7.4
|
48 |
-
env: PHPUNIT_VERSION=~7.2.0
|
49 |
-
- php: 7.4
|
50 |
-
env: PHPUNIT_VERSION=~7.1.0
|
51 |
-
- php: 7.4
|
52 |
-
env: PHPUNIT_VERSION=~7.0.0
|
53 |
-
- php: 7.4
|
54 |
-
env: PHPUNIT_VERSION=~6.5.0
|
55 |
-
- php: 7.4
|
56 |
-
env: PHPUNIT_VERSION=~6.4.0
|
57 |
-
- php: 7.4
|
58 |
-
env: PHPUNIT_VERSION=~6.3.0
|
59 |
-
- php: 7.4
|
60 |
-
env: PHPUNIT_VERSION=~6.2.0
|
61 |
-
- php: 7.4
|
62 |
-
env: PHPUNIT_VERSION=~6.1.0
|
63 |
-
- php: 7.4
|
64 |
-
env: PHPUNIT_VERSION=~6.0.0
|
65 |
-
|
66 |
-
- php: 7.2
|
67 |
-
env: PHPUNIT_VERSION=dev-master
|
68 |
-
- php: 7.2
|
69 |
-
env: PHPUNIT_VERSION=~9.0.0
|
70 |
-
- php: 7.1
|
71 |
-
env: PHPUNIT_VERSION=dev-master
|
72 |
-
- php: 7.1
|
73 |
-
env: PHPUNIT_VERSION=~9.0.0
|
74 |
-
- php: 7.1
|
75 |
-
env: PHPUNIT_VERSION=~8.5.0
|
76 |
-
- php: 7.1
|
77 |
-
env: PHPUNIT_VERSION=~8.4.0
|
78 |
-
- php: 7.1
|
79 |
-
env: PHPUNIT_VERSION=~8.3.0
|
80 |
-
- php: 7.1
|
81 |
-
env: PHPUNIT_VERSION=~8.2.0
|
82 |
-
- php: 7.1
|
83 |
-
env: PHPUNIT_VERSION=~8.1.0
|
84 |
-
- php: 7.1
|
85 |
-
env: PHPUNIT_VERSION=~8.0.0
|
86 |
-
|
87 |
-
- php: 7
|
88 |
-
env: PHPUNIT_VERSION=dev-master
|
89 |
-
- php: 7
|
90 |
-
env: PHPUNIT_VERSION=~9.0.0
|
91 |
-
- php: 7
|
92 |
-
env: PHPUNIT_VERSION=~8.5.0
|
93 |
-
- php: 7
|
94 |
-
env: PHPUNIT_VERSION=~8.4.0
|
95 |
-
- php: 7
|
96 |
-
env: PHPUNIT_VERSION=~8.3.0
|
97 |
-
- php: 7
|
98 |
-
env: PHPUNIT_VERSION=~8.2.0
|
99 |
-
- php: 7
|
100 |
-
env: PHPUNIT_VERSION=~8.1.0
|
101 |
-
- php: 7
|
102 |
-
env: PHPUNIT_VERSION=~8.0.0
|
103 |
-
- php: 7
|
104 |
-
env: PHPUNIT_VERSION=~7.5.0
|
105 |
-
- php: 7
|
106 |
-
env: PHPUNIT_VERSION=~7.4.0
|
107 |
-
- php: 7
|
108 |
-
env: PHPUNIT_VERSION=~7.3.0
|
109 |
-
- php: 7
|
110 |
-
env: PHPUNIT_VERSION=~7.2.0
|
111 |
-
- php: 7
|
112 |
-
env: PHPUNIT_VERSION=~7.1.0
|
113 |
-
- php: 7
|
114 |
-
env: PHPUNIT_VERSION=~7.0.0
|
115 |
-
allow_failures:
|
116 |
-
- env: PHPUNIT_VERSION=dev-master
|
117 |
-
|
118 |
-
install:
|
119 |
-
- composer require phpunit/phpunit:${PHPUNIT_VERSION}
|
120 |
-
- composer require squizlabs/php_codesniffer
|
121 |
-
- composer require phpmd/phpmd
|
122 |
-
|
123 |
-
script:
|
124 |
-
- vendor/bin/phpunit
|
125 |
-
- vendor/bin/phpcs --standard=PSR2 classes/ tests/
|
126 |
-
- vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/LICENSE
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2 |
-
Version 2, December 2004
|
3 |
-
|
4 |
-
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
5 |
-
|
6 |
-
Everyone is permitted to copy and distribute verbatim or modified
|
7 |
-
copies of this license document, and changing it is allowed as long
|
8 |
-
as the name is changed.
|
9 |
-
|
10 |
-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12 |
-
|
13 |
-
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/README.md
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
# Mock PHP built-in functions with PHPUnit
|
2 |
-
|
3 |
-
This package integrates the function mock library
|
4 |
-
[PHP-Mock](https://github.com/php-mock/php-mock) with PHPUnit.
|
5 |
-
|
6 |
-
# Installation
|
7 |
-
|
8 |
-
Use [Composer](https://getcomposer.org/):
|
9 |
-
|
10 |
-
```sh
|
11 |
-
composer require --dev php-mock/php-mock-phpunit
|
12 |
-
```
|
13 |
-
|
14 |
-
# Usage
|
15 |
-
|
16 |
-
PHP-Mock integrates with the trait
|
17 |
-
[`PHPMock`](http://php-mock.github.io/php-mock-phpunit/api/class-phpmock.phpunit.PHPMock.html)
|
18 |
-
into your PHPUnit test case. This trait extends the framework
|
19 |
-
by the method
|
20 |
-
[`getFunctionMock()`](http://php-mock.github.io/php-mock-phpunit/api/class-phpmock.phpunit.PHPMock.html#_getFunctionMock).
|
21 |
-
With this method you can build a mock in the way you are used to build a
|
22 |
-
PHPUnit mock:
|
23 |
-
|
24 |
-
```php
|
25 |
-
<?php
|
26 |
-
|
27 |
-
namespace foo;
|
28 |
-
|
29 |
-
class BuiltinTest extends \PHPUnit\Framework\TestCase
|
30 |
-
{
|
31 |
-
|
32 |
-
use \phpmock\phpunit\PHPMock;
|
33 |
-
|
34 |
-
public function testTime()
|
35 |
-
{
|
36 |
-
$time = $this->getFunctionMock(__NAMESPACE__, "time");
|
37 |
-
$time->expects($this->once())->willReturn(3);
|
38 |
-
|
39 |
-
$this->assertEquals(3, time());
|
40 |
-
}
|
41 |
-
|
42 |
-
public function testExec()
|
43 |
-
{
|
44 |
-
$exec = $this->getFunctionMock(__NAMESPACE__, "exec");
|
45 |
-
$exec->expects($this->once())->willReturnCallback(
|
46 |
-
function ($command, &$output, &$return_var) {
|
47 |
-
$this->assertEquals("foo", $command);
|
48 |
-
$output = ["failure"];
|
49 |
-
$return_var = 1;
|
50 |
-
}
|
51 |
-
);
|
52 |
-
|
53 |
-
exec("foo", $output, $return_var);
|
54 |
-
$this->assertEquals(["failure"], $output);
|
55 |
-
$this->assertEquals(1, $return_var);
|
56 |
-
}
|
57 |
-
}
|
58 |
-
```
|
59 |
-
|
60 |
-
There's no need to disable the mocked function. The PHPUnit integration does
|
61 |
-
that for you.
|
62 |
-
|
63 |
-
## Restrictions
|
64 |
-
|
65 |
-
This library comes with the same restrictions as the underlying
|
66 |
-
[`php-mock`](https://github.com/php-mock/php-mock#requirements-and-restrictions):
|
67 |
-
|
68 |
-
* Only *unqualified* function calls in a namespace context can be mocked.
|
69 |
-
E.g. a call for `time()` in the namespace `foo` is mockable,
|
70 |
-
a call for `\time()` is not.
|
71 |
-
|
72 |
-
* The mock has to be defined before the first call to the unqualified function
|
73 |
-
in the tested class. This is documented in [Bug #68541](https://bugs.php.net/bug.php?id=68541).
|
74 |
-
In most cases you can ignore this restriction. But if you happen to run into
|
75 |
-
this issue you can call [`PHPMock::defineFunctionMock()`](http://php-mock.github.io/php-mock-phpunit/api/class-phpmock.phpunit.PHPMock.html#_defineFunctionMock)
|
76 |
-
before that first call (e.g. with `@beforeClass`).
|
77 |
-
This would define a side effectless namespaced function. Another effective
|
78 |
-
approach is running your test in an isolated process (e.g. with `@runInSeparateProcess`).
|
79 |
-
|
80 |
-
# License and authors
|
81 |
-
|
82 |
-
This project is free and under the WTFPL.
|
83 |
-
Responsable for this project is Markus Malkusch markus@malkusch.de.
|
84 |
-
|
85 |
-
## Donations
|
86 |
-
|
87 |
-
If you like this project and feel generous donate a few Bitcoins here:
|
88 |
-
[1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK)
|
89 |
-
|
90 |
-
[![Build Status](https://travis-ci.org/php-mock/php-mock-phpunit.svg?branch=master)](https://travis-ci.org/php-mock/php-mock-phpunit)
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/autoload.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (class_exists(\PHPUnit\Framework\MockObject\Rule\InvocationOrder::class)) {
|
4 |
-
class_alias(
|
5 |
-
\PHPUnit\Framework\MockObject\Rule\InvocationOrder::class,
|
6 |
-
\PHPUnit\Framework\MockObject\Matcher\Invocation::class
|
7 |
-
);
|
8 |
-
} elseif (! interface_exists(\PHPUnit\Framework\MockObject\Matcher\Invocation::class)) {
|
9 |
-
class_alias(
|
10 |
-
\PHPUnit_Framework_MockObject_Matcher_Invocation::class,
|
11 |
-
\PHPUnit\Framework\MockObject\Matcher\Invocation::class
|
12 |
-
);
|
13 |
-
}
|
14 |
-
|
15 |
-
if (! interface_exists(\PHPUnit\Framework\MockObject\Invocation::class)
|
16 |
-
&& interface_exists(\PHPUnit_Framework_MockObject_Invocation::class)
|
17 |
-
) {
|
18 |
-
class_alias(
|
19 |
-
\PHPUnit_Framework_MockObject_Invocation::class,
|
20 |
-
\PHPUnit\Framework\MockObject\Invocation::class
|
21 |
-
);
|
22 |
-
}
|
23 |
-
|
24 |
-
if (! interface_exists(\PHPUnit\Framework\MockObject\MockObject::class)) {
|
25 |
-
class_alias(
|
26 |
-
\PHPUnit_Framework_MockObject_MockObject::class,
|
27 |
-
\PHPUnit\Framework\MockObject\MockObject::class
|
28 |
-
);
|
29 |
-
}
|
30 |
-
|
31 |
-
if (! class_exists(\PHPUnit\Framework\MockObject\Builder\InvocationMocker::class)) {
|
32 |
-
class_alias(
|
33 |
-
\PHPUnit_Framework_MockObject_Builder_InvocationMocker::class,
|
34 |
-
\PHPUnit\Framework\MockObject\Builder\InvocationMocker::class
|
35 |
-
);
|
36 |
-
}
|
37 |
-
|
38 |
-
if (class_exists(\PHPUnit\Framework\MockObject\Rule\MethodName::class)) {
|
39 |
-
class_alias(
|
40 |
-
\PHPUnit\Framework\MockObject\Rule\MethodName::class,
|
41 |
-
\PHPUnit\Framework\MockObject\Matcher\MethodName::class
|
42 |
-
);
|
43 |
-
}
|
44 |
-
|
45 |
-
if (! class_exists(\PHPUnit\Framework\MockObject\Matcher\MethodName::class)) {
|
46 |
-
class_alias(
|
47 |
-
\PHPUnit_Framework_MockObject_Matcher_MethodName::class,
|
48 |
-
\PHPUnit\Framework\MockObject\Matcher\MethodName::class
|
49 |
-
);
|
50 |
-
}
|
51 |
-
|
52 |
-
if (!class_exists(\PHPUnit\Framework\MockObject\InvocationHandler::class)
|
53 |
-
&& !interface_exists(\PHPUnit\Framework\MockObject\Stub\MatcherCollection::class)
|
54 |
-
) {
|
55 |
-
class_alias(
|
56 |
-
\PHPUnit_Framework_MockObject_Stub_MatcherCollection::class,
|
57 |
-
\PHPUnit\Framework\MockObject\Stub\MatcherCollection::class
|
58 |
-
);
|
59 |
-
}
|
60 |
-
|
61 |
-
if (!class_exists(\PHPUnit\Framework\MockObject\InvocationHandler::class)
|
62 |
-
&& !class_exists(\PHPUnit\Framework\MockObject\InvocationMocker::class)
|
63 |
-
) {
|
64 |
-
class_alias(
|
65 |
-
\PHPUnit_Framework_MockObject_InvocationMocker::class,
|
66 |
-
\PHPUnit\Framework\MockObject\InvocationMocker::class
|
67 |
-
);
|
68 |
-
}
|
69 |
-
|
70 |
-
if (! class_exists(\PHPUnit\Framework\BaseTestListener::class)) {
|
71 |
-
include __DIR__ . '/compatibility/BaseTestListener.php';
|
72 |
-
class_alias(
|
73 |
-
phpmock\phpunit\MockDisablerPHPUnit7::class,
|
74 |
-
phpmock\phpunit\MockDisabler::class
|
75 |
-
);
|
76 |
-
} else {
|
77 |
-
class_alias(
|
78 |
-
phpmock\phpunit\MockDisablerPHPUnit6::class,
|
79 |
-
phpmock\phpunit\MockDisabler::class
|
80 |
-
);
|
81 |
-
}
|
82 |
-
|
83 |
-
if (class_exists(\PHPUnit\Runner\Version::class)
|
84 |
-
&& version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
|
85 |
-
) {
|
86 |
-
class_alias(\phpmock\phpunit\DefaultArgumentRemoverReturnTypes84::class, \phpmock\phpunit\DefaultArgumentRemover::class);
|
87 |
-
class_alias(\phpmock\phpunit\MockObjectProxyReturnTypes84::class, \phpmock\phpunit\MockObjectProxy::class);
|
88 |
-
} elseif (class_exists(\PHPUnit\Runner\Version::class)
|
89 |
-
&& version_compare(\PHPUnit\Runner\Version::id(), '8.1.0') >= 0
|
90 |
-
) {
|
91 |
-
class_alias(\phpmock\phpunit\DefaultArgumentRemoverReturnTypes::class, \phpmock\phpunit\DefaultArgumentRemover::class);
|
92 |
-
class_alias(\phpmock\phpunit\MockObjectProxyReturnTypes::class, \phpmock\phpunit\MockObjectProxy::class);
|
93 |
-
} else {
|
94 |
-
class_alias(\phpmock\phpunit\DefaultArgumentRemoverNoReturnTypes::class, \phpmock\phpunit\DefaultArgumentRemover::class);
|
95 |
-
class_alias(\phpmock\phpunit\MockObjectProxyNoReturnTypes::class, \phpmock\phpunit\MockObjectProxy::class);
|
96 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemoverNoReturnTypes.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\generator\MockFunctionGenerator;
|
6 |
-
use PHPUnit\Framework\MockObject\Invocation;
|
7 |
-
use PHPUnit\Framework\MockObject\Matcher\Invocation as InvocationInterface;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Removes default arguments from the invocation.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
* @internal
|
16 |
-
*/
|
17 |
-
class DefaultArgumentRemoverNoReturnTypes implements InvocationInterface
|
18 |
-
{
|
19 |
-
/**
|
20 |
-
* @SuppressWarnings(PHPMD)
|
21 |
-
*/
|
22 |
-
public function invoked(Invocation $invocation)
|
23 |
-
{
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @SuppressWarnings(PHPMD)
|
28 |
-
*/
|
29 |
-
public function matches(Invocation $invocation)
|
30 |
-
{
|
31 |
-
if ($invocation instanceof Invocation\StaticInvocation) {
|
32 |
-
$this->removeDefaultArguments($invocation);
|
33 |
-
} else {
|
34 |
-
MockFunctionGenerator::removeDefaultArguments($invocation->parameters);
|
35 |
-
}
|
36 |
-
|
37 |
-
return false;
|
38 |
-
}
|
39 |
-
|
40 |
-
public function verify()
|
41 |
-
{
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* This method is not defined in the interface, but used in
|
46 |
-
* PHPUnit_Framework_MockObject_InvocationMocker::hasMatchers().
|
47 |
-
*
|
48 |
-
* @return boolean
|
49 |
-
* @see \PHPUnit_Framework_MockObject_InvocationMocker::hasMatchers()
|
50 |
-
*/
|
51 |
-
public function hasMatchers()
|
52 |
-
{
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function toString() : string
|
57 |
-
{
|
58 |
-
return __CLASS__;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Remove default arguments from StaticInvocation or its children (hack)
|
63 |
-
*
|
64 |
-
* @SuppressWarnings(PHPMD)
|
65 |
-
*/
|
66 |
-
private function removeDefaultArguments(Invocation\StaticInvocation $invocation)
|
67 |
-
{
|
68 |
-
$remover = function () {
|
69 |
-
MockFunctionGenerator::removeDefaultArguments($this->parameters);
|
70 |
-
};
|
71 |
-
|
72 |
-
$remover->bindTo($invocation, Invocation\StaticInvocation::class)();
|
73 |
-
}
|
74 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemoverReturnTypes.php
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\generator\MockFunctionGenerator;
|
6 |
-
use PHPUnit\Framework\MockObject\Invocation;
|
7 |
-
use PHPUnit\Framework\MockObject\Matcher\Invocation as InvocationInterface;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Removes default arguments from the invocation.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
* @internal
|
16 |
-
*/
|
17 |
-
class DefaultArgumentRemoverReturnTypes implements InvocationInterface
|
18 |
-
{
|
19 |
-
/**
|
20 |
-
* @SuppressWarnings(PHPMD)
|
21 |
-
*/
|
22 |
-
public function invoked(Invocation $invocation)
|
23 |
-
{
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @SuppressWarnings(PHPMD)
|
28 |
-
*/
|
29 |
-
public function matches(Invocation $invocation) : bool
|
30 |
-
{
|
31 |
-
$iClass = class_exists(Invocation::class);
|
32 |
-
|
33 |
-
if ($iClass
|
34 |
-
|| $invocation instanceof Invocation\StaticInvocation
|
35 |
-
) {
|
36 |
-
$this->removeDefaultArguments(
|
37 |
-
$invocation,
|
38 |
-
$iClass ? Invocation::class : Invocation\StaticInvocation::class
|
39 |
-
);
|
40 |
-
} else {
|
41 |
-
MockFunctionGenerator::removeDefaultArguments($invocation->parameters);
|
42 |
-
}
|
43 |
-
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
|
47 |
-
public function verify() : void
|
48 |
-
{
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* This method is not defined in the interface, but used in
|
53 |
-
* PHPUnit_Framework_MockObject_InvocationMocker::hasMatchers().
|
54 |
-
*
|
55 |
-
* @return boolean
|
56 |
-
* @see \PHPUnit_Framework_MockObject_InvocationMocker::hasMatchers()
|
57 |
-
*/
|
58 |
-
public function hasMatchers()
|
59 |
-
{
|
60 |
-
return false;
|
61 |
-
}
|
62 |
-
|
63 |
-
public function toString() : string
|
64 |
-
{
|
65 |
-
return __CLASS__;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Remove default arguments from StaticInvocation or its children (hack)
|
70 |
-
*
|
71 |
-
* @SuppressWarnings(PHPMD)
|
72 |
-
*/
|
73 |
-
private function removeDefaultArguments(Invocation $invocation, string $class)
|
74 |
-
{
|
75 |
-
$remover = function () {
|
76 |
-
MockFunctionGenerator::removeDefaultArguments($this->parameters);
|
77 |
-
};
|
78 |
-
|
79 |
-
$remover->bindTo($invocation, $class)();
|
80 |
-
}
|
81 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemoverReturnTypes84.php
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\generator\MockFunctionGenerator;
|
6 |
-
use PHPUnit\Framework\MockObject\Invocation;
|
7 |
-
use PHPUnit\Framework\MockObject\Rule\InvocationOrder;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Removes default arguments from the invocation.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
* @internal
|
16 |
-
*/
|
17 |
-
class DefaultArgumentRemoverReturnTypes84 extends InvocationOrder
|
18 |
-
{
|
19 |
-
/**
|
20 |
-
* @SuppressWarnings(PHPMD)
|
21 |
-
*/
|
22 |
-
public function invokedDo(Invocation $invocation)
|
23 |
-
{
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @SuppressWarnings(PHPMD)
|
28 |
-
*/
|
29 |
-
public function matches(Invocation $invocation) : bool
|
30 |
-
{
|
31 |
-
$iClass = class_exists(Invocation::class);
|
32 |
-
|
33 |
-
if ($iClass
|
34 |
-
|| $invocation instanceof Invocation\StaticInvocation
|
35 |
-
) {
|
36 |
-
$this->removeDefaultArguments(
|
37 |
-
$invocation,
|
38 |
-
$iClass ? Invocation::class : Invocation\StaticInvocation::class
|
39 |
-
);
|
40 |
-
} else {
|
41 |
-
MockFunctionGenerator::removeDefaultArguments($invocation->parameters);
|
42 |
-
}
|
43 |
-
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
|
47 |
-
public function verify() : void
|
48 |
-
{
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* This method is not defined in the interface, but used in
|
53 |
-
* PHPUnit_Framework_MockObject_InvocationMocker::hasMatchers().
|
54 |
-
*
|
55 |
-
* @return boolean
|
56 |
-
* @see \PHPUnit_Framework_MockObject_InvocationMocker::hasMatchers()
|
57 |
-
*/
|
58 |
-
public function hasMatchers()
|
59 |
-
{
|
60 |
-
return false;
|
61 |
-
}
|
62 |
-
|
63 |
-
public function toString() : string
|
64 |
-
{
|
65 |
-
return __CLASS__;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Remove default arguments from StaticInvocation or its children (hack)
|
70 |
-
*
|
71 |
-
* @SuppressWarnings(PHPMD)
|
72 |
-
*/
|
73 |
-
private function removeDefaultArguments(Invocation $invocation, string $class)
|
74 |
-
{
|
75 |
-
$remover = function () {
|
76 |
-
MockFunctionGenerator::removeDefaultArguments($this->parameters);
|
77 |
-
};
|
78 |
-
|
79 |
-
$remover->bindTo($invocation, $class)();
|
80 |
-
}
|
81 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/MockDisablerPHPUnit6.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\Deactivatable;
|
6 |
-
use PHPUnit\Framework\BaseTestListener;
|
7 |
-
use PHPUnit\Framework\Test;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Test listener for PHPUnit integration.
|
11 |
-
*
|
12 |
-
* This class disables mock functions after a test was run.
|
13 |
-
*
|
14 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
15 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
16 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
17 |
-
* @internal
|
18 |
-
*/
|
19 |
-
class MockDisablerPHPUnit6 extends BaseTestListener
|
20 |
-
{
|
21 |
-
/**
|
22 |
-
* @var Deactivatable The function mocks.
|
23 |
-
*/
|
24 |
-
private $deactivatable;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Sets the function mocks.
|
28 |
-
*
|
29 |
-
* @param Deactivatable $deactivatable The function mocks.
|
30 |
-
*/
|
31 |
-
public function __construct(Deactivatable $deactivatable)
|
32 |
-
{
|
33 |
-
$this->deactivatable = $deactivatable;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Disables the function mocks.
|
38 |
-
*
|
39 |
-
* @param Test $test The test.
|
40 |
-
* @param int $time The test duration.
|
41 |
-
*
|
42 |
-
* @see Mock::disable()
|
43 |
-
*/
|
44 |
-
public function endTest(Test $test, $time)
|
45 |
-
{
|
46 |
-
parent::endTest($test, $time);
|
47 |
-
|
48 |
-
$this->deactivatable->disable();
|
49 |
-
}
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/MockDisablerPHPUnit7.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\Deactivatable;
|
6 |
-
use PHPUnit\Framework\BaseTestListener;
|
7 |
-
use PHPUnit\Framework\Test;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Test listener for PHPUnit integration.
|
11 |
-
*
|
12 |
-
* This class disables mock functions after a test was run.
|
13 |
-
*
|
14 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
15 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
16 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
17 |
-
* @internal
|
18 |
-
*/
|
19 |
-
class MockDisablerPHPUnit7 extends BaseTestListener
|
20 |
-
{
|
21 |
-
/**
|
22 |
-
* @var Deactivatable The function mocks.
|
23 |
-
*/
|
24 |
-
private $deactivatable;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Sets the function mocks.
|
28 |
-
*
|
29 |
-
* @param Deactivatable $deactivatable The function mocks.
|
30 |
-
*/
|
31 |
-
public function __construct(Deactivatable $deactivatable)
|
32 |
-
{
|
33 |
-
$this->deactivatable = $deactivatable;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Disables the function mocks.
|
38 |
-
*
|
39 |
-
* @param Test $test The test.
|
40 |
-
* @param int $time The test duration.
|
41 |
-
*
|
42 |
-
* @see Mock::disable()
|
43 |
-
*/
|
44 |
-
public function endTest(Test $test, float $time) : void
|
45 |
-
{
|
46 |
-
parent::endTest($test, $time);
|
47 |
-
|
48 |
-
$this->deactivatable->disable();
|
49 |
-
}
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/MockObjectProxyNoReturnTypes.php
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\MockObject\Matcher\Invocation;
|
6 |
-
use PHPUnit\Framework\MockObject\MockObject;
|
7 |
-
use phpmock\integration\MockDelegateFunctionBuilder;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Proxy for PHPUnit's PHPUnit_Framework_MockObject_MockObject.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
* @internal
|
16 |
-
*/
|
17 |
-
class MockObjectProxyNoReturnTypes implements MockObject
|
18 |
-
{
|
19 |
-
/**
|
20 |
-
* @var MockObject $mockObject The mock object.
|
21 |
-
*/
|
22 |
-
private $mockObject;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Inject the subject.
|
26 |
-
*
|
27 |
-
* @param MockObject $mockObject The subject.
|
28 |
-
*/
|
29 |
-
public function __construct(MockObject $mockObject)
|
30 |
-
{
|
31 |
-
$this->mockObject = $mockObject;
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @SuppressWarnings(PHPMD)
|
36 |
-
*/
|
37 |
-
// @codingStandardsIgnoreStart
|
38 |
-
public function __phpunit_getInvocationMocker()
|
39 |
-
{
|
40 |
-
// @codingStandardsIgnoreEnd
|
41 |
-
return $this->mockObject->__phpunit_getInvocationMocker();
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @SuppressWarnings(PHPMD)
|
46 |
-
*/
|
47 |
-
// @codingStandardsIgnoreStart
|
48 |
-
public function __phpunit_setOriginalObject($originalObject)
|
49 |
-
{
|
50 |
-
// @codingStandardsIgnoreEnd
|
51 |
-
return $this->mockObject->__phpunit_setOriginalObject($originalObject);
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @SuppressWarnings(PHPMD)
|
56 |
-
*/
|
57 |
-
// @codingStandardsIgnoreStart
|
58 |
-
public function __phpunit_verify(bool $unsetInvocationMocker = true)
|
59 |
-
{
|
60 |
-
// @codingStandardsIgnoreEnd
|
61 |
-
return $this->mockObject->__phpunit_verify($unsetInvocationMocker);
|
62 |
-
}
|
63 |
-
|
64 |
-
public function expects(Invocation $matcher)
|
65 |
-
{
|
66 |
-
return $this->mockObject->expects($matcher)->method(MockDelegateFunctionBuilder::METHOD);
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* This method is not part of the contract but was found in
|
71 |
-
* PHPUnit's mocked_class.tpl.dist.
|
72 |
-
*
|
73 |
-
* @SuppressWarnings(PHPMD)
|
74 |
-
*/
|
75 |
-
// @codingStandardsIgnoreStart
|
76 |
-
public function __phpunit_hasMatchers()
|
77 |
-
{
|
78 |
-
// @codingStandardsIgnoreEnd
|
79 |
-
return $this->mockObject->__phpunit_hasMatchers();
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* @SuppressWarnings(PHPMD)
|
84 |
-
*/
|
85 |
-
// @codingStandardsIgnoreStart
|
86 |
-
public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration)
|
87 |
-
{
|
88 |
-
// @codingStandardsIgnoreEnd
|
89 |
-
return $this->mockObject->__phpunit_setReturnValueGeneration($returnValueGeneration);
|
90 |
-
}
|
91 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/MockObjectProxyReturnTypes.php
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\MockObject\Builder\InvocationMocker as BuilderInvocationMocker;
|
6 |
-
use PHPUnit\Framework\MockObject\InvocationMocker;
|
7 |
-
use PHPUnit\Framework\MockObject\Matcher\Invocation;
|
8 |
-
use PHPUnit\Framework\MockObject\MockObject;
|
9 |
-
use phpmock\integration\MockDelegateFunctionBuilder;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Proxy for PHPUnit's PHPUnit_Framework_MockObject_MockObject.
|
13 |
-
*
|
14 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
15 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
16 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
17 |
-
* @internal
|
18 |
-
*/
|
19 |
-
class MockObjectProxyReturnTypes implements MockObject
|
20 |
-
{
|
21 |
-
/**
|
22 |
-
* @var MockObject $mockObject The mock object.
|
23 |
-
*/
|
24 |
-
private $mockObject;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Inject the subject.
|
28 |
-
*
|
29 |
-
* @param MockObject $mockObject The subject.
|
30 |
-
*/
|
31 |
-
public function __construct(MockObject $mockObject)
|
32 |
-
{
|
33 |
-
$this->mockObject = $mockObject;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @SuppressWarnings(PHPMD)
|
38 |
-
*/
|
39 |
-
// @codingStandardsIgnoreStart
|
40 |
-
public function __phpunit_getInvocationMocker() : InvocationMocker
|
41 |
-
{
|
42 |
-
// @codingStandardsIgnoreEnd
|
43 |
-
return $this->mockObject->__phpunit_getInvocationMocker();
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @SuppressWarnings(PHPMD)
|
48 |
-
*/
|
49 |
-
// @codingStandardsIgnoreStart
|
50 |
-
public function __phpunit_setOriginalObject($originalObject) : void
|
51 |
-
{
|
52 |
-
// @codingStandardsIgnoreEnd
|
53 |
-
$this->mockObject->__phpunit_setOriginalObject($originalObject);
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* @SuppressWarnings(PHPMD)
|
58 |
-
*/
|
59 |
-
// @codingStandardsIgnoreStart
|
60 |
-
public function __phpunit_verify(bool $unsetInvocationMocker = true) : void
|
61 |
-
{
|
62 |
-
// @codingStandardsIgnoreEnd
|
63 |
-
$this->mockObject->__phpunit_verify($unsetInvocationMocker);
|
64 |
-
}
|
65 |
-
|
66 |
-
public function expects(Invocation $matcher) : BuilderInvocationMocker
|
67 |
-
{
|
68 |
-
return $this->mockObject->expects($matcher)->method(MockDelegateFunctionBuilder::METHOD);
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* This method is not part of the contract but was found in
|
73 |
-
* PHPUnit's mocked_class.tpl.dist.
|
74 |
-
*
|
75 |
-
* @SuppressWarnings(PHPMD)
|
76 |
-
*/
|
77 |
-
// @codingStandardsIgnoreStart
|
78 |
-
public function __phpunit_hasMatchers() : bool
|
79 |
-
{
|
80 |
-
// @codingStandardsIgnoreEnd
|
81 |
-
return $this->mockObject->__phpunit_hasMatchers();
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @SuppressWarnings(PHPMD)
|
86 |
-
*/
|
87 |
-
// @codingStandardsIgnoreStart
|
88 |
-
public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration) : void
|
89 |
-
{
|
90 |
-
// @codingStandardsIgnoreEnd
|
91 |
-
$this->mockObject->__phpunit_setReturnValueGeneration($returnValueGeneration);
|
92 |
-
}
|
93 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/MockObjectProxyReturnTypes84.php
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\MockObject\Builder\InvocationMocker as BuilderInvocationMocker;
|
6 |
-
use PHPUnit\Framework\MockObject\InvocationHandler;
|
7 |
-
use PHPUnit\Framework\MockObject\Rule\InvocationOrder;
|
8 |
-
use PHPUnit\Framework\MockObject\MockObject;
|
9 |
-
use phpmock\integration\MockDelegateFunctionBuilder;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Proxy for PHPUnit's PHPUnit_Framework_MockObject_MockObject.
|
13 |
-
*
|
14 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
15 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
16 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
17 |
-
* @internal
|
18 |
-
*/
|
19 |
-
class MockObjectProxyReturnTypes84 implements MockObject
|
20 |
-
{
|
21 |
-
/**
|
22 |
-
* @var MockObject $mockObject The mock object.
|
23 |
-
*/
|
24 |
-
private $mockObject;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Inject the subject.
|
28 |
-
*
|
29 |
-
* @param MockObject $mockObject The subject.
|
30 |
-
*/
|
31 |
-
public function __construct(MockObject $mockObject)
|
32 |
-
{
|
33 |
-
$this->mockObject = $mockObject;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @SuppressWarnings(PHPMD)
|
38 |
-
*/
|
39 |
-
// @codingStandardsIgnoreStart
|
40 |
-
public function __phpunit_getInvocationHandler(): InvocationHandler
|
41 |
-
{
|
42 |
-
return $this->mockObject->__phpunit_getInvocationHandler();
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @SuppressWarnings(PHPMD)
|
47 |
-
*/
|
48 |
-
// @codingStandardsIgnoreStart
|
49 |
-
public function __phpunit_setOriginalObject($originalObject) : void
|
50 |
-
{
|
51 |
-
// @codingStandardsIgnoreEnd
|
52 |
-
$this->mockObject->__phpunit_setOriginalObject($originalObject);
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* @SuppressWarnings(PHPMD)
|
57 |
-
*/
|
58 |
-
// @codingStandardsIgnoreStart
|
59 |
-
public function __phpunit_verify(bool $unsetInvocationMocker = true) : void
|
60 |
-
{
|
61 |
-
// @codingStandardsIgnoreEnd
|
62 |
-
$this->mockObject->__phpunit_verify($unsetInvocationMocker);
|
63 |
-
}
|
64 |
-
|
65 |
-
public function expects(InvocationOrder $matcher) : BuilderInvocationMocker
|
66 |
-
{
|
67 |
-
return $this->mockObject->expects($matcher)->method(MockDelegateFunctionBuilder::METHOD);
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* This method is not part of the contract but was found in
|
72 |
-
* PHPUnit's mocked_class.tpl.dist.
|
73 |
-
*
|
74 |
-
* @SuppressWarnings(PHPMD)
|
75 |
-
*/
|
76 |
-
// @codingStandardsIgnoreStart
|
77 |
-
public function __phpunit_hasMatchers() : bool
|
78 |
-
{
|
79 |
-
// @codingStandardsIgnoreEnd
|
80 |
-
return $this->mockObject->__phpunit_hasMatchers();
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* @SuppressWarnings(PHPMD)
|
85 |
-
*/
|
86 |
-
// @codingStandardsIgnoreStart
|
87 |
-
public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration) : void
|
88 |
-
{
|
89 |
-
// @codingStandardsIgnoreEnd
|
90 |
-
$this->mockObject->__phpunit_setReturnValueGeneration($returnValueGeneration);
|
91 |
-
}
|
92 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/classes/PHPMock.php
DELETED
@@ -1,128 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\integration\MockDelegateFunctionBuilder;
|
6 |
-
use phpmock\MockBuilder;
|
7 |
-
use phpmock\Deactivatable;
|
8 |
-
use PHPUnit\Framework\MockObject\MockObject;
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Adds building a function mock functionality into \PHPUnit\Framework\TestCase.
|
12 |
-
*
|
13 |
-
* Use this trait in your \PHPUnit\Framework\TestCase:
|
14 |
-
* <code>
|
15 |
-
* <?php
|
16 |
-
*
|
17 |
-
* namespace foo;
|
18 |
-
*
|
19 |
-
* class FooTest extends \PHPUnit\Framework\TestCase
|
20 |
-
* {
|
21 |
-
*
|
22 |
-
* use \phpmock\phpunit\PHPMock;
|
23 |
-
*
|
24 |
-
* public function testBar()
|
25 |
-
* {
|
26 |
-
* $time = $this->getFunctionMock(__NAMESPACE__, "time");
|
27 |
-
* $time->expects($this->once())->willReturn(3);
|
28 |
-
* $this->assertEquals(3, time());
|
29 |
-
* }
|
30 |
-
* }
|
31 |
-
* </code>
|
32 |
-
*
|
33 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
34 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
35 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
36 |
-
*/
|
37 |
-
trait PHPMock
|
38 |
-
{
|
39 |
-
/**
|
40 |
-
* Returns the enabled function mock.
|
41 |
-
*
|
42 |
-
* This mock will be disabled automatically after the test run.
|
43 |
-
*
|
44 |
-
* @param string $namespace The function namespace.
|
45 |
-
* @param string $name The function name.
|
46 |
-
*
|
47 |
-
* @return MockObject The PHPUnit mock.
|
48 |
-
*/
|
49 |
-
public function getFunctionMock($namespace, $name)
|
50 |
-
{
|
51 |
-
$delegateBuilder = new MockDelegateFunctionBuilder();
|
52 |
-
$delegateBuilder->build($name);
|
53 |
-
|
54 |
-
$builder = $this->getMockBuilder($delegateBuilder->getFullyQualifiedClassName());
|
55 |
-
if (is_callable([$builder, 'addMethods'])) {
|
56 |
-
$builder->addMethods([$name]);
|
57 |
-
}
|
58 |
-
$mock = $builder->getMockForAbstractClass();
|
59 |
-
$this->addMatcher($mock, $name);
|
60 |
-
|
61 |
-
$functionMockBuilder = new MockBuilder();
|
62 |
-
$functionMockBuilder->setNamespace($namespace)
|
63 |
-
->setName($name)
|
64 |
-
->setFunctionProvider($mock);
|
65 |
-
|
66 |
-
$functionMock = $functionMockBuilder->build();
|
67 |
-
$functionMock->enable();
|
68 |
-
|
69 |
-
$this->registerForTearDown($functionMock);
|
70 |
-
|
71 |
-
$proxy = new MockObjectProxy($mock);
|
72 |
-
return $proxy;
|
73 |
-
}
|
74 |
-
|
75 |
-
private function addMatcher($mock, $name)
|
76 |
-
{
|
77 |
-
if (is_callable([$mock, '__phpunit_getInvocationHandler'])) {
|
78 |
-
$mocker = $mock->__phpunit_getInvocationHandler()->expects(new DefaultArgumentRemover());
|
79 |
-
$mocker->method($name);
|
80 |
-
return;
|
81 |
-
}
|
82 |
-
$mock->__phpunit_getInvocationMocker()->addMatcher(new DefaultArgumentRemover());
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Automatically disable function mocks after the test was run.
|
87 |
-
*
|
88 |
-
* If you use getFunctionMock() you don't need this method. This method
|
89 |
-
* is meant for a Deactivatable (e.g. a MockEnvironment) which was
|
90 |
-
* directly created with PHPMock's API.
|
91 |
-
*
|
92 |
-
* @param Deactivatable $deactivatable The function mocks.
|
93 |
-
*/
|
94 |
-
public function registerForTearDown(Deactivatable $deactivatable)
|
95 |
-
{
|
96 |
-
$result = $this->getTestResultObject();
|
97 |
-
$result->addListener(new MockDisabler($deactivatable));
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Defines the mocked function in the given namespace.
|
102 |
-
*
|
103 |
-
* In most cases you don't have to call this method. {@link getFunctionMock()}
|
104 |
-
* is doing this for you. But if the mock is defined after the first call in the
|
105 |
-
* tested class, the tested class doesn't resolve to the mock. This is
|
106 |
-
* documented in Bug #68541. You therefore have to define the namespaced
|
107 |
-
* function before the first call (e.g. with the beforeClass annotation).
|
108 |
-
*
|
109 |
-
* Defining the function has no side effects. If the function was
|
110 |
-
* already defined this method does nothing.
|
111 |
-
*
|
112 |
-
* @see getFunctionMock()
|
113 |
-
* @link https://bugs.php.net/bug.php?id=68541 Bug #68541
|
114 |
-
*
|
115 |
-
* @param string $namespace The function namespace.
|
116 |
-
* @param string $name The function name.
|
117 |
-
*/
|
118 |
-
public static function defineFunctionMock($namespace, $name)
|
119 |
-
{
|
120 |
-
$functionMockBuilder = new MockBuilder();
|
121 |
-
$functionMockBuilder->setNamespace($namespace)
|
122 |
-
->setName($name)
|
123 |
-
->setFunction(function () {
|
124 |
-
})
|
125 |
-
->build()
|
126 |
-
->define();
|
127 |
-
}
|
128 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/compatibility/BaseTestListener.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace PHPUnit\Framework;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Compatibility class to work with PHPUnit 7
|
7 |
-
*
|
8 |
-
* @internal
|
9 |
-
*/
|
10 |
-
abstract class BaseTestListener implements TestListener
|
11 |
-
{
|
12 |
-
use TestListenerDefaultImplementation;
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/composer.json
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "php-mock/php-mock-phpunit",
|
3 |
-
"type": "library",
|
4 |
-
"description": "Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.",
|
5 |
-
"keywords": ["phpunit", "mock", "stub", "test double", "function", "test", "TDD", "BDD"],
|
6 |
-
"homepage": "https://github.com/php-mock/php-mock-phpunit",
|
7 |
-
"license": "WTFPL",
|
8 |
-
"authors": [
|
9 |
-
{
|
10 |
-
"name": "Markus Malkusch",
|
11 |
-
"email": "markus@malkusch.de",
|
12 |
-
"homepage": "http://markus.malkusch.de",
|
13 |
-
"role": "Developer"
|
14 |
-
}
|
15 |
-
],
|
16 |
-
"autoload": {
|
17 |
-
"files": ["autoload.php"],
|
18 |
-
"psr-4": {"phpmock\\phpunit\\": "classes/"}
|
19 |
-
},
|
20 |
-
"require": {
|
21 |
-
"php": ">=7",
|
22 |
-
"phpunit/phpunit": "^6 || ^7 || ^8 || ^9",
|
23 |
-
"php-mock/php-mock-integration": "^2.1"
|
24 |
-
},
|
25 |
-
"archive": {
|
26 |
-
"exclude": ["/tests"]
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/tests/MockDisablerTest.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\Mock;
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests MockDisabler.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see MockDisabler
|
15 |
-
*/
|
16 |
-
class MockDisablerTest extends TestCase
|
17 |
-
{
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Tests disabling the mock.
|
21 |
-
*
|
22 |
-
* @test
|
23 |
-
*/
|
24 |
-
public function testEndTest()
|
25 |
-
{
|
26 |
-
$min = new Mock(__NAMESPACE__, "min", "max");
|
27 |
-
$min->enable();
|
28 |
-
$this->assertEquals(9, min(1, 9));
|
29 |
-
|
30 |
-
$disabler = new MockDisabler($min);
|
31 |
-
$disabler->endTest($this, 1);
|
32 |
-
|
33 |
-
$this->assertEquals(1, min(1, 9));
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/tests/MockObjectProxyTest.php
DELETED
@@ -1,163 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\integration\MockDelegateFunctionBuilder;
|
6 |
-
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
|
7 |
-
use PHPUnit\Framework\MockObject\ConfigurableMethod;
|
8 |
-
use PHPUnit\Framework\MockObject\InvocationHandler;
|
9 |
-
use PHPUnit\Framework\MockObject\Matcher\Invocation;
|
10 |
-
use PHPUnit\Framework\MockObject\Matcher\MethodName;
|
11 |
-
use PHPUnit\Framework\MockObject\MockObject;
|
12 |
-
use PHPUnit\Framework\MockObject\Stub\MatcherCollection;
|
13 |
-
use PHPUnit\Framework\TestCase;
|
14 |
-
use SebastianBergmann\Type\Type;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Tests MockObjectProxyTest.
|
18 |
-
*
|
19 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
20 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
21 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
22 |
-
* @see MockObjectProxy
|
23 |
-
* @requires PHPUnit 4.5.0
|
24 |
-
*/
|
25 |
-
class MockObjectProxyTest extends TestCase
|
26 |
-
{
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Tests expects()
|
30 |
-
*
|
31 |
-
* @test
|
32 |
-
*/
|
33 |
-
public function testExpects()
|
34 |
-
{
|
35 |
-
$matcher = $this->getMockBuilder(Invocation::class)->getMock();
|
36 |
-
|
37 |
-
$methods = class_exists(ConfigurableMethod::class)
|
38 |
-
? new ConfigurableMethod(
|
39 |
-
MockDelegateFunctionBuilder::METHOD,
|
40 |
-
$this->prophesize(Type::class)->reveal()
|
41 |
-
)
|
42 |
-
: [MockDelegateFunctionBuilder::METHOD];
|
43 |
-
|
44 |
-
if (class_exists(\PHPUnit\Runner\Version::class)
|
45 |
-
&& version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
|
46 |
-
) {
|
47 |
-
$invocationHandler = new InvocationHandler([$methods], false);
|
48 |
-
$invocationMocker = $invocationHandler->expects($matcher);
|
49 |
-
} else {
|
50 |
-
$invocationMocker = new InvocationMocker(
|
51 |
-
$this->prophesize(MatcherCollection::class)->reveal(),
|
52 |
-
$this->prophesize(Invocation::class)->reveal(),
|
53 |
-
$methods
|
54 |
-
);
|
55 |
-
}
|
56 |
-
|
57 |
-
$prophecy = $this->prophesize(MockObject::class);
|
58 |
-
$prophecy->expects($matcher)->willReturn($invocationMocker);
|
59 |
-
$mock = $prophecy->reveal();
|
60 |
-
|
61 |
-
$proxy = new MockObjectProxy($mock);
|
62 |
-
|
63 |
-
$result = $proxy->expects($matcher);
|
64 |
-
$this->assertEquals($invocationMocker, $result);
|
65 |
-
|
66 |
-
$this->assertSame(
|
67 |
-
(new MethodName(MockDelegateFunctionBuilder::METHOD))->toString(),
|
68 |
-
$this->getMethodMatcher($invocationMocker)->toString()
|
69 |
-
);
|
70 |
-
}
|
71 |
-
|
72 |
-
private function getMethodMatcher($invocationMocker)
|
73 |
-
{
|
74 |
-
if (class_exists(\PHPUnit\Runner\Version::class)
|
75 |
-
&& version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
|
76 |
-
) {
|
77 |
-
$reflection = new \ReflectionClass(InvocationMocker::class);
|
78 |
-
$property = $reflection->getProperty('matcher');
|
79 |
-
$property->setAccessible(true);
|
80 |
-
return $property->getValue($invocationMocker)->getMethodNameRule();
|
81 |
-
}
|
82 |
-
|
83 |
-
return $invocationMocker->getMatcher()->methodNameMatcher ??
|
84 |
-
$invocationMocker->getMatcher()->getMethodNameMatcher();
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Tests delegation of __phpunit_hasMatchers().
|
89 |
-
*
|
90 |
-
* Before PHPUnit-5 __phpunit_hasMatchers() was not part of the contract.
|
91 |
-
* But it was used within PHPUnit as it would be. Unfortunately the
|
92 |
-
* mocking framework Prophecy will not allow to mock this method.
|
93 |
-
*
|
94 |
-
* @test
|
95 |
-
* @requires PHPUnit 5
|
96 |
-
*/
|
97 |
-
public function testHasMatcher()
|
98 |
-
{
|
99 |
-
$prophecy = $this->prophesize(MockObject::class);
|
100 |
-
$prophecy->__phpunit_hasMatchers()->willReturn(true);
|
101 |
-
$mock = $prophecy->reveal();
|
102 |
-
|
103 |
-
$proxy = new MockObjectProxy($mock);
|
104 |
-
|
105 |
-
$result = $proxy->__phpunit_hasMatchers();
|
106 |
-
$this->assertTrue($result);
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Tests calling the proxy forwards the call to the subject.
|
111 |
-
*
|
112 |
-
* @param string $method The proxy method.
|
113 |
-
* @param array $arguments The optional arguments.
|
114 |
-
*
|
115 |
-
* @test
|
116 |
-
* @dataProvider provideTestProxiedMethods
|
117 |
-
*/
|
118 |
-
public function testProxiedMethods($method, array $arguments = [], $expected = null)
|
119 |
-
{
|
120 |
-
$prophecy = $this->prophesize(MockObject::class);
|
121 |
-
if ($expected) {
|
122 |
-
call_user_func_array([$prophecy, $method], $arguments)->willReturn($expected)->shouldBeCalledTimes(1);
|
123 |
-
} else {
|
124 |
-
call_user_func_array([$prophecy, $method], $arguments)->shouldBeCalledTimes(1);
|
125 |
-
}
|
126 |
-
$mock = $prophecy->reveal();
|
127 |
-
|
128 |
-
$proxy = new MockObjectProxy($mock);
|
129 |
-
|
130 |
-
$result = call_user_func_array([$proxy, $method], $arguments);
|
131 |
-
|
132 |
-
if ($expected) {
|
133 |
-
$this->assertSame($expected, $result);
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Returns the test cases for testProxiedMethods().
|
139 |
-
*
|
140 |
-
* @return array Test cases.
|
141 |
-
*
|
142 |
-
* @SuppressWarnings(PHPMD)
|
143 |
-
*/
|
144 |
-
public function provideTestProxiedMethods()
|
145 |
-
{
|
146 |
-
$return = [];
|
147 |
-
if (class_exists(\PHPUnit\Runner\Version::class)
|
148 |
-
&& version_compare(\PHPUnit\Runner\Version::id(), '8.4.0') >= 0
|
149 |
-
) {
|
150 |
-
$return[] = ['__phpunit_getInvocationHandler', [], new InvocationHandler([], false)];
|
151 |
-
} else {
|
152 |
-
$return[] = [
|
153 |
-
'__phpunit_getInvocationMocker',
|
154 |
-
[],
|
155 |
-
new \PHPUnit\Framework\MockObject\InvocationMocker([], true)
|
156 |
-
];
|
157 |
-
}
|
158 |
-
|
159 |
-
$return[] = ['__phpunit_setOriginalObject', ['bar']];
|
160 |
-
$return[] = ['__phpunit_verify', [true]];
|
161 |
-
return $return;
|
162 |
-
}
|
163 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock-phpunit/tests/PHPMockTest.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\phpunit;
|
4 |
-
|
5 |
-
use phpmock\AbstractMockTest;
|
6 |
-
use PHPUnit\Framework\ExpectationFailedException;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests PHPMock.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see PHPMock
|
15 |
-
*/
|
16 |
-
class PHPMockTest extends AbstractMockTest
|
17 |
-
{
|
18 |
-
|
19 |
-
use PHPMock;
|
20 |
-
|
21 |
-
protected function defineFunction($namespace, $functionName)
|
22 |
-
{
|
23 |
-
self::defineFunctionMock($namespace, $functionName);
|
24 |
-
}
|
25 |
-
|
26 |
-
protected function mockFunction($namespace, $functionName, callable $function)
|
27 |
-
{
|
28 |
-
$mock = $this->getFunctionMock($namespace, $functionName);
|
29 |
-
$mock->expects($this->any())->willReturnCallback($function);
|
30 |
-
}
|
31 |
-
|
32 |
-
protected function disableMocks()
|
33 |
-
{
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Tests building a mock with arguments.
|
38 |
-
*
|
39 |
-
* @test
|
40 |
-
*/
|
41 |
-
public function testFunctionMockWithArguments()
|
42 |
-
{
|
43 |
-
$time = $this->getFunctionMock(__NAMESPACE__, "sqrt");
|
44 |
-
$time->expects($this->once())->with(9)->willReturn(2);
|
45 |
-
|
46 |
-
$this->assertEquals(2, sqrt(9));
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Tests failing an expectation.
|
51 |
-
*
|
52 |
-
* @test
|
53 |
-
*/
|
54 |
-
public function testFunctionMockFailsExpectation()
|
55 |
-
{
|
56 |
-
try {
|
57 |
-
$time = $this->getFunctionMock(__NAMESPACE__, "time");
|
58 |
-
$time->expects($this->once());
|
59 |
-
|
60 |
-
$time->__phpunit_verify();
|
61 |
-
$this->fail("Expectation should fail");
|
62 |
-
} catch (ExpectationFailedException $e) {
|
63 |
-
time(); // satisfy the expectation
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/.github/workflows/coding-standards.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
name: "Check Coding Standards"
|
2 |
-
|
3 |
-
on:
|
4 |
-
pull_request:
|
5 |
-
push:
|
6 |
-
|
7 |
-
jobs:
|
8 |
-
coding-standards:
|
9 |
-
name: "Check Coding Standards"
|
10 |
-
|
11 |
-
runs-on: "ubuntu-latest"
|
12 |
-
|
13 |
-
steps:
|
14 |
-
- name: "Checkout"
|
15 |
-
uses: "actions/checkout@v2"
|
16 |
-
|
17 |
-
- name: "Setup PHP"
|
18 |
-
uses: "shivammathur/setup-php@v2"
|
19 |
-
with:
|
20 |
-
php-version: "7.4"
|
21 |
-
tools: composer:v2, cs2pr
|
22 |
-
|
23 |
-
- name: "Install dependencies"
|
24 |
-
run: "composer install --no-interaction --no-progress --no-suggest"
|
25 |
-
|
26 |
-
- name: "Run phpcs"
|
27 |
-
run: vendor/bin/phpcs -q --report=checkstyle | cs2pr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/.github/workflows/phpmd.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
name: "Check phpmd"
|
2 |
-
|
3 |
-
on:
|
4 |
-
pull_request:
|
5 |
-
push:
|
6 |
-
|
7 |
-
jobs:
|
8 |
-
coding-standards:
|
9 |
-
name: "Check phpmd"
|
10 |
-
|
11 |
-
runs-on: "ubuntu-latest"
|
12 |
-
|
13 |
-
steps:
|
14 |
-
- name: "Checkout"
|
15 |
-
uses: "actions/checkout@v2"
|
16 |
-
|
17 |
-
- name: "Setup PHP"
|
18 |
-
uses: "shivammathur/setup-php@v2"
|
19 |
-
with:
|
20 |
-
php-version: "7.4"
|
21 |
-
tools: composer:v2
|
22 |
-
|
23 |
-
- name: "Install dependencies"
|
24 |
-
run: "composer require phpmd/phpmd --no-interaction --no-progress --no-suggest"
|
25 |
-
|
26 |
-
- name: "Run phpmd"
|
27 |
-
run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/.github/workflows/phpunit.yml
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
name: "PHPUnit tests"
|
2 |
-
|
3 |
-
on:
|
4 |
-
pull_request:
|
5 |
-
push:
|
6 |
-
|
7 |
-
jobs:
|
8 |
-
phpunit:
|
9 |
-
name: PHPUnit tests on PHP ${{ matrix.php-version }}
|
10 |
-
|
11 |
-
runs-on: "ubuntu-latest"
|
12 |
-
|
13 |
-
strategy:
|
14 |
-
matrix:
|
15 |
-
php-version:
|
16 |
-
- "5.6"
|
17 |
-
- "7.0"
|
18 |
-
- "7.1"
|
19 |
-
- "7.2"
|
20 |
-
- "7.3"
|
21 |
-
- "7.4"
|
22 |
-
- "8.0"
|
23 |
-
|
24 |
-
steps:
|
25 |
-
- name: "Checkout"
|
26 |
-
uses: "actions/checkout@v2"
|
27 |
-
|
28 |
-
- name: "Install PHP"
|
29 |
-
uses: "shivammathur/setup-php@v2"
|
30 |
-
with:
|
31 |
-
coverage: "pcov"
|
32 |
-
php-version: "${{ matrix.php-version }}"
|
33 |
-
ini-values: memory_limit=-1
|
34 |
-
tools: composer:v2
|
35 |
-
|
36 |
-
- name: "Cache dependencies"
|
37 |
-
uses: "actions/cache@v2"
|
38 |
-
with:
|
39 |
-
path: |
|
40 |
-
~/.composer/cache
|
41 |
-
vendor
|
42 |
-
key: "php-${{ matrix.php-version }}"
|
43 |
-
restore-keys: "php-${{ matrix.php-version }}"
|
44 |
-
|
45 |
-
- name: "Install dependencies"
|
46 |
-
run: "composer install --no-interaction --no-progress --no-suggest"
|
47 |
-
|
48 |
-
- name: "Tests"
|
49 |
-
run: vendor/bin/phpunit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/.github/workflows/test-flight.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
name: "Check test-flight"
|
2 |
-
|
3 |
-
on:
|
4 |
-
pull_request:
|
5 |
-
push:
|
6 |
-
|
7 |
-
jobs:
|
8 |
-
coding-standards:
|
9 |
-
name: "Check test-flight"
|
10 |
-
|
11 |
-
runs-on: "ubuntu-latest"
|
12 |
-
|
13 |
-
steps:
|
14 |
-
- name: "Checkout"
|
15 |
-
uses: "actions/checkout@v2"
|
16 |
-
|
17 |
-
- name: "Setup PHP"
|
18 |
-
uses: "shivammathur/setup-php@v2"
|
19 |
-
with:
|
20 |
-
php-version: "7.4"
|
21 |
-
tools: composer:v2
|
22 |
-
ini-values: "zend.assertions=1"
|
23 |
-
|
24 |
-
- name: "Install dependencies"
|
25 |
-
run: "composer require cundd/test-flight --no-interaction --no-progress --no-suggest"
|
26 |
-
|
27 |
-
- name: "Run test-flight"
|
28 |
-
run: |
|
29 |
-
vendor/bin/test-flight README.md
|
30 |
-
vendor/bin/test-flight classes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/LICENSE
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2 |
-
Version 2, December 2004
|
3 |
-
|
4 |
-
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
5 |
-
|
6 |
-
Everyone is permitted to copy and distribute verbatim or modified
|
7 |
-
copies of this license document, and changing it is allowed as long
|
8 |
-
as the name is changed.
|
9 |
-
|
10 |
-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12 |
-
|
13 |
-
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/README.md
DELETED
@@ -1,262 +0,0 @@
|
|
1 |
-
# PHP-Mock: mocking built-in PHP functions
|
2 |
-
|
3 |
-
PHP-Mock is a testing library which mocks non deterministic built-in PHP functions like
|
4 |
-
`time()` or `rand()`. This is achieved by [PHP's namespace fallback policy](http://php.net/manual/en/language.namespaces.fallback.php):
|
5 |
-
|
6 |
-
> PHP will fall back to global functions […]
|
7 |
-
> if a namespaced function […] does not exist.
|
8 |
-
|
9 |
-
PHP-Mock uses that feature by providing the namespaced function. I.e. you have
|
10 |
-
to be in a **non global namespace** context and call the function
|
11 |
-
**unqualified**:
|
12 |
-
|
13 |
-
```php
|
14 |
-
namespace foo;
|
15 |
-
|
16 |
-
$time = time(); // This call can be mocked, a call to \time() can't.
|
17 |
-
```
|
18 |
-
|
19 |
-
## Requirements and restrictions
|
20 |
-
|
21 |
-
* Only *unqualified* function calls in a namespace context can be mocked.
|
22 |
-
E.g. a call for `time()` in the namespace `foo` is mockable,
|
23 |
-
a call for `\time()` is not.
|
24 |
-
|
25 |
-
* The mock has to be defined before the first call to the unqualified function
|
26 |
-
in the tested class. This is documented in [Bug #68541](https://bugs.php.net/bug.php?id=68541).
|
27 |
-
In most cases, you can ignore this restriction but if you happen to run into
|
28 |
-
this issue you can call [`Mock::define()`](http://php-mock.github.io/php-mock/api/class-phpmock.Mock.html#_define)
|
29 |
-
before that first call. This would define a side effectless namespaced
|
30 |
-
function which can be enabled later. Another effective
|
31 |
-
approach is running your test in an isolated process.
|
32 |
-
|
33 |
-
## Alternatives
|
34 |
-
|
35 |
-
If you can't rely on or just don't want to use the namespace fallback policy,
|
36 |
-
there are alternative techniques to mock built-in PHP functions:
|
37 |
-
|
38 |
-
* [**PHPBuiltinMock**](https://github.com/jadell/PHPBuiltinMock) relies on
|
39 |
-
the [APD](http://php.net/manual/en/book.apd.php) extension.
|
40 |
-
|
41 |
-
* [**MockFunction**](https://github.com/tcz/phpunit-mockfunction) is a PHPUnit
|
42 |
-
extension. It uses the [runkit](http://php.net/manual/en/book.runkit.php) extension.
|
43 |
-
|
44 |
-
* [**UOPZ**](https://github.com/krakjoe/uopz) is a Zend extension which
|
45 |
-
allows, among others, renaming and deletion of functions.
|
46 |
-
|
47 |
-
* [**vfsStream**](https://github.com/mikey179/vfsStream) is a stream wrapper for
|
48 |
-
a virtual file system. This will help you write tests which covers PHP
|
49 |
-
stream functions (e.g. `fread()` or `readdir()`).
|
50 |
-
|
51 |
-
# Installation
|
52 |
-
|
53 |
-
Use [Composer](https://getcomposer.org/):
|
54 |
-
|
55 |
-
```sh
|
56 |
-
composer require --dev php-mock/php-mock
|
57 |
-
```
|
58 |
-
|
59 |
-
|
60 |
-
# Usage
|
61 |
-
|
62 |
-
You don't need to learn yet another API. PHP-Mock has integrations
|
63 |
-
for these testing frameworks:
|
64 |
-
|
65 |
-
- [php-mock/php-mock-phpunit](https://github.com/php-mock/php-mock-phpunit) - PHPUnit integration
|
66 |
-
|
67 |
-
- [php-mock/php-mock-mockery](https://github.com/php-mock/php-mock-mockery) - Mockery integration
|
68 |
-
|
69 |
-
- [php-mock/php-mock-prophecy](https://github.com/php-mock/php-mock-prophecy) - Prophecy (phpspec) integration
|
70 |
-
|
71 |
-
**Note:** If you plan to use one of the above mentioned testing frameworks you can skip
|
72 |
-
reading any further and just go to the particular integration project.
|
73 |
-
|
74 |
-
## PHP-Mock API
|
75 |
-
|
76 |
-
You find the API in the namespace
|
77 |
-
[`phpmock`](http://php-mock.github.io/php-mock/api/namespace-phpmock.html).
|
78 |
-
|
79 |
-
Create a [`Mock`](http://php-mock.github.io/php-mock/api/class-phpmock.Mock.html)
|
80 |
-
object. You can do this with the fluent API of [`MockBuilder`](http://php-mock.github.io/php-mock/api/class-phpmock.MockBuilder.html):
|
81 |
-
|
82 |
-
* [`MockBuilder::setNamespace()`](http://php-mock.github.io/php-mock/api/class-phpmock.MockBuilder.html#_setNamespace)
|
83 |
-
sets the target namespace of the mocked function.
|
84 |
-
|
85 |
-
* [`MockBuilder::setName()`](http://php-mock.github.io/php-mock/api/class-phpmock.MockBuilder.html#_setName)
|
86 |
-
sets the name of the mocked function (e.g. `time()`).
|
87 |
-
|
88 |
-
* [`MockBuilder::setFunction()`](http://php-mock.github.io/php-mock/api/class-phpmock.MockBuilder.html#_setFunction)
|
89 |
-
sets the concrete mock implementation.
|
90 |
-
|
91 |
-
* [`MockBuilder::setFunctionProvider()`](http://php-mock.github.io/php-mock/api/class-phpmock.MockBuilder.html#_setFunctionProvider)
|
92 |
-
sets, alternativly to `MockBuilder::setFunction()`, the mock implementation as a
|
93 |
-
[`FunctionProvider`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.FunctionProvider.html):
|
94 |
-
|
95 |
-
* [`FixedValueFunction`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.FixedValueFunction.html)
|
96 |
-
is a simple implementation which returns always the same value.
|
97 |
-
|
98 |
-
* [`FixedMicrotimeFunction`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.FixedMicrotimeFunction.html)
|
99 |
-
is a simple implementation which returns always the same microtime. This
|
100 |
-
class is different to `FixedValueFunction` as it contains a converter for
|
101 |
-
`microtime()`'s float and string format.
|
102 |
-
|
103 |
-
* [`FixedDateFunction`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.FixedDateFunction.html)
|
104 |
-
is a simple implementation which returns always a formated date for the fixed timestamp.
|
105 |
-
|
106 |
-
* [`SleepFunction`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.SleepFunction.html)
|
107 |
-
is a `sleep()` implementation, which doesn't halt but increases an
|
108 |
-
[`Incrementable`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.Incrementable.html)
|
109 |
-
e.g. a `time()` mock.
|
110 |
-
|
111 |
-
* [`UsleepFunction`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.UsleepFunction.html)
|
112 |
-
is an `usleep()` implementation, which doesn't halt but increases an
|
113 |
-
`Incrementable` e.g. a `microtime()` mock.
|
114 |
-
|
115 |
-
* [`MockBuilder::build()`](http://php-mock.github.io/php-mock/api/class-phpmock.MockBuilder.html#_build)
|
116 |
-
builds a `Mock` object.
|
117 |
-
|
118 |
-
After you have build your `Mock` object you have to call [`enable()`](http://php-mock.github.io/php-mock/api/class-phpmock.Mock.html#_enable)
|
119 |
-
to enable the mock in the given namespace. When you are finished with that mock you
|
120 |
-
should disable it by calling [`disable()`](http://php-mock.github.io/php-mock/api/class-phpmock.Mock.html#_disable)
|
121 |
-
on the mock instance.
|
122 |
-
|
123 |
-
This example illustrates mocking of the unqualified function `time()` in the
|
124 |
-
namespace `foo`:
|
125 |
-
|
126 |
-
```php
|
127 |
-
namespace foo;
|
128 |
-
|
129 |
-
use phpmock\MockBuilder;
|
130 |
-
|
131 |
-
$builder = new MockBuilder();
|
132 |
-
$builder->setNamespace(__NAMESPACE__)
|
133 |
-
->setName("time")
|
134 |
-
->setFunction(
|
135 |
-
function () {
|
136 |
-
return 1417011228;
|
137 |
-
}
|
138 |
-
);
|
139 |
-
|
140 |
-
$mock = $builder->build();
|
141 |
-
|
142 |
-
// The mock is not enabled yet.
|
143 |
-
assert (time() != 1417011228);
|
144 |
-
|
145 |
-
$mock->enable();
|
146 |
-
assert (time() == 1417011228);
|
147 |
-
|
148 |
-
// The mock is disabled and PHP's built-in time() is called.
|
149 |
-
$mock->disable();
|
150 |
-
assert (time() != 1417011228);
|
151 |
-
```
|
152 |
-
|
153 |
-
Instead of setting the mock function with `MockBuilder::setFunction()` you could also
|
154 |
-
use the existing [`FixedValueFunction`](http://php-mock.github.io/php-mock/api/class-phpmock.functions.FixedValueFunction.html):
|
155 |
-
|
156 |
-
```php
|
157 |
-
namespace foo;
|
158 |
-
|
159 |
-
use phpmock\MockBuilder;
|
160 |
-
use phpmock\functions\FixedValueFunction;
|
161 |
-
|
162 |
-
$builder = new MockBuilder();
|
163 |
-
$builder->setNamespace(__NAMESPACE__)
|
164 |
-
->setName("time")
|
165 |
-
->setFunctionProvider(new FixedValueFunction(1417011228));
|
166 |
-
|
167 |
-
$mock = $builder->build();
|
168 |
-
```
|
169 |
-
|
170 |
-
### Reset global state
|
171 |
-
|
172 |
-
An enabled mock changes global state. This will break subsequent tests if
|
173 |
-
they run code which would call the mock unintentionally. Therefore
|
174 |
-
you should always disable a mock after the test case. You will have to disable
|
175 |
-
the created mock. You could do this for all mocks by calling the
|
176 |
-
static method
|
177 |
-
[`Mock::disableAll()`](http://php-mock.github.io/php-mock/api/class-phpmock.Mock.html#_disableAll).
|
178 |
-
|
179 |
-
### Mock environments
|
180 |
-
|
181 |
-
Complex mock environments of several mocked functions can be grouped in a [`MockEnvironment`](http://php-mock.github.io/php-mock/api/class-phpmock.environment.MockEnvironment.html):
|
182 |
-
|
183 |
-
* [`MockEnvironment::enable()`](http://php-mock.github.io/php-mock/api/class-phpmock.environment.MockEnvironment.html#_enable)
|
184 |
-
enables all mocked functions of this environment.
|
185 |
-
|
186 |
-
* [`MockEnvironment::disable()`](http://php-mock.github.io/php-mock/api/class-phpmock.environment.MockEnvironment.html#_disable)
|
187 |
-
disables all mocked functions of this environment.
|
188 |
-
|
189 |
-
* [`MockEnvironment::define()`](http://php-mock.github.io/php-mock/api/class-phpmock.environment.MockEnvironment.html#_define)
|
190 |
-
defines all mocked functions of this environment.
|
191 |
-
|
192 |
-
#### SleepEnvironmentBuilder
|
193 |
-
|
194 |
-
The [`SleepEnvironmentBuilder`](http://php-mock.github.io/php-mock/api/class-phpmock.environment.SleepEnvironmentBuilder.html)
|
195 |
-
builds a mock environment where `sleep()` and `usleep()` return immediatly.
|
196 |
-
Furthermore they increase the amount of time in the mocked `date()`, `time()` and
|
197 |
-
`microtime()`:
|
198 |
-
|
199 |
-
```php
|
200 |
-
namespace foo;
|
201 |
-
|
202 |
-
use phpmock\environment\SleepEnvironmentBuilder;
|
203 |
-
|
204 |
-
$builder = new SleepEnvironmentBuilder();
|
205 |
-
$builder->addNamespace(__NAMESPACE__)
|
206 |
-
->setTimestamp(1417011228);
|
207 |
-
|
208 |
-
$environment = $builder->build();
|
209 |
-
$environment->enable();
|
210 |
-
|
211 |
-
// This won't delay the test for 10 seconds, but increase time().
|
212 |
-
sleep(10);
|
213 |
-
|
214 |
-
assert(1417011228 + 10 == time());
|
215 |
-
```
|
216 |
-
|
217 |
-
If the mocked functions should be in different namespaces you can
|
218 |
-
add more namespaces with [`SleepEnvironmentBuilder::addNamespace()`](http://php-mock.github.io/php-mock/api/class-phpmock.environment.SleepEnvironmentBuilder.html#_addNamespace)
|
219 |
-
|
220 |
-
### Spies
|
221 |
-
|
222 |
-
A [`Spy`](http://php-mock.github.io/php-mock/api/class-phpmock.spy.Spy.html)
|
223 |
-
gives you access to the function invocations.
|
224 |
-
[`Spy::getInvocations()`](http://php-mock.github.io/php-mock/api/class-phpmock.spy.Spy.html#_getInvocations)
|
225 |
-
gives you access to the arguments and return value.
|
226 |
-
|
227 |
-
As a `Spy` is a specialization of `Mock` it behaves identically. However you
|
228 |
-
could ommit the third constructor parameter `callable $function` which
|
229 |
-
would then create a spy using the existing function.
|
230 |
-
E.g. a `new Spy(__NAMESPACE__ , "rand")` would create a spy which basically
|
231 |
-
proxies PHP's built-in `rand()`:
|
232 |
-
|
233 |
-
```php
|
234 |
-
namespace foo;
|
235 |
-
|
236 |
-
use phpmock\spy\Spy;
|
237 |
-
|
238 |
-
function bar($min, $max) {
|
239 |
-
return rand($min, $max) + 3;
|
240 |
-
}
|
241 |
-
|
242 |
-
$spy = new Spy(__NAMESPACE__, "rand");
|
243 |
-
$spy->enable();
|
244 |
-
|
245 |
-
$result = bar(1, 2);
|
246 |
-
|
247 |
-
assert ([1, 2] == $spy->getInvocations()[0]->getArguments());
|
248 |
-
assert ($result == $spy->getInvocations()[0]->getReturn() + 3);
|
249 |
-
```
|
250 |
-
|
251 |
-
|
252 |
-
# License and authors
|
253 |
-
|
254 |
-
This project is free and under the WTFPL.
|
255 |
-
Responsable for this project is Markus Malkusch markus@malkusch.de.
|
256 |
-
This library was inspired by Fabian Schmengler's article
|
257 |
-
[*PHP: “Mocking” built-in functions like time() in Unit Tests*](http://www.schmengler-se.de/en/2011/03/php-mocking-built-in-functions-like-time-in-unit-tests/).
|
258 |
-
|
259 |
-
## Donations
|
260 |
-
|
261 |
-
If you like PHP-Mock and feel generous donate a few Bitcoins here:
|
262 |
-
[1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/autoload.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Compatibility with phpunit/php-text-template v2
|
4 |
-
|
5 |
-
if (!class_exists(SebastianBergmann\Template\Template::class)
|
6 |
-
&& class_exists(Text_Template::class)
|
7 |
-
) {
|
8 |
-
class_alias(Text_Template::class, SebastianBergmann\Template\Template::class);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/Deactivatable.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Implementation deactivates related mocks.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
*/
|
12 |
-
interface Deactivatable
|
13 |
-
{
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Disable related mocks.
|
17 |
-
*/
|
18 |
-
public function disable();
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/Mock.php
DELETED
@@ -1,191 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
use phpmock\generator\MockFunctionGenerator;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Mocking framework for built-in PHP functions.
|
10 |
-
*
|
11 |
-
* Mocking a build-in PHP function is achieved by using
|
12 |
-
* PHP's namespace fallback policy. A mock will provide the namespaced function.
|
13 |
-
* I.e. only unqualified functions in a non-global namespace can be mocked.
|
14 |
-
*
|
15 |
-
* Example:
|
16 |
-
* <code>
|
17 |
-
* namespace foo;
|
18 |
-
*
|
19 |
-
* use phpmock\Mock;
|
20 |
-
*
|
21 |
-
* $time = new Mock(
|
22 |
-
* __NAMESPACE__,
|
23 |
-
* "time",
|
24 |
-
* function () {
|
25 |
-
* return 3;
|
26 |
-
* }
|
27 |
-
* );
|
28 |
-
* $time->enable();
|
29 |
-
* assert (3 == time());
|
30 |
-
*
|
31 |
-
* $time->disable();
|
32 |
-
* assert (3 != time());
|
33 |
-
* </code>
|
34 |
-
*
|
35 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
36 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
37 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
38 |
-
* @see MockBuilder
|
39 |
-
*/
|
40 |
-
class Mock implements Deactivatable
|
41 |
-
{
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @var string namespace for the mock function.
|
45 |
-
*/
|
46 |
-
private $namespace;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* @var string function name of the mocked function.
|
50 |
-
*/
|
51 |
-
private $name;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @var callable The function mock.
|
55 |
-
*/
|
56 |
-
private $function;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Set the namespace, function name and the mock function.
|
60 |
-
*
|
61 |
-
* @param string $namespace The namespace for the mock function.
|
62 |
-
* @param string $name The function name of the mocked function.
|
63 |
-
* @param callable $function The mock function.
|
64 |
-
*/
|
65 |
-
public function __construct($namespace, $name, callable $function)
|
66 |
-
{
|
67 |
-
if (empty($namespace)) {
|
68 |
-
throw new InvalidArgumentException('Namespace should not be empty');
|
69 |
-
}
|
70 |
-
if (empty($name)) {
|
71 |
-
throw new InvalidArgumentException('Function name should not be empty');
|
72 |
-
}
|
73 |
-
|
74 |
-
$this->namespace = $namespace;
|
75 |
-
$this->name = $name;
|
76 |
-
$this->function = $function;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Enables this mock.
|
81 |
-
*
|
82 |
-
* @throws MockEnabledException If the function has already an enabled mock.
|
83 |
-
* @see Mock::disable()
|
84 |
-
* @see Mock::disableAll()
|
85 |
-
*
|
86 |
-
* @SuppressWarnings(PHPMD)
|
87 |
-
*/
|
88 |
-
public function enable()
|
89 |
-
{
|
90 |
-
$registry = MockRegistry::getInstance();
|
91 |
-
if ($registry->isRegistered($this)) {
|
92 |
-
throw new MockEnabledException(
|
93 |
-
"$this->name is already enabled."
|
94 |
-
. "Call disable() on the existing mock."
|
95 |
-
);
|
96 |
-
}
|
97 |
-
$this->define();
|
98 |
-
$registry->register($this);
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Disable this mock.
|
103 |
-
*
|
104 |
-
* @see Mock::enable()
|
105 |
-
* @see Mock::disableAll()
|
106 |
-
*/
|
107 |
-
public function disable()
|
108 |
-
{
|
109 |
-
MockRegistry::getInstance()->unregister($this);
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Disable all mocks.
|
114 |
-
*
|
115 |
-
* @see Mock::enable()
|
116 |
-
* @see Mock::disable()
|
117 |
-
*/
|
118 |
-
public static function disableAll()
|
119 |
-
{
|
120 |
-
MockRegistry::getInstance()->unregisterAll();
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Calls the mocked function.
|
125 |
-
*
|
126 |
-
* This method is called from the namespaced function.
|
127 |
-
*
|
128 |
-
* @param array $arguments the call arguments.
|
129 |
-
* @return mixed
|
130 |
-
* @internal
|
131 |
-
*/
|
132 |
-
public function call(array $arguments)
|
133 |
-
{
|
134 |
-
return call_user_func_array($this->function, $arguments);
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Returns the fully qualified function name.
|
139 |
-
*
|
140 |
-
* @return string The function name with its namespace.
|
141 |
-
* @internal
|
142 |
-
*/
|
143 |
-
public function getFQFN()
|
144 |
-
{
|
145 |
-
return strtolower("{$this->getNamespace()}\\$this->name");
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Returns the namespace without enclosing slashes.
|
150 |
-
*
|
151 |
-
* @return string The namespace
|
152 |
-
*/
|
153 |
-
public function getNamespace()
|
154 |
-
{
|
155 |
-
return trim($this->namespace, "\\");
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Returns the unqualified function name.
|
160 |
-
*
|
161 |
-
* @return string The name of the mocked function.
|
162 |
-
*/
|
163 |
-
public function getName()
|
164 |
-
{
|
165 |
-
return $this->name;
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Defines the mocked function in the given namespace.
|
170 |
-
*
|
171 |
-
* In most cases you don't have to call this method. enable() is doing this
|
172 |
-
* for you. But if the mock is defined after the first call in the
|
173 |
-
* tested class, the tested class doesn't resolve to the mock. This is
|
174 |
-
* documented in Bug #68541. You therefore have to define the namespaced
|
175 |
-
* function before the first call. Defining the function has no side
|
176 |
-
* effects as you still have to enable the mock. If the function was
|
177 |
-
* already defined this method does nothing.
|
178 |
-
*
|
179 |
-
* @see enable()
|
180 |
-
* @link https://bugs.php.net/bug.php?id=68541 Bug #68541
|
181 |
-
*/
|
182 |
-
public function define()
|
183 |
-
{
|
184 |
-
$fqfn = $this->getFQFN();
|
185 |
-
if (function_exists($fqfn)) {
|
186 |
-
return;
|
187 |
-
}
|
188 |
-
$functionGenerator = new MockFunctionGenerator($this);
|
189 |
-
$functionGenerator->defineFunction();
|
190 |
-
}
|
191 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/MockBuilder.php
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
use phpmock\functions\FunctionProvider;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Fluent API mock builder.
|
9 |
-
*
|
10 |
-
* Example:
|
11 |
-
* <code>
|
12 |
-
* namespace foo;
|
13 |
-
*
|
14 |
-
* use phpmock\MockBuilder;
|
15 |
-
* use phpmock\functions\FixedValueFunction;
|
16 |
-
*
|
17 |
-
* $builder = new MockBuilder();
|
18 |
-
* $builder->setNamespace(__NAMESPACE__)
|
19 |
-
* ->setName("time")
|
20 |
-
* ->setFunctionProvider(new FixedValueFunction(1417011228));
|
21 |
-
*
|
22 |
-
* $mock = $builder->build();
|
23 |
-
*
|
24 |
-
* // The mock is not enabled yet.
|
25 |
-
* assert (time() != 1417011228);
|
26 |
-
*
|
27 |
-
* $mock->enable();
|
28 |
-
* assert (time() == 1417011228);
|
29 |
-
*
|
30 |
-
* // The mock is disabled and PHP's built-in time() is called.
|
31 |
-
* $mock->disable();
|
32 |
-
* assert (time() != 1417011228);
|
33 |
-
* </code>
|
34 |
-
*
|
35 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
36 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
37 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
38 |
-
* @see Mock
|
39 |
-
*/
|
40 |
-
class MockBuilder
|
41 |
-
{
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @var string namespace for the mock function.
|
45 |
-
*/
|
46 |
-
private $namespace;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* @var string function name of the mocked function.
|
50 |
-
*/
|
51 |
-
private $name;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @var callable The function mock.
|
55 |
-
*/
|
56 |
-
private $function;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Sets the mock namespace.
|
60 |
-
*
|
61 |
-
* @param string $namespace The function namespace.
|
62 |
-
* @return MockBuilder
|
63 |
-
*/
|
64 |
-
public function setNamespace($namespace)
|
65 |
-
{
|
66 |
-
$this->namespace = $namespace;
|
67 |
-
return $this;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Sets the mocked function name.
|
72 |
-
*
|
73 |
-
* @param string $name The function name.
|
74 |
-
* @return MockBuilder
|
75 |
-
*/
|
76 |
-
public function setName($name)
|
77 |
-
{
|
78 |
-
$this->name = $name;
|
79 |
-
return $this;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Sets the mock function.
|
84 |
-
*
|
85 |
-
* Use this method if you want to set the mocked behaviour with
|
86 |
-
* a callable. Alternatively, you can use {@link setFunctionProvider()}
|
87 |
-
* to set it with a {@link FunctionProvider}.
|
88 |
-
*
|
89 |
-
* @param callable $function The mock function.
|
90 |
-
* @return MockBuilder
|
91 |
-
* @see setFunctionProvider()
|
92 |
-
*/
|
93 |
-
public function setFunction(callable $function)
|
94 |
-
{
|
95 |
-
$this->function = $function;
|
96 |
-
return $this;
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Sets the mock function.
|
101 |
-
*
|
102 |
-
* Use this method if you want to set the mocked behaviour with
|
103 |
-
* a {@link FunctionProvider}. Alternatively, you can use
|
104 |
-
* {@link setFunction()} to set it with a callable.
|
105 |
-
*
|
106 |
-
* @param FunctionProvider $provider The mock function provider.
|
107 |
-
* @return MockBuilder
|
108 |
-
* @see setFunction()
|
109 |
-
*/
|
110 |
-
public function setFunctionProvider(FunctionProvider $provider)
|
111 |
-
{
|
112 |
-
return $this->setFunction($provider->getCallable());
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Builds a mock.
|
117 |
-
*
|
118 |
-
* @return Mock The mock.
|
119 |
-
*/
|
120 |
-
public function build()
|
121 |
-
{
|
122 |
-
return new Mock($this->namespace, $this->name, $this->function);
|
123 |
-
}
|
124 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/MockEnabledException.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Exception when enabling a mock for an already mocked function.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
* @see Mock::enable()
|
12 |
-
*/
|
13 |
-
class MockEnabledException extends \Exception
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Sets the message.
|
18 |
-
*
|
19 |
-
* @param string $message Exception message.
|
20 |
-
*/
|
21 |
-
public function __construct($message)
|
22 |
-
{
|
23 |
-
parent::__construct($message);
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/MockRegistry.php
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Enabled mock registry.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
* @see MockBuilder
|
12 |
-
* @internal
|
13 |
-
*/
|
14 |
-
class MockRegistry
|
15 |
-
{
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var Mock[] Enabled mocks.
|
19 |
-
*/
|
20 |
-
private $mocks = [];
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @var MockRegistry Singleton.
|
24 |
-
*/
|
25 |
-
private static $instance;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Returns the singleton.
|
29 |
-
*
|
30 |
-
* @return MockRegistry The singleton.
|
31 |
-
*/
|
32 |
-
public static function getInstance()
|
33 |
-
{
|
34 |
-
if (empty(self::$instance)) {
|
35 |
-
self::$instance = new self();
|
36 |
-
}
|
37 |
-
return self::$instance;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Returns true if the mock is already registered.
|
42 |
-
*
|
43 |
-
* @param Mock $mock The mock.
|
44 |
-
* @return bool True if the mock is registered.
|
45 |
-
*/
|
46 |
-
public function isRegistered(Mock $mock)
|
47 |
-
{
|
48 |
-
return isset($this->mocks[$mock->getFQFN()]);
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Returns the registered mock.
|
53 |
-
*
|
54 |
-
* @param string $fqfn The fully qualified function name.
|
55 |
-
* @return Mock The registered Mock.
|
56 |
-
* @see Mock::getFQFN()
|
57 |
-
*/
|
58 |
-
public function getMock($fqfn)
|
59 |
-
{
|
60 |
-
if (! isset($this->mocks[$fqfn])) {
|
61 |
-
return null;
|
62 |
-
}
|
63 |
-
return $this->mocks[$fqfn];
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Registers a mock.
|
68 |
-
*
|
69 |
-
* @param Mock $mock The mock.
|
70 |
-
*/
|
71 |
-
public function register(Mock $mock)
|
72 |
-
{
|
73 |
-
$this->mocks[$mock->getFQFN()] = $mock;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Unregisters all mocks.
|
78 |
-
*/
|
79 |
-
public function unregisterAll()
|
80 |
-
{
|
81 |
-
$this->mocks = [];
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Unregisters a mock.
|
86 |
-
*
|
87 |
-
* @param Mock $mock The mock.
|
88 |
-
*/
|
89 |
-
public function unregister(Mock $mock)
|
90 |
-
{
|
91 |
-
unset($this->mocks[$mock->getFQFN()]);
|
92 |
-
}
|
93 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/environment/MockEnvironment.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\environment;
|
4 |
-
|
5 |
-
use phpmock\Deactivatable;
|
6 |
-
use phpmock\Mock;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Container for several mocks.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
*/
|
15 |
-
class MockEnvironment implements Deactivatable
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @var Mock[] Mock environment.
|
20 |
-
*/
|
21 |
-
private $mocks = [];
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Sets the mocks for this environment.
|
25 |
-
*
|
26 |
-
* @param Mock[] $mocks The mocks for this environment.
|
27 |
-
*/
|
28 |
-
public function __construct(array $mocks = [])
|
29 |
-
{
|
30 |
-
$this->mocks = $mocks;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Adds a mock to this environment.
|
35 |
-
*
|
36 |
-
* @param Mock $mock Mock.
|
37 |
-
*/
|
38 |
-
public function addMock(Mock $mock)
|
39 |
-
{
|
40 |
-
$this->mocks[] = $mock;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Enable all mocks in this environment.
|
45 |
-
*/
|
46 |
-
public function enable()
|
47 |
-
{
|
48 |
-
foreach ($this->mocks as $mock) {
|
49 |
-
$mock->enable();
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Define all mocks in this environment.
|
55 |
-
*
|
56 |
-
* @see phpmock\Mock::define()
|
57 |
-
*/
|
58 |
-
public function define()
|
59 |
-
{
|
60 |
-
foreach ($this->mocks as $mock) {
|
61 |
-
$mock->define();
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Disable all mocks in this environment.
|
67 |
-
*/
|
68 |
-
public function disable()
|
69 |
-
{
|
70 |
-
foreach ($this->mocks as $mock) {
|
71 |
-
$mock->disable();
|
72 |
-
}
|
73 |
-
}
|
74 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/environment/SleepEnvironmentBuilder.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\environment;
|
4 |
-
|
5 |
-
use phpmock\MockBuilder;
|
6 |
-
use phpmock\functions\FixedDateFunction;
|
7 |
-
use phpmock\functions\FixedMicrotimeFunction;
|
8 |
-
use phpmock\functions\SleepFunction;
|
9 |
-
use phpmock\functions\UsleepFunction;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Builds a sleep(), usleep(), date(), time() and microtime() mock environment.
|
13 |
-
*
|
14 |
-
* In this environment sleep() and usleep() don't sleep for real. Instead
|
15 |
-
* they return immediatly and increase the amount of time in the mocks for
|
16 |
-
* date(), time() and microtime().
|
17 |
-
*
|
18 |
-
* Example:
|
19 |
-
* <code>
|
20 |
-
* namespace foo;
|
21 |
-
*
|
22 |
-
* use phpmock\environment\SleepEnvironmentBuilder;
|
23 |
-
*
|
24 |
-
* $builder = new SleepEnvironmentBuilder();
|
25 |
-
* $builder->addNamespace(__NAMESPACE__)
|
26 |
-
* ->setTimestamp(1417011228);
|
27 |
-
*
|
28 |
-
* $environment = $builder->build();
|
29 |
-
* $environment->enable();
|
30 |
-
*
|
31 |
-
* // This won't delay the test for 10 seconds, but increase time().
|
32 |
-
* sleep(10);
|
33 |
-
* assert(1417011228 + 10 == time());
|
34 |
-
*
|
35 |
-
* // Now revert the effect so that sleep() and time() are not mocked anymore.
|
36 |
-
* $environment->disable();
|
37 |
-
* </code>
|
38 |
-
*
|
39 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
40 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
41 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
42 |
-
*/
|
43 |
-
class SleepEnvironmentBuilder
|
44 |
-
{
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @var array The namespaces for the mock environment.
|
48 |
-
*/
|
49 |
-
private $namespaces;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @var mixed the timestamp.
|
53 |
-
*/
|
54 |
-
private $timestamp;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Add a namespace for the mock environment.
|
58 |
-
*
|
59 |
-
* @param string $namespace A namespace for the mock environment.
|
60 |
-
* @return SleepEnvironmentBuilder
|
61 |
-
*/
|
62 |
-
public function addNamespace($namespace)
|
63 |
-
{
|
64 |
-
$this->namespaces[] = $namespace;
|
65 |
-
return $this;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Sets the mocked timestamp.
|
70 |
-
*
|
71 |
-
* If not set the mock will use the current time at creation time.
|
72 |
-
* The timestamp can be an int, a float with microseconds or a string
|
73 |
-
* in the microtime() format.
|
74 |
-
*
|
75 |
-
* @param mixed $timestamp The timestamp.
|
76 |
-
* @return SleepEnvironmentBuilder
|
77 |
-
*/
|
78 |
-
public function setTimestamp($timestamp)
|
79 |
-
{
|
80 |
-
$this->timestamp = $timestamp;
|
81 |
-
return $this;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Builds a sleep(), usleep(), date(), time() and microtime() mock environment.
|
86 |
-
*
|
87 |
-
* @return MockEnvironment
|
88 |
-
*/
|
89 |
-
public function build()
|
90 |
-
{
|
91 |
-
$environment = new MockEnvironment();
|
92 |
-
$builder = new MockBuilder();
|
93 |
-
|
94 |
-
$incrementables = [];
|
95 |
-
foreach ($this->namespaces as $namespace) {
|
96 |
-
$builder->setNamespace($namespace);
|
97 |
-
|
98 |
-
// microtime() mock
|
99 |
-
$microtime = new FixedMicrotimeFunction($this->timestamp);
|
100 |
-
$builder->setName("microtime")
|
101 |
-
->setFunctionProvider($microtime);
|
102 |
-
$environment->addMock($builder->build());
|
103 |
-
|
104 |
-
// time() mock
|
105 |
-
$builder->setName("time")
|
106 |
-
->setFunction([$microtime, "getTime"]);
|
107 |
-
$environment->addMock($builder->build());
|
108 |
-
|
109 |
-
// date() mock
|
110 |
-
$date = new FixedDateFunction($this->timestamp);
|
111 |
-
$builder->setName("date")
|
112 |
-
->setFunctionProvider($date);
|
113 |
-
$environment->addMock($builder->build());
|
114 |
-
|
115 |
-
$incrementables[] = $microtime;
|
116 |
-
$incrementables[] = $date;
|
117 |
-
}
|
118 |
-
|
119 |
-
// Need a complete list of $incrementables.
|
120 |
-
foreach ($this->namespaces as $namespace) {
|
121 |
-
$builder->setNamespace($namespace);
|
122 |
-
// sleep() mock
|
123 |
-
$builder->setName("sleep")
|
124 |
-
->setFunctionProvider(new SleepFunction($incrementables));
|
125 |
-
$environment->addMock($builder->build());
|
126 |
-
|
127 |
-
// usleep() mock
|
128 |
-
$builder->setName("usleep")
|
129 |
-
->setFunctionProvider(new UsleepFunction($incrementables));
|
130 |
-
$environment->addMock($builder->build());
|
131 |
-
}
|
132 |
-
|
133 |
-
return $environment;
|
134 |
-
}
|
135 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/AbstractSleepFunction.php
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Abstract class for sleep() and usleep() functions.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
*/
|
12 |
-
abstract class AbstractSleepFunction implements FunctionProvider
|
13 |
-
{
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var Incrementable[] Observing Incrementables.
|
17 |
-
*/
|
18 |
-
private $incrementables = [];
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Sets the Incrementable objects.
|
22 |
-
*
|
23 |
-
* @param Incrementable[] $incrementables Observing Incrementables.
|
24 |
-
* @see addIncrementable()
|
25 |
-
*/
|
26 |
-
public function __construct(array $incrementables = [])
|
27 |
-
{
|
28 |
-
$this->incrementables = $incrementables;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Returns the sleep() mock function.
|
33 |
-
*
|
34 |
-
* A call will increase all registered Increment objects.
|
35 |
-
*
|
36 |
-
* @return callable The callable for this object.
|
37 |
-
*/
|
38 |
-
public function getCallable()
|
39 |
-
{
|
40 |
-
return function ($amount) {
|
41 |
-
foreach ($this->incrementables as $incrementable) {
|
42 |
-
$incrementable->increment($this->convertToSeconds($amount));
|
43 |
-
}
|
44 |
-
};
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Converts the sleep() parameter into seconds.
|
49 |
-
*
|
50 |
-
* @param int $amount Amount of time units.
|
51 |
-
* @return mixed Seconds.
|
52 |
-
* @internal
|
53 |
-
*/
|
54 |
-
abstract protected function convertToSeconds($amount);
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Adds an Incrementable object.
|
58 |
-
*
|
59 |
-
* These objects are observing this function and get notified by
|
60 |
-
* increasing the amount of passed time. Incrementables are used
|
61 |
-
* for time() and microtime() mocks.
|
62 |
-
*
|
63 |
-
* @param Incrementable $incrementable Observing Incrementable.
|
64 |
-
*/
|
65 |
-
public function addIncrementable(Incrementable $incrementable)
|
66 |
-
{
|
67 |
-
$this->incrementables[] = $incrementable;
|
68 |
-
}
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/FixedDateFunction.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Mock function for date() which returns always the same time.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
*/
|
14 |
-
class FixedDateFunction implements FunctionProvider, Incrementable
|
15 |
-
{
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var int the timestamp.
|
19 |
-
*/
|
20 |
-
private $timestamp;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Set the timestamp.
|
24 |
-
*
|
25 |
-
* @param int $timestamp The timestamp, if ommited the current time.
|
26 |
-
*/
|
27 |
-
public function __construct($timestamp = null)
|
28 |
-
{
|
29 |
-
if (is_null($timestamp)) {
|
30 |
-
$timestamp = \time();
|
31 |
-
}
|
32 |
-
if (!is_numeric($timestamp)) {
|
33 |
-
throw new InvalidArgumentException('Timestamp should be numeric');
|
34 |
-
}
|
35 |
-
$this->timestamp = $timestamp;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Returns the mocked date() function.
|
40 |
-
*
|
41 |
-
* @return callable The callable for this object.
|
42 |
-
*/
|
43 |
-
public function getCallable()
|
44 |
-
{
|
45 |
-
return function ($format, $timestamp = null) {
|
46 |
-
if (is_null($timestamp)) {
|
47 |
-
$timestamp = $this->timestamp;
|
48 |
-
}
|
49 |
-
return \date($format, $timestamp);
|
50 |
-
};
|
51 |
-
}
|
52 |
-
|
53 |
-
public function increment($increment)
|
54 |
-
{
|
55 |
-
$this->timestamp += $increment;
|
56 |
-
}
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/FixedMicrotimeFunction.php
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Mock function for microtime which returns always the same time.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
*/
|
14 |
-
class FixedMicrotimeFunction implements FunctionProvider, Incrementable
|
15 |
-
{
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var string the timestamp in PHP's microtime() string format.
|
19 |
-
*/
|
20 |
-
private $timestamp;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Set the timestamp.
|
24 |
-
*
|
25 |
-
* @param mixed $timestamp The timestamp, if ommited the current time.
|
26 |
-
*
|
27 |
-
* @SuppressWarnings(PHPMD)
|
28 |
-
*/
|
29 |
-
public function __construct($timestamp = null)
|
30 |
-
{
|
31 |
-
if (is_null($timestamp)) {
|
32 |
-
$this->setMicrotime(\microtime());
|
33 |
-
} elseif (is_string($timestamp)) {
|
34 |
-
$this->setMicrotime($timestamp);
|
35 |
-
} elseif (is_numeric($timestamp)) {
|
36 |
-
$this->setMicrotimeAsFloat($timestamp);
|
37 |
-
} else {
|
38 |
-
throw new InvalidArgumentException(
|
39 |
-
"Timestamp parameter is invalid type."
|
40 |
-
);
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Returns this object as a callable for the mock function.
|
46 |
-
*
|
47 |
-
* @return callable The callable for this object.
|
48 |
-
*/
|
49 |
-
public function getCallable()
|
50 |
-
{
|
51 |
-
return [$this, "getMicrotime"];
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Set the timestamp as string.
|
56 |
-
*
|
57 |
-
* @param string $timestamp The timestamp as string.
|
58 |
-
*/
|
59 |
-
public function setMicrotime($timestamp)
|
60 |
-
{
|
61 |
-
if (empty($timestamp)) {
|
62 |
-
throw new InvalidArgumentException('Timestamp should not be empty');
|
63 |
-
}
|
64 |
-
$this->timestamp = $timestamp;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Set the timestamp as float.
|
69 |
-
*
|
70 |
-
* @param float $timestamp The timestamp as float.
|
71 |
-
*/
|
72 |
-
public function setMicrotimeAsFloat($timestamp)
|
73 |
-
{
|
74 |
-
if (!is_numeric($timestamp)) {
|
75 |
-
throw new InvalidArgumentException('Timestamp should be numeric');
|
76 |
-
}
|
77 |
-
$converter = new MicrotimeConverter();
|
78 |
-
$this->timestamp = $converter->convertFloatToString($timestamp);
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Returns the microtime.
|
83 |
-
*
|
84 |
-
* @param bool $get_as_float If true returns timestamp as float, else string
|
85 |
-
* @return mixed The value.
|
86 |
-
* @SuppressWarnings(PHPMD)
|
87 |
-
*/
|
88 |
-
public function getMicrotime($get_as_float = false)
|
89 |
-
{
|
90 |
-
if ($get_as_float) {
|
91 |
-
$converter = new MicrotimeConverter();
|
92 |
-
return $converter->convertStringToFloat($this->timestamp);
|
93 |
-
} else {
|
94 |
-
return $this->timestamp;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Returns the time without the microseconds.
|
100 |
-
*
|
101 |
-
* @return int The time.
|
102 |
-
*/
|
103 |
-
public function getTime()
|
104 |
-
{
|
105 |
-
return (int) $this->getMicrotime(true);
|
106 |
-
}
|
107 |
-
|
108 |
-
public function increment($increment)
|
109 |
-
{
|
110 |
-
$this->setMicrotimeAsFloat($this->getMicrotime(true) + $increment);
|
111 |
-
}
|
112 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/FixedValueFunction.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Mock function which returns always the same value.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
*/
|
12 |
-
class FixedValueFunction implements FunctionProvider, Incrementable
|
13 |
-
{
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var mixed The fixed value for the function.
|
17 |
-
*/
|
18 |
-
private $value;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Set the value.
|
22 |
-
*
|
23 |
-
* @param mixed $value The value.
|
24 |
-
*/
|
25 |
-
public function __construct($value = null)
|
26 |
-
{
|
27 |
-
$this->setValue($value);
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Returns this object as a callable for the mock function.
|
32 |
-
*
|
33 |
-
* @return callable The callable for this object.
|
34 |
-
*/
|
35 |
-
public function getCallable()
|
36 |
-
{
|
37 |
-
return function () {
|
38 |
-
return $this->value;
|
39 |
-
};
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Set the value.
|
44 |
-
*
|
45 |
-
* @param mixed $value The value.
|
46 |
-
*/
|
47 |
-
public function setValue($value)
|
48 |
-
{
|
49 |
-
$this->value = $value;
|
50 |
-
}
|
51 |
-
|
52 |
-
public function increment($increment)
|
53 |
-
{
|
54 |
-
$this->value += $increment;
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/FunctionProvider.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Provides a callable for a mock function.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
* @see phpmock\MockBuilder::setFunctionProvider()
|
12 |
-
*/
|
13 |
-
interface FunctionProvider
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Returns this object as a callable for the mock function.
|
18 |
-
*
|
19 |
-
* @return callable The callable for this object.
|
20 |
-
*/
|
21 |
-
public function getCallable();
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/Incrementable.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Incrementable allows incrementing a value.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
*/
|
12 |
-
interface Incrementable
|
13 |
-
{
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Increments a value.
|
17 |
-
*
|
18 |
-
* @param mixed $increment The amount of increase.
|
19 |
-
* @internal
|
20 |
-
*/
|
21 |
-
public function increment($increment);
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/MicrotimeConverter.php
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Converts PHP's microtime string format into a float and vice versa.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
* @internal
|
12 |
-
*/
|
13 |
-
class MicrotimeConverter
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Converts a string microtime into a float.
|
18 |
-
*
|
19 |
-
* @param string $microtime The microtime.
|
20 |
-
* @return float The microtime as float.
|
21 |
-
*/
|
22 |
-
public function convertStringToFloat($microtime)
|
23 |
-
{
|
24 |
-
/*
|
25 |
-
* This is from the manual:
|
26 |
-
* http://php.net/manual/en/function.microtime.php
|
27 |
-
*/
|
28 |
-
// list($usec, $sec) = explode(" ", $microtime);
|
29 |
-
|
30 |
-
// This seems to be more intuitive as an inverse function.
|
31 |
-
list($usec, $sec) = sscanf($microtime, "%f %d");
|
32 |
-
|
33 |
-
return ((float)$usec + (float)$sec);
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Converts a float microtime in PHP's microtime() string format.
|
38 |
-
*
|
39 |
-
* @param float $microtime The microtime.
|
40 |
-
* @return string The microtime as string.
|
41 |
-
*/
|
42 |
-
public function convertFloatToString($microtime)
|
43 |
-
{
|
44 |
-
return sprintf("%0.8F %d", fmod($microtime, 1), $microtime);
|
45 |
-
}
|
46 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/SleepFunction.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Mock function for sleep().
|
7 |
-
*
|
8 |
-
* This function doesn't sleep. It returns immediatly. All registered
|
9 |
-
* Incrementable objects (time() or microtime() mocks) get increased by the
|
10 |
-
* passed seconds.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
*/
|
16 |
-
class SleepFunction extends AbstractSleepFunction
|
17 |
-
{
|
18 |
-
|
19 |
-
protected function convertToSeconds($amount)
|
20 |
-
{
|
21 |
-
return $amount;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/functions/UsleepFunction.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Mock function for usleep().
|
7 |
-
*
|
8 |
-
* This function doesn't sleep. It returns immediatly. All registered
|
9 |
-
* Incrementable objects (time() or microtime() mocks) get increased by the
|
10 |
-
* passed seconds.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
*/
|
16 |
-
class UsleepFunction extends AbstractSleepFunction
|
17 |
-
{
|
18 |
-
|
19 |
-
protected function convertToSeconds($amount)
|
20 |
-
{
|
21 |
-
return $amount / 1000000;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/generator/MockFunctionGenerator.php
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\generator;
|
4 |
-
|
5 |
-
use phpmock\Mock;
|
6 |
-
use phpmock\MockRegistry;
|
7 |
-
use SebastianBergmann\Template\Template;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Generates the mock function.
|
11 |
-
*
|
12 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
13 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
14 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
15 |
-
* @internal
|
16 |
-
*/
|
17 |
-
class MockFunctionGenerator
|
18 |
-
{
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var string The internal name for optional parameters.
|
22 |
-
*/
|
23 |
-
const DEFAULT_ARGUMENT = "optionalParameter";
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @var Mock The mock.
|
27 |
-
*/
|
28 |
-
private $mock;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @var Template The function template.
|
32 |
-
*/
|
33 |
-
private $template;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Sets the mock.
|
37 |
-
*
|
38 |
-
* @param Mock $mock The mock.
|
39 |
-
*/
|
40 |
-
public function __construct(Mock $mock)
|
41 |
-
{
|
42 |
-
$this->mock = $mock;
|
43 |
-
$this->template = new Template(__DIR__ . '/function.tpl');
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Defines the mock function.
|
48 |
-
*
|
49 |
-
* @SuppressWarnings(PHPMD)
|
50 |
-
*/
|
51 |
-
public function defineFunction()
|
52 |
-
{
|
53 |
-
$name = $this->mock->getName();
|
54 |
-
|
55 |
-
$parameterBuilder = new ParameterBuilder();
|
56 |
-
$parameterBuilder->build($name);
|
57 |
-
|
58 |
-
$data = [
|
59 |
-
"namespace" => $this->mock->getNamespace(),
|
60 |
-
"name" => $name,
|
61 |
-
"fqfn" => $this->mock->getFQFN(),
|
62 |
-
"signatureParameters" => $parameterBuilder->getSignatureParameters(),
|
63 |
-
"bodyParameters" => $parameterBuilder->getBodyParameters(),
|
64 |
-
];
|
65 |
-
$this->template->setVar($data, false);
|
66 |
-
$definition = $this->template->render();
|
67 |
-
|
68 |
-
eval($definition);
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Removes optional arguments.
|
73 |
-
*
|
74 |
-
* @param array $arguments The arguments.
|
75 |
-
*/
|
76 |
-
public static function removeDefaultArguments(&$arguments)
|
77 |
-
{
|
78 |
-
foreach ($arguments as $key => $argument) {
|
79 |
-
if ($argument === self::DEFAULT_ARGUMENT) {
|
80 |
-
unset($arguments[$key]);
|
81 |
-
}
|
82 |
-
}
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Calls the enabled mock, or the built-in function otherwise.
|
87 |
-
*
|
88 |
-
* @param string $functionName The function name.
|
89 |
-
* @param string $fqfn The fully qualified function name.
|
90 |
-
* @param array $arguments The arguments.
|
91 |
-
*
|
92 |
-
* @return mixed The result of the called function.
|
93 |
-
* @see Mock::define()
|
94 |
-
* @SuppressWarnings(PHPMD)
|
95 |
-
*/
|
96 |
-
public static function call($functionName, $fqfn, &$arguments)
|
97 |
-
{
|
98 |
-
$registry = MockRegistry::getInstance();
|
99 |
-
$mock = $registry->getMock($fqfn);
|
100 |
-
|
101 |
-
self::removeDefaultArguments($arguments);
|
102 |
-
|
103 |
-
if (empty($mock)) {
|
104 |
-
// call the built-in function if the mock was not enabled.
|
105 |
-
return call_user_func_array($functionName, $arguments);
|
106 |
-
} else {
|
107 |
-
// call the mock function.
|
108 |
-
return $mock->call($arguments);
|
109 |
-
}
|
110 |
-
}
|
111 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/generator/ParameterBuilder.php
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\generator;
|
4 |
-
|
5 |
-
use ReflectionFunction;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Builder for the mocked function parameters.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @internal
|
14 |
-
*/
|
15 |
-
class ParameterBuilder
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @var string The signature's parameters.
|
20 |
-
*/
|
21 |
-
private $signatureParameters;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var string The body's parameter access list.
|
25 |
-
*/
|
26 |
-
private $bodyParameters;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Builds the parameters for an existing function.
|
30 |
-
*
|
31 |
-
* @param string $functionName The function name.
|
32 |
-
*/
|
33 |
-
public function build($functionName)
|
34 |
-
{
|
35 |
-
if (!function_exists($functionName)) {
|
36 |
-
return;
|
37 |
-
}
|
38 |
-
$function = new ReflectionFunction($functionName);
|
39 |
-
$signatureParameters = [];
|
40 |
-
$bodyParameters = [];
|
41 |
-
foreach ($function->getParameters() as $reflectionParameter) {
|
42 |
-
if ($this->isVariadic($reflectionParameter)) {
|
43 |
-
break;
|
44 |
-
}
|
45 |
-
$parameter = $reflectionParameter->isPassedByReference()
|
46 |
-
? "&$$reflectionParameter->name"
|
47 |
-
: "$$reflectionParameter->name";
|
48 |
-
|
49 |
-
$signatureParameter = $reflectionParameter->isOptional()
|
50 |
-
? sprintf("%s = '%s'", $parameter, MockFunctionGenerator::DEFAULT_ARGUMENT)
|
51 |
-
: $parameter;
|
52 |
-
|
53 |
-
$signatureParameters[] = $signatureParameter;
|
54 |
-
$bodyParameters[] = $parameter;
|
55 |
-
}
|
56 |
-
$this->signatureParameters = implode(", ", $signatureParameters);
|
57 |
-
$this->bodyParameters = implode(", ", $bodyParameters);
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Returns whether a parameter is variadic.
|
62 |
-
*
|
63 |
-
* @param \ReflectionParameter $parameter The parameter.
|
64 |
-
*
|
65 |
-
* @return boolean True, if the parameter is variadic.
|
66 |
-
*/
|
67 |
-
private function isVariadic(\ReflectionParameter $parameter)
|
68 |
-
{
|
69 |
-
if ($parameter->name == "...") {
|
70 |
-
// This is a variadic C-implementation before PHP-5.6.
|
71 |
-
return true;
|
72 |
-
}
|
73 |
-
if (method_exists($parameter, "isVariadic")) {
|
74 |
-
return $parameter->isVariadic();
|
75 |
-
}
|
76 |
-
return false;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Returns the signature's parameters.
|
81 |
-
*
|
82 |
-
* @return string The signature's parameters.
|
83 |
-
*/
|
84 |
-
public function getSignatureParameters()
|
85 |
-
{
|
86 |
-
return $this->signatureParameters;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Returns the body's parameter access list.
|
91 |
-
*
|
92 |
-
* @return string The body's parameter list.
|
93 |
-
*/
|
94 |
-
public function getBodyParameters()
|
95 |
-
{
|
96 |
-
return $this->bodyParameters;
|
97 |
-
}
|
98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/generator/function.tpl
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
namespace {namespace};
|
2 |
-
|
3 |
-
use phpmock\generator\MockFunctionGenerator;
|
4 |
-
|
5 |
-
function {name}({signatureParameters})
|
6 |
-
{
|
7 |
-
$arguments = [{bodyParameters}];
|
8 |
-
|
9 |
-
$variadics = \array_slice(\func_get_args(), \count($arguments));
|
10 |
-
$arguments = \array_merge($arguments, $variadics);
|
11 |
-
|
12 |
-
return MockFunctionGenerator::call(
|
13 |
-
'{name}',
|
14 |
-
'{fqfn}',
|
15 |
-
$arguments
|
16 |
-
);
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/spy/Invocation.php
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\spy;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* A function call with its arguments and result.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
*/
|
12 |
-
class Invocation
|
13 |
-
{
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var mixed The function call's return value.
|
17 |
-
*/
|
18 |
-
private $return;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var array The function call's arguments.
|
22 |
-
*/
|
23 |
-
private $arguments;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @var \Exception|null The exception thrown by the function.
|
27 |
-
*/
|
28 |
-
private $exception;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Sets the arguments and return value
|
32 |
-
*
|
33 |
-
* @param array $arguments Function's arguments
|
34 |
-
* @param mixed $return Function's return value
|
35 |
-
* @param \Exception $exception The exception thrown by the function
|
36 |
-
*
|
37 |
-
* @internal
|
38 |
-
*/
|
39 |
-
public function __construct(array $arguments, $return, \Exception $exception = null)
|
40 |
-
{
|
41 |
-
$this->arguments = $arguments;
|
42 |
-
$this->return = $return;
|
43 |
-
$this->exception = $exception;
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Returns the arguments of a function call.
|
48 |
-
*
|
49 |
-
* @return array The arguments.
|
50 |
-
*/
|
51 |
-
public function getArguments()
|
52 |
-
{
|
53 |
-
return $this->arguments;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Returns the return value of a function call.
|
58 |
-
*
|
59 |
-
* @return mixed The return value.
|
60 |
-
*/
|
61 |
-
public function getReturn()
|
62 |
-
{
|
63 |
-
return $this->return;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Returns if the spied function threw an exception.
|
68 |
-
*
|
69 |
-
* @return bool TRUE if an exception was thrown.
|
70 |
-
*/
|
71 |
-
public function isExceptionThrown()
|
72 |
-
{
|
73 |
-
return !is_null($this->exception);
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Return the exception which was thrown by the spied function.
|
78 |
-
*
|
79 |
-
* @return \Exception|null function's exception or null if none was thrown
|
80 |
-
*/
|
81 |
-
public function getException()
|
82 |
-
{
|
83 |
-
return $this->exception;
|
84 |
-
}
|
85 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/classes/spy/Spy.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\spy;
|
4 |
-
|
5 |
-
use phpmock\Mock;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* A spy records the arguments and results of function calls.
|
9 |
-
*
|
10 |
-
* If you create a Spy without a mock function, it will use the existing
|
11 |
-
* function.
|
12 |
-
*
|
13 |
-
* Example:
|
14 |
-
* <code>
|
15 |
-
* namespace foo;
|
16 |
-
*
|
17 |
-
* use phpmock\spy\Spy;
|
18 |
-
*
|
19 |
-
* function bar($min, $max) {
|
20 |
-
* return rand($min, $max) + 3;
|
21 |
-
* }
|
22 |
-
*
|
23 |
-
* $spy = new Spy(__NAMESPACE__, "rand");
|
24 |
-
* $spy->enable();
|
25 |
-
*
|
26 |
-
* $result = bar(1, 2);
|
27 |
-
*
|
28 |
-
* assert ([1, 2] == $spy->getInvocations()[0]->getArguments());
|
29 |
-
* assert ($result == $spy->getInvocations()[0]->getReturn() + 3);
|
30 |
-
* </code>
|
31 |
-
*
|
32 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
33 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
34 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
35 |
-
*/
|
36 |
-
class Spy extends Mock
|
37 |
-
{
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @var Invocation[] The recorded calls.
|
41 |
-
*/
|
42 |
-
private $invocations = [];
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Initializes the spy.
|
46 |
-
*
|
47 |
-
* If no function is specified it will use the existing function.
|
48 |
-
*
|
49 |
-
* @param string $namespace The namespace for the mock function.
|
50 |
-
* @param string $name The function name of the mocked function.
|
51 |
-
* @param callable|null $function The mock function, or null for using the existing function.
|
52 |
-
*/
|
53 |
-
public function __construct($namespace, $name, callable $function = null)
|
54 |
-
{
|
55 |
-
parent::__construct($namespace, $name, $function ?: $name);
|
56 |
-
}
|
57 |
-
|
58 |
-
public function call(array $arguments)
|
59 |
-
{
|
60 |
-
$return = null;
|
61 |
-
$exception = null;
|
62 |
-
try {
|
63 |
-
$return = parent::call($arguments);
|
64 |
-
return $return;
|
65 |
-
} catch (\Exception $e) {
|
66 |
-
$exception = $e;
|
67 |
-
throw $e;
|
68 |
-
} finally {
|
69 |
-
$this->invocations[] = new Invocation($arguments, $return, $exception);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Returns the recorded function calls and its arguments.
|
75 |
-
*
|
76 |
-
* @return Invocation[] The recorded function arguments.
|
77 |
-
*/
|
78 |
-
public function getInvocations()
|
79 |
-
{
|
80 |
-
return $this->invocations;
|
81 |
-
}
|
82 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/composer.json
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "php-mock/php-mock",
|
3 |
-
"type": "library",
|
4 |
-
"description": "PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.",
|
5 |
-
"keywords": ["mock", "stub", "test double", "function", "test", "TDD", "BDD"],
|
6 |
-
"homepage": "https://github.com/php-mock/php-mock",
|
7 |
-
"license": "WTFPL",
|
8 |
-
"authors": [
|
9 |
-
{
|
10 |
-
"name": "Markus Malkusch",
|
11 |
-
"email": "markus@malkusch.de",
|
12 |
-
"homepage": "http://markus.malkusch.de",
|
13 |
-
"role": "Developer"
|
14 |
-
}
|
15 |
-
],
|
16 |
-
"autoload": {
|
17 |
-
"files": ["autoload.php"],
|
18 |
-
"psr-4": {
|
19 |
-
"phpmock\\": ["classes/", "tests/"]
|
20 |
-
}
|
21 |
-
},
|
22 |
-
"autoload-dev": {
|
23 |
-
"files": ["tests/autoload.php"]
|
24 |
-
},
|
25 |
-
"require": {
|
26 |
-
"php": "^5.6 || ^7.0 || ^8.0",
|
27 |
-
"phpunit/php-text-template": "^1 || ^2"
|
28 |
-
},
|
29 |
-
"require-dev": {
|
30 |
-
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.0 || ^9.0",
|
31 |
-
"squizlabs/php_codesniffer": "^3.5"
|
32 |
-
},
|
33 |
-
"replace": {
|
34 |
-
"malkusch/php-mock": "*"
|
35 |
-
},
|
36 |
-
"suggest": {
|
37 |
-
"php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock."
|
38 |
-
},
|
39 |
-
"archive": {
|
40 |
-
"exclude": ["/tests"]
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/AbstractMockTest.php
DELETED
@@ -1,350 +0,0 @@
|
|
1 |
-
<?php // phpcs:ignore PSR1.Files.SideEffects.FoundWithSymbols
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
// When class is used in related repositories we need to add autoloader for PHPUnit 8 compatibility
|
8 |
-
if (!trait_exists(TestCaseTrait::class)) {
|
9 |
-
require __DIR__ . '/../tests/autoload.php';
|
10 |
-
}
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Common tests for mocks.
|
14 |
-
*
|
15 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
16 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
17 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
18 |
-
* @see Mock
|
19 |
-
*/
|
20 |
-
abstract class AbstractMockTest extends TestCase
|
21 |
-
{
|
22 |
-
use TestCaseTrait;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Disable all mocks.
|
26 |
-
*/
|
27 |
-
abstract protected function disableMocks();
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Builds an enabled function mock.
|
31 |
-
*
|
32 |
-
* @param string $namespace The namespace.
|
33 |
-
* @param string $functionName The function name.
|
34 |
-
* @param callable $function The function mock.
|
35 |
-
*/
|
36 |
-
abstract protected function mockFunction($namespace, $functionName, callable $function);
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Defines the function mock.
|
40 |
-
*
|
41 |
-
* @param string $namespace The namespace.
|
42 |
-
* @param string $functionName The function name.
|
43 |
-
*/
|
44 |
-
abstract protected function defineFunction($namespace, $functionName);
|
45 |
-
|
46 |
-
protected function tearDownCompat()
|
47 |
-
{
|
48 |
-
parent::tearDown();
|
49 |
-
|
50 |
-
$this->disableMocks();
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Tests mocking a function without parameters.
|
55 |
-
*
|
56 |
-
* @test
|
57 |
-
*/
|
58 |
-
public function testMockFunctionWithoutParameters()
|
59 |
-
{
|
60 |
-
$this->mockFunction(__NAMESPACE__, "getmyuid", function () {
|
61 |
-
return 1234;
|
62 |
-
});
|
63 |
-
$this->assertEquals(1234, getmyuid());
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Tests mocking a previously mocked function again.
|
68 |
-
*
|
69 |
-
* @test
|
70 |
-
* @depends testMockFunctionWithoutParameters
|
71 |
-
*/
|
72 |
-
public function testRedefine()
|
73 |
-
{
|
74 |
-
$this->mockFunction(__NAMESPACE__, "getmyuid", function () {
|
75 |
-
return 5;
|
76 |
-
});
|
77 |
-
$this->assertEquals(5, getmyuid());
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Tests mocking a function without parameters.
|
82 |
-
*
|
83 |
-
* @test
|
84 |
-
*/
|
85 |
-
public function testMockFunctionWithParameters()
|
86 |
-
{
|
87 |
-
$this->mockFunction(__NAMESPACE__, "rand", function ($min, $max) {
|
88 |
-
return $max;
|
89 |
-
});
|
90 |
-
$this->assertEquals(1234, rand(1, 1234));
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Tests mocking of an undefined function.
|
95 |
-
*
|
96 |
-
* @test
|
97 |
-
*/
|
98 |
-
public function testUndefinedFunction()
|
99 |
-
{
|
100 |
-
$this->assertFalse(function_exists("testUndefinedFunction"));
|
101 |
-
$this->mockFunction(__NAMESPACE__, "testUndefinedFunction", function ($arg) {
|
102 |
-
return $arg + 1;
|
103 |
-
});
|
104 |
-
$result = testUndefinedFunction(1);
|
105 |
-
$this->assertEquals(2, $result);
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Tests failing enabling an already enabled mock.
|
110 |
-
*
|
111 |
-
* @test
|
112 |
-
*/
|
113 |
-
public function testFailEnable()
|
114 |
-
{
|
115 |
-
$name = "testFailEnable";
|
116 |
-
$this->mockFunction(__NAMESPACE__, $name, "sqrt");
|
117 |
-
|
118 |
-
$this->expectException(MockEnabledException::class);
|
119 |
-
$this->mockFunction(__NAMESPACE__, $name, "sqrt");
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Tests passing by value.
|
124 |
-
*
|
125 |
-
* @test
|
126 |
-
*/
|
127 |
-
public function testPassingByValue()
|
128 |
-
{
|
129 |
-
$this->mockFunction(__NAMESPACE__, "testPassingByValue", function ($a) {
|
130 |
-
return $a + 1;
|
131 |
-
});
|
132 |
-
|
133 |
-
// Tests passing directly the value.
|
134 |
-
$this->assertEquals(3, testPassingByValue(2));
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Test passing by reference.
|
139 |
-
*
|
140 |
-
* @test
|
141 |
-
*/
|
142 |
-
public function testPassingByReference()
|
143 |
-
{
|
144 |
-
$this->mockFunction(__NAMESPACE__, "exec", function ($a, &$b, &$c) {
|
145 |
-
$a = "notExpected";
|
146 |
-
$b[] = "test1";
|
147 |
-
$b[] = "test2";
|
148 |
-
$c = "test";
|
149 |
-
});
|
150 |
-
|
151 |
-
$noReference = "expected";
|
152 |
-
$b = [];
|
153 |
-
$c = "";
|
154 |
-
|
155 |
-
exec($noReference, $b, $c);
|
156 |
-
$this->assertEquals(["test1", "test2"], $b);
|
157 |
-
$this->assertEquals("test", $c);
|
158 |
-
$this->assertEquals("test", $c);
|
159 |
-
$this->assertEquals("expected", $noReference);
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Tests that the mock preserves the default argument
|
164 |
-
*
|
165 |
-
* @test
|
166 |
-
*/
|
167 |
-
public function testPreserveArgumentDefaultValue()
|
168 |
-
{
|
169 |
-
$functionName = $this->buildPrivateFunctionName("testPreserveArgumentDefaultValue");
|
170 |
-
|
171 |
-
eval("
|
172 |
-
function $functionName(\$b = \"default\") {
|
173 |
-
return \$b;
|
174 |
-
}
|
175 |
-
");
|
176 |
-
|
177 |
-
$this->mockFunction(
|
178 |
-
__NAMESPACE__,
|
179 |
-
$functionName,
|
180 |
-
function ($arg = "expected") {
|
181 |
-
return $arg;
|
182 |
-
}
|
183 |
-
);
|
184 |
-
|
185 |
-
$fqfn = __NAMESPACE__ . "\\$functionName";
|
186 |
-
$result = $fqfn();
|
187 |
-
$this->assertEquals("expected", $result);
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Tests that the disabled mock uses the default argument of the original function.
|
192 |
-
*
|
193 |
-
* @test
|
194 |
-
* @depends testPreserveArgumentDefaultValue
|
195 |
-
*/
|
196 |
-
public function testResetToDefaultArgumentOfOriginalFunction()
|
197 |
-
{
|
198 |
-
$functionName = $this->buildPrivateFunctionName("testPreserveArgumentDefaultValue");
|
199 |
-
$result = $functionName();
|
200 |
-
$this->assertEquals("default", $result);
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* Tests some methods which use the varname "...".
|
205 |
-
*
|
206 |
-
* @test
|
207 |
-
*/
|
208 |
-
public function testCVariadic()
|
209 |
-
{
|
210 |
-
$this->mockFunction(__NAMESPACE__, "min", "max");
|
211 |
-
|
212 |
-
$this->assertEquals(2, min(2, 1));
|
213 |
-
$this->assertEquals(2, min([2, 1]));
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Tests some methods which use the varname "..." after a mock was defined.
|
218 |
-
*
|
219 |
-
* @test
|
220 |
-
* @depends testCVariadic
|
221 |
-
*/
|
222 |
-
public function testCVariadicReset()
|
223 |
-
{
|
224 |
-
$this->assertEquals(1, min(2, 1));
|
225 |
-
$this->assertEquals(1, min([2, 1]));
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Setup a mock for testDisable().
|
230 |
-
*
|
231 |
-
* @test
|
232 |
-
*/
|
233 |
-
public function testDisableSetup()
|
234 |
-
{
|
235 |
-
$this->mockFunction(__NAMESPACE__, "rand", function () {
|
236 |
-
return 1234;
|
237 |
-
});
|
238 |
-
$this->mockFunction(__NAMESPACE__, "mt_rand", function () {
|
239 |
-
return 1234;
|
240 |
-
});
|
241 |
-
$this->assertEquals(1234, rand());
|
242 |
-
$this->assertEquals(1234, mt_rand());
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Tests disable().
|
247 |
-
*
|
248 |
-
* @test
|
249 |
-
* @depends testDisableSetup
|
250 |
-
*/
|
251 |
-
public function testDisable()
|
252 |
-
{
|
253 |
-
$this->assertNotEquals(1234, rand());
|
254 |
-
$this->assertNotEquals(1234, mt_rand());
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Tests mocking the function implicitely defines the function.
|
259 |
-
*
|
260 |
-
* @test
|
261 |
-
*/
|
262 |
-
public function testImplicitDefine()
|
263 |
-
{
|
264 |
-
$functionName = $this->buildPrivateFunctionName("testDefine");
|
265 |
-
$fqfn = __NAMESPACE__ . "\\$functionName";
|
266 |
-
$this->assertFalse(function_exists($fqfn));
|
267 |
-
$this->mockFunction(__NAMESPACE__, $functionName, "sqrt");
|
268 |
-
$this->assertTrue(function_exists($fqfn));
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Tests explicit function defining.
|
273 |
-
*
|
274 |
-
* @test
|
275 |
-
*/
|
276 |
-
public function testExplicitDefine()
|
277 |
-
{
|
278 |
-
$this->defineFunction(__NAMESPACE__, "escapeshellcmd");
|
279 |
-
$this->escapeshellcmd("foo");
|
280 |
-
|
281 |
-
$this->mockFunction(__NAMESPACE__, "escapeshellcmd", function () {
|
282 |
-
return "bar";
|
283 |
-
});
|
284 |
-
|
285 |
-
$this->assertEquals("bar", self::escapeshellcmd("foo"));
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Returns the built-in call to escapeshellcmd().
|
290 |
-
*
|
291 |
-
* @param string $command Shell command.
|
292 |
-
*
|
293 |
-
* @return string The built-in call.
|
294 |
-
*/
|
295 |
-
private function escapeshellcmd($command)
|
296 |
-
{
|
297 |
-
return escapeshellcmd($command);
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Builds a function name which is has a postfix for the current class.
|
302 |
-
*
|
303 |
-
* @param string $name The function name.
|
304 |
-
*
|
305 |
-
* @return string The function name.
|
306 |
-
*/
|
307 |
-
private function buildPrivateFunctionName($name)
|
308 |
-
{
|
309 |
-
return $name . str_replace("\\", "_", get_class($this));
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Tests declaring repeatedly a mock with enabled backupStaticAttributes.
|
314 |
-
*
|
315 |
-
* @test
|
316 |
-
* @backupStaticAttributes
|
317 |
-
* @dataProvider provideTestBackupStaticAttributes
|
318 |
-
*/
|
319 |
-
public function testBackupStaticAttributes()
|
320 |
-
{
|
321 |
-
$this->mockFunction(__NAMESPACE__, "testBackupStaticAttributes", "sqrt");
|
322 |
-
$this->assertEquals(2, testBackupStaticAttributes(4));
|
323 |
-
}
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Just repeat testBackupStaticAttributes a few times.
|
327 |
-
*
|
328 |
-
* @return array Test cases.
|
329 |
-
*/
|
330 |
-
public function provideTestBackupStaticAttributes()
|
331 |
-
{
|
332 |
-
return [
|
333 |
-
[], [], [], [], [], [], [], [], [], [], [], []
|
334 |
-
];
|
335 |
-
}
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Tests the mock in a separate process.
|
339 |
-
*
|
340 |
-
* @test
|
341 |
-
* @runInSeparateProcess
|
342 |
-
*/
|
343 |
-
public function testRunInSeparateProcess()
|
344 |
-
{
|
345 |
-
$this->mockFunction(__NAMESPACE__, "time", function () {
|
346 |
-
return 123;
|
347 |
-
});
|
348 |
-
$this->assertEquals(123, time());
|
349 |
-
}
|
350 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/ExampleTest.php
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace foo;
|
4 |
-
|
5 |
-
use phpmock\Mock;
|
6 |
-
use phpmock\MockBuilder;
|
7 |
-
use phpmock\MockRegistry;
|
8 |
-
use phpmock\functions\FixedValueFunction;
|
9 |
-
use phpmock\environment\SleepEnvironmentBuilder;
|
10 |
-
use phpmock\TestCaseTrait;
|
11 |
-
use PHPUnit\Framework\TestCase;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Tests the example from the documentation.
|
15 |
-
*
|
16 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
17 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
18 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
19 |
-
*/
|
20 |
-
class ExampleTest extends TestCase
|
21 |
-
{
|
22 |
-
use TestCaseTrait;
|
23 |
-
|
24 |
-
protected function tearDownCompat()
|
25 |
-
{
|
26 |
-
MockRegistry::getInstance()->unregisterAll();
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Tests the example from the documentation.
|
31 |
-
*
|
32 |
-
* @test
|
33 |
-
*/
|
34 |
-
public function testExample1()
|
35 |
-
{
|
36 |
-
$builder = new MockBuilder();
|
37 |
-
$builder->setNamespace(__NAMESPACE__)
|
38 |
-
->setName("time")
|
39 |
-
->setFunction(
|
40 |
-
function () {
|
41 |
-
return 1234;
|
42 |
-
}
|
43 |
-
);
|
44 |
-
|
45 |
-
$mock = $builder->build();
|
46 |
-
$mock->enable();
|
47 |
-
assert(time() == 1234);
|
48 |
-
$this->assertEquals(1234, time());
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Tests the example from the documentation.
|
53 |
-
*
|
54 |
-
* @test
|
55 |
-
*/
|
56 |
-
public function testExample2()
|
57 |
-
{
|
58 |
-
$builder = new MockBuilder();
|
59 |
-
$builder->setNamespace(__NAMESPACE__)
|
60 |
-
->setName("time")
|
61 |
-
->setFunctionProvider(new FixedValueFunction(12345));
|
62 |
-
|
63 |
-
$mock = $builder->build();
|
64 |
-
$mock->enable();
|
65 |
-
assert(time() == 12345);
|
66 |
-
$this->assertEquals(12345, time());
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Tests the example from the documentation.
|
71 |
-
*
|
72 |
-
* @test
|
73 |
-
*/
|
74 |
-
public function testExample3()
|
75 |
-
{
|
76 |
-
$builder = new SleepEnvironmentBuilder();
|
77 |
-
$builder->addNamespace(__NAMESPACE__)
|
78 |
-
->setTimestamp(12345);
|
79 |
-
|
80 |
-
$environment = $builder->build();
|
81 |
-
$environment->enable();
|
82 |
-
|
83 |
-
sleep(10);
|
84 |
-
|
85 |
-
assert(12345 + 10 == time());
|
86 |
-
$this->assertEquals(12345 + 10, time());
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Tests the example from the documentation.
|
91 |
-
*/
|
92 |
-
public function testExample4()
|
93 |
-
{
|
94 |
-
$function = function () {
|
95 |
-
throw new \Exception();
|
96 |
-
};
|
97 |
-
$mock = new Mock(__NAMESPACE__, "time", $function);
|
98 |
-
$mock->enable();
|
99 |
-
try {
|
100 |
-
$this->expectException(\Exception::class);
|
101 |
-
time();
|
102 |
-
} finally {
|
103 |
-
$mock->disable();
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Tests the example from the documentation.
|
109 |
-
*
|
110 |
-
* @test
|
111 |
-
*/
|
112 |
-
public function testExample5()
|
113 |
-
{
|
114 |
-
$time = new Mock(
|
115 |
-
__NAMESPACE__,
|
116 |
-
"time",
|
117 |
-
function () {
|
118 |
-
return 3;
|
119 |
-
}
|
120 |
-
);
|
121 |
-
$time->enable();
|
122 |
-
$this->assertSame(3, time());
|
123 |
-
}
|
124 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/MockBuilderTest.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
use phpmock\functions\FixedValueFunction;
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests MockBuilder.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see MockBuilder
|
15 |
-
*/
|
16 |
-
class MockBuilderTest extends TestCase
|
17 |
-
{
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Tests build().
|
21 |
-
*
|
22 |
-
* @test
|
23 |
-
*/
|
24 |
-
public function testBuild()
|
25 |
-
{
|
26 |
-
$builder = new MockBuilder();
|
27 |
-
$builder->setNamespace(__NAMESPACE__)
|
28 |
-
->setName("time")
|
29 |
-
->setFunction(
|
30 |
-
function () {
|
31 |
-
return 1234;
|
32 |
-
}
|
33 |
-
);
|
34 |
-
|
35 |
-
$mock = $builder->build();
|
36 |
-
$mock->enable();
|
37 |
-
$this->assertEquals(1234, time());
|
38 |
-
$mock->disable();
|
39 |
-
|
40 |
-
|
41 |
-
$builder->setFunctionProvider(new FixedValueFunction(123));
|
42 |
-
$mock = $builder->build();
|
43 |
-
$mock->enable();
|
44 |
-
$this->assertEquals(123, time());
|
45 |
-
$mock->disable();
|
46 |
-
}
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/MockCaseInsensitivityTest.php
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
use phpmock\functions\FixedValueFunction;
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests Mock's case insensitivity.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see Mock
|
15 |
-
*/
|
16 |
-
class MockCaseInsensitivityTest extends TestCase
|
17 |
-
{
|
18 |
-
use TestCaseTrait;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var Mock
|
22 |
-
*/
|
23 |
-
private $mock;
|
24 |
-
|
25 |
-
protected function tearDownCompat()
|
26 |
-
{
|
27 |
-
if (isset($this->mock)) {
|
28 |
-
$this->mock->disable();
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* @param string $mockName The mock function name.
|
34 |
-
*
|
35 |
-
* @dataProvider provideTestCaseSensitivity
|
36 |
-
* @test
|
37 |
-
*/
|
38 |
-
public function testFailEnable($mockName)
|
39 |
-
{
|
40 |
-
$builder = new MockBuilder();
|
41 |
-
$builder->setNamespace(__NAMESPACE__)
|
42 |
-
->setName(strtolower($mockName))
|
43 |
-
->setFunctionProvider(new FixedValueFunction(1234));
|
44 |
-
|
45 |
-
$this->mock = $builder->build();
|
46 |
-
$this->mock->enable();
|
47 |
-
|
48 |
-
$failingMock = $builder->setName($mockName)->build();
|
49 |
-
$this->expectException(MockEnabledException::class);
|
50 |
-
$failingMock->enable();
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Tests case insensitive mocks.
|
55 |
-
*
|
56 |
-
* @param string $mockName The mock function name.
|
57 |
-
*
|
58 |
-
* @test
|
59 |
-
* @dataProvider provideTestCaseSensitivity
|
60 |
-
*/
|
61 |
-
public function testCaseSensitivity($mockName)
|
62 |
-
{
|
63 |
-
$builder = new MockBuilder();
|
64 |
-
$builder->setNamespace(__NAMESPACE__)
|
65 |
-
->setName($mockName)
|
66 |
-
->setFunctionProvider(new FixedValueFunction(1234));
|
67 |
-
|
68 |
-
$this->mock = $builder->build();
|
69 |
-
$this->mock->enable();
|
70 |
-
|
71 |
-
$this->assertEquals(1234, time(), "time() is not mocked");
|
72 |
-
$this->assertEquals(1234, Time(), "Time() is not mocked");
|
73 |
-
$this->assertEquals(1234, TIME(), "TIME() is not mocked");
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Returns test cases for testCaseSensitivity().
|
78 |
-
*
|
79 |
-
* @return string[][] Test cases.
|
80 |
-
*/
|
81 |
-
public function provideTestCaseSensitivity()
|
82 |
-
{
|
83 |
-
return [
|
84 |
-
["TIME"],
|
85 |
-
["Time"],
|
86 |
-
["time"],
|
87 |
-
];
|
88 |
-
}
|
89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/MockDefiningOrderTest.php
DELETED
@@ -1,132 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
use phpmock\functions\FixedValueFunction;
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests the ordering of the mock creation.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see Mock
|
15 |
-
*/
|
16 |
-
class MockDefiningOrderTest extends TestCase
|
17 |
-
{
|
18 |
-
use TestCaseTrait;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var Mock The mock.
|
22 |
-
*/
|
23 |
-
private $mock;
|
24 |
-
|
25 |
-
protected function tearDownCompat()
|
26 |
-
{
|
27 |
-
if (isset($this->mock)) {
|
28 |
-
$this->mock->disable();
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Returns the built-in call to escapeshellcmd().
|
34 |
-
*
|
35 |
-
* @param string $command Shell command.
|
36 |
-
*
|
37 |
-
* @return string The built-in call.
|
38 |
-
*/
|
39 |
-
private static function escapeshellcmd($command)
|
40 |
-
{
|
41 |
-
return escapeshellcmd($command);
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Tests the restriction of Bug #68541.
|
46 |
-
*
|
47 |
-
* The fallback policy seems to be static for called class methods. This
|
48 |
-
* is documented in Bug #68541. The mock function has to be defined before
|
49 |
-
* the first call in a class.
|
50 |
-
*
|
51 |
-
* When this bug fails, PHP behaviour changed its behaviour and the
|
52 |
-
* documentation can be updated.
|
53 |
-
*
|
54 |
-
* @link https://bugs.php.net/bug.php?id=68541 Bug #68541
|
55 |
-
* @test
|
56 |
-
*/
|
57 |
-
public function testDefineBeforeFirstCallRestriction()
|
58 |
-
{
|
59 |
-
/*
|
60 |
-
* HHVM did fix this bug already.
|
61 |
-
*
|
62 |
-
* See https://github.com/sebastianbergmann/phpunit/issues/1356
|
63 |
-
* for a better syntax.
|
64 |
-
*/
|
65 |
-
if (defined('HHVM_VERSION')) {
|
66 |
-
$this->markTestSkipped();
|
67 |
-
}
|
68 |
-
|
69 |
-
$function = __NAMESPACE__ . '\escapeshellcmd';
|
70 |
-
$this->assertFalse(function_exists($function));
|
71 |
-
|
72 |
-
self::escapeshellcmd("foo");
|
73 |
-
|
74 |
-
$builder = new MockBuilder();
|
75 |
-
$builder->setNamespace(__NAMESPACE__)
|
76 |
-
->setName("escapeshellcmd")
|
77 |
-
->setFunctionProvider(new FixedValueFunction("foo"));
|
78 |
-
|
79 |
-
$this->mock = $builder->build();
|
80 |
-
$this->mock->enable();
|
81 |
-
|
82 |
-
$this->assertTrue(function_exists($function));
|
83 |
-
$this->assertEquals("foo", escapeshellcmd("bar"));
|
84 |
-
$this->assertEquals("bar", self::escapeshellcmd("bar"));
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Tests defining the mock after calling the unqualified function name.
|
89 |
-
*
|
90 |
-
* @test
|
91 |
-
*/
|
92 |
-
public function testDefiningAfterCallingUnqualified()
|
93 |
-
{
|
94 |
-
$function = __NAMESPACE__ . '\highlight_string';
|
95 |
-
$this->assertFalse(function_exists($function));
|
96 |
-
highlight_string("foo", true);
|
97 |
-
|
98 |
-
$builder = new MockBuilder();
|
99 |
-
$builder->setNamespace(__NAMESPACE__)
|
100 |
-
->setName("highlight_string")
|
101 |
-
->setFunctionProvider(new FixedValueFunction("bar"));
|
102 |
-
|
103 |
-
$this->mock = $builder->build();
|
104 |
-
$this->mock->enable();
|
105 |
-
|
106 |
-
$this->assertTrue(function_exists($function));
|
107 |
-
$this->assertEquals("bar", highlight_string("foo"));
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Tests defining the mock after calling the qualified function name.
|
112 |
-
*
|
113 |
-
* @test
|
114 |
-
*/
|
115 |
-
public function testDefiningAfterCallingQualified()
|
116 |
-
{
|
117 |
-
$function = __NAMESPACE__ . '\str_word_count';
|
118 |
-
$this->assertFalse(function_exists($function));
|
119 |
-
\str_word_count("foo");
|
120 |
-
|
121 |
-
$builder = new MockBuilder();
|
122 |
-
$builder->setNamespace(__NAMESPACE__)
|
123 |
-
->setName("str_word_count")
|
124 |
-
->setFunctionProvider(new FixedValueFunction("bar"));
|
125 |
-
|
126 |
-
$this->mock = $builder->build();
|
127 |
-
$this->mock->enable();
|
128 |
-
|
129 |
-
$this->assertTrue(function_exists($function));
|
130 |
-
$this->assertEquals("bar", str_word_count("foo"));
|
131 |
-
}
|
132 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/MockNamespaceTest.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// A different namespace
|
4 |
-
namespace phpmocktest;
|
5 |
-
|
6 |
-
use phpmock\Mock;
|
7 |
-
use phpmock\MockBuilder;
|
8 |
-
use phpmock\functions\FixedValueFunction;
|
9 |
-
use phpmock\TestCaseTrait;
|
10 |
-
use PHPUnit\Framework\TestCase;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Tests Mock in a different namespace.
|
14 |
-
*
|
15 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
16 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
17 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
18 |
-
* @see Mock
|
19 |
-
*/
|
20 |
-
class MockNamespaceTest extends TestCase
|
21 |
-
{
|
22 |
-
use TestCaseTrait;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @var Mock
|
26 |
-
*/
|
27 |
-
private $mock;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @var MockBuilder
|
31 |
-
*/
|
32 |
-
private $builder;
|
33 |
-
|
34 |
-
protected function setUpCompat()
|
35 |
-
{
|
36 |
-
$this->builder = new MockBuilder();
|
37 |
-
$this->builder
|
38 |
-
->setName("time")
|
39 |
-
->setFunctionProvider(new FixedValueFunction(1234));
|
40 |
-
}
|
41 |
-
|
42 |
-
protected function tearDownCompat()
|
43 |
-
{
|
44 |
-
if (! empty($this->mock)) {
|
45 |
-
$this->mock->disable();
|
46 |
-
unset($this->mock);
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Tests defining mocks in a different namespace.
|
52 |
-
*
|
53 |
-
* @test
|
54 |
-
* @dataprovider provideTestNamespace
|
55 |
-
* @runInSeparateProcess
|
56 |
-
*/
|
57 |
-
public function testDefiningNamespaces()
|
58 |
-
{
|
59 |
-
$this->builder->setNamespace(__NAMESPACE__);
|
60 |
-
$this->mock = $this->builder->build();
|
61 |
-
$this->mock->enable();
|
62 |
-
|
63 |
-
$this->assertEquals(1234, time());
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Tests redefining mocks in a different namespace.
|
68 |
-
*
|
69 |
-
* @test
|
70 |
-
* @dataprovider provideTestNamespace
|
71 |
-
*/
|
72 |
-
public function testRedefiningNamespaces()
|
73 |
-
{
|
74 |
-
$this->builder->setNamespace(__NAMESPACE__);
|
75 |
-
$this->mock = $this->builder->build();
|
76 |
-
$this->mock->enable();
|
77 |
-
|
78 |
-
$this->assertEquals(1234, time());
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Provides namespaces for testNamespace().
|
83 |
-
*
|
84 |
-
* @return string[][] Namespaces.
|
85 |
-
*/
|
86 |
-
public function provideTestNamespace()
|
87 |
-
{
|
88 |
-
return [
|
89 |
-
[__NAMESPACE__],
|
90 |
-
['phpmock\test'],
|
91 |
-
['\phpmock\test'],
|
92 |
-
['phpmock\test\\'],
|
93 |
-
['\phpmock\test\\']
|
94 |
-
];
|
95 |
-
}
|
96 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/MockTest.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests Mock.
|
7 |
-
*
|
8 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
9 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
10 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
11 |
-
* @see Mock
|
12 |
-
*/
|
13 |
-
class MockTest extends AbstractMockTest
|
14 |
-
{
|
15 |
-
|
16 |
-
protected function defineFunction($namespace, $functionName)
|
17 |
-
{
|
18 |
-
$mock = new Mock($namespace, $functionName, function () {
|
19 |
-
});
|
20 |
-
$mock->define();
|
21 |
-
}
|
22 |
-
|
23 |
-
protected function mockFunction($namespace, $functionName, callable $function)
|
24 |
-
{
|
25 |
-
$mock = new Mock($namespace, $functionName, $function);
|
26 |
-
$mock->enable();
|
27 |
-
}
|
28 |
-
|
29 |
-
protected function disableMocks()
|
30 |
-
{
|
31 |
-
Mock::disableAll();
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Tests enable().
|
36 |
-
*
|
37 |
-
* @test
|
38 |
-
*/
|
39 |
-
public function testEnable()
|
40 |
-
{
|
41 |
-
$mock = new Mock(
|
42 |
-
__NAMESPACE__,
|
43 |
-
"rand",
|
44 |
-
function () {
|
45 |
-
return 1234;
|
46 |
-
}
|
47 |
-
);
|
48 |
-
$this->assertNotEquals(1234, rand());
|
49 |
-
$mock->enable();
|
50 |
-
$this->assertEquals(1234, rand());
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Tests disabling and enabling again.
|
55 |
-
*
|
56 |
-
* @test
|
57 |
-
*/
|
58 |
-
public function testReenable()
|
59 |
-
{
|
60 |
-
$mock = new Mock(
|
61 |
-
__NAMESPACE__,
|
62 |
-
"time",
|
63 |
-
function () {
|
64 |
-
return 1234;
|
65 |
-
}
|
66 |
-
);
|
67 |
-
$mock->enable();
|
68 |
-
$mock->disable();
|
69 |
-
$mock->enable();
|
70 |
-
$this->assertEquals(1234, time());
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Tests disableAll().
|
75 |
-
*
|
76 |
-
* @test
|
77 |
-
*/
|
78 |
-
public function testDisableAll()
|
79 |
-
{
|
80 |
-
$mock2 = new Mock(__NAMESPACE__, "min", "max");
|
81 |
-
$mock2->enable();
|
82 |
-
|
83 |
-
Mock::disableAll();
|
84 |
-
|
85 |
-
$this->assertNotEquals(1234, time());
|
86 |
-
$this->assertEquals(1, min([1, 2]));
|
87 |
-
}
|
88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/TestCaseNoTypeHintTrait.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @internal
|
7 |
-
*/
|
8 |
-
trait TestCaseNoTypeHintTrait
|
9 |
-
{
|
10 |
-
protected function setUp()
|
11 |
-
{
|
12 |
-
if (method_exists($this, 'setUpCompat')) {
|
13 |
-
$this->setUpCompat();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
protected function tearDown()
|
18 |
-
{
|
19 |
-
if (method_exists($this, 'tearDownCompat')) {
|
20 |
-
$this->tearDownCompat();
|
21 |
-
}
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/TestCaseTypeHintTrait.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @internal
|
7 |
-
*/
|
8 |
-
trait TestCaseTypeHintTrait
|
9 |
-
{
|
10 |
-
protected function setUp(): void
|
11 |
-
{
|
12 |
-
if (method_exists($this, 'setUpCompat')) {
|
13 |
-
$this->setUpCompat();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
protected function tearDown(): void
|
18 |
-
{
|
19 |
-
if (method_exists($this, 'tearDownCompat')) {
|
20 |
-
$this->tearDownCompat();
|
21 |
-
}
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/autoload.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use PHPUnit\Runner\Version;
|
4 |
-
|
5 |
-
// Compatibility with PHPUnit 8.0
|
6 |
-
// We need to use "magic" trait \phpmock\TestCaseTrait
|
7 |
-
// and instead of setUp/tearDown method in test case
|
8 |
-
// we should have setUpCompat/tearDownCompat.
|
9 |
-
if (
|
10 |
-
class_exists(Version::class)
|
11 |
-
&& version_compare(Version::id(), '8.0.0') >= 0
|
12 |
-
) {
|
13 |
-
class_alias(\phpmock\TestCaseTypeHintTrait::class, \phpmock\TestCaseTrait::class);
|
14 |
-
} else {
|
15 |
-
class_alias(\phpmock\TestCaseNoTypeHintTrait::class, \phpmock\TestCaseTrait::class);
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/environment/MockEnvironmentTest.php
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\environment;
|
4 |
-
|
5 |
-
use phpmock\Mock;
|
6 |
-
use phpmock\MockBuilder;
|
7 |
-
use phpmock\functions\FixedValueFunction;
|
8 |
-
use phpmock\TestCaseTrait;
|
9 |
-
use PHPUnit\Framework\TestCase;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Tests MockEnvironment.
|
13 |
-
*
|
14 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
15 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
16 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
17 |
-
* @see MockEnvironment
|
18 |
-
*/
|
19 |
-
class MockEnvironmentTest extends TestCase
|
20 |
-
{
|
21 |
-
use TestCaseTrait;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var MockEnvironment The tested environment.
|
25 |
-
*/
|
26 |
-
private $environment;
|
27 |
-
|
28 |
-
protected function setUpCompat()
|
29 |
-
{
|
30 |
-
$builder = new MockBuilder();
|
31 |
-
$builder->setNamespace(__NAMESPACE__)
|
32 |
-
->setFunctionProvider(new FixedValueFunction(1234));
|
33 |
-
|
34 |
-
$this->environment = new MockEnvironment();
|
35 |
-
$this->environment->addMock($builder->setName("time")->build());
|
36 |
-
$this->environment->addMock($builder->setName("rand")->build());
|
37 |
-
}
|
38 |
-
|
39 |
-
protected function tearDownCompat()
|
40 |
-
{
|
41 |
-
$this->environment->disable();
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Tests enable()
|
46 |
-
*
|
47 |
-
* @test
|
48 |
-
*/
|
49 |
-
public function testEnable()
|
50 |
-
{
|
51 |
-
$this->environment->enable();
|
52 |
-
|
53 |
-
$this->assertEquals(1234, time());
|
54 |
-
$this->assertEquals(1234, rand());
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Tests define()
|
59 |
-
*
|
60 |
-
* @test
|
61 |
-
*/
|
62 |
-
public function testDefine()
|
63 |
-
{
|
64 |
-
$this->environment->addMock(
|
65 |
-
new Mock(__NAMESPACE__, "testDefine", function () {
|
66 |
-
})
|
67 |
-
);
|
68 |
-
|
69 |
-
$this->environment->define();
|
70 |
-
|
71 |
-
$this->assertTrue(function_exists("phpmock\\environment\\time"));
|
72 |
-
$this->assertTrue(function_exists("phpmock\\environment\\rand"));
|
73 |
-
$this->assertTrue(function_exists("phpmock\\environment\\testDefine"));
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Tests disable()
|
78 |
-
*
|
79 |
-
* @test
|
80 |
-
*/
|
81 |
-
public function testDisable()
|
82 |
-
{
|
83 |
-
$this->environment->enable();
|
84 |
-
$this->environment->disable();
|
85 |
-
|
86 |
-
$this->assertNotEquals(1234, time());
|
87 |
-
|
88 |
-
// Note: There's a tiny chance that this assertion might fail.
|
89 |
-
$this->assertNotEquals(1234, rand());
|
90 |
-
}
|
91 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/environment/SleepEnvironmentBuilderTest.php
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\environment;
|
4 |
-
|
5 |
-
use phpmock\TestCaseTrait;
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests SleepEnvironmentBuilder.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see SleepEnvironmentBuilder
|
15 |
-
*/
|
16 |
-
class SleepEnvironmentBuilderTest extends TestCase
|
17 |
-
{
|
18 |
-
use TestCaseTrait;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var MockEnvironment The build environment.
|
22 |
-
*/
|
23 |
-
private $environment;
|
24 |
-
|
25 |
-
protected function setUpCompat()
|
26 |
-
{
|
27 |
-
$builder = new SleepEnvironmentBuilder();
|
28 |
-
$builder->addNamespace(__NAMESPACE__)
|
29 |
-
->setTimestamp(1234);
|
30 |
-
|
31 |
-
$this->environment = $builder->build();
|
32 |
-
$this->environment->enable();
|
33 |
-
}
|
34 |
-
|
35 |
-
protected function tearDownCompat()
|
36 |
-
{
|
37 |
-
$this->environment->disable();
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Tests mocking functions accross several namespaces.
|
42 |
-
*
|
43 |
-
* @test
|
44 |
-
*/
|
45 |
-
public function testAddNamespace()
|
46 |
-
{
|
47 |
-
$builder = new SleepEnvironmentBuilder();
|
48 |
-
$builder->addNamespace(__NAMESPACE__)
|
49 |
-
->addNamespace("testAddNamespace")
|
50 |
-
->setTimestamp(1234);
|
51 |
-
|
52 |
-
$this->environment->disable();
|
53 |
-
$this->environment = $builder->build();
|
54 |
-
$this->environment->enable();
|
55 |
-
|
56 |
-
$time = time();
|
57 |
-
\testAddNamespace\sleep(123);
|
58 |
-
sleep(123);
|
59 |
-
|
60 |
-
$this->assertEquals(2 * 123 + $time, time());
|
61 |
-
$this->assertEquals(2 * 123 + $time, \testAddNamespace\time());
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Tests sleep()
|
66 |
-
*
|
67 |
-
* @test
|
68 |
-
*/
|
69 |
-
public function testSleep()
|
70 |
-
{
|
71 |
-
$time = time();
|
72 |
-
$microtime = microtime(true);
|
73 |
-
sleep(1);
|
74 |
-
|
75 |
-
$this->assertEquals($time + 1, time());
|
76 |
-
$this->assertEquals($microtime + 1, microtime(true));
|
77 |
-
$this->assertEquals($time + 1, date("U"));
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Tests usleep()
|
82 |
-
*
|
83 |
-
* @param int $microseconds Microseconds.
|
84 |
-
*
|
85 |
-
* @test
|
86 |
-
* @dataProvider provideTestUsleep
|
87 |
-
*/
|
88 |
-
public function testUsleep($microseconds)
|
89 |
-
{
|
90 |
-
$time = time();
|
91 |
-
$microtime = microtime(true);
|
92 |
-
usleep($microseconds);
|
93 |
-
|
94 |
-
$delta = $microseconds / 1000000;
|
95 |
-
$this->assertEquals((int)($time + $delta), time());
|
96 |
-
$this->assertEquals((int)($time + $delta), date("U"));
|
97 |
-
$this->assertEquals($microtime + $delta, microtime(true));
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Returns test cases for testUsleep().
|
102 |
-
*
|
103 |
-
* @return int[][] Test cases.
|
104 |
-
*/
|
105 |
-
public function provideTestUsleep()
|
106 |
-
{
|
107 |
-
return [
|
108 |
-
[1000],
|
109 |
-
[999999],
|
110 |
-
[1000000],
|
111 |
-
];
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Tests date()
|
116 |
-
*
|
117 |
-
* @test
|
118 |
-
*/
|
119 |
-
public function testDate()
|
120 |
-
{
|
121 |
-
$time = time();
|
122 |
-
sleep(100);
|
123 |
-
|
124 |
-
$this->assertEquals($time + 100, date("U"));
|
125 |
-
}
|
126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/functions/AbstractSleepFunctionTest.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests AbstractSleepFunction and all its implementations.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see AbstractSleepFunction
|
14 |
-
*/
|
15 |
-
class AbstractSleepFunctionTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Tests incrementation of all Incrementables
|
20 |
-
*
|
21 |
-
* @test
|
22 |
-
*/
|
23 |
-
public function testSleepIncrementationOfAllIncrementables()
|
24 |
-
{
|
25 |
-
$value1 = new FixedValueFunction(1);
|
26 |
-
$value2 = new FixedValueFunction(2);
|
27 |
-
$sleep = new SleepFunction([$value1, $value2]);
|
28 |
-
|
29 |
-
call_user_func($sleep->getCallable(), 1);
|
30 |
-
|
31 |
-
$this->assertEquals(2, call_user_func($value1->getCallable()));
|
32 |
-
$this->assertEquals(3, call_user_func($value2->getCallable()));
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Tests incrementation of Incrementables
|
37 |
-
*
|
38 |
-
* @param AbstractSleepFunction $sleepFunction Tested implementation.
|
39 |
-
* @param int $amount Amount of time units.
|
40 |
-
* @param mixed $expected Expected seconds.
|
41 |
-
*
|
42 |
-
* @test
|
43 |
-
* @dataProvider provideTestSleepIncrementation
|
44 |
-
*/
|
45 |
-
public function testSleepIncrementation(
|
46 |
-
AbstractSleepFunction $sleepFunction,
|
47 |
-
$amount,
|
48 |
-
$expected
|
49 |
-
) {
|
50 |
-
$value = new FixedValueFunction(0);
|
51 |
-
$sleepFunction->addIncrementable($value);
|
52 |
-
call_user_func($sleepFunction->getCallable(), $amount);
|
53 |
-
$this->assertEquals($expected, call_user_func($value->getCallable()));
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Returns test cases for testSleepIncrementation().
|
58 |
-
*
|
59 |
-
* @return array Test cases.
|
60 |
-
*/
|
61 |
-
public function provideTestSleepIncrementation()
|
62 |
-
{
|
63 |
-
return [
|
64 |
-
[new SleepFunction(), 1, 1],
|
65 |
-
[new SleepFunction(), 0, 0],
|
66 |
-
|
67 |
-
[new UsleepFunction(), 0, 0],
|
68 |
-
[new UsleepFunction(), 1000, 0.001],
|
69 |
-
[new UsleepFunction(), 1000000, 1],
|
70 |
-
];
|
71 |
-
}
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/functions/FixedDateFunctionTest.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests FixedDateFunction.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see FixedDateFunction
|
14 |
-
*/
|
15 |
-
class FixedDateFunctionTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Tests getDate().
|
20 |
-
*
|
21 |
-
* @test
|
22 |
-
*/
|
23 |
-
public function testGetDate()
|
24 |
-
{
|
25 |
-
$function = new FixedDateFunction(strtotime("2013-3-3"));
|
26 |
-
$this->assertEquals("3. 3. 2013", call_user_func($function->getCallable(), "j. n. Y"));
|
27 |
-
$this->assertEquals("24. 3. 2015", call_user_func($function->getCallable(), "j. n. Y", strtotime("2015-3-24")));
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/functions/FixedMicrotimeFunctionTest.php
DELETED
@@ -1,145 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use phpmock\MockBuilder;
|
6 |
-
use PHPUnit\Framework\TestCase;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests FixedMicrotimeFunction.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see FixedMicrotimeFunction
|
15 |
-
*/
|
16 |
-
class FixedMicrotimeFunctionTest extends TestCase
|
17 |
-
{
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Tests setMicrotime().
|
21 |
-
*
|
22 |
-
* @test
|
23 |
-
*/
|
24 |
-
public function testSetMicrotime()
|
25 |
-
{
|
26 |
-
$function = new FixedMicrotimeFunction();
|
27 |
-
$function->setMicrotime("0.00000001 1");
|
28 |
-
$this->assertEquals("0.00000001 1", $function->getMicrotime());
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Tests setMicrotimeAsFloat().
|
33 |
-
*
|
34 |
-
* @test
|
35 |
-
*/
|
36 |
-
public function testSetMicrotimeAsFloat()
|
37 |
-
{
|
38 |
-
$function = new FixedMicrotimeFunction();
|
39 |
-
$function->setMicrotimeAsFloat(1.00000001);
|
40 |
-
$this->assertEquals(1.00000001, $function->getMicrotime(true));
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Tests getMicrotime().
|
45 |
-
*
|
46 |
-
* @test
|
47 |
-
*/
|
48 |
-
public function testGetMicrotime()
|
49 |
-
{
|
50 |
-
$function = new FixedMicrotimeFunction();
|
51 |
-
$function->setMicrotimeAsFloat(1.00000001);
|
52 |
-
$this->assertEquals(1.00000001, $function->getMicrotime(true));
|
53 |
-
$this->assertEquals("0.00000001 1", $function->getMicrotime());
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Tests getCallable()
|
58 |
-
*
|
59 |
-
* @test
|
60 |
-
*/
|
61 |
-
public function testGetCallable()
|
62 |
-
{
|
63 |
-
$function = new FixedMicrotimeFunction();
|
64 |
-
$function->setMicrotimeAsFloat(1.00000001);
|
65 |
-
|
66 |
-
$builder = new MockBuilder();
|
67 |
-
$builder->setNamespace(__NAMESPACE__)
|
68 |
-
->setName("microtime")
|
69 |
-
->setFunctionProvider($function);
|
70 |
-
|
71 |
-
$mock = $builder->build();
|
72 |
-
$mock->enable();
|
73 |
-
$this->assertEquals("0.00000001 1", microtime());
|
74 |
-
$this->assertEquals(1.00000001, microtime(true));
|
75 |
-
|
76 |
-
$mock->disable();
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Tests initializing with the current timestamp
|
81 |
-
*
|
82 |
-
* @test
|
83 |
-
*/
|
84 |
-
public function testConstructCurrentTime()
|
85 |
-
{
|
86 |
-
$function = new FixedMicrotimeFunction();
|
87 |
-
|
88 |
-
$this->assertGreaterThan($function->getMicrotime(true), \microtime(true));
|
89 |
-
$this->assertGreaterThan(0, $function->getMicrotime(true));
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Tests exception for invalid argument in constructor.
|
94 |
-
*
|
95 |
-
* @test
|
96 |
-
* @dataProvider provideTestConstructFailsForInvalidArgument
|
97 |
-
*/
|
98 |
-
public function testConstructFailsForInvalidArgument($timestamp)
|
99 |
-
{
|
100 |
-
$this->expectException(\InvalidArgumentException::class);
|
101 |
-
new FixedMicrotimeFunction($timestamp);
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Returns test cases for testConstructFailsForInvalidArgument()
|
106 |
-
*
|
107 |
-
* @return array Test cases.
|
108 |
-
*/
|
109 |
-
public function provideTestConstructFailsForInvalidArgument()
|
110 |
-
{
|
111 |
-
return [
|
112 |
-
[true],
|
113 |
-
[new \stdClass()]
|
114 |
-
];
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Tests initializing with a timestamp.
|
119 |
-
*
|
120 |
-
* @param mixed $timestamp The tested timestamp.
|
121 |
-
* @param float $expected The expected timestamp.
|
122 |
-
*
|
123 |
-
* @test
|
124 |
-
* @dataProvider provideTestConstruct
|
125 |
-
*/
|
126 |
-
public function testConstruct($timestamp, $expected)
|
127 |
-
{
|
128 |
-
$function = new FixedMicrotimeFunction($timestamp);
|
129 |
-
|
130 |
-
$this->assertEquals($expected, $function->getMicrotime(true));
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Provides test cases for testConstruct().
|
135 |
-
*
|
136 |
-
* @return array
|
137 |
-
*/
|
138 |
-
public function provideTestConstruct()
|
139 |
-
{
|
140 |
-
return [
|
141 |
-
["0.00000001 1", 1.00000001],
|
142 |
-
[1.00000001, 1.00000001],
|
143 |
-
];
|
144 |
-
}
|
145 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/functions/IncrementableTest.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests Incrementable and all its implementations.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see Incrementable
|
14 |
-
*/
|
15 |
-
class IncrementableTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Tests increment().
|
20 |
-
*
|
21 |
-
* @param mixed $expected The expected value.
|
22 |
-
* @param mixed $increment The amount of increase.
|
23 |
-
* @param Incrementable $incrementable The tested Incrementable.
|
24 |
-
* @param callable $getValue The lambda for getting the value.
|
25 |
-
*
|
26 |
-
* @test
|
27 |
-
* @dataProvider provideTestIncrement
|
28 |
-
*/
|
29 |
-
public function testIncrement(
|
30 |
-
$expected,
|
31 |
-
$increment,
|
32 |
-
Incrementable $incrementable,
|
33 |
-
callable $getValue
|
34 |
-
) {
|
35 |
-
$incrementable->increment($increment);
|
36 |
-
$this->assertEquals($expected, $getValue($incrementable));
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Test cases for testIncrement().
|
41 |
-
*
|
42 |
-
* @return array Test cases.
|
43 |
-
*/
|
44 |
-
public function provideTestIncrement()
|
45 |
-
{
|
46 |
-
$getFixedValue = function (FixedValueFunction $function) {
|
47 |
-
return call_user_func($function->getCallable());
|
48 |
-
};
|
49 |
-
$getMicrotime = function (FixedMicrotimeFunction $function) {
|
50 |
-
return $function->getMicrotime(true);
|
51 |
-
};
|
52 |
-
$getDate = function (FixedDateFunction $function) {
|
53 |
-
return call_user_func($function->getCallable(), "U");
|
54 |
-
};
|
55 |
-
return [
|
56 |
-
[1, 1, new FixedValueFunction(0), $getFixedValue],
|
57 |
-
[2, 1, new FixedValueFunction(1), $getFixedValue],
|
58 |
-
[-1, -1, new FixedValueFunction(0), $getFixedValue],
|
59 |
-
|
60 |
-
[1, 1, new FixedMicrotimeFunction(0), $getMicrotime],
|
61 |
-
[-1, -1, new FixedMicrotimeFunction(0), $getMicrotime],
|
62 |
-
[2, 1, new FixedMicrotimeFunction(1), $getMicrotime],
|
63 |
-
|
64 |
-
[1, 1, new FixedDateFunction(0), $getDate],
|
65 |
-
[-1, -1, new FixedDateFunction(0), $getDate],
|
66 |
-
[2, 1, new FixedDateFunction(1), $getDate],
|
67 |
-
|
68 |
-
[
|
69 |
-
1.00000001,
|
70 |
-
0.00000001,
|
71 |
-
new FixedMicrotimeFunction(1),
|
72 |
-
$getMicrotime
|
73 |
-
],
|
74 |
-
[
|
75 |
-
1.00000009,
|
76 |
-
0.00000009,
|
77 |
-
new FixedMicrotimeFunction(1),
|
78 |
-
$getMicrotime
|
79 |
-
],
|
80 |
-
];
|
81 |
-
}
|
82 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/functions/MicrotimeConverterTest.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\functions;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests MicrotimeConverter.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see MicrotimeConverter
|
14 |
-
*/
|
15 |
-
class MicrotimeConverterTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Test convertStringToFloat().
|
20 |
-
*
|
21 |
-
* @param float $float The timestamp.
|
22 |
-
* @param string $string The timestamp.
|
23 |
-
*
|
24 |
-
* @test
|
25 |
-
* @dataProvider provideFloatAndStrings
|
26 |
-
*/
|
27 |
-
public function testConvertStringToFloat($float, $string)
|
28 |
-
{
|
29 |
-
$converter = new MicrotimeConverter();
|
30 |
-
$this->assertEquals($float, $converter->convertStringToFloat($string));
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Test convertFloatToString().
|
35 |
-
*
|
36 |
-
* @param float $float The timestamp.
|
37 |
-
* @param string $string The timestamp.
|
38 |
-
*
|
39 |
-
* @test
|
40 |
-
* @dataProvider provideFloatAndStrings
|
41 |
-
*/
|
42 |
-
public function testConvertFloatToString($float, $string)
|
43 |
-
{
|
44 |
-
$converter = new MicrotimeConverter();
|
45 |
-
$this->assertEquals($string, $converter->convertFloatToString($float));
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Returns convert test cases.
|
50 |
-
*
|
51 |
-
* @return array
|
52 |
-
*/
|
53 |
-
public function provideFloatAndStrings()
|
54 |
-
{
|
55 |
-
return [
|
56 |
-
[1.0, "0.00000000 1"],
|
57 |
-
[1.00000001, "0.00000001 1"],
|
58 |
-
[1.00000009, "0.00000009 1"],
|
59 |
-
[1.1, "0.10000000 1"],
|
60 |
-
[1.11, "0.11000000 1"],
|
61 |
-
[1.9, "0.90000000 1"],
|
62 |
-
[1.99999999, "0.99999999 1"],
|
63 |
-
];
|
64 |
-
}
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/generator/MockFunctionGeneratorTest.php
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\generator;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests MockFunctionGenerator.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see MockFunctionGenerator
|
14 |
-
*/
|
15 |
-
class MockFunctionGeneratorTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Tests removeDefaultArguments().
|
20 |
-
*
|
21 |
-
* @param array $expected The expected result.
|
22 |
-
* @param array $arguments The input arguments.
|
23 |
-
*
|
24 |
-
* @test
|
25 |
-
* @dataProvider provideTestRemoveDefaultArguments
|
26 |
-
*/
|
27 |
-
public function testRemoveDefaultArguments(array $expected, array $arguments)
|
28 |
-
{
|
29 |
-
MockFunctionGenerator::removeDefaultArguments($arguments);
|
30 |
-
$this->assertEquals($expected, $arguments);
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Returns test cases for testRemoveDefaultArguments().
|
35 |
-
*
|
36 |
-
* @return The test cases.
|
37 |
-
*/
|
38 |
-
public function provideTestRemoveDefaultArguments()
|
39 |
-
{
|
40 |
-
return[
|
41 |
-
[[], []],
|
42 |
-
[[1], [1]],
|
43 |
-
[[1, 2], [1, 2]],
|
44 |
-
[[null], [null]],
|
45 |
-
[[], [MockFunctionGenerator::DEFAULT_ARGUMENT]],
|
46 |
-
[[], [MockFunctionGenerator::DEFAULT_ARGUMENT, MockFunctionGenerator::DEFAULT_ARGUMENT]],
|
47 |
-
[[1], [1, MockFunctionGenerator::DEFAULT_ARGUMENT]],
|
48 |
-
[[null], [null, MockFunctionGenerator::DEFAULT_ARGUMENT]],
|
49 |
-
[[1], [1, MockFunctionGenerator::DEFAULT_ARGUMENT, MockFunctionGenerator::DEFAULT_ARGUMENT]],
|
50 |
-
];
|
51 |
-
}
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/generator/ParameterBuilderTest.php
DELETED
@@ -1,224 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\generator;
|
4 |
-
|
5 |
-
use PHPUnit\Framework\TestCase;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Tests ParameterBuilder.
|
9 |
-
*
|
10 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
11 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
12 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
13 |
-
* @see ParameterBuilder
|
14 |
-
*/
|
15 |
-
class ParameterBuilderTest extends TestCase
|
16 |
-
{
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Tests build().
|
20 |
-
*
|
21 |
-
* @param string $expectedSignature The expected signature parameters.
|
22 |
-
* @param string $expectedBody The expected body parameters.
|
23 |
-
* @param string $function The function name.
|
24 |
-
*
|
25 |
-
* @dataProvider provideTestBuild
|
26 |
-
* @test
|
27 |
-
*/
|
28 |
-
public function testBuild($expectedSignature, $expectedBody, $function)
|
29 |
-
{
|
30 |
-
$builder = new ParameterBuilder();
|
31 |
-
$builder->build($function);
|
32 |
-
$this->assertEquals($expectedSignature, $builder->getSignatureParameters());
|
33 |
-
$this->assertEquals($expectedBody, $builder->getBodyParameters());
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Returns test cases for testBuild().
|
38 |
-
*
|
39 |
-
* @return string[][][] The test cases.
|
40 |
-
*/
|
41 |
-
public function provideTestBuild()
|
42 |
-
{
|
43 |
-
// @codingStandardsIgnoreStart
|
44 |
-
|
45 |
-
function testNoParameter()
|
46 |
-
{
|
47 |
-
}
|
48 |
-
|
49 |
-
function testOneParameter($one)
|
50 |
-
{
|
51 |
-
}
|
52 |
-
|
53 |
-
function testTwoParameters($one, $two)
|
54 |
-
{
|
55 |
-
}
|
56 |
-
|
57 |
-
function testOptionalParameters1($one = 1)
|
58 |
-
{
|
59 |
-
}
|
60 |
-
|
61 |
-
function testOptionalParameters2($one = 1, $two = 2)
|
62 |
-
{
|
63 |
-
}
|
64 |
-
|
65 |
-
function testOptionalParameters3($one, $two = 2)
|
66 |
-
{
|
67 |
-
}
|
68 |
-
|
69 |
-
function testReference1(&$one)
|
70 |
-
{
|
71 |
-
}
|
72 |
-
|
73 |
-
function testReference2(&$one, $two)
|
74 |
-
{
|
75 |
-
}
|
76 |
-
|
77 |
-
function testReference3($one, &$two)
|
78 |
-
{
|
79 |
-
}
|
80 |
-
|
81 |
-
function testReference4(&$one, &$two)
|
82 |
-
{
|
83 |
-
}
|
84 |
-
|
85 |
-
function testCombined($one, &$two, $three = 3, &$four = 4)
|
86 |
-
{
|
87 |
-
}
|
88 |
-
|
89 |
-
function testPHPVariadics1(...$one)
|
90 |
-
{
|
91 |
-
}
|
92 |
-
|
93 |
-
function testPHPVariadics2($one, ...$two)
|
94 |
-
{
|
95 |
-
}
|
96 |
-
|
97 |
-
function testPHPVariadics3($one, $two = 2, ...$three)
|
98 |
-
{
|
99 |
-
}
|
100 |
-
|
101 |
-
function testPHPVariadics4(&$one, $two = 2, ...$three)
|
102 |
-
{
|
103 |
-
}
|
104 |
-
|
105 |
-
// When declaring a function or a method, adding a required parameter
|
106 |
-
// after optional parameters is deprecated since PHP 8.0. So, let's
|
107 |
-
// use conditional eval() here and avoid parsing this part of file
|
108 |
-
// as a function in PHP8.0+.
|
109 |
-
if (version_compare(PHP_VERSION, '8.0', '<')) {
|
110 |
-
eval(
|
111 |
-
'namespace ' . __NAMESPACE__ . ';
|
112 |
-
function testOptionalParametersBeforeRequired($one = 1, $two)
|
113 |
-
{
|
114 |
-
}'
|
115 |
-
);
|
116 |
-
}
|
117 |
-
|
118 |
-
// @codingStandardsIgnoreEnd
|
119 |
-
|
120 |
-
// PHP8.0+ has a different signature wording.
|
121 |
-
$return_value = version_compare(PHP_VERSION, '8', '<') ? "return_value" : "result_code";
|
122 |
-
// HHVM has a different signature wording.
|
123 |
-
if (defined('HHVM_VERSION')) {
|
124 |
-
$return_value = "return_var";
|
125 |
-
}
|
126 |
-
|
127 |
-
$cases = [
|
128 |
-
["", "", __NAMESPACE__ . "\\testNoParameter"],
|
129 |
-
['$one', '$one', __NAMESPACE__ . "\\testOneParameter"],
|
130 |
-
['$one, $two', '$one, $two', __NAMESPACE__ . "\\testTwoParameters"],
|
131 |
-
['$one, $two', '$one, $two', __NAMESPACE__ . "\\testTwoParameters"],
|
132 |
-
['&$one', '&$one', __NAMESPACE__ . "\\testReference1"],
|
133 |
-
['&$one, $two', '&$one, $two', __NAMESPACE__ . "\\testReference2"],
|
134 |
-
['$one, &$two', '$one, &$two', __NAMESPACE__ . "\\testReference3"],
|
135 |
-
['&$one, &$two', '&$one, &$two', __NAMESPACE__ . "\\testReference4"],
|
136 |
-
[
|
137 |
-
sprintf(
|
138 |
-
"\$command, &\$output = '%1\$s', &\${$return_value} = '%1\$s'",
|
139 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
140 |
-
),
|
141 |
-
"\$command, &\$output, &\${$return_value}",
|
142 |
-
"exec"
|
143 |
-
],
|
144 |
-
[
|
145 |
-
sprintf(
|
146 |
-
"\$one = '%s'",
|
147 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
148 |
-
),
|
149 |
-
'$one',
|
150 |
-
__NAMESPACE__ . "\\testOptionalParameters1"
|
151 |
-
],
|
152 |
-
[
|
153 |
-
sprintf(
|
154 |
-
"\$one = '%1\$s', \$two = '%1\$s'",
|
155 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
156 |
-
),
|
157 |
-
'$one, $two',
|
158 |
-
__NAMESPACE__ . "\\testOptionalParameters2"
|
159 |
-
],
|
160 |
-
[
|
161 |
-
sprintf(
|
162 |
-
"\$one, \$two = '%s'",
|
163 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
164 |
-
),
|
165 |
-
'$one, $two',
|
166 |
-
__NAMESPACE__ . "\\testOptionalParameters3"
|
167 |
-
],
|
168 |
-
[
|
169 |
-
sprintf(
|
170 |
-
"\$one, &\$two, \$three = '%1\$s', &\$four = '%1\$s'",
|
171 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
172 |
-
),
|
173 |
-
'$one, &$two, $three, &$four',
|
174 |
-
__NAMESPACE__ . "\\testCombined"
|
175 |
-
],
|
176 |
-
["", "", __NAMESPACE__ . "\\testPHPVariadics1"],
|
177 |
-
['$one', '$one', __NAMESPACE__ . "\\testPHPVariadics2"],
|
178 |
-
];
|
179 |
-
|
180 |
-
if (defined('HHVM_VERSION')) {
|
181 |
-
// HHVM has different implementation details
|
182 |
-
$cases = array_merge($cases, [
|
183 |
-
['$value1', '$value1', "min"],
|
184 |
-
['$one, $two', '$one, $two', __NAMESPACE__ . "\\testPHPVariadics3"],
|
185 |
-
['&$one, $two', '&$one, $two', __NAMESPACE__ . "\\testPHPVariadics4"],
|
186 |
-
]);
|
187 |
-
} else {
|
188 |
-
$cases = array_merge($cases, [
|
189 |
-
version_compare(PHP_VERSION, '8', '<') ? ["", "", "min"] : ['$value', '$value', "min"],
|
190 |
-
[
|
191 |
-
sprintf(
|
192 |
-
"\$one, \$two = '%s'",
|
193 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
194 |
-
),
|
195 |
-
'$one, $two',
|
196 |
-
__NAMESPACE__ . "\\testPHPVariadics3"
|
197 |
-
],
|
198 |
-
[
|
199 |
-
sprintf(
|
200 |
-
"&\$one, \$two = '%s'",
|
201 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
202 |
-
),
|
203 |
-
'&$one, $two',
|
204 |
-
__NAMESPACE__ . "\\testPHPVariadics4"
|
205 |
-
],
|
206 |
-
]);
|
207 |
-
}
|
208 |
-
|
209 |
-
if (version_compare(PHP_VERSION, '8.0', '<')) {
|
210 |
-
$cases = array_merge($cases, [
|
211 |
-
[
|
212 |
-
sprintf(
|
213 |
-
"\$one, \$two",
|
214 |
-
MockFunctionGenerator::DEFAULT_ARGUMENT
|
215 |
-
),
|
216 |
-
'$one, $two',
|
217 |
-
__NAMESPACE__ . "\\testOptionalParametersBeforeRequired"
|
218 |
-
],
|
219 |
-
]);
|
220 |
-
}
|
221 |
-
|
222 |
-
return $cases;
|
223 |
-
}
|
224 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/php-mock/php-mock/tests/spy/SpyTest.php
DELETED
@@ -1,179 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace phpmock\spy;
|
4 |
-
|
5 |
-
use phpmock\Mock;
|
6 |
-
use phpmock\AbstractMockTest;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Tests the Spy.
|
10 |
-
*
|
11 |
-
* @author Markus Malkusch <markus@malkusch.de>
|
12 |
-
* @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
|
13 |
-
* @license http://www.wtfpl.net/txt/copying/ WTFPL
|
14 |
-
* @see Spy
|
15 |
-
*/
|
16 |
-
class SpyTest extends AbstractMockTest
|
17 |
-
{
|
18 |
-
|
19 |
-
protected function defineFunction($namespace, $functionName)
|
20 |
-
{
|
21 |
-
$mock = new Spy($namespace, $functionName, function () {
|
22 |
-
});
|
23 |
-
$mock->define();
|
24 |
-
}
|
25 |
-
|
26 |
-
protected function mockFunction($namespace, $functionName, callable $function)
|
27 |
-
{
|
28 |
-
$mock = new Spy($namespace, $functionName, $function);
|
29 |
-
$mock->enable();
|
30 |
-
}
|
31 |
-
|
32 |
-
protected function disableMocks()
|
33 |
-
{
|
34 |
-
Mock::disableAll();
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Tests spying.
|
39 |
-
*
|
40 |
-
* @param array $expected
|
41 |
-
* @param string $name
|
42 |
-
* @param callable $invocations
|
43 |
-
*
|
44 |
-
* @test
|
45 |
-
* @dataProvider provideTestGetInvocations
|
46 |
-
*/
|
47 |
-
public function testGetInvocations(array $expected, $name, callable $invocations)
|
48 |
-
{
|
49 |
-
$spy = new Spy(__NAMESPACE__, $name);
|
50 |
-
$spy->enable();
|
51 |
-
call_user_func($invocations);
|
52 |
-
$this->assertEquals($expected, $spy->getInvocations());
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Returns test cases for testGetInvocations().
|
57 |
-
*
|
58 |
-
* @return array Test cases for testGetInvocations.
|
59 |
-
*/
|
60 |
-
public function provideTestGetInvocations()
|
61 |
-
{
|
62 |
-
eval("function testGetInvocations_noParameters() { return 123; }");
|
63 |
-
eval("function testGetInvocations_oneParameter(\$a) { return \$a + 1; }");
|
64 |
-
eval("function testGetInvocations_twoParameters(\$a, \$b) { return \$a + \$b; }");
|
65 |
-
eval("function testGetInvocations_optionalParameter(\$a = null) { return \$a; }");
|
66 |
-
|
67 |
-
return [
|
68 |
-
[
|
69 |
-
[],
|
70 |
-
"testGetInvocations_noParameters",
|
71 |
-
function () {
|
72 |
-
}
|
73 |
-
],
|
74 |
-
[
|
75 |
-
[new Invocation([], 123)],
|
76 |
-
"testGetInvocations_noParameters",
|
77 |
-
function () {
|
78 |
-
testGetInvocations_noParameters();
|
79 |
-
}
|
80 |
-
],
|
81 |
-
[
|
82 |
-
[
|
83 |
-
new Invocation([], 123),
|
84 |
-
new Invocation([], 123),
|
85 |
-
],
|
86 |
-
"testGetInvocations_noParameters",
|
87 |
-
function () {
|
88 |
-
testGetInvocations_noParameters();
|
89 |
-
testGetInvocations_noParameters();
|
90 |
-
}
|
91 |
-
],
|
92 |
-
[
|
93 |
-
[new Invocation([1], 2)],
|
94 |
-
"testGetInvocations_oneParameter",
|
95 |
-
function () {
|
96 |
-
testGetInvocations_oneParameter(1);
|
97 |
-
}
|
98 |
-
],
|
99 |
-
[
|
100 |
-
[new Invocation([1, 2], 3)],
|
101 |
-
"testGetInvocations_twoParameters",
|
102 |
-
function () {
|
103 |
-
testGetInvocations_twoParameters(1, 2);
|
104 |
-
}
|
105 |
-
],
|
106 |
-
[
|
107 |
-
[new Invocation([], null)],
|
108 |
-
"testGetInvocations_optionalParameter",
|
109 |
-
function () {
|
110 |
-
testGetInvocations_optionalParameter();
|
111 |
-
}
|
112 |
-
],
|
113 |
-
[
|
114 |
-
[new Invocation([123], 123)],
|
115 |
-
"testGetInvocations_optionalParameter",
|
116 |
-
function () {
|
117 |
-
testGetInvocations_optionalParameter(123);
|
118 |
-
}
|
119 |
-
],
|
120 |
-
];
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Tests the default function.
|
125 |
-
*
|
126 |
-
* @test
|
127 |
-
*/
|
128 |
-
public function testDefaultFunction()
|
129 |
-
{
|
130 |
-
eval("function testDefaultFunction() { return 123; }");
|
131 |
-
$spy = new Spy(__NAMESPACE__, "testDefaultFunction");
|
132 |
-
$spy->enable();
|
133 |
-
|
134 |
-
$result = testDefaultFunction();
|
135 |
-
$this->assertEquals(123, $result);
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* An exception should still be recorded.
|
140 |
-
*
|
141 |
-
* @test
|
142 |
-
*/
|
143 |
-
public function testException()
|
144 |
-
{
|
145 |
-
eval('function testException($foo) { throw new \Exception(); }');
|
146 |
-
$spy = new Spy(__NAMESPACE__, "testException");
|
147 |
-
$spy->enable();
|
148 |
-
|
149 |
-
try {
|
150 |
-
testException("foo");
|
151 |
-
$this->fail("Expected exception");
|
152 |
-
} catch (\Exception $e) {
|
153 |
-
$invocation = $spy->getInvocations()[0];
|
154 |
-
|
155 |
-
$this->assertEquals(["foo"], $invocation->getArguments());
|
156 |
-
$this->assertNull($invocation->getReturn());
|
157 |
-
$this->assertTrue($invocation->isExceptionThrown());
|
158 |
-
$this->assertEquals($e, $invocation->getException());
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Test the invocation of a none exception call.
|
164 |
-
*
|
165 |
-
* @test
|
166 |
-
*/
|
167 |
-
public function testNoException()
|
168 |
-
{
|
169 |
-
eval("function testNoException() { }");
|
170 |
-
$spy = new Spy(__NAMESPACE__, "testNoException");
|
171 |
-
$spy->enable();
|
172 |
-
|
173 |
-
testNoException();
|
174 |
-
|
175 |
-
$invocation = $spy->getInvocations()[0];
|
176 |
-
$this->assertFalse($invocation->isExceptionThrown());
|
177 |
-
$this->assertNull($invocation->getException());
|
178 |
-
}
|
179 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/CHANGELOG.md
DELETED
@@ -1,1488 +0,0 @@
|
|
1 |
-
# Change Log for the PHPCompatibility standard for PHP Codesniffer
|
2 |
-
|
3 |
-
All notable changes to this project will be documented in this file.
|
4 |
-
|
5 |
-
This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
|
6 |
-
|
7 |
-
Up to version 8.0.0, the `major.minor` version numbers were based on the PHP version for which compatibility check support was added, with `patch` version numbers being specific to this library.
|
8 |
-
From version 8.0.0 onwards, [Semantic Versioning](http://semver.org/) is used.
|
9 |
-
|
10 |
-
<!-- Legend to the icons used: https://github.com/PHPCompatibility/PHPCompatibility/pull/506#discussion_r131650488 -->
|
11 |
-
|
12 |
-
|
13 |
-
## [Unreleased]
|
14 |
-
|
15 |
-
_Nothing yet._
|
16 |
-
|
17 |
-
## [9.3.5] - 2019-12-27
|
18 |
-
|
19 |
-
See all related issues and PRs in the [9.3.5 milestone].
|
20 |
-
|
21 |
-
### Added
|
22 |
-
- :star: `PHPCompatibility.Classes.NewClasses` sniff: recognize the new `FFI` extension related classes as introduced in PHP 7.4. [#949](https://github.com/PHPCompatibility/PHPCompatibility/pull/949)
|
23 |
-
- :star: `PHPCompatibility.IniDirectives.NewIniDirectives` sniff: detect use of the new `FFI` extension related ini directives as introduced in PHP 7.4. [#949](https://github.com/PHPCompatibility/PHPCompatibility/pull/949)
|
24 |
-
|
25 |
-
### Changed
|
26 |
-
- :pencil: `PHPCompatibility.Syntax.NewShortArray`: improved clarity of the error message and made it consistent with other error messages in this standard. [#934](https://github.com/PHPCompatibility/PHPCompatibility/pull/934)
|
27 |
-
- :pencil: `PHPCompatibility.Interfaces.NewInterfaces`: updated the URL which is mentioned in select error messages. [#942](https://github.com/PHPCompatibility/PHPCompatibility/pull/942)
|
28 |
-
- :recycle: Another slew of code documentation fixes. [#937](https://github.com/PHPCompatibility/PHPCompatibility/pull/937), [#939](https://github.com/PHPCompatibility/PHPCompatibility/pull/939), [#940](https://github.com/PHPCompatibility/PHPCompatibility/pull/940), [#941](https://github.com/PHPCompatibility/PHPCompatibility/pull/941), [#943](https://github.com/PHPCompatibility/PHPCompatibility/pull/943), [#944](https://github.com/PHPCompatibility/PHPCompatibility/pull/944), [#951](https://github.com/PHPCompatibility/PHPCompatibility/pull/951), [#950](https://github.com/PHPCompatibility/PHPCompatibility/pull/950). Fixes [#734](https://github.com/PHPCompatibility/PHPCompatibility/issues/734).
|
29 |
-
- :green_heart: Travis: various tweaks. The builds against PHP 7.4 are no longer allowed to fail. [#935](https://github.com/PHPCompatibility/PHPCompatibility/pull/935), [#938](https://github.com/PHPCompatibility/PHPCompatibility/pull/938)
|
30 |
-
For running the sniffs on PHP 7.4, it is recommended to use PHP_CodeSniffer 3.5.0+ as PHP_CodeSniffer itself is
|
31 |
-
not compatible with PHP 7.4 until version 3.5.0.
|
32 |
-
|
33 |
-
### Fixed
|
34 |
-
- :bug: `PHPCompatibility.Classes.NewClasses`: two new PHP 7.4 classes were being checked as if they were Exceptions. [#945](https://github.com/PHPCompatibility/PHPCompatibility/pull/945)
|
35 |
-
|
36 |
-
### Credits
|
37 |
-
Thanks go out to [William Entriken] for their contribution to this version. :clap:
|
38 |
-
|
39 |
-
|
40 |
-
## [9.3.4] - 2019-11-15
|
41 |
-
|
42 |
-
See all related issues and PRs in the [9.3.4 milestone].
|
43 |
-
|
44 |
-
### Fixed
|
45 |
-
- :bug: `PHPCompatibility.Keywords.ForbiddenNames`: false positive for list when used in a `foreach()` condition. [#930](https://github.com/PHPCompatibility/PHPCompatibility/pull/930). Fixes [#928](https://github.com/PHPCompatibility/PHPCompatibility/issues/928), [#929](https://github.com/PHPCompatibility/PHPCompatibility/pull/929)
|
46 |
-
|
47 |
-
### Credits
|
48 |
-
Thanks go out to [Sergii Bondarenko] for their contribution to this version. :clap:
|
49 |
-
|
50 |
-
|
51 |
-
## [9.3.3] - 2019-11-11
|
52 |
-
|
53 |
-
See all related issues and PRs in the [9.3.3 milestone].
|
54 |
-
|
55 |
-
### Added
|
56 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of yet more (undocumented) PHP 7.2 Sodium constants. [#924](https://github.com/PHPCompatibility/PHPCompatibility/pull/924)
|
57 |
-
- :star: `PHPCompatibility.Keywords.ForbiddenNames` sniff: detect the use of more reserved keywords which are not allowed to be used to name certain constructs. [#923](https://github.com/PHPCompatibility/PHPCompatibility/pull/923). Fixes [#922](https://github.com/PHPCompatibility/PHPCompatibility/issues/922)
|
58 |
-
|
59 |
-
### Fixed
|
60 |
-
- :bug: `PHPCompatibility.FunctionNameRestrictions.RemovedPHP4StyleConstructors`: false positive detecting PHP4-style constructors when declared in interfaces. The class implementing the interface will not have the same name as the interface, so the actual method would not be regarded as a PHP4 style constructor. [#921](https://github.com/PHPCompatibility/PHPCompatibility/pull/921)
|
61 |
-
|
62 |
-
### Credits
|
63 |
-
Thanks go out to [Nikhil] for their contribution to this version. :clap:
|
64 |
-
|
65 |
-
|
66 |
-
## [9.3.2] - 2019-10-16
|
67 |
-
|
68 |
-
See all related issues and PRs in the [9.3.2 milestone].
|
69 |
-
|
70 |
-
### Added
|
71 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of the PHP 7.2 `SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13` constant. [#915](https://github.com/PHPCompatibility/PHPCompatibility/pull/915)
|
72 |
-
- :books: Readme: a list of projects which are build upon or extend PHPCompatibility. [#904](https://github.com/PHPCompatibility/PHPCompatibility/pull/904)
|
73 |
-
|
74 |
-
### Changed
|
75 |
-
- :pushpin: `PHPCompatibility.FunctionNameRestrictions.RemovedPHP4StyleConstructors`: minor efficiency fix to make the sniff faster. [#912](https://github.com/PHPCompatibility/PHPCompatibility/pull/912)
|
76 |
-
- :pushpin: `PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames`: functions marked as `@deprecated` in the function docblock will now be ignored by this sniff. [#917](https://github.com/PHPCompatibility/PHPCompatibility/pull/917). Fixes [#911](https://github.com/PHPCompatibility/PHPCompatibility/issues/911)
|
77 |
-
- :pencil: `PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters`: the `$ooScopeTokens` property is now `protected`, it should never have been `public` in the first place. [#907](https://github.com/PHPCompatibility/PHPCompatibility/pull/907)
|
78 |
-
- :recycle: More code documentation fixes. [#903](https://github.com/PHPCompatibility/PHPCompatibility/pull/903), [#916](https://github.com/PHPCompatibility/PHPCompatibility/pull/916)
|
79 |
-
- :books: Readme/Contributing: various tweaks. [#904](https://github.com/PHPCompatibility/PHPCompatibility/pull/904), [#905](https://github.com/PHPCompatibility/PHPCompatibility/pull/905)
|
80 |
-
|
81 |
-
### Fixed
|
82 |
-
- :bug: `PHPCompatibility.FunctionUse.OptionalToRequiredFunctionParameters`: false positive when a class is instantiated which has the same name as one of the affected functions. [#914](https://github.com/PHPCompatibility/PHPCompatibility/pull/914). Fixes [#913](https://github.com/PHPCompatibility/PHPCompatibility/issues/913)
|
83 |
-
- :bug: `PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters`: false positive when a class is instantiated which has the same name as one of the affected functions. [#914](https://github.com/PHPCompatibility/PHPCompatibility/pull/914)
|
84 |
-
- :bug: `PHPCompatibility.MethodUse.NewDirectCallsToClone`: false positive on calling `__clone()` from within the class being cloned [#910](https://github.com/PHPCompatibility/PHPCompatibility/pull/910). Fixes [#629 (comment)](https://github.com/PHPCompatibility/PHPCompatibility/issues/629#issuecomment-532607809)
|
85 |
-
- :bug: `PHPCompatibility.Miscellaneous.ValidIntegers`: binary numbers using an uppercase `B` were not always recognized correctly. [#909](https://github.com/PHPCompatibility/PHPCompatibility/pull/909)
|
86 |
-
|
87 |
-
|
88 |
-
## [9.3.1] - 2019-09-06
|
89 |
-
|
90 |
-
See all related issues and PRs in the [9.3.1 milestone].
|
91 |
-
|
92 |
-
### Changed
|
93 |
-
- :recycle: A whole slew of code documentation fixes. [#892](https://github.com/PHPCompatibility/PHPCompatibility/pull/892), [#895](https://github.com/PHPCompatibility/PHPCompatibility/pull/895), [#896](https://github.com/PHPCompatibility/PHPCompatibility/pull/896), [#897](https://github.com/PHPCompatibility/PHPCompatibility/pull/897), [#898](https://github.com/PHPCompatibility/PHPCompatibility/pull/898), [#899](https://github.com/PHPCompatibility/PHPCompatibility/pull/899), [#900](https://github.com/PHPCompatibility/PHPCompatibility/pull/900)
|
94 |
-
- :wrench: Travis: minor tweaks to the build script. [#893](https://github.com/PHPCompatibility/PHPCompatibility/pull/893)
|
95 |
-
|
96 |
-
### Fixed
|
97 |
-
- :bug: `PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder`: false positive when an array item in the second parameter contained a ternary. [#891](https://github.com/PHPCompatibility/PHPCompatibility/pull/891). Fixes [#890](https://github.com/PHPCompatibility/PHPCompatibility/issues/890)
|
98 |
-
- :bug: `PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder`: will now take array casts into account when determining which parameter is `$pieces`. [#891](https://github.com/PHPCompatibility/PHPCompatibility/pull/891).
|
99 |
-
- :bug: `PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder`: hardening of the logic to not examine the second parameter when the first is just and only a text string (`$glue`). [#891](https://github.com/PHPCompatibility/PHPCompatibility/pull/891).
|
100 |
-
|
101 |
-
|
102 |
-
## [9.3.0] - 2019-08-29
|
103 |
-
|
104 |
-
See all related issues and PRs in the [9.3.0 milestone].
|
105 |
-
|
106 |
-
To keep informed of the progress of covering "_everything PHP 7.4_" in PHPCompatibility, please subscribe to issue [#808](https://github.com/PHPCompatibility/PHPCompatibility/issues/808).
|
107 |
-
|
108 |
-
### Changes expected in PHPCompatibility 10.0.0
|
109 |
-
The next version of PHPCompatibility is expected to include a new external dependency.
|
110 |
-
|
111 |
-
In this same release, support for PHP < 5.4 and PHP_CodeSniffer < 2.6.0 will be dropped.
|
112 |
-
|
113 |
-
The `10.0.0` release is expected around the same time as the release of PHP 7.4 - end of November/beginning of December 2019.
|
114 |
-
|
115 |
-
### Added
|
116 |
-
- :star2: New `PHPCompatibility.Miscellaneous.NewPHPOpenTagEOF` sniff to detect a stand-alone PHP open tag at the end of a file, without trailing newline, as will be supported as of PHP 7.4. [#843](https://github.com/PHPCompatibility/PHPCompatibility/pull/846)
|
117 |
-
- :star2: New `PHPCompatibility.ParameterValues.ForbiddenStripTagsSelfClosingXHTML` sniff to detect calls to `strip_tags()` passing self-closing XHTML tags in the `$allowable_tags` parameter. This has not been supported since PHP 5.3.4. [#866](https://github.com/PHPCompatibility/PHPCompatibility/pull/866)
|
118 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault` sniff to detect calls to `html_entity_decode()`, `htmlentities()` and `htmlspecialchars()` which are impacted by the change to the default value of the `$encoding` parameter in PHP 5.4. [#862](https://github.com/PHPCompatibility/PHPCompatibility/pull/862)
|
119 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewIconvMbstringCharsetDefault` sniff to detect code impacted by the change in the `default_charset` value in PHP 5.6. [#864](https://github.com/PHPCompatibility/PHPCompatibility/pull/864) Fixes [#839](https://github.com/PHPCompatibility/PHPCompatibility/issues/839)
|
120 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewIDNVariantDefault` sniff to detect calls to `idn_to_ascii()` and `idn_to_utf8()` impacted by the PHP 7.4 change in the default value for the `$variant` parameter. [#861](https://github.com/PHPCompatibility/PHPCompatibility/pull/861)
|
121 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues` sniff to detect calls to `password_hash()` and `password_needs_rehash()` impacted by the changed value of the `PASSWORD_DEFAULT`, `PASSWORD_BCRYPT`, `PASSWORD_ARGON2I` and `PASSWORD_ARGON2ID` constants in PHP 7.4. [#865](https://github.com/PHPCompatibility/PHPCompatibility/pull/865)
|
122 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewProcOpenCmdArray` sniff to detect calls to `proc_open()` passing an array for the `$cmd` parameter as supported as of PHP 7.4. [#869](https://github.com/PHPCompatibility/PHPCompatibility/pull/869)
|
123 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewStripTagsAllowableTagsArray` sniff to detect calls to `strip_tags()` passing an array for the `$allowable_tags` parameter as will be supported as of PHP 7.4. [#867](https://github.com/PHPCompatibility/PHPCompatibility/pull/867)
|
124 |
-
- :star2: New `PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder` sniff to detect `implode()` being called with `$glue` and `$pieces` in reverse order from the documented argument order. This was previously allowed for historical reasons, but will be deprecated in PHP 7.4. [#846](https://github.com/PHPCompatibility/PHPCompatibility/pull/846)
|
125 |
-
- :star2: New `PHPCompatibility.ParameterValues.RemovedMbStrrposEncodingThirdParam` sniff to detect the `$encoding` being passed as the third, instead of the fourth parameter, to `mb_strrpos()` as has been soft deprecated since PHP 5.2 and will be hard deprecated as of PHP 7.4. [#860](https://github.com/PHPCompatibility/PHPCompatibility/pull/860)
|
126 |
-
- :star2: New `PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess` sniff to detect array and string offset access using curly braces as will be deprecated as of PHP 7.4. [#855](https://github.com/PHPCompatibility/PHPCompatibility/pull/855)
|
127 |
-
- In contrast to any other sniff in the PHPCompatibility standard, this sniff contains an auto-fixer.
|
128 |
-
- :star2: New `PHPCompatibility.TextStrings.NewUnicodeEscapeSequence` sniff to detect use of the PHP 7.0+ unicode codepoint escape sequences and issues with invalid sequences. [#856](https://github.com/PHPCompatibility/PHPCompatibility/pull/856)
|
129 |
-
- :star2: New `PHPCompatibility.Upgrade.LowPHP` sniff to give users of old PHP versions advance warning when support will be dropped in the near future. [#838](https://github.com/PHPCompatibility/PHPCompatibility/pull/838)
|
130 |
-
At this moment, the intention is to drop support for PHP 5.3 by the end of this year.
|
131 |
-
- :star: `PHPCompatibility.Classes.NewClasses` sniff: recognize the new `WeakReference` class as introduced in PHP 7.4. [#857](https://github.com/PHPCompatibility/PHPCompatibility/pull/857)
|
132 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of new Curl constants as introduced in PHP 7.3.5. [#878](https://github.com/PHPCompatibility/PHPCompatibility/pull/878)
|
133 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of the revived `T_BAD_CHARACTER` constant as re-introduced in PHP 7.4. [#882](https://github.com/PHPCompatibility/PHPCompatibility/pull/882)
|
134 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of the new `IMG_FILTER_SCATTER` and `PASSWORD_ARGON2_PROVIDER` constants as introduced in PHP 7.4. [#887](https://github.com/PHPCompatibility/PHPCompatibility/pull/887)
|
135 |
-
- :star: `PHPCompatibility.Constants.RemovedConstants` sniff: detection of use of the `CURLPIPE_HTTP1` constant which will be deprecated in PHP 7.4. [#879](https://github.com/PHPCompatibility/PHPCompatibility/pull/879)
|
136 |
-
- :star: `PHPCompatibility.Constants.RemovedConstants` sniff: detection of use of the `FILTER_SANITIZE_MAGIC_QUOTES` constant which will be deprecated in PHP 7.4. [#845](https://github.com/PHPCompatibility/PHPCompatibility/pull/845)
|
137 |
-
- :star: `PHPCompatibility.Constants.RemovedConstants` sniff: detection of use of the `T_CHARACTER` and `T_BAD_CHARACTER` constants which were removed in PHP 7.0. [#882](https://github.com/PHPCompatibility/PHPCompatibility/pull/882)
|
138 |
-
- :star: `PHPCompatibility.FunctionDeclarations.NewMagicMethods` sniff: recognize the new `__serialize()` and `__unserialize()` magic methods as introduced in PHP 7.4. [#868](https://github.com/PHPCompatibility/PHPCompatibility/pull/868)
|
139 |
-
- :star: `PHPCompatibility.FunctionDeclarations.NewMagicMethods` sniff: recognize the PHP 5.0 `__construct()` and `__destruct()` magic methods. [#884](https://github.com/PHPCompatibility/PHPCompatibility/pull/884)
|
140 |
-
- :star: `PHPCompatibility.FunctionDeclarations.NonStaticMagicMethods` sniff: recognize the new `__serialize()` and `__unserialize()` magic methods as introduced in PHP 7.4. [#868](https://github.com/PHPCompatibility/PHPCompatibility/pull/868)
|
141 |
-
- :star: `PHPCompatibility.FunctionUse.NewFunctions` sniff: recognize the new PHP 7.4 function `imagecreatefromtga()`. [#873](https://github.com/PHPCompatibility/PHPCompatibility/pull/873)
|
142 |
-
- :star: `PHPCompatibility.FunctionUse.RemovedFunctionParameters` sniff: recognize the deprecation of the `$age` parameter of the `curl_version()` function. [#874](https://github.com/PHPCompatibility/PHPCompatibility/pull/874)
|
143 |
-
- :star: `PHPCompatibility.FunctionUse.RemovedFunctions` sniff: recognize the PHP 7.4 deprecated `convert_cyr_string()()`, `ezmlm_hash()`, `get_magic_quotes_gpc()`, `get_magic_quotes_runtime()`, `hebrevc()`, `is_real()`, `money_format()` and `restore_include_path()` functions. [#847](https://github.com/PHPCompatibility/PHPCompatibility/pull/847)
|
144 |
-
- :star: `PHPCompatibility.IniDirectives.NewIniDirectives` sniff: detect use of the new PHP 7.4 `zend.exception_ignore_args` ini directive. [#871](https://github.com/PHPCompatibility/PHPCompatibility/pull/871)
|
145 |
-
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectives` sniff: detect use of the `allow_url_include` ini directive which is deprecated as of PHP 7.4. [#870](https://github.com/PHPCompatibility/PHPCompatibility/pull/870)
|
146 |
-
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectives` sniff: detection of use of the `opcache.load_comments` directive which was removed in PHP 7.0. [#883](https://github.com/PHPCompatibility/PHPCompatibility/pull/883)
|
147 |
-
- :star: `PHPCompatibility.ParameterValues.NewHashAlgorithms`: recognize use of the new PHP 7.4 `crc32c` hash algorithm. [#872](https://github.com/PHPCompatibility/PHPCompatibility/pull/872)
|
148 |
-
- :star: `PHPCompatibility.TypeCasts.RemovedTypeCasts` sniff: detect usage of the `(real)` type cast which will be deprecated in PHP 7.4. [#844](https://github.com/PHPCompatibility/PHPCompatibility/pull/844)
|
149 |
-
- :star: Recognize the `recode` extension functionality which will be removed in PHP 7.4 (moved to PECL) in the `RemovedExtensions` and `RemovedFunctions` sniffs. [#841](https://github.com/PHPCompatibility/PHPCompatibility/pull/841)
|
150 |
-
- :star: Recognize the `OPcache` extension functionality which was be introduced in PHP 5.5, but not yet fully accounted for in the `NewFunctions` and `NewIniDirectives` sniffs. [#883](https://github.com/PHPCompatibility/PHPCompatibility/pull/883)
|
151 |
-
- :star: New `getCompleteTextString()` utility method to the `PHPCompatibility\Sniff` class. [#856](https://github.com/PHPCompatibility/PHPCompatibility/pull/856)
|
152 |
-
- :umbrella: Unit test for the `PHPCompatibility.Upgrade.LowPHPCS` sniff.
|
153 |
-
- :umbrella: Some extra unit tests for the `PHPCompatibility.ParameterValues.NewNegativeStringOffset`, `PHPCompatibility.ParameterValues.RemovedMbStringModifiers` and sniffs. [#876](https://github.com/PHPCompatibility/PHPCompatibility/pull/876), [#877](https://github.com/PHPCompatibility/PHPCompatibility/pull/877)
|
154 |
-
- :books: `CONTRIBUTING.md`: Added a list of typical sources for information about changes to PHP. [#875](https://github.com/PHPCompatibility/PHPCompatibility/pull/875)
|
155 |
-
|
156 |
-
### Changed
|
157 |
-
- :pushpin: `PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString` sniff: the sniff will now also examine the function docblock, if available, and will throw an error when a `@throws` tag is found in the docblock. [#880](https://github.com/PHPCompatibility/PHPCompatibility/pull/880). Fixes [#863](https://github.com/PHPCompatibility/PHPCompatibility/issues/863)
|
158 |
-
- :pushpin: `PHPCompatibility.FunctionDeclarations.NonStaticMagicMethods` sniff: will now also check the visibility and `static` (or not) requirements of the magic `__construct()`, `__destruct()`, `__clone()`, `__debugInfo()`, `__invoke()` and `__set_state()` methods. [#885](https://github.com/PHPCompatibility/PHPCompatibility/pull/885)
|
159 |
-
- :pushpin: `PHPCompatibility.Syntax.NewArrayStringDereferencing` sniff: the sniff will now also recognize array string dereferencing using curly braces as was (silently) supported since PHP 7.0. [#851](https://github.com/PHPCompatibility/PHPCompatibility/pull/851)
|
160 |
-
- The sniff will now also throw errors for each dereference found on the array/string, not just the first one.
|
161 |
-
- :pushpin: `PHPCompatibility.Syntax.NewClassMemberAccess` sniff: the sniff will now also recognize class member access on instantiation and cloning using curly braces as was (silently) supported since PHP 7.0. [#852](https://github.com/PHPCompatibility/PHPCompatibility/pull/852)
|
162 |
-
- The sniff will now also throw errors for each access detected, not just the first one.
|
163 |
-
- The line number on which the error is thrown in now set more precisely.
|
164 |
-
- :pushpin: `PHPCompatibility.Syntax.NewFunctionArrayDereferencing` sniff: the sniff will now also recognize function array dereferencing using curly braces as was (silently) supported since PHP 7.0. [#853](https://github.com/PHPCompatibility/PHPCompatibility/pull/853)
|
165 |
-
- The sniff will now also throw errors for each access detected, not just the first one.
|
166 |
-
- The line number on which the error is thrown in now set more precisely.
|
167 |
-
- :recycle: Various code clean-up and improvements. [#849](https://github.com/PHPCompatibility/PHPCompatibility/pull/849), [#850](https://github.com/PHPCompatibility/PHPCompatibility/pull/850)
|
168 |
-
- :recycle: Various minor inline documentation fixes. [#854](https://github.com/PHPCompatibility/PHPCompatibility/pull/854), [#886](https://github.com/PHPCompatibility/PHPCompatibility/pull/886)
|
169 |
-
- :wrench: Travis: various tweaks to the build script. [#834](https://github.com/PHPCompatibility/PHPCompatibility/pull/834), [#842](https://github.com/PHPCompatibility/PHPCompatibility/pull/842)
|
170 |
-
|
171 |
-
### Fixed
|
172 |
-
- :bug: `PHPCompatibility.FunctionDeclarations.ForbiddenParametersWithSameName` sniff: variable names are case-sensitive, so recognition of same named parameters should be done in a case-sensitive manner. [#848](https://github.com/PHPCompatibility/PHPCompatibility/pull/848)
|
173 |
-
- :bug: `PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString` sniff: Exceptions thrown within a `try` should not trigger the sniff. [#880](https://github.com/PHPCompatibility/PHPCompatibility/pull/880). Fixes [#863](https://github.com/PHPCompatibility/PHPCompatibility/issues/863)
|
174 |
-
- :bug: `PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString` sniff: the `$ooScopeTokens` property should never have been a public property. [#880](https://github.com/PHPCompatibility/PHPCompatibility/pull/880).
|
175 |
-
- :umbrella: Some of the unit tests for the `PHPCompatibility.Operators.RemovedTernaryAssociativity` sniff were not being run. [#836](https://github.com/PHPCompatibility/PHPCompatibility/pull/836)
|
176 |
-
|
177 |
-
|
178 |
-
## [9.2.0] - 2019-06-28
|
179 |
-
|
180 |
-
See all related issues and PRs in the [9.2.0 milestone].
|
181 |
-
|
182 |
-
To keep informed of the progress of covering "_everything PHP 7.4_" in PHPCompatibility, please subscribe to issue [#808](https://github.com/PHPCompatibility/PHPCompatibility/issues/808).
|
183 |
-
|
184 |
-
### Added
|
185 |
-
- :star2: New `PHPCompatibility.Classes.ForbiddenAbstractPrivateMethods` sniff to detect methods declared as both `private` as well as `abstract`. This was allowed between PHP 5.0.0 and 5.0.4, but disallowed in PHP 5.1 as the behaviour of `private` and `abstract` are mutually exclusive. [#822](https://github.com/PHPCompatibility/PHPCompatibility/pull/822)
|
186 |
-
- :star2: New `PHPCompatibility.Classes.NewTypedProperties` sniff to detect PHP 7.4 typed property declarations. [#801](https://github.com/PHPCompatibility/PHPCompatibility/pull/801), [#829](https://github.com/PHPCompatibility/PHPCompatibility/pull/829)
|
187 |
-
- :star2: New `PHPCompatibility.Classes.RemovedOrphanedParent` sniff to detect the use of the `parent` keyword in classes without a parent (non-extended classes). This code pattern is deprecated in PHP 7.4 and will become a compile-error in PHP 8.0. [#818](https://github.com/PHPCompatibility/PHPCompatibility/pull/818)
|
188 |
-
- :star2: New `PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString` sniff to detect throwing exceptions from `__toString()` methods. This would previously result in a fatal error, but will be allowed as of PHP 7.4. [#814](https://github.com/PHPCompatibility/PHPCompatibility/pull/814)
|
189 |
-
- :star2: New `PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters` sniff to detect `__toString()` function declarations expecting parameters. This was disallowed in PHP 5.3. [#815](https://github.com/PHPCompatibility/PHPCompatibility/pull/815)
|
190 |
-
- :star2: New `PHPCompatibility.MethodUse.ForbiddenToStringParameters` sniff to detect direct calls to `__toString()` magic methods passing parameters. This was disallowed in PHP 5.3. [#830](https://github.com/PHPCompatibility/PHPCompatibility/pull/830)
|
191 |
-
- :star2: New `PHPCompatibility.Operators.ChangedConcatOperatorPrecedence` sniff to detect code affected by the upcoming change in operator precedence for the concatenation operator. The concatenation operator precedence will be lowered in PHP 8.0, with deprecation notices for code affected being thrown in PHP 7.4. [#805](https://github.com/PHPCompatibility/PHPCompatibility/pull/805)
|
192 |
-
- :star2: New `PHPCompatibility.Operators.RemovedTernaryAssociativity` sniff to detect code relying on left-associativity of the ternary operator. This behaviour will be deprecated in PHP 7.4 and removed in PHP 8.0. [#810](https://github.com/PHPCompatibility/PHPCompatibility/pull/810)
|
193 |
-
- :star2: New `PHPCompatibility.Syntax.NewArrayUnpacking` sniff to detect the use of the spread operator to unpack arrays when declaring a new array, as introduced in PHP 7.4. [#804](https://github.com/PHPCompatibility/PHPCompatibility/pull/804)
|
194 |
-
- :star: `PHPCompatibility.Classes.NewClasses` sniff: recognize the new `ReflectionReference` class as introduced in PHP 7.4. [#820](https://github.com/PHPCompatibility/PHPCompatibility/pull/820)
|
195 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of the new PHP 7.4 Core (Standard), MBString, Socket and Tidy constants. [#821](https://github.com/PHPCompatibility/PHPCompatibility/pull/821)
|
196 |
-
- :star: `PHPCompatibility.FunctionUse.NewFunctions` sniff: detect usage of the new PHP 7.4 `get_mangled_object_vars()`, `mb_str_split()`, `openssl_x509_verify()`, `password_algos()`, `pcntl_unshare()`, `sapi_windows_set_ctrl_handler()` and `sapi_windows_generate_ctrl_event()` functions. [#811](https://github.com/PHPCompatibility/PHPCompatibility/pull/811), [#819](https://github.com/PHPCompatibility/PHPCompatibility/pull/819), [#827](https://github.com/PHPCompatibility/PHPCompatibility/pull/827)
|
197 |
-
- :star: `PHPCompatibility.FunctionUse.NewFunctions` sniff: recognize the new OCI functions as introduced in PHP 7.2.14 and PHP 7.3.1. [#786](https://github.com/PHPCompatibility/PHPCompatibility/pull/786)
|
198 |
-
- :star: `PHPCompatibility.FunctionUse.RemovedFunctions` sniff: recognize the PHP 7.4 deprecated `ldap_control_paged_result_response()` and `ldap_control_paged_result()` functions. [#831](https://github.com/PHPCompatibility/PHPCompatibility/pull/831)
|
199 |
-
- :star: `PHPCompatibility.FunctionUse.RemovedFunctions` sniff: recognize the `Payflow Pro/pfpro` functions as removed in PHP 5.1. [#823](https://github.com/PHPCompatibility/PHPCompatibility/pull/823)
|
200 |
-
- :star: `PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters` sniff: account for the parameters for `array_merge()` and `array_merge_recursive()` becoming optional in PHP 7.4. [#817](https://github.com/PHPCompatibility/PHPCompatibility/pull/817)
|
201 |
-
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectives` sniff: recognize the `Payflow Pro/pfpro` ini directives as removed in PHP 5.1. [#823](https://github.com/PHPCompatibility/PHPCompatibility/pull/823)
|
202 |
-
- :star: Recognize the `interbase/Firebird` extension functionality which will be removed in PHP 7.4 (moved to PECL) in the `RemovedConstants`, `RemovedExtensions`, `RemovedFunctions` and `RemovedIniDirectives` sniffs. [#807](https://github.com/PHPCompatibility/PHPCompatibility/pull/807)
|
203 |
-
- :star: Recognize the `wddx` extension functionality which will be removed in PHP 7.4 (moved to PECL) in the `RemovedExtensions` and `RemovedFunctions` sniffs. [#826](https://github.com/PHPCompatibility/PHPCompatibility/pull/826)
|
204 |
-
- :star: New `isShortTernary()` and `isUnaryPlusMinus()` utility methods to the `PHPCompatibility\Sniff` class. [#810](https://github.com/PHPCompatibility/PHPCompatibility/pull/810), [#805](https://github.com/PHPCompatibility/PHPCompatibility/pull/805)
|
205 |
-
|
206 |
-
### Changed
|
207 |
-
- :pencil2: The `PHPCompatibility.Extensions.RemovedExtensions` sniff will now only report on the removed `Payflow Pro` extension when a function uses `pfpro_` as a prefix. Previously, it used the `pfpro` prefix (without underscore) for detection. [#812](https://github.com/PHPCompatibility/PHPCompatibility/pull/812)
|
208 |
-
- :pencil2: The error message thrown when the `T_ELLIPSIS` token, i.e. the spread operator, is detected. [#803](https://github.com/PHPCompatibility/PHPCompatibility/pull/803)
|
209 |
-
PHP 7.4 adds a third use-case for the spread operator. The adjusted error message accounts for this.
|
210 |
-
- :umbrella: `PHPCompatibility.FunctionDeclarations.NewParamTypeDeclarations` is now also tested with parameters using the splat operator. [#802](https://github.com/PHPCompatibility/PHPCompatibility/pull/802)
|
211 |
-
- :books: The documentation now uses the GitHub repo of `PHP_CodeSniffer` as the canonical entry point for `PHP_CodeSniffer`. Previously, it would point to the PEAR package. [#788](https://github.com/PHPCompatibility/PHPCompatibility/pull/788)
|
212 |
-
- :books: The links in the changelog now all point to the `PHPCompatibility/PHPCompatibility` repo and no longer to the (deprecated) `wimg/PHPCompatibility` repo. [#828](https://github.com/PHPCompatibility/PHPCompatibility/pull/828)
|
213 |
-
- :recycle: Various minor inline documentation improvements. [#825](https://github.com/PHPCompatibility/PHPCompatibility/pull/825)
|
214 |
-
- :wrench: Various performance optimizations and code simplifications. [#783](https://github.com/PHPCompatibility/PHPCompatibility/pull/783), [#784](https://github.com/PHPCompatibility/PHPCompatibility/pull/784), [#795](https://github.com/PHPCompatibility/PHPCompatibility/pull/795), [#813](https://github.com/PHPCompatibility/PHPCompatibility/pull/813)
|
215 |
-
- :green_heart: Travis: build tests are now being run against PHP 7.4 (unstable) as well. [#790](https://github.com/PHPCompatibility/PHPCompatibility/pull/790)
|
216 |
-
Note: the builds are currently not (yet) tested against PHP 8.0 (unstable) as there is no compatible PHPUnit version available (yet).
|
217 |
-
- :wrench: Travis: The build script has been refactored to use [stages](https://docs.travis-ci.com/user/build-stages/) to get the most relevant results faster. Additionally some more tweaks have been made to improve and/or simplify the build script. [#798](https://github.com/PHPCompatibility/PHPCompatibility/pull/798)
|
218 |
-
- :wrench: Build/PHPCS: warnings are no longer allowed for the PHPCompatibility native code. [#800](https://github.com/PHPCompatibility/PHPCompatibility/pull/800)
|
219 |
-
- :wrench: Build/PHPCS: added variable assignment alignment check and file include check to the PHPCompatibility native CS configuration. [#824](https://github.com/PHPCompatibility/PHPCompatibility/pull/824)
|
220 |
-
- :wrench: The minimum version for the recommended `DealerDirect/phpcodesniffer-composer-installer` Composer plugin has been upped to `0.5.0`. [#791](https://github.com/PHPCompatibility/PHPCompatibility/pull/791)
|
221 |
-
|
222 |
-
### Fixed
|
223 |
-
- :bug: The `PHPCompatibility.Extensions.RemovedExtensions` sniff contained a typo in the alternative recommended for the removed `mcve` extension. [#806](https://github.com/PHPCompatibility/PHPCompatibility/pull/806)
|
224 |
-
- :bug: The `PHPCompatibility.Extensions.RemovedExtensions` sniff listed the wrong removal version number for the `Payflow Pro/pfpro` extension (PHP 5.3 instead of the correct 5.1). [#823](https://github.com/PHPCompatibility/PHPCompatibility/pull/823)
|
225 |
-
|
226 |
-
### Credits
|
227 |
-
Thanks go out to [Yılmaz] and [Tim Millwood] for their contribution to this version. :clap:
|
228 |
-
|
229 |
-
|
230 |
-
## [9.1.1] - 2018-12-31
|
231 |
-
|
232 |
-
See all related issues and PRs in the [9.1.1 milestone].
|
233 |
-
|
234 |
-
### Fixed
|
235 |
-
- :bug: `ForbiddenThisUseContexts`: false positive for unsetting `$this['key']` on objects implementing `ArrayAccess`. [#781](https://github.com/PHPCompatibility/PHPCompatibility/pull/781). Fixes [#780](https://github.com/PHPCompatibility/PHPCompatibility/issues/780)
|
236 |
-
|
237 |
-
## [9.1.0] - 2018-12-16
|
238 |
-
|
239 |
-
See all related issues and PRs in the [9.1.0 milestone].
|
240 |
-
|
241 |
-
### Added
|
242 |
-
- :star2: New `PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue` sniff to detect code which could be affected by the PHP 7.0 change in the values reported by `func_get_arg()`, `func_get_args()`, `debug_backtrace()` and exception backtraces. [#750](https://github.com/PHPCompatibility/PHPCompatibility/pull/750). Fixes [#585](https://github.com/PHPCompatibility/PHPCompatibility/pull/585).
|
243 |
-
- :star2: New `PHPCompatibility.MethodUse.NewDirectCallsToClone` sniff to detect direct call to a `__clone()` magic method which wasn't allowed prior to PHP 7.0. [#743](https://github.com/PHPCompatibility/PHPCompatibility/pull/743). Fixes [#629](https://github.com/PHPCompatibility/PHPCompatibility/issues/629).
|
244 |
-
- :star2: New `PHPCompatibility.Variables.ForbiddenThisUseContext` sniff to detect most of the inconsistencies surrounding the use of the `$this` variable, which were removed in PHP 7.1. [#762](https://github.com/PHPCompatibility/PHPCompatibility/pull/762), [#771](https://github.com/PHPCompatibility/PHPCompatibility/pull/771). Fixes [#262](https://github.com/PHPCompatibility/PHPCompatibility/issues/262) and [#740](https://github.com/PHPCompatibility/PHPCompatibility/issues/740).
|
245 |
-
- :star: `NewClasses`: detection of more native PHP Exceptions. [#743](https://github.com/PHPCompatibility/PHPCompatibility/pull/743), [#753](https://github.com/PHPCompatibility/PHPCompatibility/pull/753)
|
246 |
-
- :star: `NewConstants` : detection of the new PHP 7.3 Curl, Stream Crypto and LDAP constants and some more PHP 7.0 Tokenizer constants. [#752](https://github.com/PHPCompatibility/PHPCompatibility/pull/752), [#767](https://github.com/PHPCompatibility/PHPCompatibility/pull/767), [#778](https://github.com/PHPCompatibility/PHPCompatibility/pull/778)
|
247 |
-
- :star: `NewFunctions` sniff: recognize (more) new LDAP functions as introduced in PHP 7.3. [#768](https://github.com/PHPCompatibility/PHPCompatibility/pull/768)
|
248 |
-
- :star: `NewFunctionParameters` sniff: recognize the new `$serverctrls` parameter which was added to a number of LDAP functions in PHP 7.3. [#769](https://github.com/PHPCompatibility/PHPCompatibility/pull/769)
|
249 |
-
- :star: `NewIniDirectives` sniff: recognize the new `imap.enable_insecure_rsh` ini directive as introduced in PHP 7.1.25, 7.2.13 and 7.3.0. [#770](https://github.com/PHPCompatibility/PHPCompatibility/pull/770)
|
250 |
-
- :star: `NewInterfaces` sniff: recognize two more Session related interfaces which were introduced in PHP 5.5.1 and 7.0 respectively. [#748](https://github.com/PHPCompatibility/PHPCompatibility/pull/748)
|
251 |
-
- :star: Duplicate of upstream `findStartOfStatement()` method to the `PHPCompatibility\PHPCSHelper` class to allow for PHPCS cross-version usage of that method. [#750](https://github.com/PHPCompatibility/PHPCompatibility/pull/750)
|
252 |
-
|
253 |
-
### Changed
|
254 |
-
- :pushpin: `RemovedPHP4StyleConstructors`: will now also detect PHP4-style constructors when declared in interfaces. [#751](https://github.com/PHPCompatibility/PHPCompatibility/pull/751)
|
255 |
-
- :pushpin: `Sniff::validDirectScope()`: the return value of this method has changed. Previously it would always be a boolean. It will stil return `false` when no valid direct scope has been found, but it will now return the `stackPtr` to the scope token if a _valid_ direct scope was encountered. [#758](https://github.com/PHPCompatibility/PHPCompatibility/pull/758)
|
256 |
-
- :rewind: `NewOperators` : updated the version number for `T_COALESCE_EQUAL`. [#746](https://github.com/PHPCompatibility/PHPCompatibility/pull/746)
|
257 |
-
- :pencil: Minor improvement to an error message in the unit test suite. [#742](https://github.com/PHPCompatibility/PHPCompatibility/pull/742)
|
258 |
-
- :recycle: Various code clean-up and improvements. [#745](https://github.com/PHPCompatibility/PHPCompatibility/pull/745), [#756](https://github.com/PHPCompatibility/PHPCompatibility/pull/756), [#774](https://github.com/PHPCompatibility/PHPCompatibility/pull/774)
|
259 |
-
- :recycle: Various minor inline documentation fixes. [#749](https://github.com/PHPCompatibility/PHPCompatibility/pull/749), [#757](https://github.com/PHPCompatibility/PHPCompatibility/pull/757)
|
260 |
-
- :umbrella: Improved code coverage recording. [#744](https://github.com/PHPCompatibility/PHPCompatibility/pull/744), [#776](https://github.com/PHPCompatibility/PHPCompatibility/pull/776)
|
261 |
-
- :green_heart: Travis: build tests are now being run against PHP 7.3 as well. [#511](https://github.com/PHPCompatibility/PHPCompatibility/pull/511)
|
262 |
-
Note: full PHP 7.3 support is only available in combination with PHP_CodeSniffer 2.9.2 or 3.3.1+ due to an incompatibility within PHP_CodeSniffer itself.
|
263 |
-
|
264 |
-
### Fixed
|
265 |
-
- :white_check_mark: Compatibility with the upcoming release of PHPCS 3.4.0. Deal with changed behaviour of the PHPCS `Tokenizer` regarding binary type casts. [#760](https://github.com/PHPCompatibility/PHPCompatibility/pull/760)
|
266 |
-
- :bug: `InternalInterfaces`: false negative for implemented/extended interfaces prefixed with a namespace separator. [#775](https://github.com/PHPCompatibility/PHPCompatibility/pull/775)
|
267 |
-
- :bug: `NewClasses`: the introduction version of various native PHP Exceptions has been corrected. [#743](https://github.com/PHPCompatibility/PHPCompatibility/pull/743), [#753](https://github.com/PHPCompatibility/PHPCompatibility/pull/753)
|
268 |
-
- :bug: `NewInterfaces`: false negative for implemented/extended interfaces prefixed with a namespace separator. [#775](https://github.com/PHPCompatibility/PHPCompatibility/pull/775)
|
269 |
-
- :bug: `RemovedPHP4StyleConstructors`: the sniff would examine methods in nested anonymous classes as if they were methods of the higher level class. [#751](https://github.com/PHPCompatibility/PHPCompatibility/pull/751)
|
270 |
-
- :rewind: `RemovedPHP4StyleConstructors`: the sniff will no longer throw false positives for the first method in an anonymous class when used in combination with PHPCS 2.3.x. [#751](https://github.com/PHPCompatibility/PHPCompatibility/pull/751)
|
271 |
-
- :rewind: `ReservedFunctionNames`: fixed incorrect error message text for methods in anonymous classes when used in combination with PHPCS 2.3.x. [#755](https://github.com/PHPCompatibility/PHPCompatibility/pull/755)
|
272 |
-
- :bug: `ReservedFunctionNames`: prevent duplicate errors being thrown for methods in nested anonymous classes. [#755](https://github.com/PHPCompatibility/PHPCompatibility/pull/755)
|
273 |
-
- :bug: `PHPCSHelper::findEndOfStatement()`: minor bug fix. [#749](https://github.com/PHPCompatibility/PHPCompatibility/pull/749)
|
274 |
-
- :bug: `Sniff::isClassProperty()`: class properties for classes nested in conditions or function calls were not always recognized as class properties. [#758](https://github.com/PHPCompatibility/PHPCompatibility/pull/758)
|
275 |
-
|
276 |
-
### Credits
|
277 |
-
Thanks go out to [Jonathan Champ] for his contribution to this version. :clap:
|
278 |
-
|
279 |
-
|
280 |
-
## [9.0.0] - 2018-10-07
|
281 |
-
|
282 |
-
**IMPORTANT**: This release contains **breaking changes**. Please read the below information carefully before upgrading!
|
283 |
-
|
284 |
-
All sniffs have been placed in meaningful categories and a number of sniffs have been renamed to have more consistent, meaningful and future-proof names.
|
285 |
-
|
286 |
-
Both the `PHPCompatibilityJoomla` [[GH](https://github.com/PHPCompatibility/PHPCompatibilityJoomla) | [Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-joomla)] as well as the `PHPCompatibilityWP` [[GH](https://github.com/PHPCompatibility/PHPCompatibilityWP)|[Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-wp)] rulesets have already been adjusted for this change and have released a new version which is compatible with this version of PHPCompatibility.
|
287 |
-
|
288 |
-
Aside from those CMS-based rulesets, this project now also offers a number of polyfill-library specific rulesets, such as `PHPCompatibilityPasswordCompat` [[GH](https://github.com/PHPCompatibility/PHPCompatibilityPasswordCompat) | [Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-passwordcompat)] for @ircmaxell's [`password_compat`](https://github.com/ircmaxell/password_compat) libary, `PHPCompatibilityParagonieRandomCompat` and `PHPCompatibilityParagonieSodiumCompat` [[GH](https://github.com/PHPCompatibility/PHPCompatibilityParagonie)|[Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-paragonie)] for the [Paragonie polyfills](https://github.com/paragonie?utf8=?&q=polyfill) and a number of rulesets related to various [polyfills offered by the Symfony project](https://github.com/symfony?utf8=?&q=polyfill) [[GH](https://github.com/PHPCompatibility/PHPCompatibilitySymfony)|[Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-symfony)].
|
289 |
-
|
290 |
-
If your project uses one of these polyfills, please consider using these special polyfill rulesets to prevent false positives.
|
291 |
-
|
292 |
-
Also as of this version, [Juliette Reinders Folmer] is now officially a co-maintainer of this package.
|
293 |
-
|
294 |
-
### Upgrade instructions
|
295 |
-
|
296 |
-
* If you have `<exclude name="..."/>` directives in your own project's custom ruleset which relate to sniffs from the PHPCompatibility library, you will need to update your ruleset to use the new sniff names.
|
297 |
-
* If you use the new [PHPCS 3.2+ inline annotations](https://github.com/squizlabs/PHP_CodeSniffer/releases/3.2.0), i.e. `// phpcs:ignore Standard.Category.SniffName`, in combination with PHPCompatibility sniff names, you will need to update these annotations.
|
298 |
-
* If you use neither of the above, you should be fine and upgrading should be painless.
|
299 |
-
|
300 |
-
### Overview of all the sniff renames:
|
301 |
-
|
302 |
-
Old Category.SniffName | New Category.SniffName
|
303 |
-
--- | ---
|
304 |
-
**PHP**.ArgumentFunctionsUsage | **FunctionUse**.ArgumentFunctionsUsage
|
305 |
-
**PHP**.CaseSensitiveKeywords | **Keywords**.CaseSensitiveKeywords
|
306 |
-
**PHP**.ConstantArraysUsingConst | **InitialValue**.**New**ConstantArraysUsingConst
|
307 |
-
**PHP**.ConstantArraysUsingDefine | **InitialValue**.**New**ConstantArraysUsingDefine
|
308 |
-
**PHP**.**Deprecated**Functions | **FunctionUse**.**Removed**Functions
|
309 |
-
**PHP**.**Deprecated**IniDirectives | **IniDirectives**.**Removed**IniDirectives
|
310 |
-
**PHP**.**Deprecated**MagicAutoload | **FunctionNameRestrictions**.**Removed**MagicAutoload
|
311 |
-
**PHP**.**Deprecated**NewReference | **Syntax**.**Removed**NewReference
|
312 |
-
**PHP**.**Deprecated**PHP4StyleConstructors | **FunctionNameRestrictions**.**Removed**PHP4StyleConstructors
|
313 |
-
**PHP**.**Deprecated**TypeCasts | **TypeCasts**.**Removed**TypeCasts
|
314 |
-
**PHP**.DiscouragedSwitchContinue | **ControlStructures**.DiscouragedSwitchContinue
|
315 |
-
**PHP**.DynamicAccessToStatic | **Syntax**.**New**DynamicAccessToStatic
|
316 |
-
**PHP**.EmptyNonVariable | **LanguageConstructs**.**New**EmptyNonVariable
|
317 |
-
**PHP**.ForbiddenBreakContinueOutsideLoop | **ControlStructures**.ForbiddenBreakContinueOutsideLoop
|
318 |
-
**PHP**.ForbiddenBreakContinueVariableArguments | **ControlStructures**.ForbiddenBreakContinueVariableArguments
|
319 |
-
**PHP**.ForbiddenCallTimePassByReference | **Syntax**.ForbiddenCallTimePassByReference
|
320 |
-
**PHP**.Forbidden**ClosureUseVariableNames** | **FunctionDeclarations**.Forbidden**VariableNamesInClosureUse**
|
321 |
-
**PHP**.ForbiddenEmptyListAssignment | **Lists**.ForbiddenEmptyListAssignment
|
322 |
-
**PHP**.Forbidden**Function**ParametersWithSameName | **FunctionDeclarations**.ForbiddenParametersWithSameName
|
323 |
-
**PHP**.ForbiddenGlobalVariableVariable | **Variables**.ForbiddenGlobalVariableVariable
|
324 |
-
**PHP**.ForbiddenNames | **Keywords**.ForbiddenNames
|
325 |
-
**PHP**.ForbiddenNamesAsDeclared | **Keywords**.ForbiddenNamesAsDeclared
|
326 |
-
**PHP**.ForbiddenNamesAsInvokedFunctions | **Keywords**.ForbiddenNamesAsInvokedFunctions
|
327 |
-
**PHP**.ForbiddenNegativeBitshift | **Operators**.ForbiddenNegativeBitshift
|
328 |
-
**PHP**.ForbiddenSwitchWithMultipleDefaultBlocks | **ControlStructures**.ForbiddenSwitchWithMultipleDefaultBlocks
|
329 |
-
**PHP**.InternalInterfaces | **Interfaces**.InternalInterfaces
|
330 |
-
**PHP**.LateStaticBinding | **Classes**.**New**LateStaticBinding
|
331 |
-
**PHP**.**MbstringReplaceE**Modifier | **ParameterValues**.**RemovedMbstring**Modifier**s**
|
332 |
-
**PHP**.NewAnonymousClasses | **Classes**.NewAnonymousClasses
|
333 |
-
**PHP**.NewArrayStringDereferencing | **Syntax**.NewArrayStringDereferencing
|
334 |
-
**PHP**.NewClasses | **Classes**.NewClasses
|
335 |
-
**PHP**.NewClassMemberAccess | **Syntax**.NewClassMemberAccess
|
336 |
-
**PHP**.NewClosure | **FunctionDeclarations**.NewClosure
|
337 |
-
**PHP**.NewConstants | **Constants**.NewConstants
|
338 |
-
**PHP**.NewConstantScalarExpressions | **InitialValue**.NewConstantScalarExpressions
|
339 |
-
**PHP**.NewConstVisibility | **Classes**.NewConstVisibility
|
340 |
-
**PHP**.NewExecutionDirectives | **ControlStructures**.NewExecutionDirectives
|
341 |
-
**PHP**.NewFunctionArrayDereferencing | **Syntax**.NewFunctionArrayDereferencing
|
342 |
-
**PHP**.NewFunctionParameters | **FunctionUse**.NewFunctionParameters
|
343 |
-
**PHP**.NewFunctions | **FunctionUse**.NewFunctions
|
344 |
-
**PHP**.NewGeneratorReturn | **Generators**.NewGeneratorReturn
|
345 |
-
**PHP**.NewGroupUseDeclarations | **UseDeclarations**.NewGroupUseDeclarations
|
346 |
-
**PHP**.NewHashAlgorithms | **ParameterValues**.NewHashAlgorithms
|
347 |
-
**PHP**.NewHeredoc**Initialize** | **InitialValue**.NewHeredoc
|
348 |
-
**PHP**.NewIniDirectives | **IniDirectives**.NewIniDirectives
|
349 |
-
**PHP**.NewInterfaces | **Interfaces**.NewInterfaces
|
350 |
-
**PHP**.NewKeywords | **Keywords**.NewKeywords
|
351 |
-
**PHP**.NewLanguageConstructs | **LanguageConstructs**.NewLanguageConstructs
|
352 |
-
**PHP**.NewMagicClassConstant | **Constants**.NewMagicClassConstant
|
353 |
-
**PHP**.NewMagicMethods | **FunctionNameRestrictions**.NewMagicMethods
|
354 |
-
**PHP**.NewMultiCatch | **ControlStructures**.NewMultiCatch
|
355 |
-
**PHP**.NewNullableTypes | **FunctionDeclarations**.NewNullableTypes
|
356 |
-
**PHP**.NewReturnTypeDeclarations | **FunctionDeclarations**.NewReturnTypeDeclarations
|
357 |
-
**PHP**.New**Scalar**TypeDeclarations | **FunctionDeclarations**.New**Param**TypeDeclarations
|
358 |
-
**PHP**.NewTrailingComma | **Syntax**.New**FunctionCall**TrailingComma
|
359 |
-
**PHP**.NewTypeCasts | **TypeCasts**.NewTypeCasts
|
360 |
-
**PHP**.NewUseConstFunction | **UseDeclarations**.NewUseConstFunction
|
361 |
-
**PHP**.NonStaticMagicMethods | **FunctionDeclarations**.NonStaticMagicMethods
|
362 |
-
**PHP**.OptionalRequiredFunctionParameters | **FunctionUse**.Optional**To**RequiredFunctionParameters
|
363 |
-
**PHP**.ParameterShadowSuperGlobals | **FunctionDeclarations**.**Forbidden**ParameterShadowSuperGlobals
|
364 |
-
**PHP**.**PCRENew**Modifiers | **ParameterValues**.**NewPCRE**Modifiers
|
365 |
-
**PHP**.**PregReplaceE**Modifier | **ParameterValues**.**RemovedPCRE**Modifier**s**
|
366 |
-
**PHP**.RemovedAlternativePHPTags | **Miscellaneous**.RemovedAlternativePHPTags
|
367 |
-
**PHP**.RemovedConstants | **Constants**.RemovedConstants
|
368 |
-
**PHP**.RemovedExtensions | **Extensions**.RemovedExtensions
|
369 |
-
**PHP**.RemovedFunctionParameters | **FunctionUse**.RemovedFunctionParameters
|
370 |
-
**PHP**.RemovedGlobalVariables | **Variables**.Removed**Predefined**GlobalVariables
|
371 |
-
**PHP**.RemovedHashAlgorithms | **ParameterValues**.RemovedHashAlgorithms
|
372 |
-
**PHP**.ReservedFunctionNames | **FunctionNameRestrictions**.ReservedFunctionNames
|
373 |
-
**PHP**.RequiredOptionalFunctionParameters | **FunctionUse**.Required**To**OptionalFunctionParameters
|
374 |
-
**PHP**.ShortArray | **Syntax**.**New**ShortArray
|
375 |
-
**PHP**.Ternary**Operators** | **Operators**.**NewShort**Ternary
|
376 |
-
**PHP**.ValidIntegers | **Miscellaneous**.ValidIntegers
|
377 |
-
**PHP**.**VariableVariables** | **Variables**.**NewUniformVariableSyntax**
|
378 |
-
|
379 |
-
### Changelog for version 9.0.0
|
380 |
-
|
381 |
-
See all related issues and PRs in the [9.0.0 milestone].
|
382 |
-
|
383 |
-
### Added
|
384 |
-
- :star2: New `PHPCompatibility.ControlStructures.NewForeachExpressionReferencing` sniff to detect referencing of `$value` within a `foreach()` when the iterated array is not a variable. This was not supported prior to PHP 5.5. [#664](https://github.com/PHPCompatibility/PHPCompatibility/pull/664)
|
385 |
-
- :star2: New `PHPCompatibility.ControlStructures.NewListInForeach` sniff to detect unpacking nested arrays into separate variables via the `list()` construct in a `foreach()` statement. This was not supported prior to PHP 5.5. [#657](https://github.com/PHPCompatibility/PHPCompatibility/pull/657)
|
386 |
-
- :star2: New `PHPCompatibility.FunctionNameRestrictions.RemovedNamespacedAssert` sniff to detect declaring a function called `assert()` within a namespace. This has been deprecated as of PHP 7.3. [#735](https://github.com/PHPCompatibility/PHPCompatibility/pull/735). Partially fixes [#718](https://github.com/PHPCompatibility/PHPCompatibility/issues/718).
|
387 |
-
- :star2: New `PHPCompatibility.Lists.AssignmentOrder` sniff to detect `list()` constructs affected by the change in assignment order in PHP 7.0. [#656](https://github.com/PHPCompatibility/PHPCompatibility/pull/656)
|
388 |
-
- :star2: New `PHPCompatibility.Lists.NewKeyedList` sniff to detect usage of keys in `list()`, support for which was added in PHP 7.1. [#655](https://github.com/PHPCompatibility/PHPCompatibility/pull/655). Fixes [#252](https://github.com/PHPCompatibility/PHPCompatibility/issues/252).
|
389 |
-
- :star2: New `PHPCompatibility.Lists.NewListReferenceAssignment` sniff to detect reference assignments being used in `list()` constructs, support for which has been added in PHP 7.3. [#731](https://github.com/PHPCompatibility/PHPCompatibility/pull/731)
|
390 |
-
- :star2: New `PHPCompatibility.Lists.NewShortList` sniff to detect the shorthand array syntax `[]` being used for symmetric array destructuring as introduced in PHP 7.1. [#654](https://github.com/PHPCompatibility/PHPCompatibility/pull/654). Fixes [#248](https://github.com/PHPCompatibility/PHPCompatibility/issues/248).
|
391 |
-
- :star2: New `PHPCompatibility.Operators.NewOperators` sniff which checks for usage of the pow, pow equals, spaceship and coalesce (equals) operators. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738)
|
392 |
-
These checks were previously contained within the `PHPCompatibility.LanguageConstructs.NewLanguageConstructs` sniff.
|
393 |
-
- :star2: New `PHPCompatibility.ParameterValues.ForbiddenGetClassNull` sniff to detect `null` being passed to `get_class()`, support for which has been removed in PHP 7.2 [#659](https://github.com/PHPCompatibility/PHPCompatibility/pull/659). Fixes [#557](https://github.com/PHPCompatibility/PHPCompatibility/issues/557).
|
394 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewArrayReduceInitialType` sniff to detect non-integers being passed as the `$initial` parameter to the `array_reduce()` function, which was not supported before PHP 5.3. [#666](https://github.com/PHPCompatibility/PHPCompatibility/pull/666). Fixes [#649](https://github.com/PHPCompatibility/PHPCompatibility/issues/649)
|
395 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewFopenModes` sniff to examine the `$mode` parameter passed to `fopen()` for modes not available in older PHP versions. [#658](https://github.com/PHPCompatibility/PHPCompatibility/pull/658)
|
396 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewNegativeStringOffset` sniff to detect negative string offsets being passed to string manipulation functions which was not supported before PHP 7.1. [#662](https://github.com/PHPCompatibility/PHPCompatibility/pull/662). Partially fixes [#253](https://github.com/PHPCompatibility/PHPCompatibility/issues/253).
|
397 |
-
- :star2: New `PHPCompatibility.ParameterValues.NewPackFormats` sniff to examine the `$format` parameter passed to `pack()` for formats not available in older PHP versions. [#665](https://github.com/PHPCompatibility/PHPCompatibility/pull/665)
|
398 |
-
- :star2: New `PHPCompatibility.ParameterValues.RemovedIconvEncoding` sniff to detect the PHP 5.6 deprecated encoding `$type`s being passed to `iconv_set_encoding()`. [#660](https://github.com/PHPCompatibility/PHPCompatibility/pull/660). Fixes [#475](https://github.com/PHPCompatibility/PHPCompatibility/issues/475).
|
399 |
-
- :star2: New `PHPCompatibility.ParameterValues.RemovedNonCryptoHashes` sniff to detect non-cryptographic hash algorithms being passed to various `hash_*()` functions. This is no longer accepted as of PHP 7.2. [#663](https://github.com/PHPCompatibility/PHPCompatibility/pull/663). Fixes [#559](https://github.com/PHPCompatibility/PHPCompatibility/issues/559)
|
400 |
-
- :star2: New `PHPCompatibility.ParameterValues.RemovedSetlocaleString` sniff to detect string literals being passed to the `$category` parameter of the `setlocale()` function. This behaviour was deprecated in PHP 4.2 and support has been removed in PHP 7.0. [#661](https://github.com/PHPCompatibility/PHPCompatibility/pull/661)
|
401 |
-
- :star2: New `PHPCompatibility.Syntax.NewFlexibleHeredocNowdoc` sniff to detect the new heredoc/nowdoc format as allowed as of PHP 7.3. [#736](https://github.com/PHPCompatibility/PHPCompatibility/pull/736). Fixes [#705](https://github.com/PHPCompatibility/PHPCompatibility/issues/705).
|
402 |
-
Note: This sniff is only supported in combination with PHP_CodeSniffer 2.6.0 and higher.
|
403 |
-
- :star: `PHPCompatibility.Classes.NewClasses` sniff: recognize the new `CompileError` and `JsonException` classes as introduced in PHP 7.3. [#676](https://github.com/PHPCompatibility/PHPCompatibility/pull/676)
|
404 |
-
- :star: `PHPCompatibility.Constants.NewConstants` sniff: recognize new constants which are being introduced in PHP 7.3. [#678](https://github.com/PHPCompatibility/PHPCompatibility/pull/678)
|
405 |
-
- :star: `PHPCompatibility.Constants.RemovedConstants` sniff: recognize constants which have been deprecated or removed in PHP 7.3. [#710](https://github.com/PHPCompatibility/PHPCompatibility/pull/710). Partially fixes [#718](https://github.com/PHPCompatibility/PHPCompatibility/issues/718).
|
406 |
-
- :star: `PHPCompatibility.FunctionUse.NewFunctions` sniff: recognize various new functions being introduced in PHP 7.3. [#679](https://github.com/PHPCompatibility/PHPCompatibility/pull/679)
|
407 |
-
- :star: `PHPCompatibility.FunctionUse.NewFunctions` sniff: recognize the `sapi_windows_*()`, `hash_hkdf()` and `pcntl_signal_get_handler()` functions as introduced in PHP 7.1. [#728](https://github.com/PHPCompatibility/PHPCompatibility/pull/728)
|
408 |
-
- :star: `PHPCompatibility.FunctionUse.RemovedFunctionParameters` sniff: recognize the deprecation of the `$case_insensitive` parameter for the `define()` function in PHP 7.3. [#706](https://github.com/PHPCompatibility/PHPCompatibility/pull/706)
|
409 |
-
- :star: `PHPCompatibility.FunctionUse.RemovedFunctions` sniff: recognize the PHP 7.3 deprecation of the `image2wbmp()`, `fgetss()` and `gzgetss()` functions, as well as the deprecation of undocumented Mbstring function aliases. [#681](https://github.com/PHPCompatibility/PHPCompatibility/pull/681), [#714](https://github.com/PHPCompatibility/PHPCompatibility/pull/714), [#720](https://github.com/PHPCompatibility/PHPCompatibility/pull/720). Partially fixes [#718](https://github.com/PHPCompatibility/PHPCompatibility/issues/718).
|
410 |
-
- :star: `PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters` sniff: account for the second parameter for `array_push()` and `array_unshift()` becoming optional in PHP 7.3, as well as for the `$mode` parameter for a range of `ftp_*()` functions becoming optional. [#680](https://github.com/PHPCompatibility/PHPCompatibility/pull/680)
|
411 |
-
- :star: `PHPCompatibility.IniDirectives.NewIniDirectives` sniff: recognize new `syslog` and `session` ini directives as introduced in PHP 7.3. [#702](https://github.com/PHPCompatibility/PHPCompatibility/pull/702), [#719](https://github.com/PHPCompatibility/PHPCompatibility/pull/719), [#730](https://github.com/PHPCompatibility/PHPCompatibility/pull/730)
|
412 |
-
- :star: `PHPCompatibility.IniDirectives.NewIniDirectives` sniff: recognize some more ini directives which were introduced in PHP 7.1. [#727](https://github.com/PHPCompatibility/PHPCompatibility/pull/727)
|
413 |
-
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectived` sniff: recognize ini directives removed in PHP 7.3. [#677](https://github.com/PHPCompatibility/PHPCompatibility/pull/677), [#717](https://github.com/PHPCompatibility/PHPCompatibility/pull/717). Partially fixes [#718](https://github.com/PHPCompatibility/PHPCompatibility/issues/718).
|
414 |
-
- :star: New `isNumericCalculation()` and `isVariable()` utility methods to the `PHPCompatibility\Sniff` class. [#664](https://github.com/PHPCompatibility/PHPCompatibility/pull/664), [#666](https://github.com/PHPCompatibility/PHPCompatibility/pull/666)
|
415 |
-
- :books: A section about the new sniff naming conventions to the `Contributing` file. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738)
|
416 |
-
|
417 |
-
### Changed
|
418 |
-
- :fire: All sniffs have been placed in meaningful categories and a number of sniffs have been renamed to have more consistent, meaningful and future-proof names. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738). Fixes [#601](https://github.com/PHPCompatibility/PHPCompatibility/issues/601), [#692](https://github.com/PHPCompatibility/PHPCompatibility/issues/692)
|
419 |
-
See the table at the top of this changelog for details of all the file renames.
|
420 |
-
- :umbrella: The unit test files have been moved about as well. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738)
|
421 |
-
* The directory structure for these now mirrors the default directory structure used by PHPCS itself.
|
422 |
-
* The file names of the unit test files have been adjusted for the changes made in the sniffs.
|
423 |
-
* The unit test case files have been renamed and moved to the same directory as the actual test file they apply to.
|
424 |
-
* The `BaseSniffTest::sniffFile()` method has been adjusted to match. The signature of this method has changed. Where it previously expected a relative path to the unit test case file, it now expects an absolute path.
|
425 |
-
* The unit tests for the utility methods in the `PHPCompatibility\Sniff` class have been moved to a new `PHPCompatibility\Util\Tests\Core` subdirectory.
|
426 |
-
* The bootstrap file used for PHPUnit has been moved to the project root directory and renamed `phpunit-bootstrap.php`.
|
427 |
-
- :twisted_rightwards_arrows: The `PHPCompatibility.LanguageConstructs.NewLanguageConstructs` sniff has been split into two sniffs. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738)
|
428 |
-
The `PHPCompatibility.LanguageConstructs.NewLanguageConstructs` sniff now contains just the checks for the namespace separator and the ellipsis.
|
429 |
-
The new `PHPCompatibility.Operators.NewOperators` sniff now contains the checks regarding the pow, pow equals, spaceship and coalesce (equals) operators.
|
430 |
-
- :pushpin: The `PHPCompatibility.ParameterValues.RemovedMbstringModifiers` sniff will now also recognize removed regex modifiers when used within a function call to one of the undocumented Mbstring function aliases for the Mbstring regex functions. [#715](https://github.com/PHPCompatibility/PHPCompatibility/pull/715)
|
431 |
-
- :pushpin: The `PHPCompatibility\Sniff::getFunctionCallParameter()` utility method now allows for closures called via a variable. [#723](https://github.com/PHPCompatibility/PHPCompatibility/pull/723)
|
432 |
-
- :pencil2: `PHPCompatibility.Upgrade.LowPHPCS`: the minimum supported PHPCS version is now 2.3.0. [#699](https://github.com/PHPCompatibility/PHPCompatibility/pull/699)
|
433 |
-
- :pencil2: Minor inline documentation improvements. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738)
|
434 |
-
- :umbrella: Minor improvements to the unit tests for the `PHPCompatibility.FunctionNameRestrctions.RemovedMagicAutoload` sniff. [#716](https://github.com/PHPCompatibility/PHPCompatibility/pull/716)
|
435 |
-
- :recycle: Minor other optimizations. [#698](https://github.com/PHPCompatibility/PHPCompatibility/pull/698), [#697](https://github.com/PHPCompatibility/PHPCompatibility/pull/697)
|
436 |
-
- :wrench: Minor improvements to the build tools. [#701](https://github.com/PHPCompatibility/PHPCompatibility/pull/701)
|
437 |
-
- :wrench: Removed some unnecessary inline annotations. [#700](https://github.com/PHPCompatibility/PHPCompatibility/pull/700)
|
438 |
-
- :books: Replaced some of the badges in the Readme file. [#721](https://github.com/PHPCompatibility/PHPCompatibility/pull/721), [#722](https://github.com/PHPCompatibility/PHPCompatibility/pull/722)
|
439 |
-
- :books: Composer: updated the list of package authors. [#739](https://github.com/PHPCompatibility/PHPCompatibility/pull/739)
|
440 |
-
|
441 |
-
### Removed
|
442 |
-
- :no_entry_sign: Support for PHP_CodeSniffer 1.x and low 2.x versions. The new minimum version of PHP_CodeSniffer to be able to use this library is 2.3.0. [#699](https://github.com/PHPCompatibility/PHPCompatibility/pull/699). Fixes [#691](https://github.com/PHPCompatibility/PHPCompatibility/issues/691).
|
443 |
-
The minimum _recommended_ version of PHP_CodeSniffer remains the same, i.e. 2.6.0.
|
444 |
-
- :no_entry_sign: The `\PHPCompatibility\Sniff::inUseScope()` method has been removed as it is no longer needed now support for PHPCS 1.x has been dropped. [#699](https://github.com/PHPCompatibility/PHPCompatibility/pull/699)
|
445 |
-
- :no_entry_sign: Composer: The `autoload` section has been removed from the `composer.json` file. [#738](https://github.com/PHPCompatibility/PHPCompatibility/pull/738). Fixes [#568](https://github.com/PHPCompatibility/PHPCompatibility/issues/568).
|
446 |
-
Autoloading for this library is done via the PHP_CodeSniffer default mechanism, enhanced with our own autoloader, so the Composer autoloader shouldn't be needed and was causing issues in a particular use-case.
|
447 |
-
|
448 |
-
### Fixed
|
449 |
-
- :bug: `PHPCompatibility.FunctionUse.NewFunctionParameters` sniff: The new `$mode` parameter of the `php_uname()` function was added in PHP 4.3, not in PHP 7.0 as was previously being reported.
|
450 |
-
The previous implementation of this check was based on an error in the PHP documentation. The error in the PHP documentation has been rectified and the sniff has followed suit. [#711](https://github.com/PHPCompatibility/PHPCompatibility/pull/711)
|
451 |
-
- :bug: `PHPCompatibility.Generators.NewGeneratorReturn` sniff: The sniff would throw false positives for `return` statements in nested constructs and did not correctly detect the scope which should be examined. [#725](https://github.com/PHPCompatibility/PHPCompatibility/pull/725). Fixes [#724](https://github.com/PHPCompatibility/PHPCompatibility/pull/724).
|
452 |
-
- :bug: `PHPCompatibility.Keywords.NewKeywords` sniff: PHP magic constants are case _in_sensitive. This sniff now accounts for this. [#707](https://github.com/PHPCompatibility/PHPCompatibility/pull/707)
|
453 |
-
- :bug: Various bugs in the `PHPCompatibility.Syntax.ForbiddenCallTimePassByReference` sniff [#723](https://github.com/PHPCompatibility/PHPCompatibility/pull/723):
|
454 |
-
- Closures called via a variable will now also be examined. (false negative)
|
455 |
-
- References within arrays/closures passed as function call parameters would incorrectly trigger an error. (false positive)
|
456 |
-
- :green_heart: Compatibility with PHPUnit 7.2. [#712](https://github.com/PHPCompatibility/PHPCompatibility/pull/712)
|
457 |
-
|
458 |
-
### Credits
|
459 |
-
Thanks go out to [Jonathan Champ] for his contribution to this version. :clap:
|
460 |
-
|
461 |
-
|
462 |
-
## [8.2.0] - 2018-07-17
|
463 |
-
|
464 |
-
See all related issues and PRs in the [8.2.0 milestone].
|
465 |
-
|
466 |
-
### Important changes
|
467 |
-
|
468 |
-
#### The repository has moved
|
469 |
-
As of July 13 2018, the PHPCompatibility repository has moved from the personal account of Wim Godden `wimg` to its own organization `PHPCompatibility`.
|
470 |
-
Composer users are advised to update their `composer.json`. The dependency is now called `phpcompatibility/php-compatibility`.
|
471 |
-
|
472 |
-
#### Framework/CMS specific PHPCompatibility rulesets
|
473 |
-
Within this new organization, hosting will be offered for framework/CMS specific PHPCompatibility rulesets.
|
474 |
-
|
475 |
-
The first two such repositories have been created and are now available for use:
|
476 |
-
* PHPCompatibilityJoomla [GitHub](https://github.com/PHPCompatibility/PHPCompatibilityJoomla)|[Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-joomla)
|
477 |
-
* PHPCompatibilityWP [GitHub](https://github.com/PHPCompatibility/PHPCompatibilityWP)|[Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-wp)
|
478 |
-
|
479 |
-
If you want to make sure you have all PHPCompatibility rulesets available at any time, you can use the PHPCompatibilityAll package [GitHub](https://github.com/PHPCompatibility/PHPCompatibilityAll)|[Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-all).
|
480 |
-
|
481 |
-
For more information, see the [Readme](https://github.com/PHPCompatibility/PHPCompatibility#using-a-frameworkcms-specific-ruleset) and [Contributing guidelines](https://github.com/PHPCompatibility/PHPCompatibility/blob/master/.github/CONTRIBUTING.md#frameworkcms-specific-rulesets).
|
482 |
-
|
483 |
-
#### Changes expected in PHPCompatibility 9.0.0
|
484 |
-
The next version of PHPCompatibility will include a major directory layout restructuring which means that the sniff codes of all sniffs will change.
|
485 |
-
|
486 |
-
In this same release, support for PHP_CodeSniffer 1.5.x will be dropped. The new minimum supported PHPCS version will be 2.3.0.
|
487 |
-
|
488 |
-
For more information about these upcoming changes, please read the [announcement](https://github.com/PHPCompatibility/PHPCompatibility/issues/688).
|
489 |
-
|
490 |
-
The `9.0.0` release is expected to be ready later this summer.
|
491 |
-
|
492 |
-
|
493 |
-
### Added
|
494 |
-
- :star2: New `ArgumentFunctionsUsage` sniff to detect usage of the `func_get_args()`, `func_get_arg()` and `func_num_args()` functions and the changes regarding these functions introduced in PHP 5.3. [#596](https://github.com/PHPCompatibility/PHPCompatibility/pull/596). Fixes [#372](https://github.com/PHPCompatibility/PHPCompatibility/issues/372).
|
495 |
-
- :star2: New `DiscouragedSwitchContinue` sniff to detect `continue` targetting a `switch` control structure for which `E_WARNINGS` will be thrown as of PHP 7.3. [#687](https://github.com/PHPCompatibility/PHPCompatibility/pull/687)
|
496 |
-
- :star2: New `NewClassMemberAccess` sniff to detect class member access on instantiation as added in PHP 5.4 and class member access on cloning as added in PHP 7.0. [#619](https://github.com/PHPCompatibility/PHPCompatibility/pull/619). Fixes [#53](https://github.com/PHPCompatibility/PHPCompatibility/issues/53).
|
497 |
-
- :star2: New `NewConstantScalarExpressions` sniff to detect PHP 5.6 scalar expression in contexts where PHP previously only allowed static values. [#617](https://github.com/PHPCompatibility/PHPCompatibility/pull/617). Fixes [#399](https://github.com/PHPCompatibility/PHPCompatibility/issues/399).
|
498 |
-
- :star2: New `NewGeneratorReturn` sniff to detect `return` statements within generators as introduced in PHP 7.0. [#618](https://github.com/PHPCompatibility/PHPCompatibility/pull/618)
|
499 |
-
- :star2: New `PCRENewModifiers` sniff to initially detect the new `J` regex modifier as introduced in PHP 7.2. [#600](https://github.com/PHPCompatibility/PHPCompatibility/pull/600). Fixes [#556](https://github.com/PHPCompatibility/PHPCompatibility/issues/556).
|
500 |
-
- :star2: New `ReservedFunctionNames` sniff to report on double underscore prefixed functions and methods. This was previously reported via an upstream sniff. [#581](https://github.com/PHPCompatibility/PHPCompatibility/pull/581)
|
501 |
-
- :star2: New `NewTrailingComma` sniff to detect trailing comma's in function calls, method calls, `isset()` and `unset()` as will be introduced in PHP 7.3. [#632](https://github.com/PHPCompatibility/PHPCompatibility/pull/632)
|
502 |
-
- :star2: New `Upgrade/LowPHPCS` sniff to give users of old PHP_CodeSniffer versions advance warning when support will be dropped in the near future. [#693](https://github.com/PHPCompatibility/PHPCompatibility/pull/693)
|
503 |
-
- :star: `NewClasses` sniff: check for some 40+ additional PHP native classes added in various PHP versions. [#573](https://github.com/PHPCompatibility/PHPCompatibility/pull/573)
|
504 |
-
- :star: `NewClosure` sniff: check for usage of `self`/`parent`/`static::` being used within closures, support for which was only added in PHP 5.4. [#669](https://github.com/PHPCompatibility/PHPCompatibility/pull/669). Fixes [#668](https://github.com/PHPCompatibility/PHPCompatibility/pull/668).
|
505 |
-
- :star: `NewConstants` sniff: recognize constants added by the PHP 5.5+ password extension. [#626](https://github.com/PHPCompatibility/PHPCompatibility/pull/626)
|
506 |
-
- :star: `NewFunctionParameters` sniff: recognize a number of additional function parameters added in PHP 7.0, 7.1 and 7.2. [#602](https://github.com/PHPCompatibility/PHPCompatibility/pull/602)
|
507 |
-
- :star: `NewFunctions` sniff: recognize the PHP 5.1 SPL extension functions, the PHP 5.1.1 `hash_hmac()` function, the PHP 5.6 `pg_lo_truncate()` function, more PHP 7.2 Sodium functions and the new PHP 7.3 `is_countable()` function. [#606](https://github.com/PHPCompatibility/PHPCompatibility/pull/606), [#625](https://github.com/PHPCompatibility/PHPCompatibility/pull/625), [#640](https://github.com/PHPCompatibility/PHPCompatibility/pull/640), [#651](https://github.com/PHPCompatibility/PHPCompatibility/pull/651)
|
508 |
-
- :star: `NewHashAlgorithms` sniff: recognize the new hash algorithms which were added in PHP 7.1. [#599](https://github.com/PHPCompatibility/PHPCompatibility/pull/599)
|
509 |
-
- :star: `NewInterfaces` sniff: check for the PHP 5.0 `Reflector` interface. [#572](https://github.com/PHPCompatibility/PHPCompatibility/pull/572)
|
510 |
-
- :star: `OptionalRequiredFunctionParameters` sniff: detect missing `$salt` parameter in calls to the `crypt()` function (PHP 5.6+). [#605](https://github.com/PHPCompatibility/PHPCompatibility/pull/605)
|
511 |
-
- :star: `RequiredOptionalFunctionParameters` sniff: recognize that the `$varname` parameter of `getenv()` and the `$scale` parameter of `bcscale()` have become optional as of PHP 7.1 and 7.3 respectively. [#598](https://github.com/PHPCompatibility/PHPCompatibility/pull/598), [#612](https://github.com/PHPCompatibility/PHPCompatibility/pull/612)
|
512 |
-
- :star: New `AbstractFunctionCallParameterSniff` to be used as a basis for sniffs examining function call parameters. [#636](https://github.com/PHPCompatibility/PHPCompatibility/pull/636)
|
513 |
-
- :star: New `getReturnTypeHintName()` utility method to the `PHPCompatibility\Sniff` class. [#578](https://github.com/PHPCompatibility/PHPCompatibility/pull/578), [#642](https://github.com/PHPCompatibility/PHPCompatibility/pull/642)
|
514 |
-
- :star: New `isNumber()`, `isPositiveNumber()` and `isNegativeNumber()` utility methods to the `PHPCompatibility\Sniff` class. [#610](https://github.com/PHPCompatibility/PHPCompatibility/pull/610), [#650](https://github.com/PHPCompatibility/PHPCompatibility/pull/650)
|
515 |
-
- :star: New `isShortList()` utility method to the `PHPCompatibility\Sniff` class. [#635](https://github.com/PHPCompatibility/PHPCompatibility/pull/635)
|
516 |
-
- :star: New `getCommandLineData()` method to the `PHPCompatibility\PHPCSHelper` class to provide PHPCS cross-version compatible access to command line info at run time. [#693](https://github.com/PHPCompatibility/PHPCompatibility/pull/693)
|
517 |
-
- :star: Duplicate of upstream `findEndOfStatement()` method to the `PHPCompatibility\PHPCSHelper` class to allow for PHPCS cross-version usage of that method. [#614](https://github.com/PHPCompatibility/PHPCompatibility/pull/614)
|
518 |
-
- :umbrella: additional unit test to confirm that the `PHPCompatibility\Sniff::isUseOfGlobalConstant()` method handles multi-constant declarations correctly. [#587](https://github.com/PHPCompatibility/PHPCompatibility/pull/587)
|
519 |
-
- :umbrella: additional unit tests to confirm that the `PHPCompatibility\Sniff::isClassProperty()` method handles multi-property declarations correctly. [#583](https://github.com/PHPCompatibility/PHPCompatibility/pull/583)
|
520 |
-
- :books: [Readme](https://github.com/PHPCompatibility/PHPCompatibility#using-a-frameworkcms-specific-ruleset) & [Contributing](https://github.com/PHPCompatibility/PHPCompatibility/blob/master/.github/CONTRIBUTING.md#frameworkcms-specific-rulesets): add information about the framework/CMS specific rulesets. Related PRs: [#615](https://github.com/PHPCompatibility/PHPCompatibility/pull/615), [#624](https://github.com/PHPCompatibility/PHPCompatibility/pull/624), [#648](https://github.com/PHPCompatibility/PHPCompatibility/pull/648), [#674](https://github.com/PHPCompatibility/PHPCompatibility/pull/674), [#685](https://github.com/PHPCompatibility/PHPCompatibility/pull/685), [#694](https://github.com/PHPCompatibility/PHPCompatibility/pull/694). Related to issue [#530](https://github.com/PHPCompatibility/PHPCompatibility/issues/530).
|
521 |
-
- :books: Readme: information about the PHPCS 3.3.0 change which allows for a `testVersion` in a custom ruleset to be overruled by the command-line. [#607](https://github.com/PHPCompatibility/PHPCompatibility/pull/607)
|
522 |
-
|
523 |
-
### Changed
|
524 |
-
- :books: Adjusted references to the old repository location throughout the codebase to reflect the move to a GitHub organization. [#689](https://github.com/PHPCompatibility/PHPCompatibility/pull/689)
|
525 |
-
This repository will now live in [https://github.com/PHPCompatibility/PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility) and the Packagist reference will now be `phpcompatibility/php-compatibility`.
|
526 |
-
- :white_check_mark: The `getReturnTypeHintToken()` utility method has been made compatible with the changes in the PHPCS tokenizer which were introduced in PHP_CodeSniffer 3.3.0. [#642](https://github.com/PHPCompatibility/PHPCompatibility/pull/642). Fixes [#639](https://github.com/PHPCompatibility/PHPCompatibility/issues/639).
|
527 |
-
- :pushpin: `ConstantArrayUsingConst`: improved handling of multi-constant declarations. [#593](https://github.com/PHPCompatibility/PHPCompatibility/pull/593)
|
528 |
-
- :pushpin: `NewHeredocInitialize`: improved handling of constant declarations using the `const` keyword.
|
529 |
-
The sniff will now also report on multi-declarations for variables, constants and class properties and on using heredoc as a function parameter default. [#641](https://github.com/PHPCompatibility/PHPCompatibility/pull/641)
|
530 |
-
- :pushpin: `ForbiddenEmptyListAssignment`: this sniff will now also report on empty list assignments when the PHP 7.1 short list syntax is used. [#653](https://github.com/PHPCompatibility/PHPCompatibility/pull/653)
|
531 |
-
- :pushpin: The `ForbiddenNegativeBitshift` sniff would previously only report on "bitshift right". As of this version, "bitshift left" and bitshift assignments will also be recognized. [#614](https://github.com/PHPCompatibility/PHPCompatibility/pull/614)
|
532 |
-
- :pushpin: The `NewClasses` and `NewInterfaces` sniffs will now also report on new classes/interfaces when used as _return type_ declarations. [#578](https://github.com/PHPCompatibility/PHPCompatibility/pull/578)
|
533 |
-
- :pushpin: The `NewScalarTypeDeclarations` sniff will now recognize `parent` as a valid type declaration.
|
534 |
-
The sniff will now also throw an error about using `self` and `parent` when PHP < 5.2 needs to be supported as PHP 5.1 and lower would presume these to be class names instead of keywords. [#595](https://github.com/PHPCompatibility/PHPCompatibility/pull/595)
|
535 |
-
- :pushpin: The `PregReplaceEModifier` sniff - and the `PCRENewModifiers` sniff by extension - will now correctly examine and report on modifiers in regexes passed via calls to `preg_replace_callback_array()`. [#600](https://github.com/PHPCompatibility/PHPCompatibility/pull/600), [#636](https://github.com/PHPCompatibility/PHPCompatibility/pull/636)
|
536 |
-
- :pushpin: `getReturnTypeHintToken()` utility method: improved support for interface methods and abstract function declarations. [#652](https://github.com/PHPCompatibility/PHPCompatibility/pull/652)
|
537 |
-
- :pushpin: The `findExtendedClassName()`, `findImplementedInterfaceNames()`, `getMethodParameters()` utility methods which are duplicates of upstream PHPCS methods, have been moved from the `PHPCompatibility\Sniff` class to the `PHPCompatibility\PHPCSHelper` class and have become static methods. [#613](https://github.com/PHPCompatibility/PHPCompatibility/pull/613)
|
538 |
-
- :white_check_mark: `getReturnTypeHintToken()` utility method: align returned `$stackPtr` with native PHPCS behaviour by returning the last token of the type declaration. [#575](https://github.com/PHPCompatibility/PHPCompatibility/pull/575)
|
539 |
-
- :white_check_mark: PHPCS cross-version compatibility: sync `getMethodParameters()` method with improved upstream version. [#643](https://github.com/PHPCompatibility/PHPCompatibility/pull/643)
|
540 |
-
- :pencil2: The `MbstringReplaceEModifier`, `PregReplaceEModifier` and the `PregReplaceEModifier` sniffs now `extend` the new `AbstractFunctionCallParameterSniff` class. This should yield more accurate results when checking whether one of the target PHP functions was called. [#636](https://github.com/PHPCompatibility/PHPCompatibility/pull/636)
|
541 |
-
- :pencil2: `DeprecatedNewReference` sniff: minor change to the error text and code - was `Forbidden`, now `Removed` -. Custom rulesets which explicitly excluded this error code will need to be updated. [#594](https://github.com/PHPCompatibility/PHPCompatibility/pull/594)
|
542 |
-
- :pencil2: `NewScalarTypeDeclarations` sniff: minor change to the error message text.[#644](https://github.com/PHPCompatibility/PHPCompatibility/pull/644)
|
543 |
-
- :umbrella: The unit test framework now allows for sniffs in categories other than `PHP`. [#634](https://github.com/PHPCompatibility/PHPCompatibility/pull/634)
|
544 |
-
- :umbrella: Boyscouting: fixed up some (non-relevant) parse errors in a unit test case file. [#576](https://github.com/PHPCompatibility/PHPCompatibility/pull/576)
|
545 |
-
- :green_heart: Travis: build tests are now also being run against the lowest supported PHPCS 3.x version. Previously only the highest supported PHPCS 3.x version was tested against. [#633](https://github.com/PHPCompatibility/PHPCompatibility/pull/633)
|
546 |
-
- :books: Readme: Improved Composer install instructions. [#690](https://github.com/PHPCompatibility/PHPCompatibility/pull/690)
|
547 |
-
- :books: Minor documentation fixes. [#672](https://github.com/PHPCompatibility/PHPCompatibility/pull/672)
|
548 |
-
- :wrench: Minor performance optimizations and code simplifications. [#592](https://github.com/PHPCompatibility/PHPCompatibility/pull/592), [#630](https://github.com/PHPCompatibility/PHPCompatibility/pull/630), [#671](https://github.com/PHPCompatibility/PHPCompatibility/pull/671)
|
549 |
-
- :wrench: Composer: Various improvements, including improved information about the suggested packages, suggesting `roave/security-advisories`, allowing for PHPUnit 7.x. [#604](https://github.com/PHPCompatibility/PHPCompatibility/pull/604/files), [#616](https://github.com/PHPCompatibility/PHPCompatibility/pull/616), [#622](https://github.com/PHPCompatibility/PHPCompatibility/pull/622), [#646](https://github.com/PHPCompatibility/PHPCompatibility/pull/646)
|
550 |
-
- :wrench: Various Travis build script improvements, including tweaks for faster build time, validation of the `composer.json` file, validation of the framework specific rulesets. [#570](https://github.com/PHPCompatibility/PHPCompatibility/pull/570), [#571](https://github.com/PHPCompatibility/PHPCompatibility/pull/571), [#579](https://github.com/PHPCompatibility/PHPCompatibility/pull/579), [#621](https://github.com/PHPCompatibility/PHPCompatibility/pull/621), [#631](https://github.com/PHPCompatibility/PHPCompatibility/pull/631)
|
551 |
-
- :wrench: Build/PHPCS: made some more CS conventions explicit and start using PHPCS 3.x options for the PHPCompatibility native ruleset. [#586](https://github.com/PHPCompatibility/PHPCompatibility/pull/586), [#667](https://github.com/PHPCompatibility/PHPCompatibility/pull/667), [#673](https://github.com/PHPCompatibility/PHPCompatibility/pull/673)
|
552 |
-
- :wrench: Some code style clean up and start using the new inline PHPCS 3.2+ annotations where applicable. [#586](https://github.com/PHPCompatibility/PHPCompatibility/pull/586), [#591](https://github.com/PHPCompatibility/PHPCompatibility/pull/591), [#620](https://github.com/PHPCompatibility/PHPCompatibility/pull/620), [#673](https://github.com/PHPCompatibility/PHPCompatibility/pull/673)
|
553 |
-
|
554 |
-
### Removed
|
555 |
-
- :no_entry_sign: PHPCompatibility no longer explicitly supports PHP_CodeSniffer 2.2.0. [#687](https://github.com/PHPCompatibility/PHPCompatibility/pull/687), [#690](https://github.com/PHPCompatibility/PHPCompatibility/pull/690)
|
556 |
-
- :no_entry_sign: The PHPCompatibility ruleset no longer includes the PHPCS native `Generic.NamingConventions.CamelCapsFunctionName`. Double underscore prefixed function names are now being reported on by a new dedicated sniff. [#581](https://github.com/PHPCompatibility/PHPCompatibility/pull/581)
|
557 |
-
- :no_entry_sign: PHPCompatibility no longer explicitly supports HHVM and builds are no longer tested against HHVM.
|
558 |
-
For now, running PHPCompatibility on HHVM to test PHP code may still work for a little while, but HHVM has announced they are [dropping PHP support](https://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html). [#623](https://github.com/PHPCompatibility/PHPCompatibility/pull/623). Fixes [#603](https://github.com/PHPCompatibility/PHPCompatibility/issues/603).
|
559 |
-
- :books: Readme: badges from services which are no longer supported or inaccurate. [#609](https://github.com/PHPCompatibility/PHPCompatibility/pull/609), [#628](https://github.com/PHPCompatibility/PHPCompatibility/pull/628)
|
560 |
-
|
561 |
-
### Fixed
|
562 |
-
- :bug: Previously, the PHPCS native `Generic.NamingConventions.CamelCapsFunctionName` sniff was included in PHPCompatibility. Some error codes of this sniff were excluded, as well as some error messages changed (via the ruleset).
|
563 |
-
If/when PHPCompatibility would be used in combination with a code style-type ruleset, this could inadvertently lead to underreporting of issues which the CS-type ruleset intends to have reported - i.e. the error codes excluded by PHPCompatibility -. This has now been fixed. [#581](https://github.com/PHPCompatibility/PHPCompatibility/pull/581)
|
564 |
-
- :bug: The `ForbiddenNegativeBitshift` sniff would incorrectly throw an error when a bitshift was based on a calculation which included a negative number, but would not necessarily result in a negative number. [#614](https://github.com/PHPCompatibility/PHPCompatibility/pull/614). Fixes [#294](https://github.com/PHPCompatibility/PHPCompatibility/issues/294), [#466](https://github.com/PHPCompatibility/PHPCompatibility/issues/466).
|
565 |
-
- :bug: The `NewClosure` sniff would report the same issue twice when the issue was encountered in a nested closure. [#669](https://github.com/PHPCompatibility/PHPCompatibility/pull/669)
|
566 |
-
- :bug: The `NewKeywords` sniff would underreport on non-lowercase keywords. [#627](https://github.com/PHPCompatibility/PHPCompatibility/pull/627)
|
567 |
-
- :bug: The `NewKeywords` sniff would incorrectly report on the use of class constants and class properties using the same name as a keyword. [#627](https://github.com/PHPCompatibility/PHPCompatibility/pull/627)
|
568 |
-
- :bug: The `NewNullableTypes` sniff would potentially underreport when comments where interspersed in the (return) type declarations. [#577](https://github.com/PHPCompatibility/PHPCompatibility/pull/577)
|
569 |
-
- :bug: The `Sniff::getFunctionCallParameters()` utility method would in rare cases return incorrect results when it encountered a closure as a parameter. [#682](https://github.com/PHPCompatibility/PHPCompatibility/pull/682)
|
570 |
-
- :bug: The `Sniff::getReturnTypeHintToken()` utility method would not always return a `$stackPtr`. [#645](https://github.com/PHPCompatibility/PHPCompatibility/pull/645)
|
571 |
-
- :bug: Minor miscellanous other bugfixes. [#670](https://github.com/PHPCompatibility/PHPCompatibility/pull/670)
|
572 |
-
- :umbrella: `PHPCompatibility\Tests\BaseClass\MethodTestFrame::getTargetToken()` could potentially not find the correct token to run a test against. [#588](https://github.com/PHPCompatibility/PHPCompatibility/pull/588)
|
573 |
-
|
574 |
-
### Credits
|
575 |
-
Thanks go out to [Michael Babker] and [Juliette Reinders Folmer] for their contributions to this version. :clap:
|
576 |
-
|
577 |
-
|
578 |
-
## [8.1.0] - 2017-12-27
|
579 |
-
|
580 |
-
See all related issues and PRs in the [8.1.0 milestone].
|
581 |
-
|
582 |
-
### Added
|
583 |
-
- :star2: New `NewConstants` and `RemovedConstants` sniffs to detect usage of new/removed PHP constants for all PHP versions from PHP 5 up. [#526](https://github.com/PHPCompatibility/PHPCompatibility/pull/525), [#551](https://github.com/PHPCompatibility/PHPCompatibility/pull/551), [#566](https://github.com/PHPCompatibility/PHPCompatibility/pull/566). Fixes [#263](https://github.com/PHPCompatibility/PHPCompatibility/issues/263).
|
584 |
-
- :star2: New `MagicAutoloadDeprecation` sniff to detect deprecated `__autoload()` functions as deprecated in PHP 7.2. [#540](https://github.com/PHPCompatibility/PHPCompatibility/pull/540)
|
585 |
-
- :star2: New `OptionalRequiredFunctionParameter` sniff to check for missing function call parameters which were required and only became optional in a later PHP version. [#524](https://github.com/PHPCompatibility/PHPCompatibility/pull/524)
|
586 |
-
- :star2: New `DynamicAccessToStatic` sniff to detect dynamic access to static methods and properties, as well as class constants, prior to PHP 5.3. [#535](https://github.com/PHPCompatibility/PHPCompatibility/pull/535). Fixes [#534](https://github.com/PHPCompatibility/PHPCompatibility/issues/534).
|
587 |
-
- :star: `DeprecatedFunctions` sniff: recognize yet more PHP 7.2 deprecated functions. [#561](https://github.com/PHPCompatibility/PHPCompatibility/pull/561), [#566](https://github.com/PHPCompatibility/PHPCompatibility/pull/566)
|
588 |
-
- :star: `DeprecatedIniDirectives` sniff: recognize the last of the PHP 7.2 deprecated ini directives. [#566](https://github.com/PHPCompatibility/PHPCompatibility/pull/566), [#567](https://github.com/PHPCompatibility/PHPCompatibility/pull/567)
|
589 |
-
- :star: `NewFunctions` : detection of all new PHP 7.2 functions added. [#522](https://github.com/PHPCompatibility/PHPCompatibility/pull/522), [#545](https://github.com/PHPCompatibility/PHPCompatibility/pull/545), [#551](https://github.com/PHPCompatibility/PHPCompatibility/pull/551), [#565](https://github.com/PHPCompatibility/PHPCompatibility/pull/565)
|
590 |
-
- :star: `RemovedExtensions` : report on usage of the `mcrypt` extension which has been removed in PHP 7.2. [#566](https://github.com/PHPCompatibility/PHPCompatibility/pull/566)
|
591 |
-
- :star: `RemovedGlobalVariables` : detection of the use of `$php_errormsg` with `track_errors` which has been deprecated in PHP 7.2. [#528](https://github.com/PHPCompatibility/PHPCompatibility/pull/528)
|
592 |
-
- :books: Documentation : added reporting usage instructions. [#533](https://github.com/PHPCompatibility/PHPCompatibility/pull/533), [#552](https://github.com/PHPCompatibility/PHPCompatibility/pull/552)
|
593 |
-
|
594 |
-
### Changed
|
595 |
-
- :pushpin: `NewClosures` : downgraded "$this found in closure outside class" to warning. [#536](https://github.com/PHPCompatibility/PHPCompatibility/pull/535). Fixes [#527](https://github.com/PHPCompatibility/PHPCompatibility/issues/527).
|
596 |
-
- :pushpin: `ForbiddenGlobalVariableVariable` : the sniff will now throw an error for each variable in a `global` statement which is no longer supported and show the variable found to make it easier to fix this. Previously only one error would be thrown per `global` statement. [#564](https://github.com/PHPCompatibility/PHPCompatibility/pull/564)
|
597 |
-
- :pushpin: `ForbiddenGlobalVariableVariable` : the sniff will now throw `warning`s for non-bare variables used in a `global` statement as those are discouraged since PHP 7.0. [#564](https://github.com/PHPCompatibility/PHPCompatibility/pull/564)
|
598 |
-
- :rewind: `NewLanguageConstructs` : updated the version number for `T_COALESCE_EQUAL`. [#523](https://github.com/PHPCompatibility/PHPCompatibility/pull/523)
|
599 |
-
- :pencil2: `Sniff::getTestVersion()` : simplified regex logic. [#520](https://github.com/PHPCompatibility/PHPCompatibility/pull/520)
|
600 |
-
- :green_heart: Travis : build tests are now being run against PHP 7.2 as well. [#511](https://github.com/PHPCompatibility/PHPCompatibility/pull/511)
|
601 |
-
- :wrench: Improved check for superfluous whitespaces in files. [#542](https://github.com/PHPCompatibility/PHPCompatibility/pull/542)
|
602 |
-
- :wrench: Build/PHPCS : stabilized the exclude patterns. [#529](https://github.com/PHPCompatibility/PHPCompatibility/pull/529)
|
603 |
-
- :wrench: Build/PHPCS : added array indentation check. [#538](https://github.com/PHPCompatibility/PHPCompatibility/pull/538)
|
604 |
-
- :white_check_mark: PHPCS cross-version compatibility : sync `FindExtendedClassname()` method with upstream. [#507](https://github.com/PHPCompatibility/PHPCompatibility/pull/507)
|
605 |
-
- :wrench: The minimum version for the recommended `DealerDirect/phpcodesniffer-composer-installer` Composer plugin has been upped to `0.4.3`. [#548](https://github.com/PHPCompatibility/PHPCompatibility/pull/548)
|
606 |
-
|
607 |
-
### Fixed
|
608 |
-
- :bug: `ForbiddenCallTimePassByReference` : a false positive was being thrown when a global constant was followed by a _bitwise and_. [#562](https://github.com/PHPCompatibility/PHPCompatibility/pull/562). Fixes [#39](https://github.com/PHPCompatibility/PHPCompatibility/issues/39).
|
609 |
-
- :bug: `ForbiddenGlobalVariableVariable` : the sniff was overzealous and would also report on `global` in combination with variable variables which are still supported. [#564](https://github.com/PHPCompatibility/PHPCompatibility/pull/564). Fixes [#537](https://github.com/PHPCompatibility/PHPCompatibility/issues/537).
|
610 |
-
- :bug: `ForbiddenGlobalVariableVariable` : variables interspersed with whitespace and/or comments were not being reported. [#564](https://github.com/PHPCompatibility/PHPCompatibility/pull/564)
|
611 |
-
- :rewind: `ForbiddenNamesAsInvokedFunctions` : improved recognition of function invocations using forbidden words and prevent warnings for keywords which are no longer forbidden as method names in PHP 7.0+. [#516](https://github.com/PHPCompatibility/PHPCompatibility/pull/516). Fixes [#515](https://github.com/PHPCompatibility/PHPCompatibility/issues/515)
|
612 |
-
- :bug: `VariableVariables` : variables interspersed with whitespace and/or comments were not being reported. [#563](https://github.com/PHPCompatibility/PHPCompatibility/pull/563)
|
613 |
-
- :umbrella: Fixed some unintentional syntax errors in test files. [#539](https://github.com/PHPCompatibility/PHPCompatibility/pull/539)
|
614 |
-
- :umbrella: Tests : fixed case numbering error. [#525](https://github.com/PHPCompatibility/PHPCompatibility/pull/525)
|
615 |
-
- :books: Tests : added missing test skip explanation. [#521](https://github.com/PHPCompatibility/PHPCompatibility/pull/521)
|
616 |
-
- :wrench: Fixed PHPCS whitespaces. [#543](https://github.com/PHPCompatibility/PHPCompatibility/pull/543)
|
617 |
-
- :wrench: Fixed code test coverage verification. [#550](https://github.com/PHPCompatibility/PHPCompatibility/pull/550). Fixes [#549](https://github.com/PHPCompatibility/PHPCompatibility/issues/549).
|
618 |
-
|
619 |
-
### Credits
|
620 |
-
Thanks go out to [Juliette Reinders Folmer] and [Jonathan Van Belle] for their contributions to this version. :clap:
|
621 |
-
|
622 |
-
|
623 |
-
## [8.0.1] - 2017-08-07
|
624 |
-
|
625 |
-
See all related issues and PRs in the [8.0.1 milestone].
|
626 |
-
|
627 |
-
### Added
|
628 |
-
- :star2: New `DeprecatedTypeCasts` sniff to detect deprecated and removed type casts, such as the `(unset)` type cast as deprecated in PHP 7.2. [#498](https://github.com/PHPCompatibility/PHPCompatibility/pull/498)
|
629 |
-
- :star2: New `NewTypeCasts` sniff to detect type casts not present in older PHP versions such as the `(binary)` type cast as added in PHP 5.2.1. [#497](https://github.com/PHPCompatibility/PHPCompatibility/pull/497)
|
630 |
-
- :star: `NewGroupUseDeclaration`: Detection of PHP 7.2 trailing comma's in group use statements. [#504](https://github.com/PHPCompatibility/PHPCompatibility/pull/504)
|
631 |
-
- :star: `DeprecatedFunctions` sniff: recognize some more PHP 7.2 deprecated functions. [#501](https://github.com/PHPCompatibility/PHPCompatibility/pull/501)
|
632 |
-
- :star: `DeprecatedIniDirectives` sniff: recognize more PHP 7.2 deprecated ini directives. [#500](https://github.com/PHPCompatibility/PHPCompatibility/pull/500)
|
633 |
-
- :star: `ForbiddenNames` sniff: recognize `object` as a forbidden keyword since PHP 7.2. [#499](https://github.com/PHPCompatibility/PHPCompatibility/pull/499)
|
634 |
-
- :star: `NewReturnTypeDeclarations` sniff: recognize generic `parent`, PHP 7.1 `iterable` and PHP 7.2 `object` return type declarations. [#505](https://github.com/PHPCompatibility/PHPCompatibility/pull/505), [#499](https://github.com/PHPCompatibility/PHPCompatibility/pull/499)
|
635 |
-
- :star: `NewScalarTypeDeclarations` sniff: recognize PHP 7.2 `object` type declarion. [#499](https://github.com/PHPCompatibility/PHPCompatibility/pull/499)
|
636 |
-
|
637 |
-
### Changed
|
638 |
-
- :pencil2: Improved clarity of the deprecated functions alternative in the error message. [#502](https://github.com/PHPCompatibility/PHPCompatibility/pull/502)
|
639 |
-
|
640 |
-
### Fixed
|
641 |
-
- :fire_engine: Temporary hotfix for installed_paths (pending [upstream fix](https://github.com/squizlabs/PHP_CodeSniffer/issues/1591).) [#503](https://github.com/PHPCompatibility/PHPCompatibility/pull/503)
|
642 |
-
|
643 |
-
### Credits
|
644 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
## [8.0.0] - 2017-08-03
|
649 |
-
|
650 |
-
**IMPORTANT**: This release contains a **breaking change**. Please read the below information carefully before upgrading!
|
651 |
-
|
652 |
-
The directory layout of the PHPCompatibility standard has been changed for improved compatibility with Composer.
|
653 |
-
This means that the PHPCompatibility standard no longer extends from the root directory of the repository, but now lives in its own subdirectory `/PHPCompatibility`.
|
654 |
-
|
655 |
-
This release also bring compatibility with PHPCS 3.x to the PHPCompatibility standard.
|
656 |
-
|
657 |
-
There are two things you will need to be aware of:
|
658 |
-
* The path to the PHPCompatibility standard has changed.
|
659 |
-
* If you intend to upgrade to PHPCS 3.x, the path to the `phpcs` script has changed (upstream change).
|
660 |
-
|
661 |
-
Please follow the below upgrade instructions carefully. This should be a one-time only action.
|
662 |
-
|
663 |
-
### Upgrade instructions
|
664 |
-
|
665 |
-
### Before upgrading
|
666 |
-
|
667 |
-
If you had previously made accommodations for the old directory layout, you should remove any such _"hacks"_ (meant in the kindest of ways) now.
|
668 |
-
|
669 |
-
By this we mean: symlinks for the PHPCompatibility install to the `PHP_CodeSniffer/CodeSniffer/Standards` directory, scripts to move the sniffs files to the PHPCS directory, scripts which made symlinks etc.
|
670 |
-
|
671 |
-
So, please remove those first.
|
672 |
-
|
673 |
-
> **Side-note**:
|
674 |
-
>
|
675 |
-
> If you had previously forked this repository to solve this issue, please consider reverting your fork to the official version or removing it all together.
|
676 |
-
|
677 |
-
### Upgrading: re-registering PHPCompatibility with PHP CodeSniffer
|
678 |
-
|
679 |
-
External PHP CodeSniffer standards need to be registered with PHP CodeSniffer. You have probably done this the first time you used PHPCompatibility or have a script or Composer plugin in place to do this for you.
|
680 |
-
|
681 |
-
As the directory layout of PHPCompatibility has changed, the path previously registered with PHP CodeSniffer will no longer work and running `phpcs -i` will **_not_** list PHPCompatibility as one of the registered standards.
|
682 |
-
|
683 |
-
#### Using a Composer plugin
|
684 |
-
|
685 |
-
If you use Composer, we recommend you use a Composer plugin to sort this out. In previous install instructions we recommended the SimplyAdmin plugin for this. This plugin has since been abandoned. We now recommend the DealerDirect plugin.
|
686 |
-
```bash
|
687 |
-
composer remove --dev simplyadmire/composer-plugins
|
688 |
-
composer require --dev dealerdirect/phpcodesniffer-composer-installer:^0.4.3
|
689 |
-
composer install
|
690 |
-
composer update phpcompatibility/php-compatibility squizlabs/php_codesniffer
|
691 |
-
vendor/bin/phpcs -i
|
692 |
-
```
|
693 |
-
If all went well, you should now see PHPCompatibility listed again in the list of installed standards.
|
694 |
-
|
695 |
-
#### Manually re-registering PHPCompatibility
|
696 |
-
|
697 |
-
1. First run `phpcs --config-show` to check which path(s) are currently registered with PHP CodeSniffer for external standards.
|
698 |
-
2. Check in the below table what the new path for PHPCompatibility will be - the path should point to the root directory of your PHPCompatibility install (not to the sub-directory of the same name):
|
699 |
-
|
700 |
-
Install type | Old path | New path
|
701 |
-
------------ | -------- | ---------
|
702 |
-
Composer | `vendor/wimg` | `vendor/phpcompatibility/php-compatibility`
|
703 |
-
Unzipped release to arbitrary directory | `path/to/dir/abovePHPCompatibility` | `path/to/dir/abovePHPCompatibility/PHPCompatibility`
|
704 |
-
Git checkout | `path/to/dir/abovePHPCompatibility` | `path/to/dir/abovePHPCompatibility/PHPCompatibility`
|
705 |
-
PEAR | If the old install instruction has been followed, not registered. | `path/to/PHPCompatibility`
|
706 |
-
|
707 |
-
> **Side-note**:
|
708 |
-
>
|
709 |
-
> If you used the old install instructions for a PEAR install, i.e. checking out the latest release to the `PHP/CodeSniffer/Standards/PHPCompatibility` directory, and you intend to upgrade to PHP CodeSniffer 3.x, it is recommended you move the PHPCompatibility folder out of the PEAR directory now, as the layout of the PHPCS directory has changed with PHPCS 3.x and you may otherwise lose your PHPCompatibility install when you upgrade PHP CodeSniffer via PEAR.
|
710 |
-
|
711 |
-
3. There are two ways in which you can register the new `installed_paths` value with PHP CodeSniffer. Choose your preferred method:
|
712 |
-
* Run `phpcs --config-set installed_paths ...` and include all previously installed paths including the _adjusted_ path for the PHPCompatibility standard.
|
713 |
-
|
714 |
-
For example, if the previous value of `installed_paths` was
|
715 |
-
|
716 |
-
`/path/to/MyStandard,/path/to/dir/abovePHPCompatibility`
|
717 |
-
|
718 |
-
you should now set it using
|
719 |
-
|
720 |
-
`phpcs --config-set installed_paths /path/to/MyStandard,/path/to/PHPCompatibility`
|
721 |
-
|
722 |
-
* If you use a custom ruleset in combination with PHPCS 2.6.0 or higher, you can pass the value to PHPCS from your custom ruleset:
|
723 |
-
```xml
|
724 |
-
<config name="installed_paths" value="vendor/phpcompatibility/php-compatibility" />
|
725 |
-
```
|
726 |
-
4. Run `phpcs -i` to verify that the PHPCompatibility standard is now listed again in the list of installed standards.
|
727 |
-
|
728 |
-
|
729 |
-
### Upgrading to PHPCS 3.x
|
730 |
-
|
731 |
-
The path to the `phpcs` script has changed in PHPCS 3.x which will impact how you call PHPCS.
|
732 |
-
|
733 |
-
Version | PHPCS 2.x | PHPCS 3.x
|
734 |
-
------- | --------- | ---------
|
735 |
-
Generic `phpcs` Command | `path/to/PHP_CodeSniffer/scripts/phpcs ....` | `path/to/PHP_CodeSniffer/bin/phpcs ....`
|
736 |
-
Composer command | `vendor/bin/phpcs ...` | `vendor/bin/phpcs ...`
|
737 |
-
|
738 |
-
So, for Composer users, nothing changes. For everyone else, you may want to add the `path/to/PHP_CodeSniffer/bin/phpcs` path to your PATH environment variable or adjust any scripts - like build scripts - which call PHPCS.
|
739 |
-
|
740 |
-
|
741 |
-
### Upgrading a Travis build script
|
742 |
-
|
743 |
-
If you run PHPCompatibility against your code as part of your Travis build:
|
744 |
-
* If you use Composer to install PHP CodeSniffer and PHPCompatibility on the travis image and you've made the above mentioned changes, your build should pass again.
|
745 |
-
* If you use `git clone` to install PHP CodeSniffer and PHPCompatibility on the travis image, your build will fail until you make the following changes:
|
746 |
-
1. Check which branch of PHPCS is being checked out. If you previously fixed this to a pre-PHPCS 3.x branch or tag, you can now change this (back) to `master` or a PHPCS 3 tag.
|
747 |
-
2. Check to which path PHPCompatibility is being cloned and adjust the path if necessary.
|
748 |
-
3. Adjust the `phpcs --config-set installed_paths` command as described above to point to the root of the cloned PHPCompatibility repo.
|
749 |
-
4. If you switched to using PHPCS 3.x, adjust the call to PHPCS.
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
### Changelog for version 8.0.0
|
754 |
-
|
755 |
-
See all related issues and PRs in the [8.0.0 milestone].
|
756 |
-
|
757 |
-
### Added
|
758 |
-
- :two_hearts: Support for PHP CodeSniffer 3.x. [#482](https://github.com/PHPCompatibility/PHPCompatibility/pull/482), [#481](https://github.com/PHPCompatibility/PHPCompatibility/pull/481), [#480](https://github.com/PHPCompatibility/PHPCompatibility/pull/480), [#488](https://github.com/PHPCompatibility/PHPCompatibility/pull/488), [#489](https://github.com/PHPCompatibility/PHPCompatibility/pull/489), [#495](https://github.com/PHPCompatibility/PHPCompatibility/pull/495)
|
759 |
-
|
760 |
-
### Changed
|
761 |
-
- :gift: As of this version PHPCompatibility will use semantic versioning.
|
762 |
-
- :fire: The directory structure of the repository has changed for better compatibility with installation via Composer. [#446](https://github.com/PHPCompatibility/PHPCompatibility/pull/446). Fixes [#102](https://github.com/PHPCompatibility/PHPCompatibility/issues/102), [#107](https://github.com/PHPCompatibility/PHPCompatibility/issues/107)
|
763 |
-
- :pencil2: The custom `functionWhitelist` property for the `PHPCompatibility.PHP.RemovedExtensions` sniff is now only supported in combination with PHP CodeSniffer 2.6.0 or higher (due to an upstream bug which was fixed in PHPCS 2.6.0). [#482](https://github.com/PHPCompatibility/PHPCompatibility/pull/482)
|
764 |
-
- :wrench: Improved the information provided to Composer from the `composer.json` file. [#446](https://github.com/PHPCompatibility/PHPCompatibility/pull/446), [#482](https://github.com/PHPCompatibility/PHPCompatibility/pull/482), [#486](https://github.com/PHPCompatibility/PHPCompatibility/pull/486)
|
765 |
-
- :wrench: Release archives will no longer contain the unit tests and other typical development files. You can still get these by using Composer with `--prefer-source` or by checking out a git clone of the repository. [#494](https://github.com/PHPCompatibility/PHPCompatibility/pull/494)
|
766 |
-
- :wrench: A variety of minor improvements to the build process. [#485](https://github.com/PHPCompatibility/PHPCompatibility/pull/485), [#486](https://github.com/PHPCompatibility/PHPCompatibility/pull/486), [#487](https://github.com/PHPCompatibility/PHPCompatibility/pull/487)
|
767 |
-
- :wrench: Some files for use by contributors have been renamed to use `.dist` extensions or moved for easier access. [#478](https://github.com/PHPCompatibility/PHPCompatibility/pull/478), [#479](https://github.com/PHPCompatibility/PHPCompatibility/pull/479), [#483](https://github.com/PHPCompatibility/PHPCompatibility/pull/483), [#493](https://github.com/PHPCompatibility/PHPCompatibility/pull/493)
|
768 |
-
- :books: The installation instructions in the Readme. [#496](https://github.com/PHPCompatibility/PHPCompatibility/pull/496)
|
769 |
-
- :books: The unit test instructions in the Contributing file. [#496](https://github.com/PHPCompatibility/PHPCompatibility/pull/496)
|
770 |
-
- :books: Improved the example code in the Readme. [#490](https://github.com/PHPCompatibility/PHPCompatibility/pull/490)
|
771 |
-
|
772 |
-
### Removed
|
773 |
-
- :no_entry_sign: Support for PHP 5.1 and 5.2.
|
774 |
-
|
775 |
-
The sniffs can now only be run on PHP 5.3 or higher in combination with PHPCS 1.5.6 or 2.x and on PHP 5.4 or higher in combination with PHPCS 3.x. [#484](https://github.com/PHPCompatibility/PHPCompatibility/pull/484), [#482](https://github.com/PHPCompatibility/PHPCompatibility/pull/482)
|
776 |
-
|
777 |
-
### Credits
|
778 |
-
Thanks go out to [Gary Jones] and [Juliette Reinders Folmer] for their contributions to this version. :clap:
|
779 |
-
|
780 |
-
|
781 |
-
## [7.1.5] - 2017-07-17
|
782 |
-
|
783 |
-
See all related issues and PRs in the [7.1.5 milestone].
|
784 |
-
|
785 |
-
### Added
|
786 |
-
- :star: The `NewKeywords` sniff will now also sniff for `yield from` which was introduced in PHP 7.0. [#477](https://github.com/PHPCompatibility/PHPCompatibility/pull/477). Fixes [#476](https://github.com/PHPCompatibility/PHPCompatibility/issues/476)
|
787 |
-
- :books: The LGPL-3.0 license. [#447](https://github.com/PHPCompatibility/PHPCompatibility/pull/447)
|
788 |
-
|
789 |
-
### Changed
|
790 |
-
- :rewind: The `NewExecutionDirectives` sniff will now also report on execution directives when used in combination with PHPCS 2.0.0-2.3.3. [#451](https://github.com/PHPCompatibility/PHPCompatibility/pull/451)
|
791 |
-
- :rewind: The `getMethodParameters()` utility method will no longer break when used with PHPCS 1.5.x < 1.5.6. This affected a number of sniffs. [#452](https://github.com/PHPCompatibility/PHPCompatibility/pull/452)
|
792 |
-
- :rewind: The `inUseScope()` utility method will no longer break when used with PHPCS 2.0.0 - 2.2.0. This affected a number of sniffs. [#454](https://github.com/PHPCompatibility/PHPCompatibility/pull/454)
|
793 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#443](https://github.com/PHPCompatibility/PHPCompatibility/pull/443), [#474](https://github.com/PHPCompatibility/PHPCompatibility/pull/474)
|
794 |
-
- :pencil2: Renamed a test file for consistency. [#453](https://github.com/PHPCompatibility/PHPCompatibility/pull/453)
|
795 |
-
- :wrench: Code style clean up. [#429](https://github.com/PHPCompatibility/PHPCompatibility/pull/429)
|
796 |
-
- :wrench: Prevent Composer installing PHPCS 3.x. **_PHPCS 3.x is not (yet) supported by the PHPCompatibility standard, but will be in the near future._** [#444](https://github.com/PHPCompatibility/PHPCompatibility/pull/444)
|
797 |
-
- :green_heart: The code base will now be checked for consistent code style during build testing. [#429](https://github.com/PHPCompatibility/PHPCompatibility/pull/429)
|
798 |
-
- :green_heart: The sniffs are now also tested against HHVM for consistent results. _Note: the sniffs do not contain any HHVM specific checks nor is there any intention to add them at this time._ [#450](https://github.com/PHPCompatibility/PHPCompatibility/pull/450)
|
799 |
-
- :books: Made it explicit that - at this moment - PHPCS 3.x is not (yet) supported. [#444](https://github.com/PHPCompatibility/PHPCompatibility/pull/444)
|
800 |
-
- :books: Minor improvements to the Readme. [#448](https://github.com/PHPCompatibility/PHPCompatibility/pull/448), [#449](https://github.com/PHPCompatibility/PHPCompatibility/pull/449), [#468](https://github.com/PHPCompatibility/PHPCompatibility/pull/468)
|
801 |
-
- :books: Minor improvements to the Contributing guidelines. [#467](https://github.com/PHPCompatibility/PHPCompatibility/pull/467)
|
802 |
-
|
803 |
-
### Removed
|
804 |
-
- :no_entry_sign: The `DefaultTimeZoneRequired` sniff. This sniff was checking server settings rather than code. [#458](https://github.com/PHPCompatibility/PHPCompatibility/pull/458). Fixes [#457](https://github.com/PHPCompatibility/PHPCompatibility/issues/457)
|
805 |
-
- :no_entry_sign: The `NewMagicClassConstant` sniff as introduced in v 7.1.4 contained two additional checks for not strictly compatibility related issues. One of these was plainly wrong, the other opinionated. Both have been removed. [#442](https://github.com/PHPCompatibility/PHPCompatibility/pull/442). Fixes [#436](https://github.com/PHPCompatibility/PHPCompatibility/issues/436)
|
806 |
-
|
807 |
-
### Fixed
|
808 |
-
- :bug: `NewClass` sniff: was reporting an incorrect introduction version number for a few of the Exception classes. [#441](https://github.com/PHPCompatibility/PHPCompatibility/pull/441). Fixes [#440](https://github.com/PHPCompatibility/PHPCompatibility/issues/440).
|
809 |
-
- :bug: `ForbiddenBreakContinueVariableArguments` sniff: was incorrectly reporting an error if the `break` or `continue` was followed by a PHP closing tag (breaking out of PHP). [#462](https://github.com/PHPCompatibility/PHPCompatibility/pull/462). Fixes [#460](https://github.com/PHPCompatibility/PHPCompatibility/issues/460)
|
810 |
-
- :bug: `ForbiddenGlobalVariableVariable` sniff: was incorrectly reporting an error if the `global` statement was followed by a PHP closing tag (breaking out of PHP). [#463](https://github.com/PHPCompatibility/PHPCompatibility/pull/463).
|
811 |
-
- :bug: `DeprecatedFunctions` sniff: was reporting false positives for classes using the same name as a deprecated function. [#465](https://github.com/PHPCompatibility/PHPCompatibility/pull/465). Fixes [#464](https://github.com/PHPCompatibility/PHPCompatibility/issues/464)
|
812 |
-
|
813 |
-
### Credits
|
814 |
-
Thanks go out to [Juliette Reinders Folmer] and [Mark Clements] for their contributions to this version. :clap:
|
815 |
-
|
816 |
-
|
817 |
-
## [7.1.4] - 2017-05-06
|
818 |
-
|
819 |
-
See all related issues and PRs in the [7.1.4 milestone].
|
820 |
-
|
821 |
-
### Added
|
822 |
-
- :star2: New `CaseSensitiveKeywords` sniff to detect use of non-lowercase `self`, `static` and `parent` keywords which could cause compatibility issues pre-PHP 5.5. [#382](https://github.com/PHPCompatibility/PHPCompatibility/pull/382)
|
823 |
-
- :star2: New `ConstantArraysUsingConst` sniff to detect constants defined using the `const` keyword being assigned an array value which was not supported prior to PHP 5.6. [#397](https://github.com/PHPCompatibility/PHPCompatibility/pull/397)
|
824 |
-
- :star2: New `ForbiddenClosureUseVariableNames` sniff to detect PHP 7.1 forbidden variable names in closure use statements. [#386](https://github.com/PHPCompatibility/PHPCompatibility/pull/386). Fixes [#374](https://github.com/PHPCompatibility/PHPCompatibility/issues/374)
|
825 |
-
- :star2: New `NewArrayStringDereferencing` sniff to detect array and string literal dereferencing as introduced in PHP 5.5. [#388](https://github.com/PHPCompatibility/PHPCompatibility/pull/388)
|
826 |
-
- :star2: New `NewHeredocInitialize` sniff to detect initialization of static variables and class properties/constants using the heredoc syntax which is supported since PHP 5.3. [#391](https://github.com/PHPCompatibility/PHPCompatibility/pull/391). Fixes [#51](https://github.com/PHPCompatibility/PHPCompatibility/issues/51)
|
827 |
-
- :star2: New `NewMagicClassConstant` sniff to detect use of the magic `::class` constant as introduced in PHP 5.5. [#403](https://github.com/PHPCompatibility/PHPCompatibility/pull/403). Fixes [#364](https://github.com/PHPCompatibility/PHPCompatibility/issues/364).
|
828 |
-
- :star2: New `NewUseConstFunction` sniff to detect use statements importing constants and functions as introduced in PHP 5.6. [#401](https://github.com/PHPCompatibility/PHPCompatibility/pull/401)
|
829 |
-
- :star: `DeprecatedFunctions` sniff: recognize PHP 7.2 deprecated GD functions. [#392](https://github.com/PHPCompatibility/PHPCompatibility/pull/392)
|
830 |
-
- :star: `DeprecatedIniDirectives` sniff: recognize PHP 7.2 deprecated `mbstring.func_overload` directive. [#377](https://github.com/PHPCompatibility/PHPCompatibility/pull/377)
|
831 |
-
- :star: `NewClasses` sniff: check for the PHP 5.1 `libXMLError` class. [#412](https://github.com/PHPCompatibility/PHPCompatibility/pull/412)
|
832 |
-
- :star: `NewClasses` sniff: recognize all native PHP Exception classes. [#418](https://github.com/PHPCompatibility/PHPCompatibility/pull/418)
|
833 |
-
- :star: `NewClosure` sniff: check for closures being declared as static and closures using `$this`. Both of which was not supported pre-PHP 5.4. [#389](https://github.com/PHPCompatibility/PHPCompatibility/pull/389). Fixes [#24](https://github.com/PHPCompatibility/PHPCompatibility/issues/24).
|
834 |
-
- :star: `NewFunctionParameters` sniff: recognize new `exclude_disabled` parameter for the `get_defined_functions()` function as introduced in PHP 7.0.15. [#375](https://github.com/PHPCompatibility/PHPCompatibility/pull/375)
|
835 |
-
- :star: `NewFunctions` sniff: recognize new PHP 7.2 socket related functions. [#376](https://github.com/PHPCompatibility/PHPCompatibility/pull/376)
|
836 |
-
- :star: `NewInterfaces` sniff: check for some more PHP native interfaces. [#411](https://github.com/PHPCompatibility/PHPCompatibility/pull/411)
|
837 |
-
- :star: New `isClassProperty()`, `isClassConstant()` and `validDirectScope()` utility methods to the `PHPCompatibility_Sniff` class. [#393](https://github.com/PHPCompatibility/PHPCompatibility/pull/393), [#391](https://github.com/PHPCompatibility/PHPCompatibility/pull/391).
|
838 |
-
- :star: New `getTypeHintsFromFunctionDeclaration()` utility method to the `PHPCompatibility_Sniff` class. [#414](https://github.com/PHPCompatibility/PHPCompatibility/pull/414).
|
839 |
-
- :umbrella: Unit tests against false positives for the `NewMagicMethods` sniff. [#381](https://github.com/PHPCompatibility/PHPCompatibility/pull/381)
|
840 |
-
- :umbrella: More unit tests for the `getTestVersion()` utility method. [#405](https://github.com/PHPCompatibility/PHPCompatibility/pull/405), [#430](https://github.com/PHPCompatibility/PHPCompatibility/pull/430)
|
841 |
-
- :green_heart: The XML of the ruleset will now be validated and checked for consistent code style during the build testing by Travis. [#433](https://github.com/PHPCompatibility/PHPCompatibility/pull/433)
|
842 |
-
- :books: Readme: information about setting `installed_paths` via a custom ruleset. [#407](https://github.com/PHPCompatibility/PHPCompatibility/pull/407)
|
843 |
-
- :books: `Changelog.md` file containing a record of notable changes since the first tagged release. [#421](https://github.com/PHPCompatibility/PHPCompatibility/pull/421)
|
844 |
-
|
845 |
-
### Changed
|
846 |
-
- :pushpin: The `ForbiddenNamesAsDeclared` sniff will now emit `warning`s for soft reserved keywords. [#406](https://github.com/PHPCompatibility/PHPCompatibility/pull/406), [#370](https://github.com/PHPCompatibility/PHPCompatibility/pull/370).
|
847 |
-
- :pushpin: The `ForbiddenNames` sniff will now allow for the more liberal rules for usage of reserved keywords as of PHP 7.0. [#417](https://github.com/PHPCompatibility/PHPCompatibility/pull/417)
|
848 |
-
- :pushpin: The `InternalInterfaces`, `NewClasses`, `NewConstVisibility`, `NewInterfaces`, `NewMagicMethods`, `NonStaticMagicMethods` and `RemovedGlobalVariables` sniffs will now also sniff for and correctly report violations in combination with anonymous classes. [#378](https://github.com/PHPCompatibility/PHPCompatibility/pull/378), [#383](https://github.com/PHPCompatibility/PHPCompatibility/pull/383), [#393](https://github.com/PHPCompatibility/PHPCompatibility/pull/393), [#394](https://github.com/PHPCompatibility/PHPCompatibility/pull/394), [#395](https://github.com/PHPCompatibility/PHPCompatibility/pull/395), [#396](https://github.com/PHPCompatibility/PHPCompatibility/pull/396). Fixes [#351](https://github.com/PHPCompatibility/PHPCompatibility/issues/351) and [#333](https://github.com/PHPCompatibility/PHPCompatibility/issues/333).
|
849 |
-
- :pushpin: The `NewClasses` and `NewInterfaces` sniffs will now also report on new classes/interfaces when used as type hints. [#414](https://github.com/PHPCompatibility/PHPCompatibility/pull/414), [#416](https://github.com/PHPCompatibility/PHPCompatibility/pull/416). Fixes [#352](https://github.com/PHPCompatibility/PHPCompatibility/issues/352)
|
850 |
-
- :pushpin: The `NewClasses` sniff will now also report on Exception classes when used in (multi-)`catch` statements. [#418](https://github.com/PHPCompatibility/PHPCompatibility/pull/418). Fixes [#373](https://github.com/PHPCompatibility/PHPCompatibility/issues/373).
|
851 |
-
- :pushpin: The `NewScalarTypeDeclarations` sniff will now report on new type hints even when the type hint is nullable. [#379](https://github.com/PHPCompatibility/PHPCompatibility/pull/379)
|
852 |
-
- :twisted_rightwards_arrows: The `NewNowdoc` sniff has been renamed to `NewNowdocQuotedHeredoc` and will now also check for double quoted heredoc identifiers as introduced in PHP 5.3. [#390](https://github.com/PHPCompatibility/PHPCompatibility/pull/390)
|
853 |
-
- :rewind: The `NewClasses` sniff will now also report anonymous classes which `extend` a new sniff when used in combination with PHPCS 2.4.0-2.8.0. [#432](https://github.com/PHPCompatibility/PHPCompatibility/pull/432). Fixes [#334](https://github.com/PHPCompatibility/PHPCompatibility/issues/334).
|
854 |
-
- :pencil2: `NewFunctionParameter` sniff: version number precision for two parameters. [#384](https://github.com/PHPCompatibility/PHPCompatibility/pull/384), [#428](https://github.com/PHPCompatibility/PHPCompatibility/pull/428)
|
855 |
-
- :umbrella: Skipping two unit tests for the `ForbiddenClosureUseVariable` sniff when run on PHPCS 2.5.1 as these cause an infinite loop due to an upstream bug. [#408](https://github.com/PHPCompatibility/PHPCompatibility/pull/408)
|
856 |
-
- :umbrella: Skipping unit tests involving `trait`s in combination with PHP < 5.4 and PHPCS < 2.4.0 as `trait`s are not recognized in those circumstances. [#431](https://github.com/PHPCompatibility/PHPCompatibility/pull/431)
|
857 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#385](https://github.com/PHPCompatibility/PHPCompatibility/pull/385), [#387](https://github.com/PHPCompatibility/PHPCompatibility/pull/387), [#415](https://github.com/PHPCompatibility/PHPCompatibility/pull/415), [#423](https://github.com/PHPCompatibility/PHPCompatibility/pull/423), [#424](https://github.com/PHPCompatibility/PHPCompatibility/pull/424)
|
858 |
-
- :recycle: Minor simplification of the PHPUnit 6 compatibility layer and other test code. [#426](https://github.com/PHPCompatibility/PHPCompatibility/pull/426), [#425](https://github.com/PHPCompatibility/PHPCompatibility/pull/425)
|
859 |
-
- General housekeeping. [#398](https://github.com/PHPCompatibility/PHPCompatibility/pull/398), [#400](https://github.com/PHPCompatibility/PHPCompatibility/pull/400)
|
860 |
-
- :wrench: Minor tweaks to the Travis build script. [#409](https://github.com/PHPCompatibility/PHPCompatibility/pull/409)
|
861 |
-
- :green_heart: The sniffs are now also tested against PHP nightly for consistent results. [#380](https://github.com/PHPCompatibility/PHPCompatibility/pull/380)
|
862 |
-
|
863 |
-
### Fixed
|
864 |
-
- :fire: Using unbounded ranges in `testVersion` resulted in unreported errors when used with sniffs using the `supportsBelow()` method. This affected the results of approximately half the sniffs. [#430](https://github.com/PHPCompatibility/PHPCompatibility/pull/430)
|
865 |
-
- :bug: The `ForbiddenNames` sniff would throw false positives for `use` statements with the `final` modifier in traits. [#402](https://github.com/PHPCompatibility/PHPCompatibility/pull/402).
|
866 |
-
- :bug: The `ForbiddenNames` sniff would fail to report on functions declared to return by reference using a reserved keyword as the function name. [#413](https://github.com/PHPCompatibility/PHPCompatibility/pull/413)
|
867 |
-
- :bug: The `ForbiddenNames` sniff would only examine the first part of a namespace and not report on reserved keywords used in subsequent parts of a nested namespace. [#419](https://github.com/PHPCompatibility/PHPCompatibility/pull/419)
|
868 |
-
- :bug: The `ForbiddenNames` sniff would not always correctly report on use statements importing constants or functions using reserved keywords. [#420](https://github.com/PHPCompatibility/PHPCompatibility/pull/420)
|
869 |
-
- :bug: The `NewKeywords` sniff would sometimes fail to report on the `const` keyword when used in a class, but not for a class constant. [#424](https://github.com/PHPCompatibility/PHPCompatibility/pull/424)
|
870 |
-
- :green_heart: PHPCS has released version 3.0 and updated the `master` branch to reflect this. This was causing the builds to fail. [#422](https://github.com/PHPCompatibility/PHPCompatibility/pull/422)
|
871 |
-
|
872 |
-
### Credits
|
873 |
-
Thanks go out to [Juliette Reinders Folmer] and [Mark Clements] for their contributions to this version. :clap:
|
874 |
-
|
875 |
-
|
876 |
-
## [7.1.3] - 2017-04-02
|
877 |
-
|
878 |
-
See all related issues and PRs in the [7.1.3 milestone].
|
879 |
-
|
880 |
-
### Added
|
881 |
-
- :zap: The `testVersion` config parameter now allows for specifying unbounded ranges.
|
882 |
-
For example: specifying `-5.6` means: check for compatibility with all PHP versions up to and including PHP 5.6;
|
883 |
-
Specifying `7.0-` means: check for compatibility with all PHP versions from PHP 7.0 upwards.
|
884 |
-
For more information about setting the `testVersion`, see [Using the compatibility sniffs](https://github.com/PHPCompatibility/PHPCompatibility#using-the-compatibility-sniffs) in the readme.
|
885 |
-
- :umbrella: Unit test for multi-line short arrays for the `ShortArray` sniff. [#347](https://github.com/PHPCompatibility/PHPCompatibility/pull/347)
|
886 |
-
- :umbrella: Various additional unit tests against false positives. [#345](https://github.com/PHPCompatibility/PHPCompatibility/pull/345), [#369](https://github.com/PHPCompatibility/PHPCompatibility/pull/369)
|
887 |
-
- :umbrella: Unit tests for the `supportsBelow()`, `supportsAbove()` and `getTestVersion()` utility methods. [#363](https://github.com/PHPCompatibility/PHPCompatibility/pull/363)
|
888 |
-
- :books: Readme: information about installation of the standard using git check-out. [#349](https://github.com/PHPCompatibility/PHPCompatibility/pull/349)
|
889 |
-
- :books: `Contributing.md` file with information about reporting bugs, requesting features, making pull requests and running the unit tests. [#350](https://github.com/PHPCompatibility/PHPCompatibility/pull/350)
|
890 |
-
|
891 |
-
### Changed
|
892 |
-
- :pushpin: The `ForbiddenFunctionParametersWithSameName`, `NewScalarTypeDeclarations`, `ParameterShadowSuperGlobals` sniff will now also sniff for and report violations in closures. [#331](https://github.com/PHPCompatibility/PHPCompatibility/pull/331)
|
893 |
-
- :twisted_rightwards_arrows: :rewind: The check for the PHP 5.3 `nowdoc` structure has been moved from the `NewKeywords` sniff to a new stand-alone `NewNowdoc` sniff which will now also recognize this structure when the sniffs are run on PHP 5.2. [#335](https://github.com/PHPCompatibility/PHPCompatibility/pull/335)
|
894 |
-
- :rewind: The `ForbiddenNames` sniff will now also correctly recognize reserved keywords used in a declared namespace when run on PHP 5.2. [#362](https://github.com/PHPCompatibility/PHPCompatibility/pull/362)
|
895 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#360](https://github.com/PHPCompatibility/PHPCompatibility/pull/360)
|
896 |
-
- :recycle: The unit tests would previously run each test case file against all PHPCompatibility sniffs. Now, they will only be tested against the sniff which the test case file is intended to test. This allows for more test cases to be tested, more precise testing in combination with `testVersion` settings and makes the unit tests run ~6 x faster.
|
897 |
-
Relevant additional unit tests have been added and others adjusted. [#369](https://github.com/PHPCompatibility/PHPCompatibility/pull/369)
|
898 |
-
- :recycle: Refactoring/tidying up of some unit test code. [#343](https://github.com/PHPCompatibility/PHPCompatibility/pull/343), [#345](https://github.com/PHPCompatibility/PHPCompatibility/pull/345), [#356](https://github.com/PHPCompatibility/PHPCompatibility/pull/356), [#355](https://github.com/PHPCompatibility/PHPCompatibility/pull/355), [#359](https://github.com/PHPCompatibility/PHPCompatibility/pull/359)
|
899 |
-
- General housekeeping. [#346](https://github.com/PHPCompatibility/PHPCompatibility/pull/346)
|
900 |
-
- :books: Readme: Clarify minimum requirements and influence on the results. [#348](https://github.com/PHPCompatibility/PHPCompatibility/pull/348)
|
901 |
-
|
902 |
-
### Removed
|
903 |
-
- :twisted_rightwards_arrows: Removed the `LongArrays` sniff. The checks it contained have been moved into the `RemovedGlobalVariables` sniff. Both sniffs essentially did the same thing, just for different PHP native superglobals. [#354](https://github.com/PHPCompatibility/PHPCompatibility/pull/354)
|
904 |
-
|
905 |
-
### Fixed
|
906 |
-
- :bug: The `PregReplaceEModifier` sniff would throw a false positive if a quote character was used as the regex delimiter. [#357](https://github.com/PHPCompatibility/PHPCompatibility/pull/357)
|
907 |
-
- :bug: `RemovedGlobalVariables` sniff would report false positives for class properties shadowing the removed `$HTTP_RAW_POST_DATA` variables. [#354](https://github.com/PHPCompatibility/PHPCompatibility/pull/354).
|
908 |
-
- :bug: The `getFQClassNameFromNewToken()` utility function could go into an infinite loop causing PHP to run out of memory when examining unfinished code (examination during live coding). [#338](https://github.com/PHPCompatibility/PHPCompatibility/pull/338), [#342](https://github.com/PHPCompatibility/PHPCompatibility/pull/342)
|
909 |
-
- :bug: The `determineNamespace()` utility method would in certain cases not break out a loop. [#358](https://github.com/PHPCompatibility/PHPCompatibility/pull/358)
|
910 |
-
- :wrench: Travis script: Minor tweak for PHP 5.2 compatibility. [#341](https://github.com/PHPCompatibility/PHPCompatibility/pull/341)
|
911 |
-
- :wrench: The unit test suite is now also compatible with PHPUnit 6. [#365](https://github.com/PHPCompatibility/PHPCompatibility/pull/365)
|
912 |
-
- :books: Readme: Typo in the composer instructions. [#344](https://github.com/PHPCompatibility/PHPCompatibility/pull/344)
|
913 |
-
|
914 |
-
### Credits
|
915 |
-
Thanks go out to [Arthur Edamov], [Juliette Reinders Folmer], [Mark Clements] and [Tadas Juozapaitis] for their contributions to this version. :clap:
|
916 |
-
|
917 |
-
|
918 |
-
## [7.1.2] - 2017-02-17
|
919 |
-
|
920 |
-
See all related issues and PRs in the [7.1.2 milestone].
|
921 |
-
|
922 |
-
### Added
|
923 |
-
- :star2: New `VariableVariables` sniff to detect variables variables for which the behaviour has changed in PHP 7.0. [#310](https://github.com/PHPCompatibility/PHPCompatibility/pull/310) Fixes [#309](https://github.com/PHPCompatibility/PHPCompatibility/issues/309).
|
924 |
-
- :star: The `NewReturnTypeDeclarations` sniff will now also sniff for non-scalar return type declarations, i.e. `array`, `callable`, `self` or a class name. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
925 |
-
- :star: The `NewLanguageConstructs` sniff will now also sniff for the null coalesce equal operator `??=`. This operator is slated to be introduced in PHP 7.2 and PHPCS already accounts for it. [#340](https://github.com/PHPCompatibility/PHPCompatibility/pull/340)
|
926 |
-
- :star: New `getReturnTypeHintToken()` utility method to the `PHPCompatibility_Sniff` class to retrieve return type hints from function declarations in a cross-PHPCS-version compatible way. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323).
|
927 |
-
- :star: New `stripVariables()` utility method to the `PHPCompatibility_Sniff` class to strip variables from interpolated text strings. [#341](https://github.com/PHPCompatibility/PHPCompatibility/pull/314).
|
928 |
-
- :umbrella: Additional unit tests covering previously uncovered code. [#308](https://github.com/PHPCompatibility/PHPCompatibility/pull/308)
|
929 |
-
|
930 |
-
### Changed
|
931 |
-
- :pushpin: The `MbstringReplaceEModifier`, `PregReplaceEModifier` and `NewExecutionDirectives` sniffs will now also correctly interpret double quoted text strings with interpolated variables. [#341](https://github.com/PHPCompatibility/PHPCompatibility/pull/314), [#324](https://github.com/PHPCompatibility/PHPCompatibility/pull/324).
|
932 |
-
- :pushpin: The `NewNullableTypes` sniff will now also report on nullable (return) type hints when used with closures. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
933 |
-
- :pushpin: The `NewReturnTypeDeclarations` sniff will now also report on return type hints when used with closures. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
934 |
-
- :pushpin: Allow for anonymous classes in the `inClassScope()` utility method. [#315](https://github.com/PHPCompatibility/PHPCompatibility/pull/315)
|
935 |
-
- :pushpin: The function call parameter related utility functions can now also be used to get the individual items from an array declaration. [#300](https://github.com/PHPCompatibility/PHPCompatibility/pull/300)
|
936 |
-
- :twisted_rightwards_arrows: The `NewScalarReturnTypeDeclarations` sniff has been renamed to `NewReturnTypeDeclarations`. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
937 |
-
- :rewind: The `ForbiddenNames` sniff will now also correctly ignore anonymous classes when used in combination with PHPCS < 2.3.4. [#319](https://github.com/PHPCompatibility/PHPCompatibility/pull/319)
|
938 |
-
- :rewind: The `NewAnonymousClasses` sniff will now correctly recognize and report on anonymous classes when used in combination with PHPCS < 2.5.2. [#325](https://github.com/PHPCompatibility/PHPCompatibility/pull/325)
|
939 |
-
- :rewind: The `NewGroupUseDeclarations` sniff will now correctly recognize and report on group use statements when used in combination with PHPCS < 2.6.0. [#320](https://github.com/PHPCompatibility/PHPCompatibility/pull/320)
|
940 |
-
- :rewind: The `NewNullableTypes` sniff will now correctly recognize and report on nullable return types when used in combination with PHPCS < 2.6.0. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
941 |
-
- :rewind: The `NewReturnTypeDeclarations` sniff will now correctly recognize and report on new return types when used in combination with PHPCS < 2.6.0. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
942 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#317](https://github.com/PHPCompatibility/PHPCompatibility/pull/317)
|
943 |
-
- :recycle: Defer to upstream `hasCondition()` utility method where appropriate. [#315](https://github.com/PHPCompatibility/PHPCompatibility/pull/315)
|
944 |
-
- :recycle: Minor refactoring of some unit test code. [#304](https://github.com/PHPCompatibility/PHPCompatibility/pull/304), [#303](https://github.com/PHPCompatibility/PHPCompatibility/pull/303), [#318](https://github.com/PHPCompatibility/PHPCompatibility/pull/318)
|
945 |
-
- :wrench: All unit tests now have appropriate `@group` annotations allowing for quicker/easier testing of a select group of tests/sniffs. [#305](https://github.com/PHPCompatibility/PHPCompatibility/pull/305)
|
946 |
-
- :wrench: All unit tests now have appropriate `@covers` annotations to improve code coverage reporting and remove bleed through of accidental coverage. [#307](https://github.com/PHPCompatibility/PHPCompatibility/pull/307)
|
947 |
-
- :wrench: Minor tweaks to the travis script. [#322](https://github.com/PHPCompatibility/PHPCompatibility/pull/322)
|
948 |
-
- :green_heart: The PHPCompatibility code base itself will now be checked for cross-version compatibility during build testing. [#322](https://github.com/PHPCompatibility/PHPCompatibility/pull/322)
|
949 |
-
|
950 |
-
### Fixed
|
951 |
-
- :bug: The `ConstantArraysUsingDefine` sniff would throw false positives if the value of the `define()` was retrieved via a function call and an array parameter was passed. [#327](https://github.com/PHPCompatibility/PHPCompatibility/pull/327)
|
952 |
-
- :bug: The `ForbiddenCallTimePassByReference` sniff would throw false positives on assign by reference within function calls or conditions. [#302](https://github.com/PHPCompatibility/PHPCompatibility/pull/302) Fixes the last two cases reported in [#68](https://github.com/PHPCompatibility/PHPCompatibility/issues/68#issuecomment-231366445)
|
953 |
-
- :bug: The `ForbiddenGlobalVariableVariableSniff` sniff would only examine the first variable in a `global ...` statement causing unreported issues if subsequent variables were variable variables. [#316](https://github.com/PHPCompatibility/PHPCompatibility/pull/316)
|
954 |
-
- :bug: The `NewKeywords` sniff would throw a false positive for the `const` keyword when encountered in an interface. [#312](https://github.com/PHPCompatibility/PHPCompatibility/pull/312)
|
955 |
-
- :bug: The `NewNullableTypes` sniff would not report on nullable return types for namespaced classnames used as a type hint. [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323)
|
956 |
-
- :bug: The `PregReplaceEModifier` sniff would always consider the first parameter passed as a single regex, while it could also be an array of regexes. This led to false positives and potentially unreported use of the `e` modifier when an array of regexes was passed. [#300](https://github.com/PHPCompatibility/PHPCompatibility/pull/300)
|
957 |
-
- :bug: The `PregReplaceEModifier` sniff could misidentify the regex delimiter when the regex to be examined was concatenated together from various text strings taken from a compound parameter leading to false positives. [#300](https://github.com/PHPCompatibility/PHPCompatibility/pull/300)
|
958 |
-
- :white_check_mark: Compatibility with PHPCS 2.7.x. Deal with changed behaviour of the upstream PHP tokenizer and utility function(s). [#313](https://github.com/PHPCompatibility/PHPCompatibility/pull/313), [#323](https://github.com/PHPCompatibility/PHPCompatibility/pull/323), [#326](https://github.com/PHPCompatibility/PHPCompatibility/pull/326), [#340](https://github.com/PHPCompatibility/PHPCompatibility/pull/340)
|
959 |
-
|
960 |
-
### Credits
|
961 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
962 |
-
|
963 |
-
|
964 |
-
## [7.1.1] - 2016-12-14
|
965 |
-
|
966 |
-
See all related issues and PRs in the [7.1.1 milestone].
|
967 |
-
|
968 |
-
### Added
|
969 |
-
- :star: `ForbiddenNamesAsDeclared` sniff: detection of the PHP 7.1 `iterable` and `void` reserved keywords when used to name classes, interfaces or traits. [#298](https://github.com/PHPCompatibility/PHPCompatibility/pull/298)
|
970 |
-
|
971 |
-
### Fixed
|
972 |
-
- :bug: The `ForbiddenNamesAsInvokedFunctions` sniff would incorrectly throw an error if the `clone` keyword was used with parenthesis. [#299](https://github.com/PHPCompatibility/PHPCompatibility/pull/299). Fixes [#284](https://github.com/PHPCompatibility/PHPCompatibility/issues/284)
|
973 |
-
|
974 |
-
### Credits
|
975 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
976 |
-
|
977 |
-
|
978 |
-
## [7.1.0] - 2016-12-14
|
979 |
-
|
980 |
-
See all related issues and PRs in the [7.1.0 milestone].
|
981 |
-
|
982 |
-
### Added
|
983 |
-
- :star: New `stringToErrorCode()`, `arrayKeysToLowercase()` and `addMessage()` utility methods to the `PHPCompatibility_Sniff` class. [#291](https://github.com/PHPCompatibility/PHPCompatibility/pull/291).
|
984 |
-
|
985 |
-
### Changed
|
986 |
-
- :pushpin: All sniff error messages now have modular error codes allowing for selectively disabling individual checks - and even selectively disabling individual sniff for specific files - without disabling the complete sniff. [#291](https://github.com/PHPCompatibility/PHPCompatibility/pull/291)
|
987 |
-
- :pencil2: Minor changes to some of the error message texts for consistency across sniffs. [#291](https://github.com/PHPCompatibility/PHPCompatibility/pull/291)
|
988 |
-
- :recycle: Refactored the complex version sniffs to reduce code duplication. [#291](https://github.com/PHPCompatibility/PHPCompatibility/pull/291)
|
989 |
-
- :recycle: Miscellaneous other refactoring for improved performance and sniff accuracy. [#291](https://github.com/PHPCompatibility/PHPCompatibility/pull/291)
|
990 |
-
- :umbrella: The unit tests for the `RemovedExtensions` sniff now verify that the correct alternative extension is being suggested. [#291](https://github.com/PHPCompatibility/PHPCompatibility/pull/291)
|
991 |
-
|
992 |
-
### Credits
|
993 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
994 |
-
|
995 |
-
|
996 |
-
## [7.0.8] - 2016-10-31 - :ghost: Spooky! :jack_o_lantern:
|
997 |
-
|
998 |
-
See all related issues and PRs in the [7.0.8 milestone].
|
999 |
-
|
1000 |
-
### Added
|
1001 |
-
- :star2: New `ForbiddenNamesAsDeclared` sniff: detection of the [other reserved keywords](http://php.net/manual/en/reserved.other-reserved-words.php) which are reserved as of PHP 7.0 (or higher). [#287](https://github.com/PHPCompatibility/PHPCompatibility/pull/287). Fixes [#115](https://github.com/PHPCompatibility/PHPCompatibility/issues/115).
|
1002 |
-
These were previously sniffed for by the `ForbiddenNames` and `ForbiddenNamesAsInvokedFunctions` sniffs causing false positives as the rules for their reservation are different from the rules for "normal" [reserved keywords](http://php.net/manual/en/reserved.keywords.php).
|
1003 |
-
- :star: New `inUseScope()` utility method to the `PHPCompatibility_Sniff` class which handles PHPCS cross-version compatibility when determining the scope of a `use` statement. [#271](https://github.com/PHPCompatibility/PHPCompatibility/pull/271).
|
1004 |
-
- :umbrella: More unit tests for the `ForbiddenNames` sniff. [#271](https://github.com/PHPCompatibility/PHPCompatibility/pull/271).
|
1005 |
-
|
1006 |
-
### Changed
|
1007 |
-
- :pushpin: _Deprecated_ functionality should throw a `warning`. _Removed_ or otherwise unavailable functionality should throw an `error`. This distinction was previously not consistently applied everywhere. [#286](https://github.com/PHPCompatibility/PHPCompatibility/pull/286)
|
1008 |
-
This change affects the following sniffs:
|
1009 |
-
* `DeprecatedPHP4StyleConstructors` will now throw a `warning` instead of an `error` for deprecated PHP4 style class constructors.
|
1010 |
-
* `ForbiddenCallTimePassByReference` will now throw a `warning` if the `testVersion` is `5.3` and an `error` if the `testVersion` if `5.4` or higher.
|
1011 |
-
* `MbstringReplaceEModifier` will now throw a `warning` instead of an `error` for usage of the deprecated `e` modifier.
|
1012 |
-
* `PregReplaceEModifier` will now throw a `warning` if the `testVersion` is `5.5` or `5.6` and an `error` if the `testVersion` if `7.0` or higher. Fixes [#290](https://github.com/PHPCompatibility/PHPCompatibility/issues/290).
|
1013 |
-
* `TernaryOperators` will now throw an `error` when the `testVersion` < `5.3` and the middle part has been omitted.
|
1014 |
-
* `ValidIntegers` will now throw a `warning` when an invalid binary integer is detected.
|
1015 |
-
- :pencil2: `DeprecatedFunctions` and `DeprecatedIniDirectives` sniffs: minor change in the sniff error message text. Use _"removed"_ rather than the ominous _"forbidden"_. [#285](https://github.com/PHPCompatibility/PHPCompatibility/pull/285)
|
1016 |
-
Also updated relevant internal variable names and documentation to match.
|
1017 |
-
|
1018 |
-
### Fixed
|
1019 |
-
- :bug: `ForbiddenNames` sniff would throw false positives for `use` statements which changed the visibility of methods in traits. [#271](https://github.com/PHPCompatibility/PHPCompatibility/pull/271).
|
1020 |
-
- :bug: `ForbiddenNames` sniff would not report reserved keywords when used in combination with `use function` or `use const`. [#271](https://github.com/PHPCompatibility/PHPCompatibility/pull/271).
|
1021 |
-
- :bug: `ForbiddenNames` sniff would potentially - unintentionally - skip over tokens, thereby - potentially - not reporting all errors. [#271](https://github.com/PHPCompatibility/PHPCompatibility/pull/271).
|
1022 |
-
- :wrench: Composer config: `prefer-stable` should be a root element of the json file. Fixes [#277](https://github.com/PHPCompatibility/PHPCompatibility/issues/277).
|
1023 |
-
|
1024 |
-
### Credits
|
1025 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
1026 |
-
|
1027 |
-
|
1028 |
-
## [7.0.7] - 2016-10-20
|
1029 |
-
|
1030 |
-
See all related issues and PRs in the [7.0.7 milestone].
|
1031 |
-
|
1032 |
-
### Added
|
1033 |
-
- :star2: New `ForbiddenBreakContinueOutsideLoop` sniff: verify that `break`/`continue` is not used outside of a loop structure. This will cause fatal errors since PHP 7.0. [#278](https://github.com/PHPCompatibility/PHPCompatibility/pull/278). Fixes [#275](https://github.com/PHPCompatibility/PHPCompatibility/issues/275)
|
1034 |
-
- :star2: New `NewConstVisibility` sniff: detect visibility indicators for `class` and `interface` constants as introduced in PHP 7.1. [#280](https://github.com/PHPCompatibility/PHPCompatibility/pull/280). Fixes [#249](https://github.com/PHPCompatibility/PHPCompatibility/issues/249)
|
1035 |
-
- :star2: New `NewHashAlgorithms` sniff to check used hash algorithms against the PHP version in which they were introduced. [#242](https://github.com/PHPCompatibility/PHPCompatibility/pull/242)
|
1036 |
-
- :star2: New `NewMultiCatch` sniff: detect catch statements catching multiple Exceptions as introduced in PHP 7.1. [#281](https://github.com/PHPCompatibility/PHPCompatibility/pull/281). Fixes [#251](https://github.com/PHPCompatibility/PHPCompatibility/issues/251)
|
1037 |
-
- :star2: New `NewNullableTypes` sniff: detect nullable parameter and return type hints (only supported in PHPCS >= 2.3.4) as introduced in PHP 7.1. [#282](https://github.com/PHPCompatibility/PHPCompatibility/pull/282). Fixes [#247](https://github.com/PHPCompatibility/PHPCompatibility/issues/247)
|
1038 |
-
- :star: `DeprecatedIniDirectives` sniff: recognize PHP 7.1 removed `session` ini directives. [#256](https://github.com/PHPCompatibility/PHPCompatibility/pull/256)
|
1039 |
-
- :star: `NewFunctions` sniff: recognize new `socket_export_stream()` function as introduced in PHP 7.0.7. [#264](https://github.com/PHPCompatibility/PHPCompatibility/pull/264)
|
1040 |
-
- :star: `NewFunctions` sniff: recognize new `curl_...()`, `is_iterable()`, `pcntl_async_signals()`, `session_create_id()`, `session_gc()` functions as introduced in PHP 7.1. [#273](https://github.com/PHPCompatibility/PHPCompatibility/pull/273)
|
1041 |
-
- :star: `NewFunctionParameters` sniff: recognize new OpenSSL function parameters as introduced in PHP 7.1. [#258](https://github.com/PHPCompatibility/PHPCompatibility/pull/258)
|
1042 |
-
- :star: `NewIniDirectives` sniff: recognize new `session` ini directives as introduced in PHP 7.1. [#259](https://github.com/PHPCompatibility/PHPCompatibility/pull/259)
|
1043 |
-
- :star: `NewScalarReturnTypeDeclarations` sniff: recognize PHP 7.1 `void` return type hint. [#250](https://github.com/PHPCompatibility/PHPCompatibility/pull/250)
|
1044 |
-
- :star: `NewScalarTypeDeclarations` sniff: recognize PHP 7.1 `iterable` type hint. [#255](https://github.com/PHPCompatibility/PHPCompatibility/pull/255)
|
1045 |
-
- :star: Recognize the PHP 7.1 deprecated `mcrypt` functionality in the `RemovedExtensions`, `DeprecatedFunctions` and `DeprecatedIniDirectives` sniffs. [#257](https://github.com/PHPCompatibility/PHPCompatibility/pull/257)
|
1046 |
-
|
1047 |
-
### Changed
|
1048 |
-
- :pushpin: `LongArrays` sniff used to only throw `warning`s. It will now throw `error`s for PHP versions in which the long superglobals have been removed. [#270](https://github.com/PHPCompatibility/PHPCompatibility/pull/270)
|
1049 |
-
- :pushpin: The `NewIniDirectives` sniff used to always throw an `warning`. Now it will throw an `error` when a new ini directive is used in combination with `ini_set()`. [#246](https://github.com/PHPCompatibility/PHPCompatibility/pull/246).
|
1050 |
-
- :pushpin: `RemovedHashAlgorithms` sniff: also recognize removed algorithms when used with the PHP 5.5+ `hash_pbkdf2()` function. [#240](https://github.com/PHPCompatibility/PHPCompatibility/pull/240)
|
1051 |
-
- :pushpin: Properly recognize nullable type hints in the `getMethodParameters()` utility method. [#282](https://github.com/PHPCompatibility/PHPCompatibility/pull/282)
|
1052 |
-
- :pencil2: `DeprecatedPHP4StyleConstructors` sniff: minor error message text fix. [#236](https://github.com/PHPCompatibility/PHPCompatibility/pull/236)
|
1053 |
-
- :pencil2: `NewIniDirectives` sniff: improved precision for the introduction version numbers being reported. [#246](https://github.com/PHPCompatibility/PHPCompatibility/pull/246)
|
1054 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#238](https://github.com/PHPCompatibility/PHPCompatibility/pull/238), [#244](https://github.com/PHPCompatibility/PHPCompatibility/pull/244), [#240](https://github.com/PHPCompatibility/PHPCompatibility/pull/240), [#276](https://github.com/PHPCompatibility/PHPCompatibility/pull/276)
|
1055 |
-
- :umbrella: Re-activate the unit tests for the `NewScalarReturnTypeDeclarations` sniff. [#250](https://github.com/PHPCompatibility/PHPCompatibility/pull/250)
|
1056 |
-
|
1057 |
-
### Fixed
|
1058 |
-
- :bug: The `DeprecatedPHP4StyleConstructors` sniff would not report errors when the case of the class name and the PHP4 constructor function name did not match. [#236](https://github.com/PHPCompatibility/PHPCompatibility/pull/236)
|
1059 |
-
- :bug: `LongArrays` sniff would report false positives for class properties shadowing removed PHP superglobals. [#270](https://github.com/PHPCompatibility/PHPCompatibility/pull/270). Fixes [#268](https://github.com/PHPCompatibility/PHPCompatibility/issues/268).
|
1060 |
-
- :bug: The `NewClasses` sniff would not report errors when the case of the class name used and "official" class name did not match. [#237](https://github.com/PHPCompatibility/PHPCompatibility/pull/237)
|
1061 |
-
- :bug: The `NewIniDirectives` sniff would report violations against the PHP version in which the ini directive was introduced. This should be the version below it. [#246](https://github.com/PHPCompatibility/PHPCompatibility/pull/246)
|
1062 |
-
- :bug: `PregReplaceEModifier` sniff would report false positives for compound regex parameters with different quote types. [#266](https://github.com/PHPCompatibility/PHPCompatibility/pull/266). Fixes [#265](https://github.com/PHPCompatibility/PHPCompatibility/issues/265).
|
1063 |
-
- :bug: `RemovedGlobalVariables` sniff would report false positives for lowercase/mixed cased variables shadowing superglobals. [#245](https://github.com/PHPCompatibility/PHPCompatibility/pull/245).
|
1064 |
-
- :bug: The `RemovedHashAlgorithms` sniff would not report errors when the case of the hash function name used and "official" class name did not match. [#240](https://github.com/PHPCompatibility/PHPCompatibility/pull/240)
|
1065 |
-
- :bug: The `ShortArray` sniff would report all violations on the line of the PHP open tag, not on the lines of the short array open/close tags. [#238](https://github.com/PHPCompatibility/PHPCompatibility/pull/238)
|
1066 |
-
|
1067 |
-
### Credits
|
1068 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
1069 |
-
|
1070 |
-
|
1071 |
-
## [7.0.6] - 2016-09-23
|
1072 |
-
|
1073 |
-
See all related issues and PRs in the [7.0.6 milestone].
|
1074 |
-
|
1075 |
-
### Added
|
1076 |
-
- :star: New `stripQuotes()` utility method in the `PHPCompatibility_Sniff` base class to strip quotes which surround text strings in a consistent manner. [#224](https://github.com/PHPCompatibility/PHPCompatibility/pull/224)
|
1077 |
-
- :books: Readme: Add _PHP Version Support_ section. [#225](https://github.com/PHPCompatibility/PHPCompatibility/pull/225)
|
1078 |
-
|
1079 |
-
### Changed
|
1080 |
-
- :pushpin: The `ForbiddenCallTimePassByReference` sniff will now also report the deprecation as of PHP 5.3, not just its removal as of PHP 5.4. [#203](https://github.com/PHPCompatibility/PHPCompatibility/pull/203)
|
1081 |
-
- :pushpin: The `NewFunctionArrayDereferencing` sniff will now also check _method_ calls for array dereferencing, not just function calls. [#229](https://github.com/PHPCompatibility/PHPCompatibility/pull/229). Fixes [#227](https://github.com/PHPCompatibility/PHPCompatibility/issues/227).
|
1082 |
-
- :pencil2: The `NewExecutionDirectives` sniff will now throw `warning`s instead of `error`s for invalid values encountered in execution directives. [#223](https://github.com/PHPCompatibility/PHPCompatibility/pull/223)
|
1083 |
-
- :pencil2: Minor miscellaneous fixes. [#231](https://github.com/PHPCompatibility/PHPCompatibility/pull/231)
|
1084 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#219](https://github.com/PHPCompatibility/PHPCompatibility/pull/219), [#203](https://github.com/PHPCompatibility/PHPCompatibility/pull/203)
|
1085 |
-
- :recycle: Defer to upstream `findImplementedInterfaceNames()` utility method when it exists. [#222](https://github.com/PHPCompatibility/PHPCompatibility/pull/222)
|
1086 |
-
- :wrench: Exclude the test files from analysis by Scrutinizer CI. [#230](https://github.com/PHPCompatibility/PHPCompatibility/pull/230)
|
1087 |
-
|
1088 |
-
### Removed
|
1089 |
-
- :no_entry_sign: Some redundant code. [#232](https://github.com/PHPCompatibility/PHPCompatibility/pull/232)
|
1090 |
-
|
1091 |
-
### Fixed
|
1092 |
-
- :bug: The `EmptyNonVariable` sniff would throw false positives for variable variables and for array access with a (partially) variable array index. [#212](https://github.com/PHPCompatibility/PHPCompatibility/pull/212). Fixes [#210](https://github.com/PHPCompatibility/PHPCompatibility/issues/210).
|
1093 |
-
- :bug: The `NewFunctionArrayDereferencing` sniff would throw false positives for lines of code containing both a function call as well as square brackets, even when they were unrelated. [#228](https://github.com/PHPCompatibility/PHPCompatibility/pull/228). Fixes [#226](https://github.com/PHPCompatibility/PHPCompatibility/issues/226).
|
1094 |
-
- :bug: `ParameterShadowSuperGlobals` sniff would report false positives for lowercase/mixed cased variables shadowing superglobals. [#218](https://github.com/PHPCompatibility/PHPCompatibility/pull/218). Fixes [#214](https://github.com/PHPCompatibility/PHPCompatibility/issues/214).
|
1095 |
-
- :bug: The `determineNamespace()` utility method now accounts properly for namespaces within scoped `declare()` statements. [#221](https://github.com/PHPCompatibility/PHPCompatibility/pull/221)
|
1096 |
-
- :books: Readme: Logo alignment in the Credits section. [#233](https://github.com/PHPCompatibility/PHPCompatibility/pull/233)
|
1097 |
-
|
1098 |
-
### Credits
|
1099 |
-
Thanks go out to [Jason Stallings], [Juliette Reinders Folmer] and [Mark Clements] for their contributions to this version. :clap:
|
1100 |
-
|
1101 |
-
|
1102 |
-
## [7.0.5] - 2016-09-08
|
1103 |
-
|
1104 |
-
See all related issues and PRs in the [7.0.5 milestone].
|
1105 |
-
|
1106 |
-
### Added
|
1107 |
-
- :star2: New `MbstringReplaceEModifier` sniff to detect the use of the PHP 7.1 deprecated `e` modifier in Mbstring regex functions. [#202](https://github.com/PHPCompatibility/PHPCompatibility/pull/202)
|
1108 |
-
- :star: The `ForbiddenBreakContinueVariableArguments` sniff will now also report on `break 0`/`continue 0` which is not allowed since PHP 5.4. [#209](https://github.com/PHPCompatibility/PHPCompatibility/pull/209)
|
1109 |
-
- :star: New `getFunctionCallParameters()`, `getFunctionCallParameter()` utility methods in the `PHPCompatibility_Sniff` base class. [#170](https://github.com/PHPCompatibility/PHPCompatibility/pull/170)
|
1110 |
-
- :star: New `tokenHasScope()` utility method in the `PHPCompatibility_Sniff` base class. [#189](https://github.com/PHPCompatibility/PHPCompatibility/pull/189)
|
1111 |
-
- :umbrella: Unit test for `goto` and `callable` detection and some other miscellanous extra unit tests for the `NewKeywords` sniff. [#189](https://github.com/PHPCompatibility/PHPCompatibility/pull/189)
|
1112 |
-
- :books: Readme: Information for sniff developers about running unit tests for _other_ sniff libraries using the PHPCS native test framework without running into conflicts with the PHPCompatibility specific unit test framework. [#217](https://github.com/PHPCompatibility/PHPCompatibility/pull/217)
|
1113 |
-
|
1114 |
-
### Changed
|
1115 |
-
- :pushpin: The `ForbiddenNames` sniff will now also check interface declarations for usage of reserved keywords. [#200](https://github.com/PHPCompatibility/PHPCompatibility/pull/200)
|
1116 |
-
- :pushpin: `PregReplaceEModifier` sniff: improved handling of regexes build up of a combination of variables, function calls and/or text strings. [#201](https://github.com/PHPCompatibility/PHPCompatibility/pull/201)
|
1117 |
-
- :rewind: The `NewKeywords` sniff will now also correctly recognize new keywords when used in combination with older PHPCS versions and/or run on older PHP versions. [#189](https://github.com/PHPCompatibility/PHPCompatibility/pull/189)
|
1118 |
-
- :pencil2: `PregReplaceEModifier` sniff: minor improvement to the error message text. [#201](https://github.com/PHPCompatibility/PHPCompatibility/pull/201)
|
1119 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#170](https://github.com/PHPCompatibility/PHPCompatibility/pull/170), [#188](https://github.com/PHPCompatibility/PHPCompatibility/pull/188), [#189](https://github.com/PHPCompatibility/PHPCompatibility/pull/189), [#199](https://github.com/PHPCompatibility/PHPCompatibility/pull/199), [#200](https://github.com/PHPCompatibility/PHPCompatibility/pull/200), [#201](https://github.com/PHPCompatibility/PHPCompatibility/pull/201), [#208](https://github.com/PHPCompatibility/PHPCompatibility/pull/208)
|
1120 |
-
- :wrench: The unit tests for the utility methods have been moved to their own subdirectory within `Tests`. [#215](https://github.com/PHPCompatibility/PHPCompatibility/pull/215)
|
1121 |
-
- :green_heart: The sniffs are now also tested against PHP 7.1 for consistent results. [#216](https://github.com/PHPCompatibility/PHPCompatibility/pull/216)
|
1122 |
-
|
1123 |
-
### Removed
|
1124 |
-
- :no_entry_sign: Some redundant code. [26d0b6](https://github.com/PHPCompatibility/PHPCompatibility/commit/26d0b6cf0921f75d93a4faaf09c390f386dde9ff) and [841616](https://github.com/PHPCompatibility/PHPCompatibility/commit/8416162ea81f4067226324f5948f4a50f7958a9b)
|
1125 |
-
|
1126 |
-
### Fixed
|
1127 |
-
- :bug: `ConstantArraysUsingDefine` sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. [#199](https://github.com/PHPCompatibility/PHPCompatibility/pull/199)
|
1128 |
-
- :bug: The `DeprecatedIniDirectives` and `NewIniDirectives` sniffs could potentially trigger on the ini value instead of the ini directive name. [#170](https://github.com/PHPCompatibility/PHPCompatibility/pull/170)
|
1129 |
-
- :bug: `ForbiddenNames` sniff: Reserved keywords when used as the name of a constant declared using `define()` would always be reported independently of the `testVersion` set. [#200](https://github.com/PHPCompatibility/PHPCompatibility/pull/200)
|
1130 |
-
- :bug: `PregReplaceEModifier` sniff would not report errors when the function name used was not in lowercase. [#201](https://github.com/PHPCompatibility/PHPCompatibility/pull/201)
|
1131 |
-
- :bug: `TernaryOperators` sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. [#188](https://github.com/PHPCompatibility/PHPCompatibility/pull/188)
|
1132 |
-
- :bug: The `getFQClassNameFromNewToken()` and `getFQClassNameFromDoubleColonToken()` utility methods would get confused when the class name was a variable instead of being hard-coded, resulting in a PHP warning being thown. [#206](https://github.com/PHPCompatibility/PHPCompatibility/pull/206). Fixes [#205](https://github.com/PHPCompatibility/PHPCompatibility/issues/205).
|
1133 |
-
- :bug: The `getFunctionCallParameters()` utility method would incorrectly identify an extra parameter if the last parameter passed to a function would have an - unnecessary - comma after it. The `getFunctionCallParameters()` utility method also did not handle parameters passed as short arrays correctly. [#213](https://github.com/PHPCompatibility/PHPCompatibility/pull/213). Fixes [#211](https://github.com/PHPCompatibility/PHPCompatibility/issues/211).
|
1134 |
-
- :umbrella: Unit tests for the `NewFunctionArrayDereferencing` sniff were not being run due to a naming error. [#208](https://github.com/PHPCompatibility/PHPCompatibility/pull/208)
|
1135 |
-
- :books: Readme: Information about setting the `testVersion` from a custom ruleset was incorrect. [#204](https://github.com/PHPCompatibility/PHPCompatibility/pull/204)
|
1136 |
-
- :wrench: Path to PHPCS in the unit tests breaking for non-Composer installs. [#198](https://github.com/PHPCompatibility/PHPCompatibility/pull/198)
|
1137 |
-
|
1138 |
-
### Credits
|
1139 |
-
Thanks go out to [Juliette Reinders Folmer] and [Yoshiaki Yoshida] for their contributions to this version. :clap:
|
1140 |
-
|
1141 |
-
|
1142 |
-
## [7.0.4] - 2016-08-20
|
1143 |
-
|
1144 |
-
See all related issues and PRs in the [7.0.4 milestone].
|
1145 |
-
|
1146 |
-
### Added
|
1147 |
-
- :star2: New `EmptyNonVariable` sniff: detection of empty being used on non-variables for PHP < 5.5. [#187](https://github.com/PHPCompatibility/PHPCompatibility/pull/187)
|
1148 |
-
- :star2: New `NewMagicMethods` sniff: detection of declaration of magic methods before the method became "magic". Includes a check for the changed behaviour for the `__toString()` magic method in PHP 5.2. [#176](https://github.com/PHPCompatibility/PHPCompatibility/pull/176). Fixes [#64](https://github.com/PHPCompatibility/PHPCompatibility/issues/64).
|
1149 |
-
- :star2: New `RemovedAlternativePHPTags` sniff: detection of ASP and script open tags for which support was removed in PHP 7.0. [#184](https://github.com/PHPCompatibility/PHPCompatibility/pull/184), [#193](https://github.com/PHPCompatibility/PHPCompatibility/pull/193). Fixes [#127](https://github.com/PHPCompatibility/PHPCompatibility/issues/127).
|
1150 |
-
- :star: `NonStaticMagicMethods` sniff: detection of the `__callStatic()`, `__sleep()`, `__toString()` and `__set_state()` magic methods.
|
1151 |
-
- :green_heart: Lint all non-test case files for syntax errors during the build testing by Travis. [#192](https://github.com/PHPCompatibility/PHPCompatibility/pull/192)
|
1152 |
-
|
1153 |
-
### Changed
|
1154 |
-
- :pushpin: `NonStaticMagicMethods` sniff: will now also sniff `trait`s for magic methods. [#174](https://github.com/PHPCompatibility/PHPCompatibility/pull/174)
|
1155 |
-
- :pushpin: `NonStaticMagicMethods` sniff: will now also check for magic methods which should be declared as `static`. [#174](https://github.com/PHPCompatibility/PHPCompatibility/pull/174)
|
1156 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#178](https://github.com/PHPCompatibility/PHPCompatibility/pull/178), [#179](https://github.com/PHPCompatibility/PHPCompatibility/pull/179), [#174](https://github.com/PHPCompatibility/PHPCompatibility/pull/174), [#171](https://github.com/PHPCompatibility/PHPCompatibility/pull/171)
|
1157 |
-
- :recycle: The unit test suite now internally caches PHPCS run results in combination with a set `testVersion` to speed up the running of the unit tests. These are now ~3 x faster. [#148](https://github.com/PHPCompatibility/PHPCompatibility/pull/148)
|
1158 |
-
- :books: Readme: Minor clarification of the minimum requirements.
|
1159 |
-
- :books: Readme: Advise to use the latest stable version of this repository.
|
1160 |
-
- :wrench: The unit tests can now be run with PHPCS installed in an arbitrary location by passing the location through an environment option. [#191](https://github.com/PHPCompatibility/PHPCompatibility/pull/191).
|
1161 |
-
- :wrench: Improved coveralls configuration and compatibility. [#194](https://github.com/PHPCompatibility/PHPCompatibility/pull/194)
|
1162 |
-
- :green_heart: The sniffs are now also tested against PHP 5.2 for consistent results. Except for namespace, trait and group use related errors, most sniffs work as intended on PHP 5.2. [#196](https://github.com/PHPCompatibility/PHPCompatibility/pull/196)
|
1163 |
-
|
1164 |
-
### Fixed
|
1165 |
-
- :bug: The `ForbiddenBreakContinueVariableArguments` sniff would not report on `break`/`continue` with a closure as an argument. [#171](https://github.com/PHPCompatibility/PHPCompatibility/pull/171)
|
1166 |
-
- :bug: The `ForbiddenNamesAsInvokedFunctions` sniff would not report on reserved keywords which were not lowercase. [#186](https://github.com/PHPCompatibility/PHPCompatibility/pull/186)
|
1167 |
-
- :bug: The `ForbiddenNamesAsInvokedFunctions` sniff would not report on the `goto` and `namespace` keywords when run on PHP 5.2. [#193](https://github.com/PHPCompatibility/PHPCompatibility/pull/193)
|
1168 |
-
- :bug: `NewAnonymousClasses` sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. [#195](https://github.com/PHPCompatibility/PHPCompatibility/pull/195).
|
1169 |
-
- :bug: `NewGroupUseDeclarations` sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. [#190](https://github.com/PHPCompatibility/PHPCompatibility/pull/190).
|
1170 |
-
- :bug: The `NonStaticMagicMethods` sniff would not report on magic methods when the function name as declared was not in the same case as used in the PHP manual. [#174](https://github.com/PHPCompatibility/PHPCompatibility/pull/174)
|
1171 |
-
- :wrench: The unit tests would exit with `0` if PHPCS could not be found. [#191](https://github.com/PHPCompatibility/PHPCompatibility/pull/191)
|
1172 |
-
- :green_heart: The PHPCompatibility library itself was not fully compatible with PHP 5.2. [#193](https://github.com/PHPCompatibility/PHPCompatibility/pull/193)
|
1173 |
-
|
1174 |
-
### Credits
|
1175 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
1176 |
-
|
1177 |
-
|
1178 |
-
## [7.0.3] - 2016-08-18
|
1179 |
-
|
1180 |
-
See all related issues and PRs in the [7.0.3 milestone].
|
1181 |
-
|
1182 |
-
### Added
|
1183 |
-
- :star2: New `InternalInterfaces` sniff: detection of internal PHP interfaces being which should not be implemented by user land classes. [#144](https://github.com/PHPCompatibility/PHPCompatibility/pull/144)
|
1184 |
-
- :star2: New `LateStaticBinding` sniff: detection of PHP 5.3 late static binding. [#177](https://github.com/PHPCompatibility/PHPCompatibility/pull/177)
|
1185 |
-
- :star2: New `NewExecutionDirectives` sniff: verify execution directives set with `declare()`. [#169](https://github.com/PHPCompatibility/PHPCompatibility/pull/169)
|
1186 |
-
- :star2: New `NewInterfaces` sniff: detection of the use of newly introduced PHP native interfaces. This sniff will also detect unsupported methods when a class implements the `Serializable` interface. [#144](https://github.com/PHPCompatibility/PHPCompatibility/pull/144)
|
1187 |
-
- :star2: New `RequiredOptionalFunctionParameters` sniff: detection of missing function parameters which were required in earlier PHP versions only to become optional in later versions. [#165](https://github.com/PHPCompatibility/PHPCompatibility/pull/165)
|
1188 |
-
- :star2: New `ValidIntegers` sniff: detection of binary integers for PHP < 5.4, detection of hexademical numeric strings for which recognition as hex integers was removed in PHP 7.0, detection of invalid binary and octal integers. [#160](https://github.com/PHPCompatibility/PHPCompatibility/pull/160). Fixes [#55](https://github.com/PHPCompatibility/PHPCompatibility/issues/55).
|
1189 |
-
- :star: `DeprecatedExtensions` sniff: detect removal of the `ereg` extension in PHP 7. [#149](https://github.com/PHPCompatibility/PHPCompatibility/pull/149)
|
1190 |
-
- :star: `DeprecatedFunctions` sniff: detection of the PHP 5.0.5 deprecated `php_check_syntax()` and PHP 5.4 deprecated `mysqli_get_cache_stats()` functions. [#155](https://github.com/PHPCompatibility/PHPCompatibility/pull/155).
|
1191 |
-
- :star: `DeprecatedFunctions` sniff: detect deprecation of a number of the `mysqli` functions in PHP 5.3. [#149](https://github.com/PHPCompatibility/PHPCompatibility/pull/149)
|
1192 |
-
- :star: `DeprecatedFunctions` sniff: detect removal of the `call_user_method()`, `ldap_sort()`, `ereg_*()` and `mysql_*()` functions in PHP 7.0. [#149](https://github.com/PHPCompatibility/PHPCompatibility/pull/149)
|
1193 |
-
- :star: `DeprecatedIniDirectives` sniff: detection of a _lot_ more deprecated/removed ini directives. [#146](https://github.com/PHPCompatibility/PHPCompatibility/pull/146)
|
1194 |
-
- :star: `NewFunctionParameters` sniff: detection of a _lot_ more new function parameters. [#164](https://github.com/PHPCompatibility/PHPCompatibility/pull/164)
|
1195 |
-
- :star: `NewFunctions` sniff: detection of numerous extra new functions. [#161](https://github.com/PHPCompatibility/PHPCompatibility/pull/161)
|
1196 |
-
- :star: `NewIniDirectives` sniff: detection of a _lot_ more new ini directives. [#146](https://github.com/PHPCompatibility/PHPCompatibility/pull/146)
|
1197 |
-
- :star: `NewLanguageConstructs` sniff: detection of the PHP 5.6 ellipsis `...` construct. [#175](https://github.com/PHPCompatibility/PHPCompatibility/pull/175)
|
1198 |
-
- :star: `NewScalarTypeDeclarations` sniff: detection of PHP 5.1 `array` and PHP 5.4 `callable` type hints. [#168](https://github.com/PHPCompatibility/PHPCompatibility/pull/168)
|
1199 |
-
- :star: `RemovedFunctionParameters` sniff: detection of a few extra removed function parameters. [#163](https://github.com/PHPCompatibility/PHPCompatibility/pull/163)
|
1200 |
-
- :star: Detection of functions and methods with a double underscore prefix as these are reserved by PHP for future use. The existing upstream `Generic.NamingConventions.CamelCapsFunctionName` sniff is re-used for this with some customization. [#173](https://github.com/PHPCompatibility/PHPCompatibility/pull/173)
|
1201 |
-
- :star: New `getFQClassNameFromNewToken()`, `getFQExtendedClassName()`, `getFQClassNameFromDoubleColonToken()`, `getFQName()`, `isNamespaced()`, `determineNamespace()` and `getDeclaredNamespaceName()` utility methods in the `PHPCompatibility_Sniff` base class for namespace determination. [#162](https://github.com/PHPCompatibility/PHPCompatibility/pull/162)
|
1202 |
-
- :recycle: New `inClassScope()` utility method in the `PHPCompatibility_Sniff` base class. [#168](https://github.com/PHPCompatibility/PHPCompatibility/pull/168)
|
1203 |
-
- :recycle: New `doesFunctionCallHaveParameters()` and `getFunctionCallParameterCount()` utility methods in the `PHPCompatibility_Sniff` base class. [#153](https://github.com/PHPCompatibility/PHPCompatibility/pull/153)
|
1204 |
-
- :umbrella: Unit test for `__halt_compiler()` detection by the `NewKeywords` sniff.
|
1205 |
-
- :umbrella: Unit tests for the `NewFunctions` sniff. [#161](https://github.com/PHPCompatibility/PHPCompatibility/pull/161)
|
1206 |
-
- :umbrella: Unit tests for the `ParameterShadowSuperGlobals` sniff. [#180](https://github.com/PHPCompatibility/PHPCompatibility/pull/180)
|
1207 |
-
- :wrench: Minimal config for Scrutinizer CI. [#145](https://github.com/PHPCompatibility/PHPCompatibility/pull/145).
|
1208 |
-
|
1209 |
-
### Changed
|
1210 |
-
- :pushpin: The `DeprecatedIniDirectives` and the `NewIniDirectives` sniffs will now indicate an alternative ini directive in case the directive has been renamed. [#146](https://github.com/PHPCompatibility/PHPCompatibility/pull/146)
|
1211 |
-
- :pushpin: The `NewClasses` sniff will now also report on new classes being extended by child classes. [#140](https://github.com/PHPCompatibility/PHPCompatibility/pull/140).
|
1212 |
-
- :pushpin: The `NewClasses` sniff will now also report on static use of new classes. [#162](https://github.com/PHPCompatibility/PHPCompatibility/pull/162).
|
1213 |
-
- :pushpin: The `NewScalarTypeDeclarations` sniff will now throw an error on use of type hints pre-PHP 5.0. [#168](https://github.com/PHPCompatibility/PHPCompatibility/pull/168)
|
1214 |
-
- :pushpin: The `NewScalarTypeDeclarations` sniff will now verify type hints used against typical mistakes. [#168](https://github.com/PHPCompatibility/PHPCompatibility/pull/168)
|
1215 |
-
- :pushpin: The `ParameterShadowSuperGlobals` sniff will now do a case-insensitive variable name compare. [#180](https://github.com/PHPCompatibility/PHPCompatibility/pull/180)
|
1216 |
-
- :pushpin: The `RemovedFunctionParameters` sniff will now also report `warning`s on deprecation of function parameters. [#163](https://github.com/PHPCompatibility/PHPCompatibility/pull/163)
|
1217 |
-
- :twisted_rightwards_arrows: The check for `JsonSerializable` has been moved from the `NewClasses` sniff to the `NewInterfaces` sniff. [#162](https://github.com/PHPCompatibility/PHPCompatibility/pull/162)
|
1218 |
-
- :rewind: The `NewLanguageConstructs` sniff will now also recognize new language constructs when used in combination with PHPCS 1.5.x. [#175](https://github.com/PHPCompatibility/PHPCompatibility/pull/175)
|
1219 |
-
- :pencil2: `NewFunctionParameters` sniff: use correct name for the new parameter for the `dirname()` function. [#164](https://github.com/PHPCompatibility/PHPCompatibility/pull/164)
|
1220 |
-
- :pencil2: `NewScalarTypeDeclarations` sniff: minor change in the sniff error message text. [#168](https://github.com/PHPCompatibility/PHPCompatibility/pull/168)
|
1221 |
-
- :pencil2: `RemovedFunctionParameters` sniff: minor change in the sniff error message text. [#163](https://github.com/PHPCompatibility/PHPCompatibility/pull/163)
|
1222 |
-
- :pencil2: The `ParameterShadowSuperGlobals` sniff now extends the `PHPCompatibility_Sniff` class. [#180](https://github.com/PHPCompatibility/PHPCompatibility/pull/180)
|
1223 |
-
- :recycle: Various (minor) refactoring for improved performance and sniff accuracy. [#181](https://github.com/PHPCompatibility/PHPCompatibility/pull/181), [#182](https://github.com/PHPCompatibility/PHPCompatibility/pull/182), [#166](https://github.com/PHPCompatibility/PHPCompatibility/pull/166), [#167](https://github.com/PHPCompatibility/PHPCompatibility/pull/167), [#172](https://github.com/PHPCompatibility/PHPCompatibility/pull/172), [#180](https://github.com/PHPCompatibility/PHPCompatibility/pull/180), [#146](https://github.com/PHPCompatibility/PHPCompatibility/pull/146), [#138](https://github.com/PHPCompatibility/PHPCompatibility/pull/138)
|
1224 |
-
- :recycle: Various refactoring to remove code duplication in the unit tests and add proper test skip notifications where relevant. [#139](https://github.com/PHPCompatibility/PHPCompatibility/pull/139), [#149](https://github.com/PHPCompatibility/PHPCompatibility/pull/149)
|
1225 |
-
|
1226 |
-
### Fixed
|
1227 |
-
- :bug: The `DeprecatedFunctions` sniff was reporting an incorrect deprecation/removal version number for a few functions. [#149](https://github.com/PHPCompatibility/PHPCompatibility/pull/149)
|
1228 |
-
- :bug: The `DeprecatedIniDirectives` sniff was in select cases reporting deprecation of an ini directive prior to removal, while the ini directive was never deprecated prior to its removal. [#146](https://github.com/PHPCompatibility/PHPCompatibility/pull/146)
|
1229 |
-
- :bug: The `DeprecatedPHP4StyleConstructors` sniff would cause false positives for methods with the same name as the class in namespaced classes. [#167](https://github.com/PHPCompatibility/PHPCompatibility/pull/167)
|
1230 |
-
- :bug: The `ForbiddenEmptyListAssignment` sniff did not report errors when there were only comments or parentheses between the list parentheses. [#166](https://github.com/PHPCompatibility/PHPCompatibility/pull/166)
|
1231 |
-
- :bug: The `ForbiddenEmptyListAssignment` sniff will no longer cause false positives during live coding. [#166](https://github.com/PHPCompatibility/PHPCompatibility/pull/166)
|
1232 |
-
- :bug: The `NewClasses` sniff would potentially misidentify namespaced classes as PHP native classes. [#161](https://github.com/PHPCompatibility/PHPCompatibility/pull/162)
|
1233 |
-
- :bug: The `NewFunctions` sniff would fail to identify called functions when the function call was not lowercase. [#161](https://github.com/PHPCompatibility/PHPCompatibility/pull/161)
|
1234 |
-
- :bug: The `NewFunctions` sniff would potentially misidentify namespaced userland functions as new functions. [#161](https://github.com/PHPCompatibility/PHPCompatibility/pull/161)
|
1235 |
-
- :bug: The `NewIniDirectives` sniff was reporting an incorrect introduction version number for a few ini directives. [#146](https://github.com/PHPCompatibility/PHPCompatibility/pull/146)
|
1236 |
-
- :bug: `NewKeywords` sniff: the use of the `const` keyword should only be reported when used outside of a class for PHP < 5.3. [#147](https://github.com/PHPCompatibility/PHPCompatibility/pull/147). Fixes [#129](https://github.com/PHPCompatibility/PHPCompatibility/issues/129).
|
1237 |
-
- :bug: The `RemovedExtensions` sniff was incorrectly reporting a number of extensions as being removed in PHP 5.3 while they were actually removed in PHP 5.1. [#156](https://github.com/PHPCompatibility/PHPCompatibility/pull/156)
|
1238 |
-
- :bug: :recycle: The `NewFunctionParameters` and `RemovedFunctionParameters` now use the new `doesFunctionCallHaveParameters()` and `getFunctionCallParameterCount()` utility methods for improved accuracy in identifying function parameters. This fixes several false positives. [#153](https://github.com/PHPCompatibility/PHPCompatibility/pull/153) Fixes [#120](https://github.com/PHPCompatibility/PHPCompatibility/issues/120), [#151](https://github.com/PHPCompatibility/PHPCompatibility/issues/151), [#152](https://github.com/PHPCompatibility/PHPCompatibility/issues/152).
|
1239 |
-
- :bug: A number of sniffs would return `false` if the examined construct was not found. This could potentially cause race conditions/infinite sniff loops. [#138](https://github.com/PHPCompatibility/PHPCompatibility/pull/138)
|
1240 |
-
- :wrench: The unit tests would fail to run when used in combination with a PEAR install of PHPCS. [#157](https://github.com/PHPCompatibility/PHPCompatibility/pull/157).
|
1241 |
-
- :green_heart: Unit tests failing against PHPCS 2.6.1. [#158](https://github.com/PHPCompatibility/PHPCompatibility/pull/158)
|
1242 |
-
The unit tests *will* still fail against PHPCS 2.6.2 due to a bug in PHPCS itself. This bug does not affect the running of the sniffs outside of a unit test context.
|
1243 |
-
|
1244 |
-
### Credits
|
1245 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
1246 |
-
|
1247 |
-
|
1248 |
-
## [7.0.2] - 2016-08-03
|
1249 |
-
|
1250 |
-
See all related issues and PRs in the [7.0.2 milestone].
|
1251 |
-
|
1252 |
-
### Added
|
1253 |
-
- :star: `RemovedExtensions` sniff: ability to whitelist userland functions for which the function prefix overlaps with a prefix of a deprecated/removed extension. [#130](https://github.com/PHPCompatibility/PHPCompatibility/pull/130). Fixes [#123](https://github.com/PHPCompatibility/PHPCompatibility/issues/123).
|
1254 |
-
To use this feature, add the `functionWhitelist` property in your custom ruleset. For more information, see the [README](https://github.com/PHPCompatibility/PHPCompatibility#phpcompatibility-specific-options).
|
1255 |
-
|
1256 |
-
### Changed
|
1257 |
-
- :pencil2: A number of sniffs contained `public` class properties. Within PHPCS, `public` properties can be overruled via a custom ruleset. This was not the intention, so the visibility of these properties has been changed to `protected`. [#135](https://github.com/PHPCompatibility/PHPCompatibility/pull/135)
|
1258 |
-
- :wrench: Composer config: Stable packages are preferred over unstable/dev.
|
1259 |
-
- :pencil2: Ruleset name. [#134](https://github.com/PHPCompatibility/PHPCompatibility/pull/134)
|
1260 |
-
|
1261 |
-
### Credits
|
1262 |
-
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
|
1263 |
-
|
1264 |
-
|
1265 |
-
## [7.0.1] - 2016-08-02
|
1266 |
-
|
1267 |
-
See all related issues and PRs in the [7.0.1 milestone].
|
1268 |
-
|
1269 |
-
### Changed
|
1270 |
-
- :pushpin: The `DeprecatedIniDirectives` sniff used to throw an `error` when a deprecated ini directive was used in combination with `ini_get()`. It will now throw a `warning` instead. [#122](https://github.com/PHPCompatibility/PHPCompatibility/pull/122) Fixes [#119](https://github.com/PHPCompatibility/PHPCompatibility/issues/119).
|
1271 |
-
Usage of deprecated ini directives in combination with `ini_set()` will still throw an `error`.
|
1272 |
-
- :pushpin: The `PregReplaceEModifier` sniff now also detects the `e` modifier when used with the `preg_filter()` function. While this is undocumented, the `e` modifier was supported by the `preg_filter()` function as well. [#128](https://github.com/PHPCompatibility/PHPCompatibility/pull/128)
|
1273 |
-
- :pencil2: The `RemovedExtensions` sniff contained superfluous deprecation information in the error message. [#131](https://github.com/PHPCompatibility/PHPCompatibility/pull/131)
|
1274 |
-
|
1275 |
-
### Removed
|
1276 |
-
- :wrench: Duplicate builds from the Travis CI build matrix. [#132](https://github.com/PHPCompatibility/PHPCompatibility/pull/132)
|
1277 |
-
|
1278 |
-
### Fixed
|
1279 |
-
- :bug: The `ForbiddenNames` sniff did not allow for the PHP 5.6 `use function ...` and `use const ...` syntax. [#126](https://github.com/PHPCompatibility/PHPCompatibility/pull/126) Fixes [#124](https://github.com/PHPCompatibility/PHPCompatibility/issues/124).
|
1280 |
-
- :bug: The `NewClasses` sniff failed to detect new classes when the class was instantiated without parenthesis, i.e. `new NewClass;`. [#121](https://github.com/PHPCompatibility/PHPCompatibility/pull/121)
|
1281 |
-
- :bug: The `PregReplaceEModifier` sniff failed to detect the `e` modifier when using bracket delimiters for the regex other than the `{}` brackets. [#128](https://github.com/PHPCompatibility/PHPCompatibility/pull/128)
|
1282 |
-
- :green_heart: Unit tests failing against PHPCS 2.6.1.
|
1283 |
-
|
1284 |
-
### Credits
|
1285 |
-
Thanks go out to [Jason Stallings], [Juliette Reinders Folmer] and [Ryan Neufeld] for their contributions to this version. :clap:
|
1286 |
-
|
1287 |
-
|
1288 |
-
## [7.0] - 2016-07-02
|
1289 |
-
|
1290 |
-
See all related issues and PRs in the [7.0 milestone].
|
1291 |
-
|
1292 |
-
### Added
|
1293 |
-
- :zap: Ability to specify a range of PHP versions against which to test your code base for compatibility, i.e. `--runtime-set testVersion 5.0-5.4` will now test your code for compatibility with PHP 5.0 up to PHP 5.4. [#99](https://github.com/PHPCompatibility/PHPCompatibility/pull/99)
|
1294 |
-
- :star2: New `NewFunctionArrayDereferencing` sniff to detect function array dereferencing as introduced in PHP 5.4. Fixes [#52](https://github.com/PHPCompatibility/PHPCompatibility/issues/52).
|
1295 |
-
- :star2: New `ShortArray` sniff to detect short array syntax as introduced in PHP 5.4. [#97](https://github.com/PHPCompatibility/PHPCompatibility/pull/97). Fixes [#47](https://github.com/PHPCompatibility/PHPCompatibility/issues/47).
|
1296 |
-
- :star2: New `TernaryOperators` sniff to detect ternaries without the middle part (`elvis` operator) as introduced in PHP 5.3. [#101](https://github.com/PHPCompatibility/PHPCompatibility/pull/101), [#103](https://github.com/PHPCompatibility/PHPCompatibility/pull/103). Fixes [#49](https://github.com/PHPCompatibility/PHPCompatibility/issues/49).
|
1297 |
-
- :star2: New `ConstantArraysUsingDefine` sniff to detect constants declared using `define()` being assigned an `array` value which was not allowed prior to PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1298 |
-
- :star2: New `DeprecatedPHP4StyleConstructors` sniff to detect PHP 4 style class constructor methods which are deprecated as of PHP 7. [#109](https://github.com/PHPCompatibility/PHPCompatibility/pull/109).
|
1299 |
-
- :star2: New `ForbiddenEmptyListAssignment` sniff to detect empty list() assignments which have been removed in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1300 |
-
- :star2: New `ForbiddenFunctionParametersWithSameName` sniff to detect functions declared with multiple same-named parameters which is no longer accepted since PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1301 |
-
- :star2: New `ForbiddenGlobalVariableVariable` sniff to detect variable variables being made `global` which is not allowed since PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1302 |
-
- :star2: New `ForbiddenNegativeBitshift` sniff to detect bitwise shifts by negative number which will throw an ArithmeticError in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1303 |
-
- :star2: New `ForbiddenSwitchWithMultipleDefaultBlocks` sniff to detect switch statements with multiple default blocks which is not allowed since PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1304 |
-
- :star2: New `NewAnonymousClasses` sniff to detect anonymous classes as introduced in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1305 |
-
- :star2: New `NewClosure` sniff to detect anonymous functions as introduced in PHP 5.3. Fixes [#35](https://github.com/PHPCompatibility/PHPCompatibility/issues/35)
|
1306 |
-
- :star2: New `NewFunctionParameters` sniff to detect use of new parameters in build-in PHP functions. Initially only sniffing for the new PHP 7.0 function parameters and the new PHP 5.3+ `before_needle` parameter for the `strstr()` function. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110), [#112](https://github.com/PHPCompatibility/PHPCompatibility/pull/112). Fixes [#27](https://github.com/PHPCompatibility/PHPCompatibility/issues/27).
|
1307 |
-
- :star2: New `NewGroupUseDeclarations` sniff to detect group use declarations as introduced in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1308 |
-
- :star2: New `NewScalarReturnTypeDeclarations` sniff to detect scalar return type hints as introduced in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1309 |
-
- :star2: New `NewScalarTypeDeclarations` sniff to detect scalar function parameter type hints as introduced in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1310 |
-
- :star2: New `RemovedFunctionParameters` sniff to detect use of removed parameters in build-in PHP functions. Initially only sniffing for the function parameters removed in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1311 |
-
- :star2: New `RemovedGlobalVariables` sniff to detect the PHP 7.0 removed `$HTTP_RAW_POST_DATA` superglobal. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1312 |
-
- :star: `DeprecatedFunctions` sniff: detection of the PHP 5.4 deprecated OCI8 functions. [#93](https://github.com/PHPCompatibility/PHPCompatibility/pull/93)
|
1313 |
-
- :star: `ForbiddenNamesAsInvokedFunctions` sniff: recognize PHP 5.5 `finally` as a reserved keywords when invoked as a function. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1314 |
-
- :star: `NewKeywords` sniff: detection of the use of the PHP 5.1+ `__halt_compiler` keyword. Fixes [#50](https://github.com/PHPCompatibility/PHPCompatibility/issues/50).
|
1315 |
-
- :star: `NewKeywords` sniff: detection of the PHP 5.3+ `nowdoc` syntax. Fixes [#48](https://github.com/PHPCompatibility/PHPCompatibility/issues/48).
|
1316 |
-
- :star: `NewKeywords` sniff: detection of the use of the `const` keyword outside of a class for PHP < 5.3. Fixes [#50](https://github.com/PHPCompatibility/PHPCompatibility/issues/50).
|
1317 |
-
- :star: `DeprecatedFunctions` sniff: recognize PHP 7.0 deprecated and removed functions. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1318 |
-
- :star: `DeprecatedIniDirectives` sniff: recognize PHP 7.0 removed ini directives. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1319 |
-
- :star: `ForbiddenNamesAsInvokedFunctions` sniff: recognize new PHP 7.0 reserved keywords when invoked as functions. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1320 |
-
- :star: `ForbiddenNames` sniff: recognize new PHP 7.0 reserved keywords. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1321 |
-
- :star: `NewFunctions` sniff: recognize new functions as introduced in PHP 7.0. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1322 |
-
- :star: `NewLanguageConstructs` sniff: recognize new PHP 7.0 `<=>` "spaceship" and `??` null coalescing operators. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1323 |
-
- :star: `RemovedExtensions` sniff: recognize PHP 7.0 removed `ereg`, `mssql`, `mysql` and `sybase_ct` extensions. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1324 |
-
- :umbrella: Additional unit tests for the `NewLanguageConstructs` sniff. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1325 |
-
- :books: Readme: New section containing information about the use of the `testVersion` config variable.
|
1326 |
-
- :books: Readme: Sponsor credits.
|
1327 |
-
|
1328 |
-
### Changed
|
1329 |
-
- :pushpin: The `DeprecatedIniDirectives` sniff used to always throw an `warning`. Now it will throw an `error` when a removed ini directive is used. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110).
|
1330 |
-
- :pushpin: The `DeprecatedNewReference` sniff will now throw an error when the `testVersion` includes PHP 7.0 or higher. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1331 |
-
- :pushpin: The `ForbiddenNames` sniff now supports detection of reserved keywords when used in combination with PHP 7 anonymous classes. [#108](https://github.com/PHPCompatibility/PHPCompatibility/pull/108), [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110).
|
1332 |
-
- :pushpin: The `PregReplaceEModifier` sniff will now throw an error when the `testVersion` includes PHP 7.0 or higher. [#110](https://github.com/PHPCompatibility/PHPCompatibility/pull/110)
|
1333 |
-
- :pencil2: `NewKeywords` sniff: clarified the error message text for the `use` keyword. Fixes [#46](https://github.com/PHPCompatibility/PHPCompatibility/issues/46).
|
1334 |
-
- :recycle: Minor refactor of the `testVersion` related utility functions. [#98](https://github.com/PHPCompatibility/PHPCompatibility/pull/98)
|
1335 |
-
- :wrench: Add autoload to the `composer.json` file. [#96](https://github.com/PHPCompatibility/PHPCompatibility/pull/96) Fixes [#67](https://github.com/PHPCompatibility/PHPCompatibility/issues/67).
|
1336 |
-
- :wrench: Minor other updates to the `composer.json` file. [#75](https://github.com/PHPCompatibility/PHPCompatibility/pull/75)
|
1337 |
-
- :wrench: Improved creation of the code coverage reports needed by coveralls via Travis.
|
1338 |
-
- :green_heart: The sniffs are now also tested against PHP 7.0 for consistent results.
|
1339 |
-
|
1340 |
-
### Fixed
|
1341 |
-
- :bug: The `ForbiddenCallTimePassByReference` sniff was throwing `Undefined index` notices when used in combination with PHPCS 2.2.0. [#100](https://github.com/PHPCompatibility/PHPCompatibility/pull/100). Fixes [#42](https://github.com/PHPCompatibility/PHPCompatibility/issues/42).
|
1342 |
-
- :bug: The `ForbiddenNamesAsInvokedFunctions` sniff would incorrectly throw an error if the `throw` keyword was used with parenthesis. Fixes [#118](https://github.com/PHPCompatibility/PHPCompatibility/issues/118).
|
1343 |
-
- :bug: The `PregReplaceEModifier` sniff incorrectly identified `e`'s in the pattern as the `e` modifier when using `{}` bracket delimiters for the regex. [#94](https://github.com/PHPCompatibility/PHPCompatibility/pull/94)
|
1344 |
-
- :bug: The `RemovedExtensions` sniff was throwing an `error` instead of a `warning` for deprecated, but not (yet) removed extensions. Fixes [#62](https://github.com/PHPCompatibility/PHPCompatibility/issues/62).
|
1345 |
-
|
1346 |
-
### Credits
|
1347 |
-
Thanks go out to AlexMiroshnikov, [Chris Abernethy], [dgudgeon], [djaenecke], [Eugene Maslovich], [Ken Guest], Koen Eelen, [Komarov Alexey], [Mark Clements] and [Remko van Bezooijen] for their contributions to this version. :clap:
|
1348 |
-
|
1349 |
-
|
1350 |
-
## [5.6] - 2015-09-14
|
1351 |
-
|
1352 |
-
See all related issues and PRs in the [5.6 milestone].
|
1353 |
-
|
1354 |
-
### Added
|
1355 |
-
- :star2: New: `NewLanguageConstructs` sniff. The initial version of this sniff checks for the PHP 5.6 `**` power operator and the `**=` power assignment operator. [#87](https://github.com/PHPCompatibility/PHPCompatibility/pull/87). Fixes [#60](https://github.com/PHPCompatibility/PHPCompatibility/issues/60).
|
1356 |
-
- :star2: New: `ParameterShadowSuperGlobals` sniff which covers the PHP 5.4 change _Parameter names that shadow super globals now cause a fatal error.`_. [#74](https://github.com/PHPCompatibility/PHPCompatibility/pull/74)
|
1357 |
-
- :star2: New: `PregReplaceEModifier` sniff which detects usage of the `e` modifier in literal regular expressions used with `preg_replace()`. The `e` modifier will not (yet) be detected when the regex passed is a variable or constant. [#81](https://github.com/PHPCompatibility/PHPCompatibility/pull/81), [#84](https://github.com/PHPCompatibility/PHPCompatibility/pull/84). Fixes [#71](https://github.com/PHPCompatibility/PHPCompatibility/issues/71), [#83](https://github.com/PHPCompatibility/PHPCompatibility/issues/83).
|
1358 |
-
- :star: `DeprecatedIniDirectives` sniff: PHP 5.6 deprecated ini directives.
|
1359 |
-
- :star: `NewKeywords` sniff: detection of the `goto` keyword introduced in PHP 5.3 and the `callable` keyword introduced in PHP 5.4. [#57](https://github.com/PHPCompatibility/PHPCompatibility/pull/57)
|
1360 |
-
- :recycle: `PHPCompatibility_Sniff` base class initially containing the `supportsAbove()` and `supportsBelow()` utility methods. (Nearly) All sniffs now extend this base class and use these methods to determine whether or not violations should be reported for a set `testVersion`. [#77](https://github.com/PHPCompatibility/PHPCompatibility/pull/77)
|
1361 |
-
- :books: Readme: Composer installation instructions. [#32](https://github.com/PHPCompatibility/PHPCompatibility/pull/32), [#61](https://github.com/PHPCompatibility/PHPCompatibility/pull/61)
|
1362 |
-
- :wrench: `.gitignore` to ignore vendor and IDE related directories. [#78](https://github.com/PHPCompatibility/PHPCompatibility/pull/78)
|
1363 |
-
- :green_heart: Code coverage checking via coveralls.
|
1364 |
-
|
1365 |
-
### Changed
|
1366 |
-
- :twisted_rightwards_arrows: The check for the `\` namespace separator has been moved from the `NewKeywords` sniff to the `NewLanguageConstructs` sniff. [#88](https://github.com/PHPCompatibility/PHPCompatibility/pull/88)
|
1367 |
-
- :pencil2: `DeprecatedIniDirectives` sniff: minor change in the sniff error message text.
|
1368 |
-
- :pencil2: `DeprecatedFunctions` sniff: minor change in the sniff error message text.
|
1369 |
-
- :wrench: Minor updates to the `composer.json` file. [#31](https://github.com/PHPCompatibility/PHPCompatibility/pull/31), [34](https://github.com/PHPCompatibility/PHPCompatibility/pull/34), [#70](https://github.com/PHPCompatibility/PHPCompatibility/pull/70)
|
1370 |
-
- :wrench: Tests: The unit tests can now be run without configuration.
|
1371 |
-
- :wrench: Tests: Skipped unit tests will now be annotated as such. [#85](https://github.com/PHPCompatibility/PHPCompatibility/pull/85)
|
1372 |
-
- :green_heart: The sniffs are now also tested against PHP 5.6 for consistent results.
|
1373 |
-
- :green_heart: The sniffs are now also tested against PHPCS 2.0+.
|
1374 |
-
- :green_heart: The sniffs are now tested using the new container-based infrastructure in Travis CI. [#37](https://github.com/PHPCompatibility/PHPCompatibility/pull/37)
|
1375 |
-
|
1376 |
-
### Fixed
|
1377 |
-
- :bug: The `ForbiddenCallTimePassByReference` sniff was throwing false positives when a bitwise and `&` was used in combination with class constants and class properties within function calls. [#44](https://github.com/PHPCompatibility/PHPCompatibility/pull/44). Fixes [#39](https://github.com/PHPCompatibility/PHPCompatibility/issues/39).
|
1378 |
-
- :bug: The `ForbiddenNamesAsInvokedFunctions` sniff was throwing false positives in certain cases when a comment separated a `try` from the `catch` block. [#29](https://github.com/PHPCompatibility/PHPCompatibility/pull/29)
|
1379 |
-
- :bug: The `ForbiddenNamesAsInvokedFunctions` sniff was incorrectly reporting `instanceof` as being introduced in PHP 5.4 while it has been around since PHP 5.0. [#80](https://github.com/PHPCompatibility/PHPCompatibility/pull/80)
|
1380 |
-
- :white_check_mark: Compatibility with PHPCS 2.0 - 2.3. [#63](https://github.com/PHPCompatibility/PHPCompatibility/pull/63), [#65](https://github.com/PHPCompatibility/PHPCompatibility/pull/65)
|
1381 |
-
|
1382 |
-
### Credits
|
1383 |
-
Thanks go out to Daniel Jänecke, [Declan Kelly], [Dominic], [Jaap van Otterdijk], [Marin Crnkovic], [Mark Clements], [Nick Pack], [Oliver Klee], [Rowan Collins] and [Sam Van der Borght] for their contributions to this version. :clap:
|
1384 |
-
|
1385 |
-
|
1386 |
-
## 5.5 - 2014-04-04
|
1387 |
-
|
1388 |
-
First tagged release.
|
1389 |
-
|
1390 |
-
See all related issues and PRs in the [5.5 milestone].
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
[Unreleased]: https://github.com/PHPCompatibility/PHPCompatibility/compare/master...HEAD
|
1395 |
-
[9.3.5]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.4...9.3.5
|
1396 |
-
[9.3.4]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.3...9.3.4
|
1397 |
-
[9.3.3]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.2...9.3.3
|
1398 |
-
[9.3.2]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.1...9.3.2
|
1399 |
-
[9.3.1]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.0...9.3.1
|
1400 |
-
[9.3.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.2.0...9.3.0
|
1401 |
-
[9.2.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.1.1...9.2.0
|
1402 |
-
[9.1.1]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.1.0...9.1.1
|
1403 |
-
[9.1.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.0.0...9.1.0
|
1404 |
-
[9.0.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/8.2.0...9.0.0
|
1405 |
-
[8.2.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/8.1.0...8.2.0
|
1406 |
-
[8.1.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/8.0.1...8.1.0
|
1407 |
-
[8.0.1]: https://github.com/PHPCompatibility/PHPCompatibility/compare/8.0.0...8.0.1
|
1408 |
-
[8.0.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.1.5...8.0.0
|
1409 |
-
[7.1.5]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.1.4...7.1.5
|
1410 |
-
[7.1.4]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.1.3...7.1.4
|
1411 |
-
[7.1.3]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.1.2...7.1.3
|
1412 |
-
[7.1.2]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.1.1...7.1.2
|
1413 |
-
[7.1.1]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.1.0...7.1.1
|
1414 |
-
[7.1.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.8...7.1.0
|
1415 |
-
[7.0.8]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.7...7.0.8
|
1416 |
-
[7.0.7]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.6...7.0.7
|
1417 |
-
[7.0.6]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.5...7.0.6
|
1418 |
-
[7.0.5]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.4...7.0.5
|
1419 |
-
[7.0.4]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.3...7.0.4
|
1420 |
-
[7.0.3]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.2...7.0.3
|
1421 |
-
[7.0.2]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0.1...7.0.2
|
1422 |
-
[7.0.1]: https://github.com/PHPCompatibility/PHPCompatibility/compare/7.0...7.0.1
|
1423 |
-
[7.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/5.6...7.0
|
1424 |
-
[5.6]: https://github.com/PHPCompatibility/PHPCompatibility/compare/5.5...5.6
|
1425 |
-
|
1426 |
-
[9.3.5 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/34
|
1427 |
-
[9.3.4 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/33
|
1428 |
-
[9.3.3 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/32
|
1429 |
-
[9.3.2 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/31
|
1430 |
-
[9.3.1 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/30
|
1431 |
-
[9.3.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/29
|
1432 |
-
[9.2.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/28
|
1433 |
-
[9.1.1 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/27
|
1434 |
-
[9.1.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/25
|
1435 |
-
[9.0.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/24
|
1436 |
-
[8.2.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/22
|
1437 |
-
[8.1.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/21
|
1438 |
-
[8.0.1 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/20
|
1439 |
-
[8.0.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/19
|
1440 |
-
[7.1.5 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/17
|
1441 |
-
[7.1.4 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/15
|
1442 |
-
[7.1.3 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/14
|
1443 |
-
[7.1.2 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/13
|
1444 |
-
[7.1.1 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/12
|
1445 |
-
[7.1.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/11
|
1446 |
-
[7.0.8 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/10
|
1447 |
-
[7.0.7 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/9
|
1448 |
-
[7.0.6 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/8
|
1449 |
-
[7.0.5 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/7
|
1450 |
-
[7.0.4 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/6
|
1451 |
-
[7.0.3 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/5
|
1452 |
-
[7.0.2 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/4
|
1453 |
-
[7.0.1 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/3
|
1454 |
-
[7.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/2
|
1455 |
-
[5.6 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/1
|
1456 |
-
[5.5 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/16
|
1457 |
-
|
1458 |
-
[Arthur Edamov]: https://github.com/edamov
|
1459 |
-
[Chris Abernethy]: https://github.com/cabernet-zerve
|
1460 |
-
[Declan Kelly]: https://github.com/declank
|
1461 |
-
[dgudgeon]: https://github.com/dgudgeon
|
1462 |
-
[djaenecke]: https://github.com/djaenecke
|
1463 |
-
[Dominic]: https://github.com/dol
|
1464 |
-
[Eugene Maslovich]: https://github.com/ehpc
|
1465 |
-
[Gary Jones]: https://github.com/GaryJones
|
1466 |
-
[Jaap van Otterdijk]: https://github.com/jaapio
|
1467 |
-
[Jason Stallings]: https://github.com/octalmage
|
1468 |
-
[Jonathan Champ]: https://github.com/jrchamp
|
1469 |
-
[Jonathan Van Belle]: https://github.com/Grummfy
|
1470 |
-
[Juliette Reinders Folmer]: https://github.com/jrfnl
|
1471 |
-
[Ken Guest]: https://github.com/kenguest
|
1472 |
-
[Komarov Alexey]: https://github.com/erdraug
|
1473 |
-
[Marin Crnkovic]: https://github.com/anorgan
|
1474 |
-
[Mark Clements]: https://github.com/MarkMaldaba
|
1475 |
-
[Michael Babker]: https://github.com/mbabker
|
1476 |
-
[Nick Pack]: https://github.com/nickpack
|
1477 |
-
[Nikhil]: https://github.com/Nikschavan
|
1478 |
-
[Oliver Klee]: https://github.com/oliverklee
|
1479 |
-
[Remko van Bezooijen]: https://github.com/emkookmer
|
1480 |
-
[Rowan Collins]: https://github.com/IMSoP
|
1481 |
-
[Ryan Neufeld]: https://github.com/ryanneufeld
|
1482 |
-
[Sam Van der Borght]: https://github.com/samvdb
|
1483 |
-
[Sergii Bondarenko]: https://github.com/BR0kEN-
|
1484 |
-
[Tadas Juozapaitis]: https://github.com/kasp3r
|
1485 |
-
[Tim Millwood]: https://github.com/timmillwood
|
1486 |
-
[William Entriken]: https://github.com/fulldecent
|
1487 |
-
[Yılmaz]: https://github.com/edigu
|
1488 |
-
[Yoshiaki Yoshida]: https://github.com/kakakakakku
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/LICENSE
DELETED
@@ -1,165 +0,0 @@
|
|
1 |
-
GNU LESSER GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
|
9 |
-
This version of the GNU Lesser General Public License incorporates
|
10 |
-
the terms and conditions of version 3 of the GNU General Public
|
11 |
-
License, supplemented by the additional permissions listed below.
|
12 |
-
|
13 |
-
0. Additional Definitions.
|
14 |
-
|
15 |
-
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16 |
-
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17 |
-
General Public License.
|
18 |
-
|
19 |
-
"The Library" refers to a covered work governed by this License,
|
20 |
-
other than an Application or a Combined Work as defined below.
|
21 |
-
|
22 |
-
An "Application" is any work that makes use of an interface provided
|
23 |
-
by the Library, but which is not otherwise based on the Library.
|
24 |
-
Defining a subclass of a class defined by the Library is deemed a mode
|
25 |
-
of using an interface provided by the Library.
|
26 |
-
|
27 |
-
A "Combined Work" is a work produced by combining or linking an
|
28 |
-
Application with the Library. The particular version of the Library
|
29 |
-
with which the Combined Work was made is also called the "Linked
|
30 |
-
Version".
|
31 |
-
|
32 |
-
The "Minimal Corresponding Source" for a Combined Work means the
|
33 |
-
Corresponding Source for the Combined Work, excluding any source code
|
34 |
-
for portions of the Combined Work that, considered in isolation, are
|
35 |
-
based on the Application, and not on the Linked Version.
|
36 |
-
|
37 |
-
The "Corresponding Application Code" for a Combined Work means the
|
38 |
-
object code and/or source code for the Application, including any data
|
39 |
-
and utility programs needed for reproducing the Combined Work from the
|
40 |
-
Application, but excluding the System Libraries of the Combined Work.
|
41 |
-
|
42 |
-
1. Exception to Section 3 of the GNU GPL.
|
43 |
-
|
44 |
-
You may convey a covered work under sections 3 and 4 of this License
|
45 |
-
without being bound by section 3 of the GNU GPL.
|
46 |
-
|
47 |
-
2. Conveying Modified Versions.
|
48 |
-
|
49 |
-
If you modify a copy of the Library, and, in your modifications, a
|
50 |
-
facility refers to a function or data to be supplied by an Application
|
51 |
-
that uses the facility (other than as an argument passed when the
|
52 |
-
facility is invoked), then you may convey a copy of the modified
|
53 |
-
version:
|
54 |
-
|
55 |
-
a) under this License, provided that you make a good faith effort to
|
56 |
-
ensure that, in the event an Application does not supply the
|
57 |
-
function or data, the facility still operates, and performs
|
58 |
-
whatever part of its purpose remains meaningful, or
|
59 |
-
|
60 |
-
b) under the GNU GPL, with none of the additional permissions of
|
61 |
-
this License applicable to that copy.
|
62 |
-
|
63 |
-
3. Object Code Incorporating Material from Library Header Files.
|
64 |
-
|
65 |
-
The object code form of an Application may incorporate material from
|
66 |
-
a header file that is part of the Library. You may convey such object
|
67 |
-
code under terms of your choice, provided that, if the incorporated
|
68 |
-
material is not limited to numerical parameters, data structure
|
69 |
-
layouts and accessors, or small macros, inline functions and templates
|
70 |
-
(ten or fewer lines in length), you do both of the following:
|
71 |
-
|
72 |
-
a) Give prominent notice with each copy of the object code that the
|
73 |
-
Library is used in it and that the Library and its use are
|
74 |
-
covered by this License.
|
75 |
-
|
76 |
-
b) Accompany the object code with a copy of the GNU GPL and this license
|
77 |
-
document.
|
78 |
-
|
79 |
-
4. Combined Works.
|
80 |
-
|
81 |
-
You may convey a Combined Work under terms of your choice that,
|
82 |
-
taken together, effectively do not restrict modification of the
|
83 |
-
portions of the Library contained in the Combined Work and reverse
|
84 |
-
engineering for debugging such modifications, if you also do each of
|
85 |
-
the following:
|
86 |
-
|
87 |
-
a) Give prominent notice with each copy of the Combined Work that
|
88 |
-
the Library is used in it and that the Library and its use are
|
89 |
-
covered by this License.
|
90 |
-
|
91 |
-
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92 |
-
document.
|
93 |
-
|
94 |
-
c) For a Combined Work that displays copyright notices during
|
95 |
-
execution, include the copyright notice for the Library among
|
96 |
-
these notices, as well as a reference directing the user to the
|
97 |
-
copies of the GNU GPL and this license document.
|
98 |
-
|
99 |
-
d) Do one of the following:
|
100 |
-
|
101 |
-
0) Convey the Minimal Corresponding Source under the terms of this
|
102 |
-
License, and the Corresponding Application Code in a form
|
103 |
-
suitable for, and under terms that permit, the user to
|
104 |
-
recombine or relink the Application with a modified version of
|
105 |
-
the Linked Version to produce a modified Combined Work, in the
|
106 |
-
manner specified by section 6 of the GNU GPL for conveying
|
107 |
-
Corresponding Source.
|
108 |
-
|
109 |
-
1) Use a suitable shared library mechanism for linking with the
|
110 |
-
Library. A suitable mechanism is one that (a) uses at run time
|
111 |
-
a copy of the Library already present on the user's computer
|
112 |
-
system, and (b) will operate properly with a modified version
|
113 |
-
of the Library that is interface-compatible with the Linked
|
114 |
-
Version.
|
115 |
-
|
116 |
-
e) Provide Installation Information, but only if you would otherwise
|
117 |
-
be required to provide such information under section 6 of the
|
118 |
-
GNU GPL, and only to the extent that such information is
|
119 |
-
necessary to install and execute a modified version of the
|
120 |
-
Combined Work produced by recombining or relinking the
|
121 |
-
Application with a modified version of the Linked Version. (If
|
122 |
-
you use option 4d0, the Installation Information must accompany
|
123 |
-
the Minimal Corresponding Source and Corresponding Application
|
124 |
-
Code. If you use option 4d1, you must provide the Installation
|
125 |
-
Information in the manner specified by section 6 of the GNU GPL
|
126 |
-
for conveying Corresponding Source.)
|
127 |
-
|
128 |
-
5. Combined Libraries.
|
129 |
-
|
130 |
-
You may place library facilities that are a work based on the
|
131 |
-
Library side by side in a single library together with other library
|
132 |
-
facilities that are not Applications and are not covered by this
|
133 |
-
License, and convey such a combined library under terms of your
|
134 |
-
choice, if you do both of the following:
|
135 |
-
|
136 |
-
a) Accompany the combined library with a copy of the same work based
|
137 |
-
on the Library, uncombined with any other library facilities,
|
138 |
-
conveyed under the terms of this License.
|
139 |
-
|
140 |
-
b) Give prominent notice with the combined library that part of it
|
141 |
-
is a work based on the Library, and explaining where to find the
|
142 |
-
accompanying uncombined form of the same work.
|
143 |
-
|
144 |
-
6. Revised Versions of the GNU Lesser General Public License.
|
145 |
-
|
146 |
-
The Free Software Foundation may publish revised and/or new versions
|
147 |
-
of the GNU Lesser General Public License from time to time. Such new
|
148 |
-
versions will be similar in spirit to the present version, but may
|
149 |
-
differ in detail to address new problems or concerns.
|
150 |
-
|
151 |
-
Each version is given a distinguishing version number. If the
|
152 |
-
Library as you received it specifies that a certain numbered version
|
153 |
-
of the GNU Lesser General Public License "or any later version"
|
154 |
-
applies to it, you have the option of following the terms and
|
155 |
-
conditions either of that published version or of any later version
|
156 |
-
published by the Free Software Foundation. If the Library as you
|
157 |
-
received it does not specify a version number of the GNU Lesser
|
158 |
-
General Public License, you may choose any version of the GNU Lesser
|
159 |
-
General Public License ever published by the Free Software Foundation.
|
160 |
-
|
161 |
-
If the Library as you received it specifies that a proxy can decide
|
162 |
-
whether future versions of the GNU Lesser General Public License shall
|
163 |
-
apply, that proxy's public statement of acceptance of any version is
|
164 |
-
permanent authorization for you to choose that version for the
|
165 |
-
Library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCSAliases.php
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* PHPCS cross-version compatibility helper.
|
6 |
-
*
|
7 |
-
* @package PHPCompatibility
|
8 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
9 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
10 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
11 |
-
*
|
12 |
-
* @since 8.0.0
|
13 |
-
*/
|
14 |
-
|
15 |
-
/*
|
16 |
-
* Alias a number of PHPCS 3.x classes to their PHPCS 2.x equivalents.
|
17 |
-
*
|
18 |
-
* This file is auto-loaded by PHPCS 3.x before any sniffs are loaded
|
19 |
-
* through the PHPCS 3.x `<autoload>` ruleset directive.
|
20 |
-
*
|
21 |
-
* {@internal The PHPCS file have been reorganized in PHPCS 3.x, quite
|
22 |
-
* a few "old" classes have been split and spread out over several "new"
|
23 |
-
* classes. In other words, this will only work for a limited number
|
24 |
-
* of classes.}
|
25 |
-
*
|
26 |
-
* {@internal The `class_exists` wrappers are needed to play nice with other
|
27 |
-
* external PHPCS standards creating cross-version compatibility in the same
|
28 |
-
* manner.}
|
29 |
-
*/
|
30 |
-
if (defined('PHPCOMPATIBILITY_PHPCS_ALIASES_SET') === false) {
|
31 |
-
if (interface_exists('\PHP_CodeSniffer_Sniff') === false) {
|
32 |
-
class_alias('PHP_CodeSniffer\Sniffs\Sniff', '\PHP_CodeSniffer_Sniff');
|
33 |
-
}
|
34 |
-
if (class_exists('\PHP_CodeSniffer_File') === false) {
|
35 |
-
class_alias('PHP_CodeSniffer\Files\File', '\PHP_CodeSniffer_File');
|
36 |
-
}
|
37 |
-
if (class_exists('\PHP_CodeSniffer_Tokens') === false) {
|
38 |
-
class_alias('PHP_CodeSniffer\Util\Tokens', '\PHP_CodeSniffer_Tokens');
|
39 |
-
}
|
40 |
-
if (class_exists('\PHP_CodeSniffer_Exception') === false) {
|
41 |
-
class_alias('PHP_CodeSniffer\Exceptions\RuntimeException', '\PHP_CodeSniffer_Exception');
|
42 |
-
}
|
43 |
-
if (class_exists('\PHP_CodeSniffer_Standards_AbstractScopeSniff') === false) {
|
44 |
-
class_alias('PHP_CodeSniffer\Sniffs\AbstractScopeSniff', '\PHP_CodeSniffer_Standards_AbstractScopeSniff');
|
45 |
-
}
|
46 |
-
if (class_exists('\Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff') === false) {
|
47 |
-
class_alias('PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff', '\Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff');
|
48 |
-
}
|
49 |
-
|
50 |
-
define('PHPCOMPATIBILITY_PHPCS_ALIASES_SET', true);
|
51 |
-
|
52 |
-
/*
|
53 |
-
* Register an autoloader.
|
54 |
-
*
|
55 |
-
* {@internal When `installed_paths` is set via the ruleset, this autoloader
|
56 |
-
* is needed to run the sniffs.
|
57 |
-
* Upstream issue: {@link https://github.com/squizlabs/PHP_CodeSniffer/issues/1591} }
|
58 |
-
*
|
59 |
-
* @since 8.0.0
|
60 |
-
*/
|
61 |
-
spl_autoload_register(function ($class) {
|
62 |
-
// Only try & load our own classes.
|
63 |
-
if (stripos($class, 'PHPCompatibility') !== 0) {
|
64 |
-
return;
|
65 |
-
}
|
66 |
-
|
67 |
-
$file = realpath(__DIR__) . DIRECTORY_SEPARATOR . strtr($class, '\\', DIRECTORY_SEPARATOR) . '.php';
|
68 |
-
|
69 |
-
if (file_exists($file)) {
|
70 |
-
include_once $file;
|
71 |
-
}
|
72 |
-
});
|
73 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractComplexVersionSniff.php
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHP_CodeSniffer_File as File;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Abstract base class for sniffs based on complex arrays with PHP version information.
|
17 |
-
*
|
18 |
-
* @since 7.1.0
|
19 |
-
*/
|
20 |
-
abstract class AbstractComplexVersionSniff extends Sniff implements ComplexVersionInterface
|
21 |
-
{
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Handle the retrieval of relevant information and - if necessary - throwing of an
|
26 |
-
* error/warning for an item.
|
27 |
-
*
|
28 |
-
* @since 7.1.0
|
29 |
-
*
|
30 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
31 |
-
* @param int $stackPtr The position of the relevant token in
|
32 |
-
* the stack.
|
33 |
-
* @param array $itemInfo Base information about the item.
|
34 |
-
*
|
35 |
-
* @return void
|
36 |
-
*/
|
37 |
-
public function handleFeature(File $phpcsFile, $stackPtr, array $itemInfo)
|
38 |
-
{
|
39 |
-
$itemArray = $this->getItemArray($itemInfo);
|
40 |
-
$errorInfo = $this->getErrorInfo($itemArray, $itemInfo);
|
41 |
-
|
42 |
-
if ($this->shouldThrowError($errorInfo) === true) {
|
43 |
-
$this->addError($phpcsFile, $stackPtr, $itemInfo, $errorInfo);
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Determine whether an error/warning should be thrown for an item based on collected information.
|
50 |
-
*
|
51 |
-
* @since 7.1.0
|
52 |
-
*
|
53 |
-
* @param array $errorInfo Detail information about an item.
|
54 |
-
*
|
55 |
-
* @return bool
|
56 |
-
*/
|
57 |
-
abstract protected function shouldThrowError(array $errorInfo);
|
58 |
-
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Get an array of the non-PHP-version array keys used in a sub-array.
|
62 |
-
*
|
63 |
-
* @since 7.1.0
|
64 |
-
*
|
65 |
-
* @return array
|
66 |
-
*/
|
67 |
-
protected function getNonVersionArrayKeys()
|
68 |
-
{
|
69 |
-
return array();
|
70 |
-
}
|
71 |
-
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Retrieve a subset of an item array containing only the array keys which
|
75 |
-
* contain PHP version information.
|
76 |
-
*
|
77 |
-
* @since 7.1.0
|
78 |
-
*
|
79 |
-
* @param array $itemArray Version and other information about an item.
|
80 |
-
*
|
81 |
-
* @return array Array with only the version information.
|
82 |
-
*/
|
83 |
-
protected function getVersionArray(array $itemArray)
|
84 |
-
{
|
85 |
-
return array_diff_key($itemArray, array_flip($this->getNonVersionArrayKeys()));
|
86 |
-
}
|
87 |
-
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Get the item name to be used for the creation of the error code and in the error message.
|
91 |
-
*
|
92 |
-
* @since 7.1.0
|
93 |
-
*
|
94 |
-
* @param array $itemInfo Base information about the item.
|
95 |
-
* @param array $errorInfo Detail information about an item.
|
96 |
-
*
|
97 |
-
* @return string
|
98 |
-
*/
|
99 |
-
protected function getItemName(array $itemInfo, array $errorInfo)
|
100 |
-
{
|
101 |
-
return $itemInfo['name'];
|
102 |
-
}
|
103 |
-
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Get the error message template for a specific sniff.
|
107 |
-
*
|
108 |
-
* @since 7.1.0
|
109 |
-
*
|
110 |
-
* @return string
|
111 |
-
*/
|
112 |
-
abstract protected function getErrorMsgTemplate();
|
113 |
-
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Allow for concrete child classes to filter the error message before it's passed to PHPCS.
|
117 |
-
*
|
118 |
-
* @since 7.1.0
|
119 |
-
*
|
120 |
-
* @param string $error The error message which was created.
|
121 |
-
* @param array $itemInfo Base information about the item this error message applies to.
|
122 |
-
* @param array $errorInfo Detail information about an item this error message applies to.
|
123 |
-
*
|
124 |
-
* @return string
|
125 |
-
*/
|
126 |
-
protected function filterErrorMsg($error, array $itemInfo, array $errorInfo)
|
127 |
-
{
|
128 |
-
return $error;
|
129 |
-
}
|
130 |
-
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Allow for concrete child classes to filter the error data before it's passed to PHPCS.
|
134 |
-
*
|
135 |
-
* @since 7.1.0
|
136 |
-
*
|
137 |
-
* @param array $data The error data array which was created.
|
138 |
-
* @param array $itemInfo Base information about the item this error message applies to.
|
139 |
-
* @param array $errorInfo Detail information about an item this error message applies to.
|
140 |
-
*
|
141 |
-
* @return array
|
142 |
-
*/
|
143 |
-
protected function filterErrorData(array $data, array $itemInfo, array $errorInfo)
|
144 |
-
{
|
145 |
-
return $data;
|
146 |
-
}
|
147 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractFunctionCallParameterSniff.php
DELETED
@@ -1,193 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHPCompatibility\Sniff;
|
14 |
-
use PHP_CodeSniffer_File as File;
|
15 |
-
use PHP_CodeSniffer_Tokens as Tokens;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Abstract class to use as a base for examining the parameter values passed to function calls.
|
19 |
-
*
|
20 |
-
* @since 8.2.0
|
21 |
-
*/
|
22 |
-
abstract class AbstractFunctionCallParameterSniff extends Sniff
|
23 |
-
{
|
24 |
-
/**
|
25 |
-
* Is the sniff looking for a function call or a method call ?
|
26 |
-
*
|
27 |
-
* Note: the child class may need to do additional checks to make sure that
|
28 |
-
* the method called is of the right class/object.
|
29 |
-
* Checking that is outside of the scope of this abstract sniff.
|
30 |
-
*
|
31 |
-
* @since 8.2.0
|
32 |
-
*
|
33 |
-
* @var bool False (default) if the sniff is looking for function calls.
|
34 |
-
* True if the sniff is looking for method calls.
|
35 |
-
*/
|
36 |
-
protected $isMethod = false;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Functions the sniff is looking for. Should be defined in the child class.
|
40 |
-
*
|
41 |
-
* @since 8.2.0
|
42 |
-
*
|
43 |
-
* @var array The only requirement for this array is that the top level
|
44 |
-
* array keys are the names of the functions you're looking for.
|
45 |
-
* Other than that, the array can have arbitrary content
|
46 |
-
* depending on your needs.
|
47 |
-
*/
|
48 |
-
protected $targetFunctions = array();
|
49 |
-
|
50 |
-
/**
|
51 |
-
* List of tokens which when they preceed the $stackPtr indicate that this
|
52 |
-
* is not a function call.
|
53 |
-
*
|
54 |
-
* @since 8.2.0
|
55 |
-
*
|
56 |
-
* @var array
|
57 |
-
*/
|
58 |
-
private $ignoreTokens = array(
|
59 |
-
\T_DOUBLE_COLON => true,
|
60 |
-
\T_OBJECT_OPERATOR => true,
|
61 |
-
\T_FUNCTION => true,
|
62 |
-
\T_NEW => true,
|
63 |
-
\T_CONST => true,
|
64 |
-
\T_USE => true,
|
65 |
-
);
|
66 |
-
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Returns an array of tokens this test wants to listen for.
|
70 |
-
*
|
71 |
-
* @since 8.2.0
|
72 |
-
*
|
73 |
-
* @return array
|
74 |
-
*/
|
75 |
-
public function register()
|
76 |
-
{
|
77 |
-
// Handle case-insensitivity of function names.
|
78 |
-
$this->targetFunctions = $this->arrayKeysToLowercase($this->targetFunctions);
|
79 |
-
|
80 |
-
return array(\T_STRING);
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Processes this test, when one of its tokens is encountered.
|
86 |
-
*
|
87 |
-
* @since 8.2.0
|
88 |
-
*
|
89 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
90 |
-
* @param int $stackPtr The position of the current token in
|
91 |
-
* the stack passed in $tokens.
|
92 |
-
*
|
93 |
-
* @return int|void Integer stack pointer to skip forward or void to continue
|
94 |
-
* normal file processing.
|
95 |
-
*/
|
96 |
-
public function process(File $phpcsFile, $stackPtr)
|
97 |
-
{
|
98 |
-
if ($this->bowOutEarly() === true) {
|
99 |
-
return;
|
100 |
-
}
|
101 |
-
|
102 |
-
$tokens = $phpcsFile->getTokens();
|
103 |
-
$function = $tokens[$stackPtr]['content'];
|
104 |
-
$functionLc = strtolower($function);
|
105 |
-
|
106 |
-
if (isset($this->targetFunctions[$functionLc]) === false) {
|
107 |
-
return;
|
108 |
-
}
|
109 |
-
|
110 |
-
$prevNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);
|
111 |
-
|
112 |
-
if ($this->isMethod === true) {
|
113 |
-
if ($tokens[$prevNonEmpty]['code'] !== \T_DOUBLE_COLON
|
114 |
-
&& $tokens[$prevNonEmpty]['code'] !== \T_OBJECT_OPERATOR
|
115 |
-
) {
|
116 |
-
// Not a call to a PHP method.
|
117 |
-
return;
|
118 |
-
}
|
119 |
-
} else {
|
120 |
-
if (isset($this->ignoreTokens[$tokens[$prevNonEmpty]['code']]) === true) {
|
121 |
-
// Not a call to a PHP function.
|
122 |
-
return;
|
123 |
-
}
|
124 |
-
|
125 |
-
if ($tokens[$prevNonEmpty]['code'] === \T_NS_SEPARATOR
|
126 |
-
&& $tokens[$prevNonEmpty - 1]['code'] === \T_STRING
|
127 |
-
) {
|
128 |
-
// Namespaced function.
|
129 |
-
return;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
$parameters = $this->getFunctionCallParameters($phpcsFile, $stackPtr);
|
134 |
-
|
135 |
-
if (empty($parameters)) {
|
136 |
-
return $this->processNoParameters($phpcsFile, $stackPtr, $function);
|
137 |
-
} else {
|
138 |
-
return $this->processParameters($phpcsFile, $stackPtr, $function, $parameters);
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Do a version check to determine if this sniff needs to run at all.
|
145 |
-
*
|
146 |
-
* @since 8.2.0
|
147 |
-
*
|
148 |
-
* If the check done in a child class is not specific to one PHP version,
|
149 |
-
* this function should return `false`.
|
150 |
-
*
|
151 |
-
* @return bool
|
152 |
-
*/
|
153 |
-
abstract protected function bowOutEarly();
|
154 |
-
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Process the parameters of a matched function.
|
158 |
-
*
|
159 |
-
* This method has to be made concrete in child classes.
|
160 |
-
*
|
161 |
-
* @since 8.2.0
|
162 |
-
*
|
163 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
164 |
-
* @param int $stackPtr The position of the current token in the stack.
|
165 |
-
* @param string $functionName The token content (function name) which was matched.
|
166 |
-
* @param array $parameters Array with information about the parameters.
|
167 |
-
*
|
168 |
-
* @return int|void Integer stack pointer to skip forward or void to continue
|
169 |
-
* normal file processing.
|
170 |
-
*/
|
171 |
-
abstract public function processParameters(File $phpcsFile, $stackPtr, $functionName, $parameters);
|
172 |
-
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Process the function if no parameters were found.
|
176 |
-
*
|
177 |
-
* Defaults to doing nothing. Can be overloaded in child classes to handle functions
|
178 |
-
* were parameters are expected, but none found.
|
179 |
-
*
|
180 |
-
* @since 8.2.0
|
181 |
-
*
|
182 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
183 |
-
* @param int $stackPtr The position of the current token in the stack.
|
184 |
-
* @param string $functionName The token content (function name) which was matched.
|
185 |
-
*
|
186 |
-
* @return int|void Integer stack pointer to skip forward or void to continue
|
187 |
-
* normal file processing.
|
188 |
-
*/
|
189 |
-
public function processNoParameters(File $phpcsFile, $stackPtr, $functionName)
|
190 |
-
{
|
191 |
-
return;
|
192 |
-
}
|
193 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractNewFeatureSniff.php
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHP_CodeSniffer_File as File;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Base class for new feature sniffs.
|
17 |
-
*
|
18 |
-
* @since 7.1.0
|
19 |
-
*/
|
20 |
-
abstract class AbstractNewFeatureSniff extends AbstractComplexVersionSniff
|
21 |
-
{
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Determine whether an error/warning should be thrown for an item based on collected information.
|
26 |
-
*
|
27 |
-
* @since 7.1.0
|
28 |
-
*
|
29 |
-
* @param array $errorInfo Detail information about an item.
|
30 |
-
*
|
31 |
-
* @return bool
|
32 |
-
*/
|
33 |
-
protected function shouldThrowError(array $errorInfo)
|
34 |
-
{
|
35 |
-
return ($errorInfo['not_in_version'] !== '');
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Retrieve the relevant detail (version) information for use in an error message.
|
41 |
-
*
|
42 |
-
* @since 7.1.0
|
43 |
-
*
|
44 |
-
* @param array $itemArray Version and other information about the item.
|
45 |
-
* @param array $itemInfo Base information about the item.
|
46 |
-
*
|
47 |
-
* @return array
|
48 |
-
*/
|
49 |
-
public function getErrorInfo(array $itemArray, array $itemInfo)
|
50 |
-
{
|
51 |
-
$errorInfo = array(
|
52 |
-
'not_in_version' => '',
|
53 |
-
'error' => true,
|
54 |
-
);
|
55 |
-
|
56 |
-
$versionArray = $this->getVersionArray($itemArray);
|
57 |
-
|
58 |
-
if (empty($versionArray) === false) {
|
59 |
-
foreach ($versionArray as $version => $present) {
|
60 |
-
if ($errorInfo['not_in_version'] === '' && $present === false
|
61 |
-
&& $this->supportsBelow($version) === true
|
62 |
-
) {
|
63 |
-
$errorInfo['not_in_version'] = $version;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
return $errorInfo;
|
69 |
-
}
|
70 |
-
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Get the error message template for this sniff.
|
74 |
-
*
|
75 |
-
* @since 7.1.0
|
76 |
-
*
|
77 |
-
* @return string
|
78 |
-
*/
|
79 |
-
protected function getErrorMsgTemplate()
|
80 |
-
{
|
81 |
-
return '%s is not present in PHP version %s or earlier';
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Generates the error or warning for this item.
|
87 |
-
*
|
88 |
-
* @since 7.1.0
|
89 |
-
*
|
90 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
91 |
-
* @param int $stackPtr The position of the relevant token in
|
92 |
-
* the stack.
|
93 |
-
* @param array $itemInfo Base information about the item.
|
94 |
-
* @param array $errorInfo Array with detail (version) information
|
95 |
-
* relevant to the item.
|
96 |
-
*
|
97 |
-
* @return void
|
98 |
-
*/
|
99 |
-
public function addError(File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo)
|
100 |
-
{
|
101 |
-
$itemName = $this->getItemName($itemInfo, $errorInfo);
|
102 |
-
$error = $this->getErrorMsgTemplate();
|
103 |
-
|
104 |
-
$errorCode = $this->stringToErrorCode($itemName) . 'Found';
|
105 |
-
$data = array(
|
106 |
-
$itemName,
|
107 |
-
$errorInfo['not_in_version'],
|
108 |
-
);
|
109 |
-
|
110 |
-
$error = $this->filterErrorMsg($error, $itemInfo, $errorInfo);
|
111 |
-
$data = $this->filterErrorData($data, $itemInfo, $errorInfo);
|
112 |
-
|
113 |
-
$this->addMessage($phpcsFile, $error, $stackPtr, $errorInfo['error'], $errorCode, $data);
|
114 |
-
}
|
115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractRemovedFeatureSniff.php
DELETED
@@ -1,156 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHP_CodeSniffer_File as File;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Base class for removed feature sniffs.
|
17 |
-
*
|
18 |
-
* @since 7.1.0
|
19 |
-
*/
|
20 |
-
abstract class AbstractRemovedFeatureSniff extends AbstractComplexVersionSniff
|
21 |
-
{
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Determine whether an error/warning should be thrown for an item based on collected information.
|
26 |
-
*
|
27 |
-
* @since 7.1.0
|
28 |
-
*
|
29 |
-
* @param array $errorInfo Detail information about an item.
|
30 |
-
*
|
31 |
-
* @return bool
|
32 |
-
*/
|
33 |
-
protected function shouldThrowError(array $errorInfo)
|
34 |
-
{
|
35 |
-
return ($errorInfo['deprecated'] !== '' || $errorInfo['removed'] !== '');
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Get an array of the non-PHP-version array keys used in a sub-array.
|
41 |
-
*
|
42 |
-
* By default, removed feature version arrays, contain an additional 'alternative' array key.
|
43 |
-
*
|
44 |
-
* @since 7.1.0
|
45 |
-
*
|
46 |
-
* @return array
|
47 |
-
*/
|
48 |
-
protected function getNonVersionArrayKeys()
|
49 |
-
{
|
50 |
-
return array('alternative');
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Retrieve the relevant detail (version) information for use in an error message.
|
56 |
-
*
|
57 |
-
* @since 7.1.0
|
58 |
-
*
|
59 |
-
* @param array $itemArray Version and other information about the item.
|
60 |
-
* @param array $itemInfo Base information about the item.
|
61 |
-
*
|
62 |
-
* @return array
|
63 |
-
*/
|
64 |
-
public function getErrorInfo(array $itemArray, array $itemInfo)
|
65 |
-
{
|
66 |
-
$errorInfo = array(
|
67 |
-
'deprecated' => '',
|
68 |
-
'removed' => '',
|
69 |
-
'alternative' => '',
|
70 |
-
'error' => false,
|
71 |
-
);
|
72 |
-
|
73 |
-
$versionArray = $this->getVersionArray($itemArray);
|
74 |
-
|
75 |
-
if (empty($versionArray) === false) {
|
76 |
-
foreach ($versionArray as $version => $removed) {
|
77 |
-
if ($this->supportsAbove($version) === true) {
|
78 |
-
if ($removed === true && $errorInfo['removed'] === '') {
|
79 |
-
$errorInfo['removed'] = $version;
|
80 |
-
$errorInfo['error'] = true;
|
81 |
-
} elseif ($errorInfo['deprecated'] === '') {
|
82 |
-
$errorInfo['deprecated'] = $version;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
if (isset($itemArray['alternative']) === true) {
|
89 |
-
$errorInfo['alternative'] = $itemArray['alternative'];
|
90 |
-
}
|
91 |
-
|
92 |
-
return $errorInfo;
|
93 |
-
}
|
94 |
-
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Get the error message template for suggesting an alternative for a specific sniff.
|
98 |
-
*
|
99 |
-
* @since 7.1.0
|
100 |
-
*
|
101 |
-
* @return string
|
102 |
-
*/
|
103 |
-
protected function getAlternativeOptionTemplate()
|
104 |
-
{
|
105 |
-
return '; Use %s instead';
|
106 |
-
}
|
107 |
-
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Generates the error or warning for this item.
|
111 |
-
*
|
112 |
-
* @since 7.1.0
|
113 |
-
*
|
114 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
115 |
-
* @param int $stackPtr The position of the relevant token in
|
116 |
-
* the stack.
|
117 |
-
* @param array $itemInfo Base information about the item.
|
118 |
-
* @param array $errorInfo Array with detail (version) information
|
119 |
-
* relevant to the item.
|
120 |
-
*
|
121 |
-
* @return void
|
122 |
-
*/
|
123 |
-
public function addError(File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo)
|
124 |
-
{
|
125 |
-
$itemName = $this->getItemName($itemInfo, $errorInfo);
|
126 |
-
$error = $this->getErrorMsgTemplate();
|
127 |
-
|
128 |
-
$errorCode = $this->stringToErrorCode($itemName);
|
129 |
-
$data = array($itemName);
|
130 |
-
|
131 |
-
if ($errorInfo['deprecated'] !== '') {
|
132 |
-
$error .= 'deprecated since PHP %s and ';
|
133 |
-
$errorCode .= 'Deprecated';
|
134 |
-
$data[] = $errorInfo['deprecated'];
|
135 |
-
}
|
136 |
-
|
137 |
-
if ($errorInfo['removed'] !== '') {
|
138 |
-
$error .= 'removed since PHP %s and ';
|
139 |
-
$errorCode .= 'Removed';
|
140 |
-
$data[] = $errorInfo['removed'];
|
141 |
-
}
|
142 |
-
|
143 |
-
// Remove the last 'and' from the message.
|
144 |
-
$error = substr($error, 0, (\strlen($error) - 5));
|
145 |
-
|
146 |
-
if ($errorInfo['alternative'] !== '') {
|
147 |
-
$error .= $this->getAlternativeOptionTemplate();
|
148 |
-
$data[] = $errorInfo['alternative'];
|
149 |
-
}
|
150 |
-
|
151 |
-
$error = $this->filterErrorMsg($error, $itemInfo, $errorInfo);
|
152 |
-
$data = $this->filterErrorData($data, $itemInfo, $errorInfo);
|
153 |
-
|
154 |
-
$this->addMessage($phpcsFile, $error, $stackPtr, $errorInfo['error'], $errorCode, $data);
|
155 |
-
}
|
156 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/ComplexVersionInterface.php
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHP_CodeSniffer_File as File;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Complex Version Interface.
|
17 |
-
*
|
18 |
-
* Interface to be implemented by sniffs using a multi-dimensional array of
|
19 |
-
* PHP features (functions, classes etc) being sniffed for with version
|
20 |
-
* information in sub-arrays.
|
21 |
-
*
|
22 |
-
* @since 7.1.0
|
23 |
-
*/
|
24 |
-
interface ComplexVersionInterface
|
25 |
-
{
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Handle the retrieval of relevant information and - if necessary - throwing of an
|
30 |
-
* error/warning for an item.
|
31 |
-
*
|
32 |
-
* @since 7.1.0
|
33 |
-
*
|
34 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
35 |
-
* @param int $stackPtr The position of the relevant token in
|
36 |
-
* the stack.
|
37 |
-
* @param array $itemInfo Base information about the item.
|
38 |
-
*
|
39 |
-
* @return void
|
40 |
-
*/
|
41 |
-
public function handleFeature(File $phpcsFile, $stackPtr, array $itemInfo);
|
42 |
-
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Get the relevant sub-array for a specific item from a multi-dimensional array.
|
46 |
-
*
|
47 |
-
* @since 7.1.0
|
48 |
-
*
|
49 |
-
* @param array $itemInfo Base information about the item.
|
50 |
-
*
|
51 |
-
* @return array Version and other information about the item.
|
52 |
-
*/
|
53 |
-
public function getItemArray(array $itemInfo);
|
54 |
-
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Retrieve the relevant detail (version) information for use in an error message.
|
58 |
-
*
|
59 |
-
* @since 7.1.0
|
60 |
-
*
|
61 |
-
* @param array $itemArray Version and other information about the item.
|
62 |
-
* @param array $itemInfo Base information about the item.
|
63 |
-
*
|
64 |
-
* @return array
|
65 |
-
*/
|
66 |
-
public function getErrorInfo(array $itemArray, array $itemInfo);
|
67 |
-
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Generates the error or warning for this item.
|
71 |
-
*
|
72 |
-
* @since 7.1.0
|
73 |
-
*
|
74 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
75 |
-
* @param int $stackPtr The position of the relevant token in
|
76 |
-
* the stack.
|
77 |
-
* @param array $itemInfo Base information about the item.
|
78 |
-
* @param array $errorInfo Array with detail (version) information
|
79 |
-
* relevant to the item.
|
80 |
-
*
|
81 |
-
* @return void
|
82 |
-
*/
|
83 |
-
public function addError(File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo);
|
84 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/PHPCSHelper.php
DELETED
@@ -1,678 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHP_CodeSniffer_Exception as PHPCS_Exception;
|
14 |
-
use PHP_CodeSniffer_File as File;
|
15 |
-
use PHP_CodeSniffer_Tokens as Tokens;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* PHPCS cross-version compatibility helper class.
|
19 |
-
*
|
20 |
-
* A number of PHPCS classes were split up into several classes in PHPCS 3.x
|
21 |
-
* Those classes cannot be aliased as they don't represent the same object.
|
22 |
-
* This class provides helper methods for functions which were contained in
|
23 |
-
* one of these classes and which are used within the PHPCompatibility library.
|
24 |
-
*
|
25 |
-
* Additionally, this class contains some duplicates of PHPCS native methods.
|
26 |
-
* These methods have received bug fixes or improved functionality between the
|
27 |
-
* lowest supported PHPCS version and the latest PHPCS stable version and
|
28 |
-
* to provide the same results cross-version, PHPCompatibility needs to use
|
29 |
-
* the up-to-date versions of these methods.
|
30 |
-
*
|
31 |
-
* @since 8.0.0
|
32 |
-
* @since 8.2.0 The duplicate PHPCS methods have been moved from the `Sniff`
|
33 |
-
* base class to this class.
|
34 |
-
*/
|
35 |
-
class PHPCSHelper
|
36 |
-
{
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Get the PHPCS version number.
|
40 |
-
*
|
41 |
-
* @since 8.0.0
|
42 |
-
*
|
43 |
-
* @return string
|
44 |
-
*/
|
45 |
-
public static function getVersion()
|
46 |
-
{
|
47 |
-
if (\defined('\PHP_CodeSniffer\Config::VERSION')) {
|
48 |
-
// PHPCS 3.x.
|
49 |
-
return \PHP_CodeSniffer\Config::VERSION;
|
50 |
-
} else {
|
51 |
-
// PHPCS 2.x.
|
52 |
-
return \PHP_CodeSniffer::VERSION;
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Pass config data to PHPCS.
|
59 |
-
*
|
60 |
-
* PHPCS cross-version compatibility helper.
|
61 |
-
*
|
62 |
-
* @since 8.0.0
|
63 |
-
*
|
64 |
-
* @param string $key The name of the config value.
|
65 |
-
* @param string|null $value The value to set. If null, the config entry
|
66 |
-
* is deleted, reverting it to the default value.
|
67 |
-
* @param boolean $temp Set this config data temporarily for this script run.
|
68 |
-
* This will not write the config data to the config file.
|
69 |
-
*
|
70 |
-
* @return void
|
71 |
-
*/
|
72 |
-
public static function setConfigData($key, $value, $temp = false)
|
73 |
-
{
|
74 |
-
if (method_exists('\PHP_CodeSniffer\Config', 'setConfigData')) {
|
75 |
-
// PHPCS 3.x.
|
76 |
-
\PHP_CodeSniffer\Config::setConfigData($key, $value, $temp);
|
77 |
-
} else {
|
78 |
-
// PHPCS 2.x.
|
79 |
-
\PHP_CodeSniffer::setConfigData($key, $value, $temp);
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Get the value of a single PHPCS config key.
|
86 |
-
*
|
87 |
-
* @since 8.0.0
|
88 |
-
*
|
89 |
-
* @param string $key The name of the config value.
|
90 |
-
*
|
91 |
-
* @return string|null
|
92 |
-
*/
|
93 |
-
public static function getConfigData($key)
|
94 |
-
{
|
95 |
-
if (method_exists('\PHP_CodeSniffer\Config', 'getConfigData')) {
|
96 |
-
// PHPCS 3.x.
|
97 |
-
return \PHP_CodeSniffer\Config::getConfigData($key);
|
98 |
-
} else {
|
99 |
-
// PHPCS 2.x.
|
100 |
-
return \PHP_CodeSniffer::getConfigData($key);
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Get the value of a single PHPCS config key.
|
107 |
-
*
|
108 |
-
* This config key can be set in the `CodeSniffer.conf` file, on the
|
109 |
-
* command-line or in a ruleset.
|
110 |
-
*
|
111 |
-
* @since 8.2.0
|
112 |
-
*
|
113 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
114 |
-
* @param string $key The name of the config value.
|
115 |
-
*
|
116 |
-
* @return string|null
|
117 |
-
*/
|
118 |
-
public static function getCommandLineData(File $phpcsFile, $key)
|
119 |
-
{
|
120 |
-
if (class_exists('\PHP_CodeSniffer\Config')) {
|
121 |
-
// PHPCS 3.x.
|
122 |
-
$config = $phpcsFile->config;
|
123 |
-
if (isset($config->{$key})) {
|
124 |
-
return $config->{$key};
|
125 |
-
}
|
126 |
-
} else {
|
127 |
-
// PHPCS 2.x.
|
128 |
-
$config = $phpcsFile->phpcs->cli->getCommandLineValues();
|
129 |
-
if (isset($config[$key])) {
|
130 |
-
return $config[$key];
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
return null;
|
135 |
-
}
|
136 |
-
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Returns the position of the first non-whitespace token in a statement.
|
140 |
-
*
|
141 |
-
* {@internal Duplicate of same method as contained in the `\PHP_CodeSniffer_File`
|
142 |
-
* class and introduced in PHPCS 2.1.0 and improved in PHPCS 2.7.1.
|
143 |
-
*
|
144 |
-
* Once the minimum supported PHPCS version for this standard goes beyond
|
145 |
-
* that, this method can be removed and calls to it replaced with
|
146 |
-
* `$phpcsFile->findStartOfStatement($start, $ignore)` calls.
|
147 |
-
*
|
148 |
-
* Last synced with PHPCS version: PHPCS 3.3.2 at commit 6ad28354c04b364c3c71a34e4a18b629cc3b231e}
|
149 |
-
*
|
150 |
-
* @since 9.1.0
|
151 |
-
*
|
152 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
153 |
-
* @param int $start The position to start searching from in the token stack.
|
154 |
-
* @param int|array $ignore Token types that should not be considered stop points.
|
155 |
-
*
|
156 |
-
* @return int
|
157 |
-
*/
|
158 |
-
public static function findStartOfStatement(File $phpcsFile, $start, $ignore = null)
|
159 |
-
{
|
160 |
-
if (version_compare(self::getVersion(), '2.7.1', '>=') === true) {
|
161 |
-
return $phpcsFile->findStartOfStatement($start, $ignore);
|
162 |
-
}
|
163 |
-
|
164 |
-
$tokens = $phpcsFile->getTokens();
|
165 |
-
$endTokens = Tokens::$blockOpeners;
|
166 |
-
|
167 |
-
$endTokens[\T_COLON] = true;
|
168 |
-
$endTokens[\T_COMMA] = true;
|
169 |
-
$endTokens[\T_DOUBLE_ARROW] = true;
|
170 |
-
$endTokens[\T_SEMICOLON] = true;
|
171 |
-
$endTokens[\T_OPEN_TAG] = true;
|
172 |
-
$endTokens[\T_CLOSE_TAG] = true;
|
173 |
-
$endTokens[\T_OPEN_SHORT_ARRAY] = true;
|
174 |
-
|
175 |
-
if ($ignore !== null) {
|
176 |
-
$ignore = (array) $ignore;
|
177 |
-
foreach ($ignore as $code) {
|
178 |
-
if (isset($endTokens[$code]) === true) {
|
179 |
-
unset($endTokens[$code]);
|
180 |
-
}
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
$lastNotEmpty = $start;
|
185 |
-
|
186 |
-
for ($i = $start; $i >= 0; $i--) {
|
187 |
-
if (isset($endTokens[$tokens[$i]['code']]) === true) {
|
188 |
-
// Found the end of the previous statement.
|
189 |
-
return $lastNotEmpty;
|
190 |
-
}
|
191 |
-
|
192 |
-
if (isset($tokens[$i]['scope_opener']) === true
|
193 |
-
&& $i === $tokens[$i]['scope_closer']
|
194 |
-
) {
|
195 |
-
// Found the end of the previous scope block.
|
196 |
-
return $lastNotEmpty;
|
197 |
-
}
|
198 |
-
|
199 |
-
// Skip nested statements.
|
200 |
-
if (isset($tokens[$i]['bracket_opener']) === true
|
201 |
-
&& $i === $tokens[$i]['bracket_closer']
|
202 |
-
) {
|
203 |
-
$i = $tokens[$i]['bracket_opener'];
|
204 |
-
} elseif (isset($tokens[$i]['parenthesis_opener']) === true
|
205 |
-
&& $i === $tokens[$i]['parenthesis_closer']
|
206 |
-
) {
|
207 |
-
$i = $tokens[$i]['parenthesis_opener'];
|
208 |
-
}
|
209 |
-
|
210 |
-
if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === false) {
|
211 |
-
$lastNotEmpty = $i;
|
212 |
-
}
|
213 |
-
}//end for
|
214 |
-
|
215 |
-
return 0;
|
216 |
-
}
|
217 |
-
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Returns the position of the last non-whitespace token in a statement.
|
221 |
-
*
|
222 |
-
* {@internal Duplicate of same method as contained in the `\PHP_CodeSniffer_File`
|
223 |
-
* class and introduced in PHPCS 2.1.0 and improved in PHPCS 2.7.1 and 3.3.0.
|
224 |
-
*
|
225 |
-
* Once the minimum supported PHPCS version for this standard goes beyond
|
226 |
-
* that, this method can be removed and calls to it replaced with
|
227 |
-
* `$phpcsFile->findEndOfStatement($start, $ignore)` calls.
|
228 |
-
*
|
229 |
-
* Last synced with PHPCS version: PHPCS 3.3.0-alpha at commit f5d899dcb5c534a1c3cca34668624517856ba823}
|
230 |
-
*
|
231 |
-
* @since 8.2.0
|
232 |
-
*
|
233 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
234 |
-
* @param int $start The position to start searching from in the token stack.
|
235 |
-
* @param int|array $ignore Token types that should not be considered stop points.
|
236 |
-
*
|
237 |
-
* @return int
|
238 |
-
*/
|
239 |
-
public static function findEndOfStatement(File $phpcsFile, $start, $ignore = null)
|
240 |
-
{
|
241 |
-
if (version_compare(self::getVersion(), '3.3.0', '>=') === true) {
|
242 |
-
return $phpcsFile->findEndOfStatement($start, $ignore);
|
243 |
-
}
|
244 |
-
|
245 |
-
$tokens = $phpcsFile->getTokens();
|
246 |
-
$endTokens = array(
|
247 |
-
\T_COLON => true,
|
248 |
-
\T_COMMA => true,
|
249 |
-
\T_DOUBLE_ARROW => true,
|
250 |
-
\T_SEMICOLON => true,
|
251 |
-
\T_CLOSE_PARENTHESIS => true,
|
252 |
-
\T_CLOSE_SQUARE_BRACKET => true,
|
253 |
-
\T_CLOSE_CURLY_BRACKET => true,
|
254 |
-
\T_CLOSE_SHORT_ARRAY => true,
|
255 |
-
\T_OPEN_TAG => true,
|
256 |
-
\T_CLOSE_TAG => true,
|
257 |
-
);
|
258 |
-
|
259 |
-
if ($ignore !== null) {
|
260 |
-
$ignore = (array) $ignore;
|
261 |
-
foreach ($ignore as $code) {
|
262 |
-
if (isset($endTokens[$code]) === true) {
|
263 |
-
unset($endTokens[$code]);
|
264 |
-
}
|
265 |
-
}
|
266 |
-
}
|
267 |
-
|
268 |
-
$lastNotEmpty = $start;
|
269 |
-
|
270 |
-
for ($i = $start; $i < $phpcsFile->numTokens; $i++) {
|
271 |
-
if ($i !== $start && isset($endTokens[$tokens[$i]['code']]) === true) {
|
272 |
-
// Found the end of the statement.
|
273 |
-
if ($tokens[$i]['code'] === \T_CLOSE_PARENTHESIS
|
274 |
-
|| $tokens[$i]['code'] === \T_CLOSE_SQUARE_BRACKET
|
275 |
-
|| $tokens[$i]['code'] === \T_CLOSE_CURLY_BRACKET
|
276 |
-
|| $tokens[$i]['code'] === \T_CLOSE_SHORT_ARRAY
|
277 |
-
|| $tokens[$i]['code'] === \T_OPEN_TAG
|
278 |
-
|| $tokens[$i]['code'] === \T_CLOSE_TAG
|
279 |
-
) {
|
280 |
-
return $lastNotEmpty;
|
281 |
-
}
|
282 |
-
|
283 |
-
return $i;
|
284 |
-
}
|
285 |
-
|
286 |
-
// Skip nested statements.
|
287 |
-
if (isset($tokens[$i]['scope_closer']) === true
|
288 |
-
&& ($i === $tokens[$i]['scope_opener']
|
289 |
-
|| $i === $tokens[$i]['scope_condition'])
|
290 |
-
) {
|
291 |
-
if ($i === $start && isset(Tokens::$scopeOpeners[$tokens[$i]['code']]) === true) {
|
292 |
-
return $tokens[$i]['scope_closer'];
|
293 |
-
}
|
294 |
-
|
295 |
-
$i = $tokens[$i]['scope_closer'];
|
296 |
-
} elseif (isset($tokens[$i]['bracket_closer']) === true
|
297 |
-
&& $i === $tokens[$i]['bracket_opener']
|
298 |
-
) {
|
299 |
-
$i = $tokens[$i]['bracket_closer'];
|
300 |
-
} elseif (isset($tokens[$i]['parenthesis_closer']) === true
|
301 |
-
&& $i === $tokens[$i]['parenthesis_opener']
|
302 |
-
) {
|
303 |
-
$i = $tokens[$i]['parenthesis_closer'];
|
304 |
-
}
|
305 |
-
|
306 |
-
if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === false) {
|
307 |
-
$lastNotEmpty = $i;
|
308 |
-
}
|
309 |
-
}//end for
|
310 |
-
|
311 |
-
return ($phpcsFile->numTokens - 1);
|
312 |
-
}
|
313 |
-
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Returns the name of the class that the specified class extends
|
317 |
-
* (works for classes, anonymous classes and interfaces).
|
318 |
-
*
|
319 |
-
* Returns FALSE on error or if there is no extended class name.
|
320 |
-
*
|
321 |
-
* {@internal Duplicate of same method as contained in the `\PHP_CodeSniffer_File`
|
322 |
-
* class, but with some improvements which have been introduced in
|
323 |
-
* PHPCS 2.8.0.
|
324 |
-
* {@link https://github.com/squizlabs/PHP_CodeSniffer/commit/0011d448119d4c568e3ac1f825ae78815bf2cc34}.
|
325 |
-
*
|
326 |
-
* Once the minimum supported PHPCS version for this standard goes beyond
|
327 |
-
* that, this method can be removed and calls to it replaced with
|
328 |
-
* `$phpcsFile->findExtendedClassName($stackPtr)` calls.
|
329 |
-
*
|
330 |
-
* Last synced with PHPCS version: PHPCS 3.1.0-alpha at commit a9efcc9b0703f3f9f4a900623d4e97128a6aafc6}
|
331 |
-
*
|
332 |
-
* @since 7.1.4
|
333 |
-
* @since 8.2.0 Moved from the `Sniff` class to this class.
|
334 |
-
*
|
335 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
336 |
-
* @param int $stackPtr The position of the class token in the stack.
|
337 |
-
*
|
338 |
-
* @return string|false
|
339 |
-
*/
|
340 |
-
public static function findExtendedClassName(File $phpcsFile, $stackPtr)
|
341 |
-
{
|
342 |
-
if (version_compare(self::getVersion(), '3.1.0', '>=') === true) {
|
343 |
-
return $phpcsFile->findExtendedClassName($stackPtr);
|
344 |
-
}
|
345 |
-
|
346 |
-
$tokens = $phpcsFile->getTokens();
|
347 |
-
|
348 |
-
// Check for the existence of the token.
|
349 |
-
if (isset($tokens[$stackPtr]) === false) {
|
350 |
-
return false;
|
351 |
-
}
|
352 |
-
|
353 |
-
if ($tokens[$stackPtr]['code'] !== \T_CLASS
|
354 |
-
&& $tokens[$stackPtr]['type'] !== 'T_ANON_CLASS'
|
355 |
-
&& $tokens[$stackPtr]['type'] !== 'T_INTERFACE'
|
356 |
-
) {
|
357 |
-
return false;
|
358 |
-
}
|
359 |
-
|
360 |
-
if (isset($tokens[$stackPtr]['scope_closer']) === false) {
|
361 |
-
return false;
|
362 |
-
}
|
363 |
-
|
364 |
-
$classCloserIndex = $tokens[$stackPtr]['scope_closer'];
|
365 |
-
$extendsIndex = $phpcsFile->findNext(\T_EXTENDS, $stackPtr, $classCloserIndex);
|
366 |
-
if ($extendsIndex === false) {
|
367 |
-
return false;
|
368 |
-
}
|
369 |
-
|
370 |
-
$find = array(
|
371 |
-
\T_NS_SEPARATOR,
|
372 |
-
\T_STRING,
|
373 |
-
\T_WHITESPACE,
|
374 |
-
);
|
375 |
-
|
376 |
-
$end = $phpcsFile->findNext($find, ($extendsIndex + 1), $classCloserIndex, true);
|
377 |
-
$name = $phpcsFile->getTokensAsString(($extendsIndex + 1), ($end - $extendsIndex - 1));
|
378 |
-
$name = trim($name);
|
379 |
-
|
380 |
-
if ($name === '') {
|
381 |
-
return false;
|
382 |
-
}
|
383 |
-
|
384 |
-
return $name;
|
385 |
-
}
|
386 |
-
|
387 |
-
|
388 |
-
/**
|
389 |
-
* Returns the name(s) of the interface(s) that the specified class implements.
|
390 |
-
*
|
391 |
-
* Returns FALSE on error or if there are no implemented interface names.
|
392 |
-
*
|
393 |
-
* {@internal Duplicate of same method as introduced in PHPCS 2.7.
|
394 |
-
* This method also includes an improvement we use which was only introduced
|
395 |
-
* in PHPCS 2.8.0, so only defer to upstream for higher versions.
|
396 |
-
* Once the minimum supported PHPCS version for this sniff library goes beyond
|
397 |
-
* that, this method can be removed and calls to it replaced with
|
398 |
-
* `$phpcsFile->findImplementedInterfaceNames($stackPtr)` calls.}
|
399 |
-
*
|
400 |
-
* @since 7.0.3
|
401 |
-
* @since 8.2.0 Moved from the `Sniff` class to this class.
|
402 |
-
*
|
403 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
404 |
-
* @param int $stackPtr The position of the class token.
|
405 |
-
*
|
406 |
-
* @return array|false
|
407 |
-
*/
|
408 |
-
public static function findImplementedInterfaceNames(File $phpcsFile, $stackPtr)
|
409 |
-
{
|
410 |
-
if (version_compare(self::getVersion(), '2.7.1', '>') === true) {
|
411 |
-
return $phpcsFile->findImplementedInterfaceNames($stackPtr);
|
412 |
-
}
|
413 |
-
|
414 |
-
$tokens = $phpcsFile->getTokens();
|
415 |
-
|
416 |
-
// Check for the existence of the token.
|
417 |
-
if (isset($tokens[$stackPtr]) === false) {
|
418 |
-
return false;
|
419 |
-
}
|
420 |
-
|
421 |
-
if ($tokens[$stackPtr]['code'] !== \T_CLASS
|
422 |
-
&& $tokens[$stackPtr]['type'] !== 'T_ANON_CLASS'
|
423 |
-
) {
|
424 |
-
return false;
|
425 |
-
}
|
426 |
-
|
427 |
-
if (isset($tokens[$stackPtr]['scope_closer']) === false) {
|
428 |
-
return false;
|
429 |
-
}
|
430 |
-
|
431 |
-
$classOpenerIndex = $tokens[$stackPtr]['scope_opener'];
|
432 |
-
$implementsIndex = $phpcsFile->findNext(\T_IMPLEMENTS, $stackPtr, $classOpenerIndex);
|
433 |
-
if ($implementsIndex === false) {
|
434 |
-
return false;
|
435 |
-
}
|
436 |
-
|
437 |
-
$find = array(
|
438 |
-
\T_NS_SEPARATOR,
|
439 |
-
\T_STRING,
|
440 |
-
\T_WHITESPACE,
|
441 |
-
\T_COMMA,
|
442 |
-
);
|
443 |
-
|
444 |
-
$end = $phpcsFile->findNext($find, ($implementsIndex + 1), ($classOpenerIndex + 1), true);
|
445 |
-
$name = $phpcsFile->getTokensAsString(($implementsIndex + 1), ($end - $implementsIndex - 1));
|
446 |
-
$name = trim($name);
|
447 |
-
|
448 |
-
if ($name === '') {
|
449 |
-
return false;
|
450 |
-
} else {
|
451 |
-
$names = explode(',', $name);
|
452 |
-
$names = array_map('trim', $names);
|
453 |
-
return $names;
|
454 |
-
}
|
455 |
-
}
|
456 |
-
|
457 |
-
|
458 |
-
/**
|
459 |
-
* Returns the method parameters for the specified function token.
|
460 |
-
*
|
461 |
-
* Each parameter is in the following format:
|
462 |
-
*
|
463 |
-
* <code>
|
464 |
-
* 0 => array(
|
465 |
-
* 'name' => '$var', // The variable name.
|
466 |
-
* 'token' => integer, // The stack pointer to the variable name.
|
467 |
-
* 'content' => string, // The full content of the variable definition.
|
468 |
-
* 'pass_by_reference' => boolean, // Is the variable passed by reference?
|
469 |
-
* 'variable_length' => boolean, // Is the param of variable length through use of `...` ?
|
470 |
-
* 'type_hint' => string, // The type hint for the variable.
|
471 |
-
* 'type_hint_token' => integer, // The stack pointer to the type hint
|
472 |
-
* // or false if there is no type hint.
|
473 |
-
* 'nullable_type' => boolean, // Is the variable using a nullable type?
|
474 |
-
* )
|
475 |
-
* </code>
|
476 |
-
*
|
477 |
-
* Parameters with default values have an additional array index of
|
478 |
-
* 'default' with the value of the default as a string.
|
479 |
-
*
|
480 |
-
* {@internal Duplicate of same method as contained in the `\PHP_CodeSniffer_File`
|
481 |
-
* class.
|
482 |
-
*
|
483 |
-
* Last synced with PHPCS version: PHPCS 3.3.0-alpha at commit 53a28408d345044c0360c2c1b4a2aaebf4a3b8c9}
|
484 |
-
*
|
485 |
-
* @since 7.0.3
|
486 |
-
* @since 8.2.0 Moved from the `Sniff` class to this class.
|
487 |
-
*
|
488 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
489 |
-
* @param int $stackPtr The position in the stack of the
|
490 |
-
* function token to acquire the
|
491 |
-
* parameters for.
|
492 |
-
*
|
493 |
-
* @return array|false
|
494 |
-
* @throws \PHP_CodeSniffer_Exception If the specified $stackPtr is not of
|
495 |
-
* type T_FUNCTION or T_CLOSURE.
|
496 |
-
*/
|
497 |
-
public static function getMethodParameters(File $phpcsFile, $stackPtr)
|
498 |
-
{
|
499 |
-
if (version_compare(self::getVersion(), '3.3.0', '>=') === true) {
|
500 |
-
return $phpcsFile->getMethodParameters($stackPtr);
|
501 |
-
}
|
502 |
-
|
503 |
-
$tokens = $phpcsFile->getTokens();
|
504 |
-
|
505 |
-
// Check for the existence of the token.
|
506 |
-
if (isset($tokens[$stackPtr]) === false) {
|
507 |
-
return false;
|
508 |
-
}
|
509 |
-
|
510 |
-
if ($tokens[$stackPtr]['code'] !== \T_FUNCTION
|
511 |
-
&& $tokens[$stackPtr]['code'] !== \T_CLOSURE
|
512 |
-
) {
|
513 |
-
throw new PHPCS_Exception('$stackPtr must be of type T_FUNCTION or T_CLOSURE');
|
514 |
-
}
|
515 |
-
|
516 |
-
$opener = $tokens[$stackPtr]['parenthesis_opener'];
|
517 |
-
$closer = $tokens[$stackPtr]['parenthesis_closer'];
|
518 |
-
|
519 |
-
$vars = array();
|
520 |
-
$currVar = null;
|
521 |
-
$paramStart = ($opener + 1);
|
522 |
-
$defaultStart = null;
|
523 |
-
$paramCount = 0;
|
524 |
-
$passByReference = false;
|
525 |
-
$variableLength = false;
|
526 |
-
$typeHint = '';
|
527 |
-
$typeHintToken = false;
|
528 |
-
$nullableType = false;
|
529 |
-
|
530 |
-
for ($i = $paramStart; $i <= $closer; $i++) {
|
531 |
-
// Check to see if this token has a parenthesis or bracket opener. If it does
|
532 |
-
// it's likely to be an array which might have arguments in it. This
|
533 |
-
// could cause problems in our parsing below, so lets just skip to the
|
534 |
-
// end of it.
|
535 |
-
if (isset($tokens[$i]['parenthesis_opener']) === true) {
|
536 |
-
// Don't do this if it's the close parenthesis for the method.
|
537 |
-
if ($i !== $tokens[$i]['parenthesis_closer']) {
|
538 |
-
$i = ($tokens[$i]['parenthesis_closer'] + 1);
|
539 |
-
}
|
540 |
-
}
|
541 |
-
|
542 |
-
if (isset($tokens[$i]['bracket_opener']) === true) {
|
543 |
-
// Don't do this if it's the close parenthesis for the method.
|
544 |
-
if ($i !== $tokens[$i]['bracket_closer']) {
|
545 |
-
$i = ($tokens[$i]['bracket_closer'] + 1);
|
546 |
-
}
|
547 |
-
}
|
548 |
-
|
549 |
-
switch ($tokens[$i]['type']) {
|
550 |
-
case 'T_BITWISE_AND':
|
551 |
-
if ($defaultStart === null) {
|
552 |
-
$passByReference = true;
|
553 |
-
}
|
554 |
-
break;
|
555 |
-
case 'T_VARIABLE':
|
556 |
-
$currVar = $i;
|
557 |
-
break;
|
558 |
-
case 'T_ELLIPSIS':
|
559 |
-
$variableLength = true;
|
560 |
-
break;
|
561 |
-
case 'T_ARRAY_HINT': // Pre-PHPCS 3.3.0.
|
562 |
-
case 'T_CALLABLE':
|
563 |
-
if ($typeHintToken === false) {
|
564 |
-
$typeHintToken = $i;
|
565 |
-
}
|
566 |
-
|
567 |
-
$typeHint .= $tokens[$i]['content'];
|
568 |
-
break;
|
569 |
-
case 'T_SELF':
|
570 |
-
case 'T_PARENT':
|
571 |
-
case 'T_STATIC':
|
572 |
-
// Self and parent are valid, static invalid, but was probably intended as type hint.
|
573 |
-
if (isset($defaultStart) === false) {
|
574 |
-
if ($typeHintToken === false) {
|
575 |
-
$typeHintToken = $i;
|
576 |
-
}
|
577 |
-
|
578 |
-
$typeHint .= $tokens[$i]['content'];
|
579 |
-
}
|
580 |
-
break;
|
581 |
-
case 'T_STRING':
|
582 |
-
// This is a string, so it may be a type hint, but it could
|
583 |
-
// also be a constant used as a default value.
|
584 |
-
$prevComma = false;
|
585 |
-
for ($t = $i; $t >= $opener; $t--) {
|
586 |
-
if ($tokens[$t]['code'] === \T_COMMA) {
|
587 |
-
$prevComma = $t;
|
588 |
-
break;
|
589 |
-
}
|
590 |
-
}
|
591 |
-
|
592 |
-
if ($prevComma !== false) {
|
593 |
-
$nextEquals = false;
|
594 |
-
for ($t = $prevComma; $t < $i; $t++) {
|
595 |
-
if ($tokens[$t]['code'] === \T_EQUAL) {
|
596 |
-
$nextEquals = $t;
|
597 |
-
break;
|
598 |
-
}
|
599 |
-
}
|
600 |
-
|
601 |
-
if ($nextEquals !== false) {
|
602 |
-
break;
|
603 |
-
}
|
604 |
-
}
|
605 |
-
|
606 |
-
if ($defaultStart === null) {
|
607 |
-
if ($typeHintToken === false) {
|
608 |
-
$typeHintToken = $i;
|
609 |
-
}
|
610 |
-
|
611 |
-
$typeHint .= $tokens[$i]['content'];
|
612 |
-
}
|
613 |
-
break;
|
614 |
-
case 'T_NS_SEPARATOR':
|
615 |
-
// Part of a type hint or default value.
|
616 |
-
if ($defaultStart === null) {
|
617 |
-
if ($typeHintToken === false) {
|
618 |
-
$typeHintToken = $i;
|
619 |
-
}
|
620 |
-
|
621 |
-
$typeHint .= $tokens[$i]['content'];
|
622 |
-
}
|
623 |
-
break;
|
624 |
-
case 'T_NULLABLE':
|
625 |
-
case 'T_INLINE_THEN': // Pre-PHPCS 2.8.0.
|
626 |
-
if ($defaultStart === null) {
|
627 |
-
$nullableType = true;
|
628 |
-
$typeHint .= $tokens[$i]['content'];
|
629 |
-
}
|
630 |
-
break;
|
631 |
-
case 'T_CLOSE_PARENTHESIS':
|
632 |
-
case 'T_COMMA':
|
633 |
-
// If it's null, then there must be no parameters for this
|
634 |
-
// method.
|
635 |
-
if ($currVar === null) {
|
636 |
-
break;
|
637 |
-
}
|
638 |
-
|
639 |
-
$vars[$paramCount] = array();
|
640 |
-
$vars[$paramCount]['token'] = $currVar;
|
641 |
-
$vars[$paramCount]['name'] = $tokens[$currVar]['content'];
|
642 |
-
$vars[$paramCount]['content'] = trim($phpcsFile->getTokensAsString($paramStart, ($i - $paramStart)));
|
643 |
-
|
644 |
-
if ($defaultStart !== null) {
|
645 |
-
$vars[$paramCount]['default'] = trim(
|
646 |
-
$phpcsFile->getTokensAsString(
|
647 |
-
$defaultStart,
|
648 |
-
($i - $defaultStart)
|
649 |
-
)
|
650 |
-
);
|
651 |
-
}
|
652 |
-
|
653 |
-
$vars[$paramCount]['pass_by_reference'] = $passByReference;
|
654 |
-
$vars[$paramCount]['variable_length'] = $variableLength;
|
655 |
-
$vars[$paramCount]['type_hint'] = $typeHint;
|
656 |
-
$vars[$paramCount]['type_hint_token'] = $typeHintToken;
|
657 |
-
$vars[$paramCount]['nullable_type'] = $nullableType;
|
658 |
-
|
659 |
-
// Reset the vars, as we are about to process the next parameter.
|
660 |
-
$defaultStart = null;
|
661 |
-
$paramStart = ($i + 1);
|
662 |
-
$passByReference = false;
|
663 |
-
$variableLength = false;
|
664 |
-
$typeHint = '';
|
665 |
-
$typeHintToken = false;
|
666 |
-
$nullableType = false;
|
667 |
-
|
668 |
-
$paramCount++;
|
669 |
-
break;
|
670 |
-
case 'T_EQUAL':
|
671 |
-
$defaultStart = ($i + 1);
|
672 |
-
break;
|
673 |
-
}//end switch
|
674 |
-
}//end for
|
675 |
-
|
676 |
-
return $vars;
|
677 |
-
}
|
678 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniff.php
DELETED
@@ -1,2267 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* PHPCompatibility, an external standard for PHP_CodeSniffer.
|
4 |
-
*
|
5 |
-
* @package PHPCompatibility
|
6 |
-
* @copyright 2012-2019 PHPCompatibility Contributors
|
7 |
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
8 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace PHPCompatibility;
|
12 |
-
|
13 |
-
use PHPCompatibility\PHPCSHelper;
|
14 |
-
use PHP_CodeSniffer_Exception as PHPCS_Exception;
|
15 |
-
use PHP_CodeSniffer_File as File;
|
16 |
-
use PHP_CodeSniffer_Sniff as PHPCS_Sniff;
|
17 |
-
use PHP_CodeSniffer_Tokens as Tokens;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Base class from which all PHPCompatibility sniffs extend.
|
21 |
-
*
|
22 |
-
* @since 5.6
|
23 |
-
*/
|
24 |
-
abstract class Sniff implements PHPCS_Sniff
|
25 |
-
{
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Regex to match variables in a double quoted string.
|
29 |
-
*
|
30 |
-
* This matches plain variables, but also more complex variables, such
|
31 |
-
* as $obj->prop, self::prop and $var[].
|
32 |
-
*
|
33 |
-
* @since 7.1.2
|
34 |
-
*
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
const REGEX_COMPLEX_VARS = '`(?:(\{)?(?<!\\\\)\$)?(\{)?(?<!\\\\)\$(\{)?(?P<varname>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(?:->\$?(?P>varname)|\[[^\]]+\]|::\$?(?P>varname)|\([^\)]*\))*(?(3)\}|)(?(2)\}|)(?(1)\}|)`';
|
38 |
-
|
39 |
-
/**
|
40 |
-
* List of superglobals as an array of strings.
|
41 |
-
*
|
42 |
-
* Used by the ForbiddenParameterShadowSuperGlobals and ForbiddenClosureUseVariableNames sniffs.
|
43 |
-
*
|
44 |
-
* @since 7.0.0
|
45 |
-
* @since 7.1.4 Moved from the `ForbiddenParameterShadowSuperGlobals` sniff to the base `Sniff` class.
|
46 |
-
*
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
protected $superglobals = array(
|
50 |
-
'$GLOBALS' => true,
|
51 |
-
'$_SERVER' => true,
|
52 |
-
'$_GET' => true,
|
53 |
-
'$_POST' => true,
|
54 |
-
'$_FILES' => true,
|
55 |
-
'$_COOKIE' => true,
|
56 |
-
'$_SESSION' => true,
|
57 |
-
'$_REQUEST' => true,
|
58 |
-
'$_ENV' => true,
|
59 |
-
);
|
60 |
-
|
61 |
-
/**
|
62 |
-
* List of functions using hash algorithm as parameter (always the first parameter).
|
63 |
-
*
|
64 |
-
* Used by the new/removed hash algorithm sniffs.
|
65 |
-
* Key is the function name, value is the 1-based parameter position in the function call.
|
66 |
-
*
|
67 |
-
* @since 5.5
|
68 |
-
* @since 7.0.7 Moved from the `RemovedHashAlgorithms` sniff to the base `Sniff` class.
|
69 |
-
*
|
70 |
-
* @var array
|
71 |
-
*/
|
72 |
-
protected $hashAlgoFunctions = array(
|
73 |
-
'hash_file' => 1,
|
74 |
-
'hash_hmac_file' => 1,
|
75 |
-
'hash_hmac' => 1,
|
76 |
-
'hash_init' => 1,
|
77 |
-
'hash_pbkdf2' => 1,
|
78 |
-
'hash' => 1,
|
79 |
-
);
|
80 |
-
|
81 |
-
|
82 |
-
/**
|
83 |
-
* List of functions which take an ini directive as parameter (always the first parameter).
|
84 |
-
*
|
85 |
-
* Used by the new/removed ini directives sniffs.
|
86 |
-
* Key is the function name, value is the 1-based parameter position in the function call.
|
87 |
-
*
|
88 |
-
* @since 7.1.0
|
89 |
-
*
|
90 |
-
* @var array
|
91 |
-
*/
|
92 |
-
protected $iniFunctions = array(
|
93 |
-
'ini_get' => 1,
|
94 |
-
'ini_set' => 1,
|
95 |
-
);
|
96 |
-
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Get the testVersion configuration variable.
|
100 |
-
*
|
101 |
-
* The testVersion configuration variable may be in any of the following formats:
|
102 |
-
* 1) Omitted/empty, in which case no version is specified. This effectively
|
103 |
-
* disables all the checks for new PHP features provided by this standard.
|
104 |
-
* 2) A single PHP version number, e.g. "5.4" in which case the standard checks that
|
105 |
-
* the code will run on that version of PHP (no deprecated features or newer
|
106 |
-
* features being used).
|
107 |
-
* 3) A range, e.g. "5.0-5.5", in which case the standard checks the code will run
|
108 |
-
* on all PHP versions in that range, and that it doesn't use any features that
|
109 |
-
* were deprecated by the final version in the list, or which were not available
|
110 |
-
* for the first version in the list.
|
111 |
-
* We accept ranges where one of the components is missing, e.g. "-5.6" means
|
112 |
-
* all versions up to PHP 5.6, and "7.0-" means all versions above PHP 7.0.
|
113 |
-
* PHP version numbers should always be in Major.Minor format. Both "5", "5.3.2"
|
114 |
-
* would be treated as invalid, and ignored.
|
115 |
-
*
|
116 |
-
* @since 7.0.0
|
117 |
-
* @since 7.1.3 Now allows for partial ranges such as `5.2-`.
|
118 |
-
*
|
119 |
-
* @return array $arrTestVersions will hold an array containing min/max version
|
120 |
-
* of PHP that we are checking against (see above). If only a
|
121 |
-
* single version number is specified, then this is used as
|
122 |
-
* both the min and max.
|
123 |
-
*
|
124 |
-
* @throws \PHP_CodeSniffer_Exception If testVersion is invalid.
|
125 |
-
*/
|
126 |
-
private function getTestVersion()
|
127 |
-
{
|
128 |
-
static $arrTestVersions = array();
|
129 |
-
|
130 |
-
$default = array(null, null);
|
131 |
-
$testVersion = trim(PHPCSHelper::getConfigData('testVersion'));
|
132 |
-
|
133 |
-
if (empty($testVersion) === false && isset($arrTestVersions[$testVersion]) === false) {
|
134 |
-
|
135 |
-
$arrTestVersions[$testVersion] = $default;
|
136 |
-
|
137 |
-
if (preg_match('`^\d+\.\d+$`', $testVersion)) {
|
138 |
-
$arrTestVersions[$testVersion] = array($testVersion, $testVersion);
|
139 |
-
return $arrTestVersions[$testVersion];
|
140 |
-
}
|
141 |
-
|
142 |
-
if (preg_match('`^(\d+\.\d+)?\s*-\s*(\d+\.\d+)?$`', $testVersion, $matches)) {
|
143 |
-
if (empty($matches[1]) === false || empty($matches[2]) === false) {
|
144 |
-
// If no lower-limit is set, we set the min version to 4.0.
|
145 |
-
// Whilst development focuses on PHP 5 and above, we also accept
|
146 |
-
// sniffs for PHP 4, so we include that as the minimum.
|
147 |
-
// (It makes no sense to support PHP 3 as this was effectively a
|
148 |
-
// different language).
|
149 |
-
$min = empty($matches[1]) ? '4.0' : $matches[1];
|
150 |
-
|
151 |
-
// If no upper-limit is set, we set the max version to 99.9.
|
152 |
-
$max = empty($matches[2]) ? '99.9' : $matches[2];
|
153 |
-
|
154 |
-
if (version_compare($min, $max, '>')) {
|
155 |
-
trigger_error(
|
156 |
-
"Invalid range in testVersion setting: '" . $testVersion . "'",
|
157 |
-
\E_USER_WARNING
|
158 |
-
);
|
159 |
-
return $default;
|
160 |
-
} else {
|
161 |
-
$arrTestVersions[$testVersion] = array($min, $max);
|
162 |
-
return $arrTestVersions[$testVersion];
|
163 |
-
}
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
trigger_error(
|
168 |
-
"Invalid testVersion setting: '" . $testVersion . "'",
|
169 |
-
\E_USER_WARNING
|
170 |
-
);
|
171 |
-
return $default;
|
172 |
-
}
|
173 |
-
|
174 |
-
if (isset($arrTestVersions[$testVersion])) {
|
175 |
-
return $arrTestVersions[$testVersion];
|
176 |
-
}
|
177 |
-
|
178 |
-
return $default;
|
179 |
-
}
|
180 |
-
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Check whether a specific PHP version is equal to or higher than the maximum
|
184 |
-
* supported PHP version as provided by the user in `testVersion`.
|
185 |
-
*
|
186 |
-
* Should be used when sniffing for *old* PHP features (deprecated/removed).
|
187 |
-
*
|
188 |
-
* @since 5.6
|
189 |
-
*
|
190 |
-
* @param string $phpVersion A PHP version number in 'major.minor' format.
|
191 |
-
*
|
192 |
-
* @return bool True if testVersion has not been provided or if the PHP version
|
193 |
-
* is equal to or higher than the highest supported PHP version
|
194 |
-
* in testVersion. False otherwise.
|
195 |
-
*/
|
196 |
-
public function supportsAbove($phpVersion)
|
197 |
-
{
|
198 |
-
$testVersion = $this->getTestVersion();
|
199 |
-
$testVersion = $testVersion[1];
|
200 |
-
|
201 |
-
if (\is_null($testVersion)
|
202 |
-
|| version_compare($testVersion, $phpVersion) >= 0
|
203 |
-
) {
|
204 |
-
return true;
|
205 |
-
} else {
|
206 |
-
return false;
|
207 |
-
}
|
208 |
-
}
|
209 |
-
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Check whether a specific PHP version is equal to or lower than the minimum
|
213 |
-
* supported PHP version as provided by the user in `testVersion`.
|
214 |
-
*
|
215 |
-
* Should be used when sniffing for *new* PHP features.
|
216 |
-
*
|
217 |
-
* @since 5.6
|
218 |
-
*
|
219 |
-
* @param string $phpVersion A PHP version number in 'major.minor' format.
|
220 |
-
*
|
221 |
-
* @return bool True if the PHP version is equal to or lower than the lowest
|
222 |
-
* supported PHP version in testVersion.
|
223 |
-
* False otherwise or if no testVersion is provided.
|
224 |
-
*/
|
225 |
-
public function supportsBelow($phpVersion)
|
226 |
-
{
|
227 |
-
$testVersion = $this->getTestVersion();
|
228 |
-
$testVersion = $testVersion[0];
|
229 |
-
|
230 |
-
if (\is_null($testVersion) === false
|
231 |
-
&& version_compare($testVersion, $phpVersion) <= 0
|
232 |
-
) {
|
233 |
-
return true;
|
234 |
-
} else {
|
235 |
-
return false;
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
|
240 |
-
/**
|
241 |
-
* Add a PHPCS message to the output stack as either a warning or an error.
|
242 |
-
*
|
243 |
-
* @since 7.1.0
|
244 |
-
*
|
245 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file the message applies to.
|
246 |
-
* @param string $message The message.
|
247 |
-
* @param int $stackPtr The position of the token
|
248 |
-
* the message relates to.
|
249 |
-
* @param bool $isError Whether to report the message as an
|
250 |
-
* 'error' or 'warning'.
|
251 |
-
* Defaults to true (error).
|
252 |
-
* @param string $code The error code for the message.
|
253 |
-
* Defaults to 'Found'.
|
254 |
-
* @param array $data Optional input for the data replacements.
|
255 |
-
*
|
256 |
-
* @return void
|
257 |
-
*/
|
258 |
-
public function addMessage(File $phpcsFile, $message, $stackPtr, $isError, $code = 'Found', $data = array())
|
259 |
-
{
|
260 |
-
if ($isError === true) {
|
261 |
-
$phpcsFile->addError($message, $stackPtr, $code, $data);
|
262 |
-
} else {
|
263 |
-
$phpcsFile->addWarning($message, $stackPtr, $code, $data);
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
|
268 |
-
/**
|
269 |
-
* Convert an arbitrary string to an alphanumeric string with underscores.
|
270 |
-
*
|
271 |
-
* Pre-empt issues with arbitrary strings being used as error codes in XML and PHP.
|
272 |
-
*
|
273 |
-
* @since 7.1.0
|
274 |
-
*
|
275 |
-
* @param string $baseString Arbitrary string.
|
276 |
-
*
|
277 |
-
* @return string
|
278 |
-
*/
|
279 |
-
public function stringToErrorCode($baseString)
|
280 |
-
{
|
281 |
-
return preg_replace('`[^a-z0-9_]`i', '_', strtolower($baseString));
|
282 |
-
}
|
283 |
-
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Strip quotes surrounding an arbitrary string.
|
287 |
-
*
|
288 |
-
* Intended for use with the contents of a T_CONSTANT_ENCAPSED_STRING / T_DOUBLE_QUOTED_STRING.
|
289 |
-
*
|
290 |
-
* @since 7.0.6
|
291 |
-
*
|
292 |
-
* @param string $string The raw string.
|
293 |
-
*
|
294 |
-
* @return string String without quotes around it.
|
295 |
-
*/
|
296 |
-
public function stripQuotes($string)
|
297 |
-
{
|
298 |
-
return preg_replace('`^([\'"])(.*)\1$`Ds', '$2', $string);
|
299 |
-
}
|
300 |
-
|
301 |
-
|
302 |
-
/**
|
303 |
-
* Strip variables from an arbitrary double quoted string.
|
304 |
-
*
|
305 |
-
* Intended for use with the contents of a T_DOUBLE_QUOTED_STRING.
|
306 |
-
*
|
307 |
-
* @since 7.1.2
|
308 |
-
*
|
309 |
-
* @param string $string The raw string.
|
310 |
-
*
|
311 |
-
* @return string String without variables in it.
|
312 |
-
*/
|
313 |
-
public function stripVariables($string)
|
314 |
-
{
|
315 |
-
if (strpos($string, '$') === false) {
|
316 |
-
return $string;
|
317 |
-
}
|
318 |
-
|
319 |
-
return preg_replace(self::REGEX_COMPLEX_VARS, '', $string);
|
320 |
-
}
|
321 |
-
|
322 |
-
|
323 |
-
/**
|
324 |
-
* Make all top level array keys in an array lowercase.
|
325 |
-
*
|
326 |
-
* @since 7.1.0
|
327 |
-
*
|
328 |
-
* @param array $array Initial array.
|
329 |
-
*
|
330 |
-
* @return array Same array, but with all lowercase top level keys.
|
331 |
-
*/
|
332 |
-
public function arrayKeysToLowercase($array)
|
333 |
-
{
|
334 |
-
return array_change_key_case($array, \CASE_LOWER);
|
335 |
-
}
|
336 |
-
|
337 |
-
|
338 |
-
/**
|
339 |
-
* Checks if a function call has parameters.
|
340 |
-
*
|
341 |
-
* Expects to be passed the T_STRING or T_VARIABLE stack pointer for the function call.
|
342 |
-
* If passed a T_STRING which is *not* a function call, the behaviour is unreliable.
|
343 |
-
*
|
344 |
-
* Extra feature: If passed an T_ARRAY or T_OPEN_SHORT_ARRAY stack pointer, it
|
345 |
-
* will detect whether the array has values or is empty.
|
346 |
-
*
|
347 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility/issues/120
|
348 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility/issues/152
|
349 |
-
*
|
350 |
-
* @since 7.0.3
|
351 |
-
*
|
352 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
353 |
-
* @param int $stackPtr The position of the function call token.
|
354 |
-
*
|
355 |
-
* @return bool
|
356 |
-
*/
|
357 |
-
public function doesFunctionCallHaveParameters(File $phpcsFile, $stackPtr)
|
358 |
-
{
|
359 |
-
$tokens = $phpcsFile->getTokens();
|
360 |
-
|
361 |
-
// Check for the existence of the token.
|
362 |
-
if (isset($tokens[$stackPtr]) === false) {
|
363 |
-
return false;
|
364 |
-
}
|
365 |
-
|
366 |
-
// Is this one of the tokens this function handles ?
|
367 |
-
if (\in_array($tokens[$stackPtr]['code'], array(\T_STRING, \T_ARRAY, \T_OPEN_SHORT_ARRAY, \T_VARIABLE), true) === false) {
|
368 |
-
return false;
|
369 |
-
}
|
370 |
-
|
371 |
-
$nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true);
|
372 |
-
|
373 |
-
// Deal with short array syntax.
|
374 |
-
if ($tokens[$stackPtr]['code'] === \T_OPEN_SHORT_ARRAY) {
|
375 |
-
if (isset($tokens[$stackPtr]['bracket_closer']) === false) {
|
376 |
-
return false;
|
377 |
-
}
|
378 |
-
|
379 |
-
if ($nextNonEmpty === $tokens[$stackPtr]['bracket_closer']) {
|
380 |
-
// No parameters.
|
381 |
-
return false;
|
382 |
-
} else {
|
383 |
-
return true;
|
384 |
-
}
|
385 |
-
}
|
386 |
-
|
387 |
-
// Deal with function calls & long arrays.
|
388 |
-
// Next non-empty token should be the open parenthesis.
|
389 |
-
if ($nextNonEmpty === false && $tokens[$nextNonEmpty]['code'] !== \T_OPEN_PARENTHESIS) {
|
390 |
-
return false;
|
391 |
-
}
|
392 |
-
|
393 |
-
if (isset($tokens[$nextNonEmpty]['parenthesis_closer']) === false) {
|
394 |
-
return false;
|
395 |
-
}
|
396 |
-
|
397 |
-
$closeParenthesis = $tokens[$nextNonEmpty]['parenthesis_closer'];
|
398 |
-
$nextNextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, $nextNonEmpty + 1, $closeParenthesis + 1, true);
|
399 |
-
|
400 |
-
if ($nextNextNonEmpty === $closeParenthesis) {
|
401 |
-
// No parameters.
|
402 |
-
return false;
|
403 |
-
}
|
404 |
-
|
405 |
-
return true;
|
406 |
-
}
|
407 |
-
|
408 |
-
|
409 |
-
/**
|
410 |
-
* Count the number of parameters a function call has been passed.
|
411 |
-
*
|
412 |
-
* Expects to be passed the T_STRING or T_VARIABLE stack pointer for the function call.
|
413 |
-
* If passed a T_STRING which is *not* a function call, the behaviour is unreliable.
|
414 |
-
*
|
415 |
-
* Extra feature: If passed an T_ARRAY or T_OPEN_SHORT_ARRAY stack pointer,
|
416 |
-
* it will return the number of values in the array.
|
417 |
-
*
|
418 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility/issues/111
|
419 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility/issues/114
|
420 |
-
* @link https://github.com/PHPCompatibility/PHPCompatibility/issues/151
|
421 |
-
*
|
422 |
-
* @since 7.0.3
|
423 |
-
*
|
424 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
425 |
-
* @param int $stackPtr The position of the function call token.
|
426 |
-
*
|
427 |
-
* @return int
|
428 |
-
*/
|
429 |
-
public function getFunctionCallParameterCount(File $phpcsFile, $stackPtr)
|
430 |
-
{
|
431 |
-
if ($this->doesFunctionCallHaveParameters($phpcsFile, $stackPtr) === false) {
|
432 |
-
return 0;
|
433 |
-
}
|
434 |
-
|
435 |
-
return \count($this->getFunctionCallParameters($phpcsFile, $stackPtr));
|
436 |
-
}
|
437 |
-
|
438 |
-
|
439 |
-
/**
|
440 |
-
* Get information on all parameters passed to a function call.
|
441 |
-
*
|
442 |
-
* Expects to be passed the T_STRING or T_VARIABLE stack pointer for the function call.
|
443 |
-
* If passed a T_STRING which is *not* a function call, the behaviour is unreliable.
|
444 |
-
*
|
445 |
-
* Will return an multi-dimentional array with the start token pointer, end token
|
446 |
-
* pointer and raw parameter value for all parameters. Index will be 1-based.
|
447 |
-
* If no parameters are found, will return an empty array.
|
448 |
-
*
|
449 |
-
* Extra feature: If passed an T_ARRAY or T_OPEN_SHORT_ARRAY stack pointer,
|
450 |
-
* it will tokenize the values / key/value pairs contained in the array call.
|
451 |
-
*
|
452 |
-
* @since 7.0.5 Split off from the `getFunctionCallParameterCount()` method.
|
453 |
-
*
|
454 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
455 |
-
* @param int $stackPtr The position of the function call token.
|
456 |
-
*
|
457 |
-
* @return array
|
458 |
-
*/
|
459 |
-
public function getFunctionCallParameters(File $phpcsFile, $stackPtr)
|
460 |
-
{
|
461 |
-
if ($this->doesFunctionCallHaveParameters($phpcsFile, $stackPtr) === false) {
|
462 |
-
return array();
|
463 |
-
}
|
464 |
-
|
465 |
-
// Ok, we know we have a T_STRING, T_VARIABLE, T_ARRAY or T_OPEN_SHORT_ARRAY with parameters
|
466 |
-
// and valid open & close brackets/parenthesis.
|
467 |
-
$tokens = $phpcsFile->getTokens();
|
468 |
-
|
469 |
-
// Mark the beginning and end tokens.
|
470 |
-
if ($tokens[$stackPtr]['code'] === \T_OPEN_SHORT_ARRAY) {
|
471 |
-
$opener = $stackPtr;
|
472 |
-
$closer = $tokens[$stackPtr]['bracket_closer'];
|
473 |
-
|
474 |
-
$nestedParenthesisCount = 0;
|
475 |
-
|
476 |
-
} else {
|
477 |
-
$opener = $phpcsFile->findNext(Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true);
|
478 |
-
$closer = $tokens[$opener]['parenthesis_closer'];
|
479 |
-
|
480 |
-
$nestedParenthesisCount = 1;
|
481 |
-
}
|
482 |
-
|
483 |
-
// Which nesting level is the one we are interested in ?
|
484 |
-
if (isset($tokens[$opener]['nested_parenthesis'])) {
|
485 |
-
$nestedParenthesisCount += \count($tokens[$opener]['nested_parenthesis']);
|
486 |
-
}
|
487 |
-
|
488 |
-
$parameters = array();
|
489 |
-
$nextComma = $opener;
|
490 |
-
$paramStart = $opener + 1;
|
491 |
-
$cnt = 1;
|
492 |
-
while (($nextComma = $phpcsFile->findNext(array(\T_COMMA, $tokens[$closer]['code'], \T_OPEN_SHORT_ARRAY, \T_CLOSURE), $nextComma + 1, $closer + 1)) !== false) {
|
493 |
-
// Ignore anything within short array definition brackets.
|
494 |
-
if ($tokens[$nextComma]['type'] === 'T_OPEN_SHORT_ARRAY'
|
495 |
-
&& (isset($tokens[$nextComma]['bracket_opener'])
|
496 |
-
&& $tokens[$nextComma]['bracket_opener'] === $nextComma)
|
497 |
-
&& isset($tokens[$nextComma]['bracket_closer'])
|
498 |
-
) {
|
499 |
-
// Skip forward to the end of the short array definition.
|
500 |
-
$nextComma = $tokens[$nextComma]['bracket_closer'];
|
501 |
-
continue;
|
502 |
-
}
|
503 |
-
|
504 |
-
// Skip past closures passed as function parameters.
|
505 |
-
if ($tokens[$nextComma]['type'] === 'T_CLOSURE'
|
506 |
-
&& (isset($tokens[$nextComma]['scope_condition'])
|
507 |
-
&& $tokens[$nextComma]['scope_condition'] === $nextComma)
|
508 |
-
&& isset($tokens[$nextComma]['scope_closer'])
|
509 |
-
) {
|
510 |
-
// Skip forward to the end of the closure declaration.
|
511 |
-
$nextComma = $tokens[$nextComma]['scope_closer'];
|
512 |
-
continue;
|
513 |
-
}
|
514 |
-
|
515 |
-
// Ignore comma's at a lower nesting level.
|
516 |
-
if ($tokens[$nextComma]['type'] === 'T_COMMA'
|
517 |
-
&& isset($tokens[$nextComma]['nested_parenthesis'])
|
518 |
-
&& \count($tokens[$nextComma]['nested_parenthesis']) !== $nestedParenthesisCount
|
519 |
-
) {
|
520 |
-
continue;
|
521 |
-
}
|
522 |
-
|
523 |
-
// Ignore closing parenthesis/bracket if not 'ours'.
|
524 |
-
if ($tokens[$nextComma]['type'] === $tokens[$closer]['type'] && $nextComma !== $closer) {
|
525 |
-
continue;
|
526 |
-
}
|
527 |
-
|
528 |
-
// Ok, we've reached the end of the parameter.
|
529 |
-
$parameters[$cnt]['start'] = $paramStart;
|
530 |
-
$parameters[$cnt]['end'] = $nextComma - 1;
|
531 |
-
$parameters[$cnt]['raw'] = trim($phpcsFile->getTokensAsString($paramStart, ($nextComma - $paramStart)));
|
532 |
-
|
533 |
-
/*
|
534 |
-
* Check if there are more tokens before the closing parenthesis.
|
535 |
-
* Prevents code like the following from setting a third parameter:
|
536 |
-
* `functionCall( $param1, $param2, );`.
|
537 |
-
*/
|
538 |
-
$hasNextParam = $phpcsFile->findNext(Tokens::$emptyTokens, $nextComma + 1, $closer, true, null, true);
|
539 |
-
if ($hasNextParam === false) {
|
540 |
-
break;
|
541 |
-
}
|
542 |
-
|
543 |
-
// Prepare for the next parameter.
|
544 |
-
$paramStart = $nextComma + 1;
|
545 |
-
$cnt++;
|
546 |
-
}
|
547 |
-
|
548 |
-
return $parameters;
|
549 |
-
}
|
550 |
-
|
551 |
-
|
552 |
-
/**
|
553 |
-
* Get information on a specific parameter passed to a function call.
|
554 |
-
*
|
555 |
-
* Expects to be passed the T_STRING or T_VARIABLE stack pointer for the function call.
|
556 |
-
* If passed a T_STRING which is *not* a function call, the behaviour is unreliable.
|
557 |
-
*
|
558 |
-
* Will return a array with the start token pointer, end token pointer and the raw value
|
559 |
-
* of the parameter at a specific offset.
|
560 |
-
* If the specified parameter is not found, will return false.
|
561 |
-
*
|
562 |
-
* @since 7.0.5
|
563 |
-
*
|
564 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
565 |
-
* @param int $stackPtr The position of the function call token.
|
566 |
-
* @param int $paramOffset The 1-based index position of the parameter to retrieve.
|
567 |
-
*
|
568 |
-
* @return array|false
|
569 |
-
*/
|
570 |
-
public function getFunctionCallParameter(File $phpcsFile, $stackPtr, $paramOffset)
|
571 |
-
{
|
572 |
-
$parameters = $this->getFunctionCallParameters($phpcsFile, $stackPtr);
|
573 |
-
|
574 |
-
if (isset($parameters[$paramOffset]) === false) {
|
575 |
-
return false;
|
576 |
-
} else {
|
577 |
-
return $parameters[$paramOffset];
|
578 |
-
}
|
579 |
-
}
|
580 |
-
|
581 |
-
|
582 |
-
/**
|
583 |
-
* Verify whether a token is within a scoped condition.
|
584 |
-
*
|
585 |
-
* If the optional $validScopes parameter has been passed, the function
|
586 |
-
* will check that the token has at least one condition which is of a
|
587 |
-
* type defined in $validScopes.
|
588 |
-
*
|
589 |
-
* @since 7.0.5 Largely split off from the `inClassScope()` method.
|
590 |
-
*
|
591 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
592 |
-
* @param int $stackPtr The position of the token.
|
593 |
-
* @param array|int $validScopes Optional. Array of valid scopes
|
594 |
-
* or int value of a valid scope.
|
595 |
-
* Pass the T_.. constant(s) for the
|
596 |
-
* desired scope to this parameter.
|
597 |
-
*
|
598 |
-
* @return bool Without the optional $scopeTypes: True if within a scope, false otherwise.
|
599 |
-
* If the $scopeTypes are set: True if *one* of the conditions is a
|
600 |
-
* valid scope, false otherwise.
|
601 |
-
*/
|
602 |
-
public function tokenHasScope(File $phpcsFile, $stackPtr, $validScopes = null)
|
603 |
-
{
|
604 |
-
$tokens = $phpcsFile->getTokens();
|
605 |
-
|
606 |
-
// Check for the existence of the token.
|
607 |
-
if (isset($tokens[$stackPtr]) === false) {
|
608 |
-
return false;
|
609 |
-
}
|
610 |
-
|
611 |
-
// No conditions = no scope.
|
612 |
-
if (empty($tokens[$stackPtr]['conditions'])) {
|
613 |
-
return false;
|
614 |
-
}
|
615 |
-
|
616 |
-
// Ok, there are conditions, do we have to check for specific ones ?
|
617 |
-
if (isset($validScopes) === false) {
|
618 |
-
return true;
|
619 |
-
}
|
620 |
-
|
621 |
-
return $phpcsFile->hasCondition($stackPtr, $validScopes);
|
622 |
-
}
|
623 |
-
|
624 |
-
|
625 |
-
/**
|
626 |
-
* Verify whether a token is within a class scope.
|
627 |
-
*
|
628 |
-
* @since 7.0.3
|
629 |
-
*
|
630 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
631 |
-
* @param int $stackPtr The position of the token.
|
632 |
-
* @param bool $strict Whether to strictly check for the T_CLASS
|
633 |
-
* scope or also accept interfaces and traits
|
634 |
-
* as scope.
|
635 |
-
*
|
636 |
-
* @return bool True if within class scope, false otherwise.
|
637 |
-
*/
|
638 |
-
public function inClassScope(File $phpcsFile, $stackPtr, $strict = true)
|
639 |
-
{
|
640 |
-
$validScopes = array(\T_CLASS);
|
641 |
-
if (\defined('T_ANON_CLASS') === true) {
|
642 |
-
$validScopes[] = \T_ANON_CLASS;
|
643 |
-
}
|
644 |
-
|
645 |
-
if ($strict === false) {
|
646 |
-
$validScopes[] = \T_INTERFACE;
|
647 |
-
$validScopes[] = \T_TRAIT;
|
648 |
-
}
|
649 |
-
|
650 |
-
return $phpcsFile->hasCondition($stackPtr, $validScopes);
|
651 |
-
}
|
652 |
-
|
653 |
-
|
654 |
-
/**
|
655 |
-
* Returns the fully qualified class name for a new class instantiation.
|
656 |
-
*
|
657 |
-
* Returns an empty string if the class name could not be reliably inferred.
|
658 |
-
*
|
659 |
-
* @since 7.0.3
|
660 |
-
*
|
661 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
662 |
-
* @param int $stackPtr The position of a T_NEW token.
|
663 |
-
*
|
664 |
-
* @return string
|
665 |
-
*/
|
666 |
-
public function getFQClassNameFromNewToken(File $phpcsFile, $stackPtr)
|
667 |
-
{
|
668 |
-
$tokens = $phpcsFile->getTokens();
|
669 |
-
|
670 |
-
// Check for the existence of the token.
|
671 |
-
if (isset($tokens[$stackPtr]) === false) {
|
672 |
-
return '';
|
673 |
-
}
|
674 |
-
|
675 |
-
if ($tokens[$stackPtr]['code'] !== \T_NEW) {
|
676 |
-
return '';
|
677 |
-
}
|
678 |
-
|
679 |
-
$start = $phpcsFile->findNext(Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true);
|
680 |
-
if ($start === false) {
|
681 |
-
return '';
|
682 |
-
}
|
683 |
-
|
684 |
-
// Bow out if the next token is a variable as we don't know where it was defined.
|
685 |
-
if ($tokens[$start]['code'] === \T_VARIABLE) {
|
686 |
-
return '';
|
687 |
-
}
|
688 |
-
|
689 |
-
// Bow out if the next token is the class keyword.
|
690 |
-
if ($tokens[$start]['type'] === 'T_ANON_CLASS' || $tokens[$start]['code'] === \T_CLASS) {
|
691 |
-
return '';
|
692 |
-
}
|
693 |
-
|
694 |
-
$find = array(
|
695 |
-
\T_NS_SEPARATOR,
|
696 |
-
\T_STRING,
|
697 |
-
\T_NAMESPACE,
|
698 |
-
\T_WHITESPACE,
|
699 |
-
);
|
700 |
-
|
701 |
-
$end = $phpcsFile->findNext($find, ($start + 1), null, true, null, true);
|
702 |
-
$className = $phpcsFile->getTokensAsString($start, ($end - $start));
|
703 |
-
$className = trim($className);
|
704 |
-
|
705 |
-
return $this->getFQName($phpcsFile, $stackPtr, $className);
|
706 |
-
}
|
707 |
-
|
708 |
-
|
709 |
-
/**
|
710 |
-
* Returns the fully qualified name of the class that the specified class extends.
|
711 |
-
*
|
712 |
-
* Returns an empty string if the class does not extend another class or if
|
713 |
-
* the class name could not be reliably inferred.
|
714 |
-
*
|
715 |
-
* @since 7.0.3
|
716 |
-
*
|
717 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
718 |
-
* @param int $stackPtr The position of a T_CLASS token.
|
719 |
-
*
|
720 |
-
* @return string
|
721 |
-
*/
|
722 |
-
public function getFQExtendedClassName(File $phpcsFile, $stackPtr)
|
723 |
-
{
|
724 |
-
$tokens = $phpcsFile->getTokens();
|
725 |
-
|
726 |
-
// Check for the existence of the token.
|
727 |
-
if (isset($tokens[$stackPtr]) === false) {
|
728 |
-
return '';
|
729 |
-
}
|
730 |
-
|
731 |
-
if ($tokens[$stackPtr]['code'] !== \T_CLASS
|
732 |
-
&& $tokens[$stackPtr]['type'] !== 'T_ANON_CLASS'
|
733 |
-
&& $tokens[$stackPtr]['type'] !== 'T_INTERFACE'
|
734 |
-
) {
|
735 |
-
return '';
|
736 |
-
}
|
737 |
-
|
738 |
-
$extends = PHPCSHelper::findExtendedClassName($phpcsFile, $stackPtr);
|
739 |
-
if (empty($extends) || \is_string($extends) === false) {
|
740 |
-
return '';
|
741 |
-
}
|
742 |
-
|
743 |
-
return $this->getFQName($phpcsFile, $stackPtr, $extends);
|
744 |
-
}
|
745 |
-
|
746 |
-
|
747 |
-
/**
|
748 |
-
* Returns the class name for the static usage of a class.
|
749 |
-
* This can be a call to a method, the use of a property or constant.
|
750 |
-
*
|
751 |
-
* Returns an empty string if the class name could not be reliably inferred.
|
752 |
-
*
|
753 |
-
* @since 7.0.3
|
754 |
-
*
|
755 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
756 |
-
* @param int $stackPtr The position of a T_NEW token.
|
757 |
-
*
|
758 |
-
* @return string
|
759 |
-
*/
|
760 |
-
public function getFQClassNameFromDoubleColonToken(File $phpcsFile, $stackPtr)
|
761 |
-
{
|
762 |
-
$tokens = $phpcsFile->getTokens();
|
763 |
-
|
764 |
-
// Check for the existence of the token.
|
765 |
-
if (isset($tokens[$stackPtr]) === false) {
|
766 |
-
return '';
|
767 |
-
}
|
768 |
-
|
769 |
-
if ($tokens[$stackPtr]['code'] !== \T_DOUBLE_COLON) {
|
770 |
-
return '';
|
771 |
-
}
|
772 |
-
|
773 |
-
// Nothing to do if previous token is a variable as we don't know where it was defined.
|
774 |
-
if ($tokens[$stackPtr - 1]['code'] === \T_VARIABLE) {
|
775 |
-
return '';
|
776 |
-
}
|
777 |
-
|
778 |
-
// Nothing to do if 'parent' or 'static' as we don't know how far the class tree extends.
|
779 |
-
if (\in_array($tokens[$stackPtr - 1]['code'], array(\T_PARENT, \T_STATIC), true)) {
|
780 |
-
return '';
|
781 |
-
}
|
782 |
-
|
783 |
-
// Get the classname from the class declaration if self is used.
|
784 |
-
if ($tokens[$stackPtr - 1]['code'] === \T_SELF) {
|
785 |
-
$classDeclarationPtr = $phpcsFile->findPrevious(\T_CLASS, $stackPtr - 1);
|
786 |
-
if ($classDeclarationPtr === false) {
|
787 |
-
return '';
|
788 |
-
}
|
789 |
-
$className = $phpcsFile->getDeclarationName($classDeclarationPtr);
|
790 |
-
return $this->getFQName($phpcsFile, $classDeclarationPtr, $className);
|
791 |
-
}
|
792 |
-
|
793 |
-
$find = array(
|
794 |
-
\T_NS_SEPARATOR,
|
795 |
-
\T_STRING,
|
796 |
-
\T_NAMESPACE,
|
797 |
-
\T_WHITESPACE,
|
798 |
-
);
|
799 |
-
|
800 |
-
$start = $phpcsFile->findPrevious($find, $stackPtr - 1, null, true, null, true);
|
801 |
-
if ($start === false || isset($tokens[($start + 1)]) === false) {
|
802 |
-
return '';
|
803 |
-
}
|
804 |
-
|
805 |
-
$start = ($start + 1);
|
806 |
-
$className = $phpcsFile->getTokensAsString($start, ($stackPtr - $start));
|
807 |
-
$className = trim($className);
|
808 |
-
|
809 |
-
return $this->getFQName($phpcsFile, $stackPtr, $className);
|
810 |
-
}
|
811 |
-
|
812 |
-
|
813 |
-
/**
|
814 |
-
* Get the Fully Qualified name for a class/function/constant etc.
|
815 |
-
*
|
816 |
-
* Checks if a class/function/constant name is already fully qualified and
|
817 |
-
* if not, enrich it with the relevant namespace information.
|
818 |
-
*
|
819 |
-
* @since 7.0.3
|
820 |
-
*
|
821 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
822 |
-
* @param int $stackPtr The position of the token.
|
823 |
-
* @param string $name The class / function / constant name.
|
824 |
-
*
|
825 |
-
* @return string
|
826 |
-
*/
|
827 |
-
public function getFQName(File $phpcsFile, $stackPtr, $name)
|
828 |
-
{
|
829 |
-
if (strpos($name, '\\') === 0) {
|
830 |
-
// Already fully qualified.
|
831 |
-
return $name;
|
832 |
-
}
|
833 |
-
|
834 |
-
// Remove the namespace keyword if used.
|
835 |
-
if (strpos($name, 'namespace\\') === 0) {
|
836 |
-
$name = substr($name, 10);
|
837 |
-
}
|
838 |
-
|
839 |
-
$namespace = $this->determineNamespace($phpcsFile, $stackPtr);
|
840 |
-
|
841 |
-
if ($namespace === '') {
|
842 |
-
return '\\' . $name;
|
843 |
-
} else {
|
844 |
-
return '\\' . $namespace . '\\' . $name;
|
845 |
-
}
|
846 |
-
}
|
847 |
-
|
848 |
-
|
849 |
-
/**
|
850 |
-
* Is the class/function/constant name namespaced or global ?
|
851 |
-
*
|
852 |
-
* @since 7.0.3
|
853 |
-
*
|
854 |
-
* @param string $FQName Fully Qualified name of a class, function etc.
|
855 |
-
* I.e. should always start with a `\`.
|
856 |
-
*
|
857 |
-
* @return bool True if namespaced, false if global.
|
858 |
-
*
|
859 |
-
* @throws \PHP_CodeSniffer_Exception If the name in the passed parameter
|
860 |
-
* is not fully qualified.
|
861 |
-
*/
|
862 |
-
public function isNamespaced($FQName)
|
863 |
-
{
|
864 |
-
if (strpos($FQName, '\\') !== 0) {
|
865 |
-
throw new PHPCS_Exception('$FQName must be a fully qualified name');
|
866 |
-
}
|
867 |
-
|
868 |
-
return (strpos(substr($FQName, 1), '\\') !== false);
|
869 |
-
}
|
870 |
-
|
871 |
-
|
872 |
-
/**
|
873 |
-
* Determine the namespace name an arbitrary token lives in.
|
874 |
-
*
|
875 |
-
* @since 7.0.3
|
876 |
-
*
|
877 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
878 |
-
* @param int $stackPtr The token position for which to determine the namespace.
|
879 |
-
*
|
880 |
-
* @return string Namespace name or empty string if it couldn't be determined or no namespace applies.
|
881 |
-
*/
|
882 |
-
public function determineNamespace(File $phpcsFile, $stackPtr)
|
883 |
-
{
|
884 |
-
$tokens = $phpcsFile->getTokens();
|
885 |
-
|
886 |
-
// Check for the existence of the token.
|
887 |
-
if (isset($tokens[$stackPtr]) === false) {
|
888 |
-
return '';
|
889 |
-
}
|
890 |
-
|
891 |
-
// Check for scoped namespace {}.
|
892 |
-
if (empty($tokens[$stackPtr]['conditions']) === false) {
|
893 |
-
$namespacePtr = $phpcsFile->getCondition($stackPtr, \T_NAMESPACE);
|
894 |
-
if ($namespacePtr !== false) {
|
895 |
-
$namespace = $this->getDeclaredNamespaceName($phpcsFile, $namespacePtr);
|
896 |
-
if ($namespace !== false) {
|
897 |
-
return $namespace;
|
898 |
-
}
|
899 |
-
|
900 |
-
// We are in a scoped namespace, but couldn't determine the name. Searching for a global namespace is futile.
|
901 |
-
return '';
|
902 |
-
}
|
903 |
-
}
|
904 |
-
|
905 |
-
/*
|
906 |
-
* Not in a scoped namespace, so let's see if we can find a non-scoped namespace instead.
|
907 |
-
* Keeping in mind that:
|
908 |
-
* - there can be multiple non-scoped namespaces in a file (bad practice, but it happens).
|
909 |
-
* - the namespace keyword can also be used as part of a function/method call and such.
|
910 |
-
* - that a non-named namespace resolves to the global namespace.
|
911 |
-
*/
|
912 |
-
$previousNSToken = $stackPtr;
|
913 |
-
$namespace = false;
|
914 |
-
do {
|
915 |
-
$previousNSToken = $phpcsFile->findPrevious(\T_NAMESPACE, ($previousNSToken - 1));
|
916 |
-
|
917 |
-
// Stop if we encounter a scoped namespace declaration as we already know we're not in one.
|
918 |
-
if (empty($tokens[$previousNSToken]['scope_condition']) === false && $tokens[$previousNSToken]['scope_condition'] === $previousNSToken) {
|
919 |
-
break;
|
920 |
-
}
|
921 |
-
|
922 |
-
$namespace = $this->getDeclaredNamespaceName($phpcsFile, $previousNSToken);
|
923 |
-
|
924 |
-
} while ($namespace === false && $previousNSToken !== false);
|
925 |
-
|
926 |
-
// If we still haven't got a namespace, return an empty string.
|
927 |
-
if ($namespace === false) {
|
928 |
-
return '';
|
929 |
-
} else {
|
930 |
-
return $namespace;
|
931 |
-
}
|
932 |
-
}
|
933 |
-
|
934 |
-
/**
|
935 |
-
* Get the complete namespace name for a namespace declaration.
|
936 |
-
*
|
937 |
-
* For hierarchical namespaces, the name will be composed of several tokens,
|
938 |
-
* i.e. MyProject\Sub\Level which will be returned together as one string.
|
939 |
-
*
|
940 |
-
* @since 7.0.3
|
941 |
-
*
|
942 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
943 |
-
* @param int|bool $stackPtr The position of a T_NAMESPACE token.
|
944 |
-
*
|
945 |
-
* @return string|false Namespace name or false if not a namespace declaration.
|
946 |
-
* Namespace name can be an empty string for global namespace declaration.
|
947 |
-
*/
|
948 |
-
public function getDeclaredNamespaceName(File $phpcsFile, $stackPtr)
|
949 |
-
{
|
950 |
-
$tokens = $phpcsFile->getTokens();
|
951 |
-
|
952 |
-
// Check for the existence of the token.
|
953 |
-
if ($stackPtr === false || isset($tokens[$stackPtr]) === false) {
|
954 |
-
return false;
|
955 |
-
}
|
956 |
-
|
957 |
-
if ($tokens[$stackPtr]['code'] !== \T_NAMESPACE) {
|
958 |
-
return false;
|
959 |
-
}
|
960 |
-
|
961 |
-
if ($tokens[($stackPtr + 1)]['code'] === \T_NS_SEPARATOR) {
|
962 |
-
// Not a namespace declaration, but use of, i.e. `namespace\someFunction();`.
|
963 |
-
return false;
|
964 |
-
}
|
965 |
-
|
966 |
-
$nextToken = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true, null, true);
|
967 |
-
if ($tokens[$nextToken]['code'] === \T_OPEN_CURLY_BRACKET) {
|
968 |
-
/*
|
969 |
-
* Declaration for global namespace when using multiple namespaces in a file.
|
970 |
-
* I.e.: `namespace {}`.
|
971 |
-
*/
|
972 |
-
return '';
|
973 |
-
}
|
974 |
-
|
975 |
-
// Ok, this should be a namespace declaration, so get all the parts together.
|
976 |
-
$validTokens = array(
|
977 |
-
\T_STRING => true,
|
978 |
-
\T_NS_SEPARATOR => true,
|
979 |
-
\T_WHITESPACE => true,
|
980 |
-
);
|
981 |
-
|
982 |
-
$namespaceName = '';
|
983 |
-
while (isset($validTokens[$tokens[$nextToken]['code']]) === true) {
|
984 |
-
$namespaceName .= trim($tokens[$nextToken]['content']);
|
985 |
-
$nextToken++;
|
986 |
-
}
|
987 |
-
|
988 |
-
return $namespaceName;
|
989 |
-
}
|
990 |
-
|
991 |
-
|
992 |
-
/**
|
993 |
-
* Get the stack pointer for a return type token for a given function.
|
994 |
-
*
|
995 |
-
* Compatible layer for older PHPCS versions which don't recognize
|
996 |
-
* return type hints correctly.
|
997 |
-
*
|
998 |
-
* Expects to be passed T_RETURN_TYPE, T_FUNCTION or T_CLOSURE token.
|
999 |
-
*
|
1000 |
-
* @since 7.1.2
|
1001 |
-
*
|
1002 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
1003 |
-
* @param int $stackPtr The position of the token.
|
1004 |
-
*
|
1005 |
-
* @return int|false Stack pointer to the return type token or false if
|
1006 |
-
* no return type was found or the passed token was
|
1007 |
-
* not of the correct type.
|
1008 |
-
*/
|
1009 |
-
public function getReturnTypeHintToken(File $phpcsFile, $stackPtr)
|
1010 |
-
{
|
1011 |
-
$tokens = $phpcsFile->getTokens();
|
1012 |
-
|
1013 |
-
if (\defined('T_RETURN_TYPE') && $tokens[$stackPtr]['code'] === \T_RETURN_TYPE) {
|
1014 |
-
return $stackPtr;
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
if ($tokens[$stackPtr]['code'] !== \T_FUNCTION && $tokens[$stackPtr]['code'] !== \T_CLOSURE) {
|
1018 |
-
return false;
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
if (isset($tokens[$stackPtr]['parenthesis_closer']) === false) {
|
1022 |
-
return false;
|
1023 |
-
}
|
1024 |
-
|
1025 |
-
// Allow for interface and abstract method declarations.
|
1026 |
-
$endOfFunctionDeclaration = null;
|
1027 |
-
if (isset($tokens[$stackPtr]['scope_opener'])) {
|
1028 |
-
$endOfFunctionDeclaration = $tokens[$stackPtr]['scope_opener'];
|
1029 |
-
} else {
|
1030 |
-
$nextSemiColon = $phpcsFile->findNext(\T_SEMICOLON, ($tokens[$stackPtr]['parenthesis_closer'] + 1), null, false, null, true);
|
1031 |
-
if ($nextSemiColon !== false) {
|
1032 |
-
$endOfFunctionDeclaration = $nextSemiColon;
|
1033 |
-
}
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
if (isset($endOfFunctionDeclaration) === false) {
|
1037 |
-
return false;
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
$hasColon = $phpcsFile->findNext(
|
1041 |
-
array(\T_COLON, \T_INLINE_ELSE),
|
1042 |
-
($tokens[$stackPtr]['parenthesis_closer'] + 1),
|
1043 |
-
$endOfFunctionDeclaration
|
1044 |
-
);
|
1045 |
-
if ($hasColon === false) {
|
1046 |
-
return false;
|
1047 |
-
}
|
1048 |
-
|
1049 |
-
/*
|
1050 |
-
* - `self`, `parent` and `callable` are not being recognized as return types in PHPCS < 2.6.0.
|
1051 |
-
* - Return types are not recognized at all in PHPCS < 2.4.0.
|
1052 |
-
* - The T_RETURN_TYPE token is defined, but no longer in use since PHPCS 3.3.0+.
|
1053 |
-
* The token will now be tokenized as T_STRING.
|
1054 |
-
* - An `array` (return) type declaration was tokenized as `T_ARRAY_HINT` in PHPCS 2.3.3 - 3.2.3
|
1055 |
-
* to prevent confusing sniffs looking for array declarations.
|
1056 |
-
* As of PHPCS 3.3.0 `array` as a type declaration will be tokenized as `T_STRING`.
|
1057 |
-
*/
|
1058 |
-
$unrecognizedTypes = array(
|
1059 |
-
\T_CALLABLE,
|
1060 |
-
\T_SELF,
|
1061 |
-
\T_PARENT,
|
1062 |
-
\T_ARRAY, // PHPCS < 2.4.0.
|
1063 |
-
\T_STRING,
|
1064 |
-
);
|
1065 |
-
|
1066 |
-
return $phpcsFile->findPrevious($unrecognizedTypes, ($endOfFunctionDeclaration - 1), $hasColon);
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
|
1070 |
-
/**
|
1071 |
-
* Get the complete return type declaration for a given function.
|
1072 |
-
*
|
1073 |
-
* Cross-version compatible way to retrieve the complete return type declaration.
|
1074 |
-
*
|
1075 |
-
* For a classname-based return type, PHPCS, as well as the Sniff::getReturnTypeHintToken()
|
1076 |
-
* method will mark the classname as the return type token.
|
1077 |
-
* This method will find preceeding namespaces and namespace separators and will return a
|
1078 |
-
* string containing the qualified return type declaration.
|
1079 |
-
*
|
1080 |
-
* Expects to be passed a T_RETURN_TYPE token or the return value from a call to
|
1081 |
-
* the Sniff::getReturnTypeHintToken() method.
|
1082 |
-
*
|
1083 |
-
* @since 8.2.0
|
1084 |
-
*
|
1085 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
1086 |
-
* @param int $stackPtr The position of the return type token.
|
1087 |
-
*
|
1088 |
-
* @return string The name of the return type token.
|
1089 |
-
*/
|
1090 |
-
public function getReturnTypeHintName(File $phpcsFile, $stackPtr)
|
1091 |
-
{
|
1092 |
-
$tokens = $phpcsFile->getTokens();
|
1093 |
-
|
1094 |
-
// In older PHPCS versions, the nullable indicator will turn a return type colon into a T_INLINE_ELSE.
|
1095 |
-
$colon = $phpcsFile->findPrevious(array(\T_COLON, \T_INLINE_ELSE, \T_FUNCTION, \T_CLOSE_PARENTHESIS), ($stackPtr - 1));
|
1096 |
-
if ($colon === false
|
1097 |
-
|| ($tokens[$colon]['code'] !== \T_COLON && $tokens[$colon]['code'] !== \T_INLINE_ELSE)
|
1098 |
-
) {
|
1099 |
-
// Shouldn't happen, just in case.
|
1100 |
-
return '';
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
$returnTypeHint = '';
|
1104 |
-
for ($i = ($colon + 1); $i <= $stackPtr; $i++) {
|
1105 |
-
// As of PHPCS 3.3.0+, all tokens are tokenized as "normal", so T_CALLABLE, T_SELF etc are
|
1106 |
-
// all possible, just exclude anything that's regarded as empty and the nullable indicator.
|
1107 |
-
if (isset(Tokens::$emptyTokens[$tokens[$i]['code']])) {
|
1108 |
-
continue;
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
if ($tokens[$i]['type'] === 'T_NULLABLE') {
|
1112 |
-
continue;
|
1113 |
-
}
|
1114 |
-
|
1115 |
-
if (\defined('T_NULLABLE') === false && $tokens[$i]['code'] === \T_INLINE_THEN) {
|
1116 |
-
// Old PHPCS.
|
1117 |
-
continue;
|
1118 |
-
}
|
1119 |
-
|
1120 |
-
$returnTypeHint .= $tokens[$i]['content'];
|
1121 |
-
}
|
1122 |
-
|
1123 |
-
return $returnTypeHint;
|
1124 |
-
}
|
1125 |
-
|
1126 |
-
|
1127 |
-
/**
|
1128 |
-
* Check whether a T_VARIABLE token is a class property declaration.
|
1129 |
-
*
|
1130 |
-
* Compatibility layer for PHPCS cross-version compatibility
|
1131 |
-
* as PHPCS 2.4.0 - 2.7.1 does not have good enough support for
|
1132 |
-
* anonymous classes. Along the same lines, the`getMemberProperties()`
|
1133 |
-
* method does not support the `var` prefix.
|
1134 |
-
*
|
1135 |
-
* @since 7.1.4
|
1136 |
-
*
|
1137 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
1138 |
-
* @param int $stackPtr The position in the stack of the
|
1139 |
-
* T_VARIABLE token to verify.
|
1140 |
-
*
|
1141 |
-
* @return bool
|
1142 |
-
*/
|
1143 |
-
public function isClassProperty(File $phpcsFile, $stackPtr)
|
1144 |
-
{
|
1145 |
-
$tokens = $phpcsFile->getTokens();
|
1146 |
-
|
1147 |
-
if (isset($tokens[$stackPtr]) === false || $tokens[$stackPtr]['code'] !== \T_VARIABLE) {
|
1148 |
-
return false;
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
// Note: interfaces can not declare properties.
|
1152 |
-
$validScopes = array(
|
1153 |
-
'T_CLASS' => true,
|
1154 |
-
'T_ANON_CLASS' => true,
|
1155 |
-
'T_TRAIT' => true,
|
1156 |
-
);
|
1157 |
-
|
1158 |
-
$scopePtr = $this->validDirectScope($phpcsFile, $stackPtr, $validScopes);
|
1159 |
-
if ($scopePtr !== false) {
|
1160 |
-
// Make sure it's not a method parameter.
|
1161 |
-
if (empty($tokens[$stackPtr]['nested_parenthesis']) === true) {
|
1162 |
-
return true;
|
1163 |
-
} else {
|
1164 |
-
$parenthesis = array_keys($tokens[$stackPtr]['nested_parenthesis']);
|
1165 |
-
$deepestOpen = array_pop($parenthesis);
|
1166 |
-
if ($deepestOpen < $scopePtr
|
1167 |
-
|| isset($tokens[$deepestOpen]['parenthesis_owner']) === false
|
1168 |
-
|| $tokens[$tokens[$deepestOpen]['parenthesis_owner']]['code'] !== \T_FUNCTION
|
1169 |
-
) {
|
1170 |
-
return true;
|
1171 |
-
}
|
1172 |
-
}
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
return false;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
|
1179 |
-
/**
|
1180 |
-
* Check whether a T_CONST token is a class constant declaration.
|
1181 |
-
*
|
1182 |
-
* @since 7.1.4
|
1183 |
-
*
|
1184 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
1185 |
-
* @param int $stackPtr The position in the stack of the
|
1186 |
-
* T_CONST token to verify.
|
1187 |
-
*
|
1188 |
-
* @return bool
|
1189 |
-
*/
|
1190 |
-
public function isClassConstant(File $phpcsFile, $stackPtr)
|
1191 |
-
{
|
1192 |
-
$tokens = $phpcsFile->getTokens();
|
1193 |
-
|
1194 |
-
if (isset($tokens[$stackPtr]) === false || $tokens[$stackPtr]['code'] !== \T_CONST) {
|
1195 |
-
return false;
|
1196 |
-
}
|
1197 |
-
|
1198 |
-
// Note: traits can not declare constants.
|
1199 |
-
$validScopes = array(
|
1200 |
-
'T_CLASS' => true,
|
1201 |
-
'T_ANON_CLASS' => true,
|
1202 |
-
'T_INTERFACE' => true,
|
1203 |
-
);
|
1204 |
-
if ($this->validDirectScope($phpcsFile, $stackPtr, $validScopes) !== false) {
|
1205 |
-
return true;
|
1206 |
-
}
|
1207 |
-
|
1208 |
-
return false;
|
1209 |
-
}
|
1210 |
-
|
1211 |
-
|
1212 |
-
/**
|
1213 |
-
* Check whether the direct wrapping scope of a token is within a limited set of
|
1214 |
-
* acceptable tokens.
|
1215 |
-
*
|
1216 |
-
* Used to check, for instance, if a T_CONST is a class constant.
|
1217 |
-
*
|
1218 |
-
* @since 7.1.4
|
1219 |
-
*
|
1220 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
1221 |
-
* @param int $stackPtr The position in the stack of the
|
1222 |
-
* token to verify.
|
1223 |
-
* @param array $validScopes Array of token types.
|
1224 |
-
* Keys should be the token types in string
|
1225 |
-
* format to allow for newer token types.
|
1226 |
-
* Value is irrelevant.
|
1227 |
-
*
|
1228 |
-
* @return int|bool StackPtr to the scope if valid, false otherwise.
|
1229 |
-
*/
|
1230 |
-
protected function validDirectScope(File $phpcsFile, $stackPtr, $validScopes)
|
1231 |
-
{
|
1232 |
-
$tokens = $phpcsFile->getTokens();
|
1233 |
-
|
1234 |
-
if (empty($tokens[$stackPtr]['conditions']) === true) {
|
1235 |
-
return false;
|
1236 |
-
}
|
1237 |
-
|
1238 |
-
/*
|
1239 |
-
* Check only the direct wrapping scope of the token.
|
1240 |
-
*/
|
1241 |
-
$conditions = array_keys($tokens[$stackPtr]['conditions']);
|
1242 |
-
$ptr = array_pop($conditions);
|
1243 |
-
|
1244 |
-
if (isset($tokens[$ptr]) === false) {
|
1245 |
-
return false;
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
if (isset($validScopes[$tokens[$ptr]['type']]) === true) {
|
1249 |
-
return $ptr;
|
1250 |
-
}
|
1251 |
-
|
1252 |
-
return false;
|
1253 |
-
}
|
1254 |
-
|
1255 |
-
|
1256 |
-
/**
|
1257 |
-
* Get an array of just the type hints from a function declaration.
|
1258 |
-
*
|
1259 |
-
* Expects to be passed T_FUNCTION or T_CLOSURE token.
|
1260 |
-
*
|
1261 |
-
* Strips potential nullable indicator and potential global namespace
|
1262 |
-
* indicator from the type hints before returning them.
|
1263 |
-
*
|
1264 |
-
* @since 7.1.4
|
1265 |
-
*
|
1266 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
1267 |
-
* @param int $stackPtr The position of the token.
|
1268 |
-
*
|
1269 |
-
* @return array Array with type hints or an empty array if
|
1270 |
-
* - the function does not have any parameters
|
1271 |
-
* - no type hints were found
|
1272 |
-
* - or the passed token was not of the correct type.
|
1273 |
-
*/
|
1274 |
-
public function getTypeHintsFromFunctionDeclaration(File $phpcsFile, $stackPtr)
|
1275 |
-
{
|
1276 |
-
$tokens = $phpcsFile->getTokens();
|
1277 |
-
|
1278 |
-
if ($tokens[$stackPtr]['code'] !== \T_FUNCTION && $tokens[$stackPtr]['code'] !== \T_CLOSURE) {
|
1279 |
-
return array();
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
$parameters = PHPCSHelper::getMethodParameters($phpcsFile, $stackPtr);
|
1283 |
-
if (empty($parameters) || \is_array($parameters) === false) {
|
1284 |
-
return array();
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
$typeHints = array();
|
1288 |
-
|
1289 |
-
foreach ($parameters as $param) {
|
1290 |
-
if ($param['type_hint'] === '') {
|
1291 |
-
continue;
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
// Strip off potential nullable indication.
|
1295 |
-
$typeHint = ltrim($param['type_hint'], '?');
|
1296 |
-
|
1297 |
-
// Strip off potential (global) namespace indication.
|
1298 |
-
$typeHint = ltrim($typeHint, '\\');
|
1299 |
-
|
1300 |
-
if ($typeHint !== '') {
|
1301 |
-
$typeHints[] = $typeHint;
|
1302 |
-
}
|
1303 |
-
}
|
1304 |
-
|
1305 |
-
return $typeHints;
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
|
1309 |
-
/**
|
1310 |
-
* Get the hash algorithm name from the parameter in a hash function call.
|
1311 |
-
*
|
1312 |
-
* @since 7.0.7 Logic was originally contained in the `RemovedHashAlgorithms` sniff.
|
1313 |
-
*
|
1314 |
-
* @param \PHP_CodeSniffer_File $phpcsFile Instance of phpcsFile.
|
1315 |
-
* @param int $stackPtr The position of the T_STRING function token.
|
1316 |
-
*
|
1317 |
-
* @return string|false The algorithm name without quotes if this was a relevant hash
|
1318 |
-
* function call or false if it was not.
|
1319 |
-
*/
|
1320 |
-
public function getHashAlgorithmParameter(File $phpcsFile, $stackPtr)
|
1321 |
-
{
|
1322 |
-
$tokens = $phpcsFile->getTokens();
|
1323 |
-
|
1324 |
-
// Check for the existence of the token.
|
1325 |
-
if (isset($tokens[$stackPtr]) === false) {
|
1326 |
-
return false;
|
1327 |
-
}
|
1328 |
-
|
1329 |
-
if ($tokens[$stackPtr]['code'] !== \T_STRING) {
|
1330 |
-
return false;
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
$functionName = $tokens[$stackPtr]['content'];
|
1334 |
-
$functionNameLc = strtolower($functionName);
|
1335 |
-
|
1336 |
-
// Bow out if not one of the functions we're targetting.
|
1337 |
-
if (isset($this->hashAlgoFunctions[$functionNameLc]) === false) {
|
1338 |
-
return false;
|
1339 |
-
}
|
1340 |
-
|
1341 |
-
// Get the parameter from the function call which should contain the algorithm name.
|
1342 |
-
$algoParam = $this->getFunctionCallParameter($phpcsFile, $stackPtr, $this->hashAlgoFunctions[$functionNameLc]);
|
1343 |
-
if ($algoParam === false) {
|
1344 |
-
return false;
|
1345 |
-
}
|
1346 |
-
|
1347 |
-
// Algorithm is a text string, so we need to remove the quotes.
|
1348 |
-
$algo = strtolower(trim($algoParam['raw']));
|
1349 |
-
$algo = $this->stripQuotes($algo);
|
1350 |
-
|
1351 |
-
return $algo;
|
1352 |
-
}
|
1353 |
-
|
1354 |
-
|
1355 |
-
/**
|
1356 |
-
* Determine whether an arbitrary T_STRING token is the use of a global constant.
|
1357 |
-
*
|
1358 |
-
* @since 8.1.0
|
1359 |
-
*
|
1360 |
-
* @param \PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
1361 |
-
* @param int $stackPtr The position of the T_STRING token.
|
1362 |
-
*
|
1363 |
-
* @return bool
|
1364 |
-
*/
|
1365 |
-
public function isUseOfGlobalConstant(File $phpcsFile, $stackPtr)
|
1366 |
-
{
|
1367 |
-
static $isLowPHPCS, $isLowPHP;
|
1368 |
-
|
1369 |
-
$tokens = $phpcsFile->getTokens();
|
1370 |
-
|
1371 |
-
// Check for the existence of the token.
|
1372 |
-
if (isset($tokens[$stackPtr]) === false) {
|
1373 |
-
return false;
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
// Is this one of the tokens this function handles ?
|
1377 |
-
if ($tokens[$stackPtr]['code'] !== \T_STRING) {
|
1378 |
-
return false;
|
1379 |
-
}
|
1380 |
-
|
1381 |
-
// Check for older PHP, PHPCS version so we can compensate for misidentified tokens.
|
1382 |
-
if (isset($isLowPHPCS, $isLowPHP) === false) {
|
1383 |
-
$isLowPHP = false;
|
1384 |
-
$isLowPHPCS = false;
|
1385 |
-
if (version_compare(\PHP_VERSION_ID, '50400', '<')) {
|
1386 |
-
$isLowPHP = true;
|
1387 |
-
$isLowPHPCS = version_compare(PHPCSHelper::getVersion(), '2.4.0', '<');
|
1388 |
-
}
|
1389 |
-
}
|
1390 |
-
|
1391 |
-
$next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true);
|
1392 |
-
if ($next !== false
|
1393 |
-
&& ($tokens[$next]['code'] === \T_OPEN_PARENTHESIS
|
1394 |
-
|| $tokens[$next]['code'] === \T_DOUBLE_COLON)
|
1395 |
-
) {
|
1396 |
-
// Function call or declaration.
|
1397 |
-
return false;
|
1398 |
-
}
|
1399 |
-
|
1400 |
-
// Array of tokens which if found preceding the $stackPtr indicate that a T_STRING is not a global constant.
|
1401 |
-
$tokensToIgnore = array(
|
1402 |
-
'T_NAMESPACE' => true,
|
1403 |
-
'T_USE' => true,
|
1404 |
-
'T_CLASS' => true,
|
1405 |
-
'T_TRAIT' => true,
|
1406 |
-
'T_INTERFACE' => true,
|
1407 |
-
'T_EXTENDS' => true,
|
1408 |
-
'T_IMPLEMENTS' => true,
|
1409 |
-
'T_NEW' => true,
|
1410 |
-
'T_FUNCTION' => true,
|
1411 |
-
'T_DOUBLE_COLON' => true,
|
1412 |
-
'T_OBJECT_OPERATOR' => true,
|
1413 |
-
'T_INSTANCEOF' => true,
|
1414 |
-
'T_INSTEADOF' => true,
|
1415 |
-
'T_GOTO' => true,
|
1416 |
-
'T_AS' => true,
|
1417 |
-
'T_PUBLIC' => true,
|
1418 |
-
'T_PROTECTED' => true,
|
1419 |
-
'T_PRIVATE' => true,
|
1420 |
-
);
|
1421 |
-
|
1422 |
-
$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);
|
1423 |
-
if ($prev !== false
|
1424 |
-
&& (isset($tokensToIgnore[$tokens[$prev]['type']]) === true
|
1425 |
-
|| ($tokens[$prev]['code'] === \T_STRING
|
1426 |
-
&& (($isLowPHPCS === true
|
1427 |
-
&& $tokens[$prev]['content'] === 'trait')
|
1428 |
-
|| ($isLowPHP === true
|
1429 |
-
&& $tokens[$prev]['content'] === 'insteadof'))))
|
1430 |
-
) {
|
1431 |
-
// Not the use of a constant.
|
1432 |
-
return false;
|
1433 |
-
}
|
1434 |
-
|
1435 |
-
if ($prev !== false
|
1436 |
-
&& $tokens[$prev]['code'] === \T_NS_SEPARATOR
|
1437 |
-
&& $tokens[($prev - 1)]['code'] === \T_STRING
|
1438 |
-
) {
|
1439 |
-
// Namespaced constant of the same name.
|
1440 |
-
return false;
|
1441 |
-
}
|
1442 |
-
|
1443 |
-
if ($prev !== false
|
1444 |
-
&& $tokens[$prev]['code'] === \T_CONST
|
1445 |
-
&& $this->isClassConstant($phpcsFile, $prev) === true
|
1446 |
-
) {
|
1447 |
-
// Class constant declaration of the same name.
|
1448 |
-
return false;
|
1449 |
-
}
|
1450 |
-
|
1451 |
-
/*
|
1452 |
-
* Deal with a number of variations of use statements.
|
1453 |
-
*/
|
1454 |
-
for ($i = $stackPtr; $i > 0; $i--) {
|
1455 |
-
if ($tokens[$i]['line'] !== $tokens[$stackPtr]['line']) {
|
1456 |
-
break;
|
1457 |
-
}
|
1458 |
-
}
|
1459 |
-
|
1460 |
-
$firstOnLine = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), null, true);
|
1461 |
-
if ($firstOnLine !== false && $tokens[$firstOnLine]['code'] === \T_USE) {
|
1462 |
-
$nextOnLine = $phpcsFile->findNext(Tokens::$emptyTokens, ($firstOnLine + 1), null, true);
|
1463 |
-
if ($nextOnLine !== false) {
|
1464 |
-
if (($tokens[$nextOnLine]['code'] === \T_STRING && $tokens[$nextOnLine]['content'] === 'const')
|
1465 |
-
|| $tokens[$nextOnLine]['code'] === \T_CONST // Happens in some PHPCS versions.
|
1466 |
-
) {
|
1467 |
-
$hasNsSep = $phpcsFile->findNext(\T_NS_SEPARATOR, ($nextOnLine + 1), $stackPtr);
|
1468 |
-
if ($hasNsSep !== false) {
|
1469 |
-
// Namespaced const (gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|